File tree 6 files changed +115
-11
lines changed
26-double vertical slider
6 files changed +115
-11
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const animated_bg_texts = document.querySelectorAll(".animated-bg-text");
25
25
26
26
const getData = ( ) => {
27
27
header . innerHTML =
28
- '<img src="https://images.unsplash.com/photo-1610729681715-1d22287e7b67 ?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1350 &q=80" alt="" />' ;
28
+ '<img src="https://images.unsplash.com/photo-1610751399547-46ad575447cf ?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=750 &q=80" alt="" />' ;
29
29
title . innerHTML = "Lorem ipsum dolor sit amet" ;
30
30
excerpt . innerHTML =
31
31
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolore perferendis" ;
Original file line number Diff line number Diff line change 15
15
< body >
16
16
< div class ="slider-container ">
17
17
< div class ="left-slide ">
18
- < div style ="background-color: #6b7d67 ">
19
- < h1 > Accessories</ h1 >
20
- < p > new collection</ p >
21
- </ div >
22
- < div style ="background-color: #2aa6c0 ">
18
+ < div style ="background-color: #b99f8a ">
23
19
< h1 > Pareos</ h1 >
24
20
< p > new collection</ p >
25
21
</ div >
@@ -31,26 +27,30 @@ <h1>Swimsuits</h1>
31
27
< h1 > Crop Tops</ h1 >
32
28
< p > new collection</ p >
33
29
</ div >
30
+ < div style ="background-color: #2b2e32 ">
31
+ < h1 > Accessories</ h1 >
32
+ < p > new collection</ p >
33
+ </ div >
34
34
</ div >
35
35
< div class ="right-slide ">
36
36
< div
37
37
style ="
38
- background-image: url('https://images.unsplash.com/photo-1552996923-5063f7db50ee ?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1050 &q=80');
38
+ background-image: url('https://images.unsplash.com/photo-1567640157569-f93dc2275420 ?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1350 &q=80');
39
39
"
40
40
> </ div >
41
41
< div
42
42
style ="
43
- background-image: url('https://images.unsplash.com/photo-1559992490-51463933f67e? ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D& auto=format&fit=crop&w=1350 &q=80');
43
+ background-image: url('https://images.unsplash.com/photo-1552996923-5063f7db50ee?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D& ixlib=rb-1.2.1&auto=format&fit=crop&w=1050 &q=80');
44
44
"
45
45
> </ div >
46
46
< div
47
47
style ="
48
- background-image: url('https://images.unsplash.com/photo-1561076722-85adfb3195cb ?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1350&q=80');
48
+ background-image: url('https://images.unsplash.com/photo-1559992490-51463933f67e ?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1350&q=80');
49
49
"
50
50
> </ div >
51
51
< div
52
52
style ="
53
- background-image: url('https://images.unsplash.com/photo-1567640157569-f93dc2275420?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D& ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
53
+ background-image: url('https://images.unsplash.com/photo-1561076722-85adfb3195cb? ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D &auto=format&fit=crop&w=1350&q=80');
54
54
"
55
55
> </ div >
56
56
</ div >
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 " />
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6
+ < link rel ="stylesheet " href ="style.css " />
7
+ < title > Toast Notification</ title >
8
+ </ head >
9
+ < body >
10
+ < div id ="toasts "> </ div >
11
+ < button class ="btn " id ="button "> Show Notification</ button >
12
+ < script src ="script.js "> </ script >
13
+ </ body >
14
+ </ html >
Original file line number Diff line number Diff line change
1
+ const button = document . getElementById ( "button" ) ;
2
+ const toasts = document . getElementById ( "toasts" ) ;
3
+
4
+ const messages = [
5
+ "Message One" ,
6
+ "Message Two" ,
7
+ "Message Three" ,
8
+ "Message Four" ,
9
+ ] ;
10
+ const types = [ "info" , "success" , "error" ] ;
11
+
12
+ const getRandomMessage = ( ) =>
13
+ messages [ Math . floor ( Math . random ( ) * messages . length ) ] ;
14
+
15
+ const getRandomType = ( ) => types [ Math . floor ( Math . random ( ) * types . length ) ] ;
16
+
17
+ const createNotification = ( message = null , type = null ) => {
18
+ const notif = document . createElement ( "div" ) ;
19
+ notif . classList . add ( "toast" ) ;
20
+ notif . classList . add ( type ? type : getRandomType ( ) ) ;
21
+ notif . innerText = message ? message : getRandomMessage ( ) ;
22
+ toasts . appendChild ( notif ) ;
23
+ setTimeout ( ( ) => notif . remove ( ) , 3000 ) ;
24
+ } ;
25
+
26
+ button . addEventListener ( "click" , ( ) => createNotification ( ) ) ;
Original file line number Diff line number Diff line change
1
+ @import url ("https://fonts.googleapis.com/css2?family=Poppins:wght@200;400&display=swap" );
2
+
3
+ * {
4
+ box-sizing : border-box;
5
+ }
6
+
7
+ body {
8
+ background-color : rebeccapurple;
9
+ font-family : "Poppins" , sans-serif;
10
+ display : flex;
11
+ flex-direction : column;
12
+ align-items : center;
13
+ justify-content : center;
14
+ height : 100vh ;
15
+ overflow : hidden;
16
+ margin : 0 ;
17
+ }
18
+
19
+ .btn {
20
+ background-color : # fff ;
21
+ color : rebeccapurple;
22
+ font-family : inherit;
23
+ font-weight : bold;
24
+ padding : 1rem ;
25
+ border-radius : 5px ;
26
+ border : none;
27
+ cursor : pointer;
28
+ }
29
+
30
+ .btn : focus {
31
+ outline : none;
32
+ }
33
+
34
+ .btn : active {
35
+ transform : scale (0.98 );
36
+ }
37
+
38
+ # toasts {
39
+ position : fixed;
40
+ bottom : 10px ;
41
+ right : 10px ;
42
+ display : flex;
43
+ flex-direction : column;
44
+ align-items : flex-end;
45
+ }
46
+
47
+ .toast {
48
+ background-color : # fff ;
49
+ border-radius : 5px ;
50
+ padding : 1rem 2rem ;
51
+ margin : 0.5rem ;
52
+ }
53
+
54
+ .toast .info {
55
+ color : rebeccapurple;
56
+ }
57
+
58
+ .toast .success {
59
+ color : green;
60
+ }
61
+
62
+ .toast .error {
63
+ color : red;
64
+ }
Original file line number Diff line number Diff line change 32
32
| 24 | [ Content Placeholder] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/24-content%20placeholder ) | [ Live Demo] ( https://codepen.io/solygambas/pen/ExgGzaX ) |
33
33
| 25 | [ Sticky Navbar] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/25-sticky%20navigation ) | [ Live Demo] ( https://codepen.io/solygambas/pen/VwKqJmw/ ) |
34
34
| 26 | [ Double Vertical Slider] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/26-double%20vertical%20slider ) | [ Live Demo] ( https://codepen.io/solygambas/pen/wvzNwqB ) |
35
- | 27 | [ Toast Notification] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/toast-notification ) | [ Live Demo] ( /toast-notification/ ) |
35
+ | 27 | [ Toast Notification] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/27-toast%20notification ) | [ Live Demo] ( https://codepen.io/solygambas/pen/YzGBNgW ) |
36
36
| 28 | [ Github Profiles] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/github-profiles ) | [ Live Demo] ( /github-profiles/ ) |
37
37
| 29 | [ Double Click Heart] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/double-click-heart ) | [ Live Demo] ( /double-click-heart/ ) |
38
38
| 30 | [ Auto Text Effect] ( https://github.com/solygambas/html-css-fifty-projects/tree/master/auto-text-effect ) | [ Live Demo] ( /auto-text-effect/ ) |
You can’t perform that action at this time.
0 commit comments