Skip to content

Commit c699152

Browse files
committed
added all courses to /browse
1 parent 7da8d75 commit c699152

File tree

9 files changed

+44
-63
lines changed

9 files changed

+44
-63
lines changed

__pycache__/data.cpython-38.pyc

154 Bytes
Binary file not shown.
80 Bytes
Binary file not shown.

data.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,16 @@
123123
'price': '$10',
124124
'imageName': 'popular-04.jpg',
125125
'description': 'Learn the basics of HTML and CSS for front-end web development.'
126-
}
126+
}
127+
Angular = {
128+
'courseName': 'Angular',
129+
'name' : 'Angular Devloper',
130+
'logo' : 'angular-plain',
131+
'diffculty' : 'Intermediate',
132+
'duration': '3 Days',
133+
'rating': '4.5',
134+
'price': '$10',
135+
'imageName': 'popular-04.jpg',
136+
'description': 'Angular.'
137+
}
138+

menuData.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,15 @@
1010
data.ML,
1111
data.CSharp,
1212
data.ruby
13+
]
14+
all = [
15+
data.Java,
16+
data.CSharp,
17+
data.ReactJS,
18+
data.ML,
19+
data.JavaScript,
20+
data.Django,
21+
data.Python,
22+
data.HTML,
23+
data.Angular
1324
]
52 Bytes
Binary file not shown.

routes/browse_routes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
'Django': data.Django,
1515
'Python': data.Python,
1616
'HTML': data.HTML,
17+
'Angular': data.Angular
1718
# Add more courses here as needed
1819
}
1920

@@ -37,6 +38,7 @@ def details(course_name):
3738
def browse():
3839
beginner = menuData.beginner
3940
advanced = menuData.advanced
41+
allCourses = menuData.all
4042

4143
# If the form is submitted (POST request), get the search keyword from the form
4244
if request.method == 'POST':
@@ -49,4 +51,4 @@ def browse():
4951
return render_template('browse.html', beginner=beginner, advanced=advanced, search_keyword=search_keyword, search_results=filtered_courses)
5052

5153
# If it's a GET request, show the regular browse page without search results
52-
return render_template('browse.html', beginner=beginner, advanced=advanced)
54+
return render_template('browse.html', beginner=beginner, advanced=advanced, allCourses=allCourses)

templates/browse.html

Lines changed: 14 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ <h4># <em>{{ search_keyword }}</em></h4>
2020
{% else %}
2121
<p>No courses found matching "{{ search_keyword }}".</p>
2222
{% endif %}
23+
24+
{% else %}
2325
{% endif %}
2426

2527
<!-- ***** Most Popular Start ***** -->
@@ -48,72 +50,25 @@ <h4># <em>Advance Coding Courses</em></h4>
4850
</div>
4951
</div>
5052
</div>
51-
<!-- ***** Start Stream Start ***** -->
52-
<div class="start-stream">
53-
<div class="col-lg-12">
54-
<div class="heading-section">
55-
<h4><em>How To Start Your</em> Live Stream</h4>
56-
</div>
57-
<div class="row">
58-
<div class="col-lg-4">
59-
<div class="item">
60-
<div class="icon">
61-
<img
62-
src="{{ url_for('static', filename='assets/images/service-01.jpg') }}"
63-
alt=""
64-
style="max-width: 60px; border-radius: 50%"
65-
/>
66-
</div>
67-
<h4>Go To Your Profile</h4>
68-
<p>
69-
Cyborg Gaming is free HTML CSS website template provided by
70-
TemplateMo. This is Bootstrap v5.2.0 layout.
71-
</p>
72-
</div>
73-
</div>
74-
<div class="col-lg-4">
75-
<div class="item">
76-
<div class="icon">
77-
<img
78-
src="{{ url_for('static', filename='assets/images/service-02.jpg') }}"
79-
alt=""
80-
style="max-width: 60px; border-radius: 50%"
81-
/>
82-
</div>
83-
<h4>Live Stream Button</h4>
84-
<p>
85-
If you wish to support us, you can make a
86-
<a href="https://paypal.me/templatemo" target="_blank"
87-
>small contribution via PayPal</a
88-
>
89-
to info [at] templatemo.com
90-
</p>
91-
</div>
92-
</div>
93-
<div class="col-lg-4">
94-
<div class="item">
95-
<div class="icon">
96-
<img
97-
src="{{ url_for('static', filename='assets/images/service-03.jpg') }}"
98-
alt=""
99-
style="max-width: 60px; border-radius: 50%"
100-
/>
53+
<!-- ***** Start Stream Start ***** -->
54+
<div class="most-popular">
55+
<div class="row">
56+
<div class="col-lg-12">
57+
<div class="heading-section">
58+
<h4># <em>Courses Available</em></h4>
59+
</div>
60+
<div class="row">
61+
<!--macro from here-->
62+
{{ project_list(allCourses) }}
63+
</div>
64+
</div>
10165
</div>
102-
<h4>You Are Live</h4>
103-
<p>
104-
You are not allowed to redistribute this template's downloadable ZIP
105-
file on any other template collection website.
106-
</p>
10766
</div>
108-
</div>
10967
<div class="col-lg-12">
11068
<div class="main-button">
11169
<a href="{{ url_for('profile.profile') }}">Go To Profile</a>
11270
</div>
11371
</div>
114-
</div>
115-
</div>
116-
</div>
11772
<!-- ***** Start Stream End ***** -->
11873

11974
{% endblock %}

templates/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<div class="container">
9999
<div class="row">
100100
<div class="col-lg-12">
101-
<div class="page-content" style="padding-top: 10vh ;">
101+
<div class="page-content" style="padding-top: 8vh ;">
102102
<!--block content start-->
103103
{% block content %}
104104
{% endblock %}

z_CourseAddition.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
1. add data of course in data.py [name, logo, duration, etc.]
22
2. add route mapping in /routes/browse_routes.py
3-
3. add lecturesData in lecturesData.py
3+
3. add lecturesData in lecturesData.py
4+
4. add to all list (optional)

0 commit comments

Comments
 (0)