Skip to content

Commit 3105a88

Browse files
committed
Added new Sponsor button
1 parent a072283 commit 3105a88

File tree

3 files changed

+114
-126
lines changed

3 files changed

+114
-126
lines changed
2.1 KB
Loading

static/assets/images/bmc-button.png

-23.8 KB
Binary file not shown.

templates/layout.html

Lines changed: 114 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,137 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
{% from 'macros/menu.html' import project_list %} {%
4-
from'macros/lectures.html' import lecture_list %}
3+
{% from 'macros/menu.html' import project_list %} {%
4+
from'macros/lectures.html' import lecture_list %}
55

6-
<head>
7-
{% include 'components/headmeta.html' %}
8-
</head>
6+
<head>
7+
{% include 'components/headmeta.html' %}
8+
</head>
99

10-
<body>
11-
<!-- ***** Preloader Start ***** -->
12-
<div id="js-preloader" class="js-preloader">
13-
<div class="preloader-inner">
14-
<span class="dot"></span>
15-
<div class="dots">
16-
<span></span>
17-
<span></span>
18-
<span></span>
19-
</div>
10+
<body>
11+
<!-- ***** Preloader Start ***** -->
12+
<div id="js-preloader" class="js-preloader">
13+
<div class="preloader-inner">
14+
<span class="dot"></span>
15+
<div class="dots">
16+
<span></span>
17+
<span></span>
18+
<span></span>
2019
</div>
2120
</div>
22-
<!-- ***** Preloader End ***** -->
21+
</div>
22+
<!-- ***** Preloader End ***** -->
23+
24+
<!-- ***** Header Area Start ***** -->
25+
<header class="header-area header-sticky">
26+
<div class="container">
27+
<div class="row">
28+
<div class="col-12">
29+
<nav class="main-nav">
30+
<!-- ***** Logo Start ***** -->
31+
<a href="{{ url_for('index.index') }}" class="logo">
32+
<img src="{{ url_for('static', filename='assets/images/logo.png') }}" alt="" />
33+
</a>
34+
<!-- ***** Logo End ***** -->
35+
<!-- ***** Search start ***** -->
36+
<div class="search-input">
37+
<form id="search" method="POST" action="{{ url_for('browse.browse_home') }}">
38+
<input type="text" placeholder="Search Courses" id="searchText" name="searchKeyword"
39+
value="{{ search_keyword }}" /> <!-- Display the search keyword if it was submitted -->
40+
<i type="submit" class="fa fa-search"></i>
2341

24-
<!-- ***** Header Area Start ***** -->
25-
<header class="header-area header-sticky">
26-
<div class="container">
27-
<div class="row">
28-
<div class="col-12">
29-
<nav class="main-nav">
30-
<!-- ***** Logo Start ***** -->
31-
<a href="{{ url_for('index.index') }}" class="logo">
32-
<img
33-
src="{{ url_for('static', filename='assets/images/logo.png') }}"
34-
alt=""
35-
/>
36-
</a>
37-
<!-- ***** Logo End ***** -->
38-
<!-- ***** Search start ***** -->
39-
<div class="search-input">
40-
<form id="search" method="POST" action="{{ url_for('browse.browse_home') }}">
41-
<input
42-
type="text"
43-
placeholder="Search Courses"
44-
id="searchText"
45-
name="searchKeyword"
46-
value="{{ search_keyword }}"
47-
/> <!-- Display the search keyword if it was submitted -->
48-
<i type="submit" class="fa fa-search"></i>
42+
</form>
43+
</div>
44+
<!-- ***** Search End ***** -->
45+
<!-- ***** Menu Start ***** -->
46+
<ul class="nav">
47+
<li>
48+
<a href="{{ url_for('index.index') }}" id="home">Home</a>
49+
</li>
50+
<li>
51+
<a href="{{ url_for('browse.browse_home') }}" id="browse">Browse</a>
52+
</li>
53+
<li>
54+
<a href="{{ url_for('login.login') }}" id="library">History</a>
55+
</li>
56+
<li onclick="window.open('https://github.com/sponsors/codeIntrovert', '_blank');">
57+
<img src="{{ url_for('static', filename='assets/images/SponsorButton.png') }}" alt="" />
58+
</li>
4959

50-
</form>
51-
</div>
52-
<!-- ***** Search End ***** -->
53-
<!-- ***** Menu Start ***** -->
54-
<ul class="nav">
55-
<li>
56-
<a href="{{ url_for('index.index') }}" id="home">Home</a>
57-
</li>
58-
<li>
59-
<a href="{{ url_for('browse.browse_home') }}" id="browse"
60-
>Browse</a
61-
>
62-
</li>
63-
<li>
64-
<a href="{{ url_for('login.login') }}" id="library">History</a>
65-
</li>
66-
<li onclick="window.open('https://www.buymeacoffee.com/codeColts', '_blank');">
67-
<img
68-
src="{{ url_for('static', filename='assets/images/bmc-button.png') }}"
69-
alt=""
70-
/>
71-
</li>
72-
73-
<!-- Add more items as required -->
74-
</ul>
60+
<!-- Add more items as required -->
61+
</ul>
7562

