Skip to content

Commit f99ae39

Browse files
Course List Style Updated
1 parent f35a7e1 commit f99ae39

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

Django + PayPal Online Payment/templates/course_list.html

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<title>{{ course.title }}</title>
77
<!-- Bootstrap CSS -->
88
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" />
9+
<!-- Font Awesome CSS -->
10+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" />
911
<style>
1012
/* Custom styles for the card */
1113
.custom-card {
@@ -43,23 +45,43 @@
4345
.btn-custom:hover {
4446
background-color: #218838; /* Button hover color */
4547
}
48+
49+
/* Custom style for the courses heading */
50+
.courses-heading {
51+
display: flex; /* Use flexbox for alignment */
52+
align-items: center; /* Center items vertically */
53+
justify-content: center; /* Center items horizontally */
54+
font-size: 2rem; /* Font size for heading */
55+
margin-bottom: 20px; /* Space below heading */
56+
color: #333; /* Heading text color */
57+
}
58+
59+
.courses-heading i {
60+
margin-right: 10px; /* Space between icon and text */
61+
color: #007bff; /* Icon color */
62+
}
4663
</style>
4764
</head>
4865
<body>
4966

5067
<div class="container mt-5">
51-
<h1 class="text-center mb-4">Courses</h1>
68+
<h1 class="courses-heading">
69+
<i class="fas fa-book-open"></i> <!-- Book icon -->
70+
Courses
71+
</h1>
5272
<hr>
5373
<div class="row">
5474
{% for course in courses %}
5575
<div class="col-md-3 mb-4">
56-
<div class="card h-100">
76+
<div class="card h-100 custom-card">
5777
<img src="{{ course.image }}" class="card-img-top course-image" alt="{{ course.title }}" style="height: 150px;">
5878
<div class="card-body">
5979
<h2 class="card-title">{{ course.title }}</h2>
6080
<p class="card-text">{{ course.description }}</p>
6181
<p class="card-price">Price: <strong>${{ course.price }}</strong></p>
62-
<a href="{% url 'course_detail' course.id %}" class="btn btn-success">Buy Course</a>
82+
<a href="{% url 'course_detail' course.id %}" class="btn btn-custom">
83+
<i class="fas fa-shopping-cart"></i> Buy Course
84+
</a>
6385
</div>
6486
</div>
6587
</div>

0 commit comments

Comments
 (0)