File tree 4 files changed +48
-5
lines changed
4 files changed +48
-5
lines changed Original file line number Diff line number Diff line change
1
+ let copyRightYear = document . getElementById ( "copyright-year" ) ;
2
+ let currentDate = new Date ( ) ;
3
+ let currentYear = currentDate . getFullYear ( ) ;
4
+ copyRightYear . innerText = currentYear ;
Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ <h3>More Features Coming Soon</h3>
129
129
130
130
< footer >
131
131
< div class ="footer-container ">
132
+
132
133
< div class ="company-info ">
133
134
< h1 class ="company-name heading flex justify-center items-center gap-4 "> < img
134
135
src ="./assets/logo.png "> Dev-Mint</ h1 >
@@ -177,11 +178,13 @@ <h1 class="heading">Keep In Touch</h1>
177
178
</ div >
178
179
</ div >
179
180
180
- < p class ="copyright "> Built with ❤️ by Dev-Mint Team | ©
181
- < script >
182
- document . write ( new Date ( ) . getFullYear ( ) ) ;
183
- </ script > : All Rights Reserved
184
- </ p >
181
+ < p > © < span id ="copyright-year "> </ span > All Rights Reserved || Built with ❤️ by Dev-Mint Team</ p >
182
+ < button id ="goto-top-btn " onclick ="goTop() "> < svg xmlns ="http://www.w3.org/2000/svg " width ="25 " height ="25 "
183
+ fill ="green " class ="bi bi-arrow-up " viewBox ="0 0 16 16 ">
184
+ < path fill-rule ="evenodd "
185
+ d ="M8 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L7.5 2.707V14.5a.5.5 0 0 0 .5.5 " />
186
+ </ svg >
187
+ </ button >
185
188
</ footer >
186
189
187
190
< script >
@@ -205,6 +208,8 @@ <h1 class="heading">Keep In Touch</h1>
205
208
document . getElementById ( "mobile-nav" ) . classList . toggle ( "hidden" ) ;
206
209
}
207
210
</ script >
211
+ < script src ="./copyrightYear.js "> </ script >
212
+ < script src ="./scrollTop.js "> </ script >
208
213
</ body >
209
214
210
215
</ html >
Original file line number Diff line number Diff line change
1
+ let scrollTopBtn = document . getElementById ( "goto-top-btn" ) ;
2
+
3
+ const showTopBtn = ( ) => {
4
+ if ( document . body . scrollTop > 50 || document . documentElement . scrollTop > 50 ) {
5
+ scrollTopBtn . style . display = "block" ;
6
+ } else {
7
+ scrollTopBtn . style . display = "none" ;
8
+ }
9
+ } ;
10
+
11
+ const goTop = ( ) => {
12
+ document . body . scrollTop = 0 ;
13
+ document . documentElement . scrollTop = 0 ;
14
+ }
15
+ window . onscroll = ( ) => {
16
+ showTopBtn ( ) ;
17
+ } ;
Original file line number Diff line number Diff line change @@ -549,6 +549,23 @@ footer {
549
549
color : # 5865F2 ;
550
550
}
551
551
552
+ # goto-top-btn {
553
+ background-color : white;
554
+ padding : 15px 19px ;
555
+ border : none;
556
+ border-radius : 50% ;
557
+ position : fixed;
558
+ bottom : 55px ;
559
+ right : 30px ;
560
+ display : none;
561
+ border : 5px solid red;
562
+ cursor : pointer;
563
+ }
564
+
565
+ # goto-top-btn : hover {
566
+ background-color : # bdbaba ;
567
+ }
568
+
552
569
@keyframes animate {
553
570
50% {
554
571
transform : translateY (-8px );
You can’t perform that action at this time.
0 commit comments