76-
<script>
77-
// Get the current page URL path
78-
var currentPath = window.location.pathname;
63+
<script>
64+
// Get the current page URL path
65+
var currentPath = window.location.pathname;
7966

80-
// Get the menu item with a matching URL and add the "active" class
81-
if (currentPath === "{{ url_for('index.index') }}") {
82-
document.getElementById("home").classList.add("active");
83-
} else if (
84-
currentPath === "{{ url_for('browse.browse_home') }}"
85-
) {
86-
document.getElementById("browse").classList.add("active");
87-
}
88-
else if (currentPath === "{{ url_for('login.login') }}") {
89-
document.getElementById("library").classList.add("active");
90-
}
91-
</script>
67+
// Get the menu item with a matching URL and add the "active" class
68+
if (currentPath === "{{ url_for('index.index') }}") {
69+
document.getElementById("home").classList.add("active");
70+
} else if (
71+
currentPath === "{{ url_for('browse.browse_home') }}"
72+
) {
73+
document.getElementById("browse").classList.add("active");
74+
}
75+
else if (currentPath === "{{ url_for('login.login') }}") {
76+
document.getElementById("library").classList.add("active");
77+
}
78+
</script>
9279

93-
<a class="menu-trigger">
94-
<span>Menu</span>
95-
</a>
96-
<!-- ***** Menu End ***** -->
97-
</nav>
98-
</div>
80+
<a class="menu-trigger">
81+
<span>Menu</span>
82+
</a>
83+
<!-- ***** Menu End ***** -->
84+
</nav>
9985
</div>
10086
</div>
101-
</header>
102-
<!-- ***** Header Area End ***** -->
103-
<div class="container">
104-
<div class="row">
105-
<div class="col-lg-12">
106-
<div class="page-content" style="padding-top: 8vh">
107-
<!--block content start-->
108-
{% block content %} {% endblock %}
109-
<!--block content end-->
110-
</div>
87+
</div>
88+
</header>
89+
<!-- ***** Header Area End ***** -->
90+
<div class="container">
91+
<div class="row">
92+
<div class="col-lg-12">
93+
<div class="page-content" style="padding-top: 8vh">
94+
<!--block content start-->
95+
{% block content %} {% endblock %}
96+
<!--block content end-->
11197
</div>
11298
</div>
11399
</div>
100+
</div>
114101

115-
<footer style="margin-top: 10vh">
116-
<div class="container">
117-
<div class="row">
118-
<div class="col-lg-12">
119-
<!--footer-->
120-
{% include 'components/footer.html' %}
121-
{% include 'components/themeButton.html' %}
122-
</div>
102+
<footer style="margin-top: 10vh">
103+
<div class="container">
104+
<div class="row">
105+
<div class="col-lg-12">
106+
<!--footer-->
107+
{% include 'components/footer.html' %}
108+
{% include 'components/themeButton.html' %}
123109
</div>
124110
</div>
125-
</footer>
111+
</div>
112+
</footer>
126113

127-
<!-- Scripts -->
128-
<!-- Bootstrap core JavaScript -->
129-
<script src="{{ url_for('static', filename='vendor/jquery/jquery.min.js') }}"></script>
130-
<script src="{{ url_for('static', filename='vendor/bootstrap/js/bootstrap.min.js') }}"></script>
131-
<script src="{{ url_for('static', filename='assets/js/tabs.js') }}"></script>
114+
<!-- Scripts -->
115+
<!-- Bootstrap core JavaScript -->
116+
<script src="{{ url_for('static', filename='vendor/jquery/jquery.min.js') }}"></script>
117+
<script src="{{ url_for('static', filename='vendor/bootstrap/js/bootstrap.min.js') }}"></script>
118+
<script src="{{ url_for('static', filename='assets/js/tabs.js') }}"></script>
132119

133-
<script src="{{ url_for('static', filename='assets/js/custom.js') }}"></script>
134-
<!-- Include jQuery library if not already included in your project -->
135-
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
120+
<script src="{{ url_for('static', filename='assets/js/custom.js') }}"></script>
121+
<!-- Include jQuery library if not already included in your project -->
122+
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
136123

137-
<script>
138-
// JavaScript code to handle the click event on the item divs
139-
$(document).ready(function () {
140-
$(".item").click(function () {
141-
var url = $(this).data("href");
142-
if (url) {
143-
window.location.href = url;
144-
}
145-
});
124+
<script>
125+
// JavaScript code to handle the click event on the item divs
126+
$(document).ready(function () {
127+
$(".item").click(function () {
128+
var url = $(this).data("href");
129+
if (url) {
130+
window.location.href = url;
131+
}
146132
});
147-
</script>
148-
</body>
149-
</html>
133+
});
134+
</script>
135+
</body>
136+
137+
</html>

0 commit comments

Comments
 (0)