├── Beat-It
├── index.html
├── index.js
├── script.js
├── sounds
│ ├── bubbles.mp3
│ ├── clay.mp3
│ ├── confetti.mp3
│ ├── glimmer.mp3
│ ├── moon.mp3
│ └── ufo.mp3
└── style.css
├── DOM-Array-Methods
├── index.html
├── script.js
└── style.css
├── Exchange-Rate-Calculator
├── index.html
├── money.png
├── script.js
└── style.css
├── Expense-Tracker
├── index.html
├── script.js
└── style.css
├── GitHub-Profile-Finder
├── images.png
├── index.html
├── script.js
└── style.css
├── Hangman-Game
├── index.html
├── script.js
└── style.css
├── Meditate-App
├── bg12.jpg
├── index.html
├── script.js
├── style.css
└── y2mate.com - 15 Minute Super Deep Meditation Music_ Relax Mind Body, Inner Peace, Relaxing Music, ☯2563B.mp3
├── Modal-Menu
├── index.html
├── script.js
└── style.css
├── Movie-Info
├── index.html
├── script.js
└── style.css
├── Movie-Seat-Booking
├── index.html
├── script.js
└── style.css
├── Music-Player
├── images
│ ├── hey.jpg
│ ├── summer.jpg
│ └── ukulele.jpg
├── index.html
├── music
│ ├── hey.mp3
│ ├── summer.mp3
│ └── ukulele.mp3
├── script.js
└── style.css
├── New-Year-Countdown
├── README.md
├── index.html
├── loaderx.gif
├── script.js
└── style.css
├── OG-Video-Player
├── index.html
├── noise12.png
├── poster.jpg
├── progress.css
├── script.js
└── style.css
├── README.md
├── Recipe-App
├── index.html
├── script.js
└── style.css
└── Todo
├── index.html
├── script.js
└── style.css
/Beat-It/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
${user.name}
37 |
38 |
39 |
40 |
41 |
42 |
43 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
${user.bio}
53 |
54 |
55 | ${user.followers}Followers
56 | ${user.following}Following
57 | ${user.public_repos}Repos
58 |
59 |
60 |
61 |
62 |
GitHub Statistics
63 |
64 |
65 |
66 |
67 |
68 | `;
69 |
70 | main.innerHTML = cardHTML;
71 | }
72 |
73 | function addReposToCard(repos) {
74 | const reposEl = document.getElementById("repos");
75 |
76 | repos
77 | .sort((a, b) => b.stargazers_count - a.stargazers_count)
78 | .slice(0, 10)
79 | .forEach((repo) => {
80 | const repoEl = document.createElement("a");
81 | repoEl.classList.add("repo");
82 |
83 | repoEl.href = repo.html_url;
84 | repoEl.target = "_blank";
85 | repoEl.innerText = repo.name;
86 |
87 | reposEl.appendChild(repoEl);
88 | });
89 | }
90 |
91 | form.addEventListener("submit", (e) => {
92 | e.preventDefault();
93 |
94 | const user = search.value;
95 |
96 | if (user) {
97 | getUser(user);
98 |
99 | search.value = "";
100 | }
101 | });
102 |
--------------------------------------------------------------------------------
/GitHub-Profile-Finder/style.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Raleway:wght@500&display=swap');
2 | @import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
3 | *{
4 | box-sizing: border-box;
5 | }
6 |
7 | body{
8 |
9 | background-image: linear-gradient(12deg, #3e2da3 0%, #41073f 84%);
10 | font-family: 'Raleway',sans-serif;
11 | display: flex;
12 | flex-direction: column;
13 | align-items: center;
14 | justify-content: center;
15 |
16 | margin: 0;
17 | min-height: 100vh;
18 | }
19 |
20 |
21 | input {
22 | background-color: #7841a5;
23 | border-radius: 14px;
24 |
25 |
26 | border: none;
27 | box-shadow: 0 -13px 10px rgba(154, 160, 185, 0.05),
28 | 0 15px 40px rgba(0, 0, 0, 0.3);
29 | color: white;
30 | font-size: 1rem;
31 | padding: 1em;
32 | margin-bottom: 2rem;
33 | }
34 |
35 | input::placeholder {
36 | color: #bbb;
37 | font-family: 'Raleway',
38 | sans-serif;
39 | text-align: center;
40 | }
41 |
42 | input:focus {
43 | outline: none;
44 | }
45 |
46 | .card {
47 |
48 |
49 | background-image: linear-gradient(315deg, #482681 10%, #436096 100%);
50 | border-radius: 20px;
51 |
52 | box-shadow: 5px 8px 15px 3px rgb(22, 21, 94);
53 | display: flex;
54 | padding: 3rem;
55 | max-width: 800px;
56 | }
57 | .det{
58 | display: flex;
59 | }
60 |
61 | .redirect{
62 | margin-top: 1.7em;
63 | margin-left: 1em;
64 | height:25px;
65 | width:25px;
66 | display: flex;
67 | }
68 |
69 | .redirect:hover{
70 | transform: scale(1.2);
71 | }
72 |
73 | .avatar {
74 | border: 10px solid #3b68a1;
75 | box-shadow: 1px 2px 22px 1px rgb(22, 21, 73,.9);
76 | border-radius: 50%;
77 | height: 150px;
78 | width: 150px;
79 | }
80 |
81 | .user-info {
82 | color: #eee;
83 |
84 | margin-left: 2rem;
85 | }
86 |
87 | .user-info h2 {
88 | margin-top: 0;
89 | }
90 |
91 | .user-info ul {
92 | display: flex;
93 | justify-content: space-between;
94 | list-style-type: none;
95 | padding: 0;
96 | font-family: 'Poppins',
97 | sans-serif;
98 | max-width: 400px;
99 | }
100 |
101 | .user-info ul li {
102 | display: flex;
103 | align-items: center;
104 | }
105 |
106 | .user-info ul li strong {
107 | font-size: 0.9rem;
108 | margin-left: 0.5rem;
109 | }
110 |
111 | .repo {
112 | background-color: #2a2a72;
113 | border-radius: 5px;
114 | display: inline-block;
115 | color: white;
116 | font-size: 0.7rem;
117 | padding: 0.25rem 0.5rem;
118 | margin-right: 0.5rem;
119 | margin-bottom: 0.5rem;
120 | text-decoration: none;
121 | }
122 |
--------------------------------------------------------------------------------
/Hangman-Game/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Hangman
7 |
8 |
9 |
10 |
11 |
Hangman
12 |
13 |
Guess the word!
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
69 |
70 |
71 |
You've already entered this letter
72 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/Hangman-Game/script.js:
--------------------------------------------------------------------------------
1 | const wordEl = document.getElementById('word');
2 | const wrongLettersEl = document.getElementById('wrong-letters');
3 | const playAgainBtn = document.getElementById('play-button');
4 | const popup = document.getElementById('popup-container');
5 | const notification = document.getElementById('notification-container');
6 | const finalMessage = document.getElementById('final-message');
7 |
8 | const figureParts = document.querySelectorAll('.figure-part');
9 |
10 | const words = ['application', 'programming', 'interface', 'wizard'];
11 |
12 | let selectedWord = words[Math.floor(Math.random() * words.length)];
13 |
14 | const correctLetters = [];
15 | const wrongLetters = [];
16 |
17 | // Show hidden word
18 | function displayWord() {
19 | wordEl.innerHTML = `
20 | ${selectedWord
21 | .split('')
22 | .map(
23 | letter => `
24 |
25 | ${correctLetters.includes(letter) ? letter : ''}
26 |
27 | `
28 | )
29 | .join('')}
30 | `;
31 |
32 | const innerWord = wordEl.innerText.replace(/\n/g, '');
33 |
34 | if (innerWord === selectedWord) {
35 | finalMessage.innerText = "Hell yeah, you guessed it right!";
36 | popup.style.display = 'flex';
37 | }
38 | }
39 |
40 | // Update the wrong letters
41 | function updateWrongLettersEl() {
42 | // Display wrong letters
43 | wrongLettersEl.innerHTML = `
44 | ${wrongLetters.length > 0 ? '
Wrong
' : ''}
45 | ${wrongLetters.map(letter => `
${letter} `)}
46 | `;
47 |
48 | // Display parts
49 | figureParts.forEach((part, index) => {
50 | const errors = wrongLetters.length;
51 |
52 | if (index < errors) {
53 | part.style.display = 'block';
54 | } else {
55 | part.style.display = 'none';
56 | }
57 | });
58 |
59 | // Check if lost
60 | if (wrongLetters.length === figureParts.length) {
61 | finalMessage.innerText = "All you had to do was to guess the goddamn word CJ!";
62 | popup.style.display = 'flex';
63 | }
64 | }
65 |
66 | // Show notification
67 | function showNotification() {
68 | notification.classList.add('show');
69 |
70 | setTimeout(() => {
71 | notification.classList.remove('show');
72 | }, 2000);
73 | }
74 |
75 | // Keydown letter press
76 | window.addEventListener('keydown', e => {
77 | // console.log(e.keyCode);
78 | if (e.keyCode >= 65 && e.keyCode <= 90) {
79 |
80 | const letter = e.key;
81 |
82 | if (selectedWord.includes(letter)) {
83 | if (!correctLetters.includes(letter)) {
84 | correctLetters.push(letter);
85 |
86 | displayWord();
87 | } else {
88 | showNotification();
89 | }
90 | } else {
91 | if (!wrongLetters.includes(letter)) {
92 | wrongLetters.push(letter);
93 |
94 | updateWrongLettersEl();
95 | } else {
96 | showNotification();
97 | }
98 | }
99 | }
100 | });
101 |
102 | // Restart game and play again
103 | playAgainBtn.addEventListener('click', () => {
104 | // Empty arrays
105 | correctLetters.splice(0);
106 | wrongLetters.splice(0);
107 |
108 | selectedWord = words[Math.floor(Math.random() * words.length)];
109 |
110 | displayWord();
111 |
112 | updateWrongLettersEl();
113 |
114 | popup.style.display = 'none';
115 | });
116 |
117 | displayWord();
118 |
119 |
120 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/Hangman-Game/style.css:
--------------------------------------------------------------------------------
1 | @import url("https://fonts.googleapis.com/css2?family=Nunito&display=swap");
2 | * {
3 | box-sizing: border-box;
4 | font-family: "Nunito", sans-serif;
5 | }
6 |
7 | body {
8 | background-color: #0f181a;
9 | color: rgb(243, 241, 241);
10 | font-family: Arial, Helvetica, sans-serif;
11 | display: flex;
12 | flex-direction: column;
13 | align-items: center;
14 | height: 80vh;
15 | margin: 0;
16 | overflow: hidden;
17 | }
18 |
19 | h1 {
20 | margin-top: 1.8em;
21 | font-size: 3em;
22 | }
23 |
24 | .game-container {
25 | padding: 20px 30px;
26 | position: relative;
27 | margin: auto;
28 | height: 350px;
29 | width: 450px;
30 | }
31 |
32 | .figure-container {
33 | fill: transparent;
34 | stroke: wheat;
35 | stroke-width: 4px;
36 | stroke-linecap: round;
37 | }
38 |
39 | .figure-part {
40 | display: none;
41 | }
42 |
43 | .wrong-letters-container {
44 | position: absolute;
45 | top: 20px;
46 | right: 20px;
47 | display: flex;
48 | flex-direction: column;
49 | text-align: right;
50 | }
51 |
52 | .wrong-letters-container p {
53 | margin: 0 0 5px;
54 | }
55 |
56 | .wrong-letters-container span {
57 | font-size: 24px;
58 | }
59 |
60 | .word {
61 | display: flex;
62 | position: absolute;
63 | bottom: 10px;
64 | left: 50%;
65 | transform: translateX(-50%);
66 | }
67 |
68 | .letter {
69 | border-bottom: 3px solid #8be978;
70 | opacity: 0.7;
71 | display: inline-flex;
72 | font-size: 30px;
73 | align-items: center;
74 | justify-content: center;
75 | margin: 0 3px;
76 | height: 50px;
77 | width: 20px;
78 | }
79 |
80 | .popup-container {
81 | background-color: rgba(0, 0, 0, 0.3);
82 | position: fixed;
83 | top: 0;
84 | bottom: 0;
85 | left: 0;
86 | right: 0;
87 | display: none;
88 | align-items: center;
89 | justify-content: center;
90 | }
91 |
92 | .popup {
93 | background: #e24f4a;
94 | border-radius: 15px;
95 | box-shadow: 0 15px 10px 3px rgba(0, 0, 0, 0.1);
96 | padding: 50px;
97 | text-align: center;
98 | }
99 |
100 | .popup button {
101 | cursor: pointer;
102 | background-color: rgb(27, 27, 27);
103 | color: #cbe3f3;
104 | border-radius: 10px;
105 | border: 0;
106 | margin-top: 20px;
107 | padding: 12px 20px;
108 | font-size: 16px;
109 | }
110 |
111 | .popup button:active {
112 | transform: scale(0.98);
113 | }
114 |
115 | .popup button:focus {
116 | outline: 0;
117 | }
118 |
119 | .notification-container {
120 | background-color: rgba(0, 0, 0, 0.3);
121 | border-radius: 10px 10px 0 0;
122 | padding: 15px 20px;
123 | position: absolute;
124 | bottom: -50px;
125 | transition: transform 0.3s ease-in-out;
126 | }
127 |
128 | .notification-container p {
129 | margin: 0;
130 | }
131 |
132 | .notification-container.show {
133 | transform: translateY(-50px);
134 | }
135 |
--------------------------------------------------------------------------------
/Meditate-App/bg12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proghead00/Ultimate-JS-Projects-Collection/54411c66a6cd59b628ae457a4d03573c8a52fb79/Meditate-App/bg12.jpg
--------------------------------------------------------------------------------
/Meditate-App/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
Meditate
9 |
10 |
11 |
Meditate
12 |
13 |
14 |
15 |
16 |
17 | Your browser does not support the audio tag.
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/Meditate-App/script.js:
--------------------------------------------------------------------------------
1 | const container = document.getElementById('container');
2 | const text = document.getElementById('text');
3 |
4 | const totalTime = 7500;
5 | const breatheTime = (totalTime / 5) * 2;
6 | const holdTime = totalTime / 5;
7 |
8 | breathAnimation();
9 |
10 | function breathAnimation() {
11 | text.innerText = 'Breathe In';
12 | container.className = 'container grow';
13 |
14 | if(text.innerText==="Breathe In")
15 | text.style.marginLeft= '5.4rem'
16 |
17 | setTimeout(() => {
18 | text.innerText = 'Hold';
19 | if(text.innerText==="Hold")
20 | text.style.marginLeft= '7.5rem'
21 |
22 | setTimeout(() => {
23 | text.innerText = 'Breathe Out';
24 |
25 | if(text.innerText==="Breathe Out")
26 | text.style.marginLeft= '4.8rem'
27 |
28 | container.className = 'container shrink';
29 | }, holdTime);
30 | }, breatheTime);
31 | }
32 |
33 | setInterval(breathAnimation, totalTime);
34 |
--------------------------------------------------------------------------------
/Meditate-App/style.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
2 |
3 | * {
4 | font-family: 'Montserrat',
5 | sans-serif;
6 | box-sizing: border-box;
7 | }
8 |
9 | body {
10 | background: #225e51 url('./bg12.jpg') no-repeat center center/cover;
11 | margin: 0;
12 | min-height: 100vh;
13 | overflow: hidden;
14 | display: flex;
15 | align-items: center;
16 | color: white;
17 | flex-direction: column;
18 |
19 | }
20 |
21 | .container {
22 | display: flex;
23 | align-items: center;
24 | justify-items: center;
25 | margin: auto;
26 | height: 300px;
27 | width: 300px;
28 | position: relative;
29 | transform: scale(1);
30 | }
31 |
32 | h1 {
33 | font-size: 3rem;
34 | margin-top: 4.2rem;
35 | }
36 |
37 | .circle {
38 | background-color: rgb(15, 59, 52);
39 | height: 100%;
40 | width: 100%;
41 | border-radius: 50%;
42 | position: absolute;
43 | z-index: -1;
44 |
45 | }
46 |
47 | #text {
48 | font-size: 1.5rem;
49 | margin-left: 1rem;
50 | color: #fffdfd;
51 | font-weight: bold;
52 |
53 | }
54 |
55 |
56 | .gradient-circle {
57 | background: conic-gradient(#55b7a4 0%,
58 | #4ca493 40%,
59 | rgb(224, 233, 228) 40%,
60 | rgb(245, 242, 242) 60%,
61 | #336d62 60%,
62 | #2a5b52 100%);
63 | height: 320px;
64 | width: 320px;
65 | z-index: -2;
66 | border-radius: 50%;
67 | position: absolute;
68 | top: -10px;
69 | left: -10px;
70 | box-shadow: 4px 8px 13px rgba(16, 61, 51, 0.9)
71 | }
72 |
73 |
74 | .pointer {
75 | background-color: #f7f7f7;
76 | border-radius: 50%;
77 | height: 20px;
78 | width: 20px;
79 | display: block;
80 | }
81 |
82 | .pointer-container {
83 | position: absolute;
84 | top: -40px;
85 | left: 140px;
86 | width: 20px;
87 | height: 190px;
88 | animation: rotate 7.5s linear forwards infinite;
89 | transform-origin: bottom center;
90 | }
91 |
92 | @keyframes rotate {
93 | from {
94 | transform: rotate(0deg);
95 | }
96 |
97 | to {
98 | transform: rotate(360deg);
99 | }
100 | }
101 |
102 | .container.grow {
103 | animation: grow 3s linear forwards;
104 | }
105 |
106 | @keyframes grow {
107 | from {
108 | transform: scale(1);
109 | }
110 |
111 | to {
112 | transform: scale(1.2);
113 | }
114 | }
115 |
116 | .container.shrink {
117 | animation: shrink 3s linear forwards;
118 | }
119 |
120 | @keyframes shrink {
121 | from {
122 | transform: scale(1.2);
123 | }
124 |
125 | to {
126 | transform: scale(1);
127 | }
128 | }
129 |
130 |
131 | audio:hover,
132 | audio:focus,
133 | audio:active {
134 | outline: none;
135 | box-shadow: 5px 5px 11px rgba(49, 148, 148, 0.4);
136 | -webkit-transform: scale(1.05);
137 | -moz-transform: scale(1.05);
138 | transform: scale(1.05);
139 | }
140 |
141 | audio {
142 | -webkit-transition: all 0.5s linear;
143 | -moz-transition: all 0.5s linear;
144 | -o-transition: all 0.5s linear;
145 | transition: all 0.5s linear;
146 |
147 | box-shadow: 2px 2px 12px 5px #55a3a8;
148 |
149 | border-radius: 89px;
150 | }
--------------------------------------------------------------------------------
/Meditate-App/y2mate.com - 15 Minute Super Deep Meditation Music_ Relax Mind Body, Inner Peace, Relaxing Music, ☯2563B.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proghead00/Ultimate-JS-Projects-Collection/54411c66a6cd59b628ae457a4d03573c8a52fb79/Meditate-App/y2mate.com - 15 Minute Super Deep Meditation Music_ Relax Mind Body, Inner Peace, Relaxing Music, ☯2563B.mp3
--------------------------------------------------------------------------------
/Modal-Menu/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Modal Demo
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
29 |
30 |
31 |
32 |
45 |
46 |
47 |
Demo as heck
48 |
Lorem ipsum dolor sit amet consectetur adipisicing elit. Cumque odit, omnis corporis pariatur voluptas fugit quaerat dignissimos excepturi reprehenderit autem!
49 |
50 |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam, id. Nobis sunt assumenda, quidem enim totam quis vero cumque ea!
51 |
52 |
Ssup?
53 |
Lorem ipsum dolor sit amet consectetur adipisicing elit. Laudantium libero tempora itaque explicabo suscipit obcaecati deserunt, odit laboriosam nisi animi?
54 |
55 |
What's poppin' mate
56 |
57 |
58 | Benefits
59 | Insurance
60 | Regret
61 |
62 |
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quia recusandae dignissimos.
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
78 |
79 |
Register to get an early bird access!
80 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
--------------------------------------------------------------------------------
/Modal-Menu/script.js:
--------------------------------------------------------------------------------
1 | const toggle = document.getElementById("toggle")
2 |
3 | const close = document.getElementById("close")
4 |
5 |
6 | const open = document.getElementById("open")
7 |
8 |
9 | const modal = document.getElementById("modal")
10 |
11 |
12 | //toggle
13 |
14 | toggle.addEventListener("click", ()=>
15 | document.body.classList.toggle('show-nav'))
16 |
17 |
18 |
19 | // show modal
20 |
21 | open.addEventListener("click", () => modal.classList.add('show-modal'))
22 |
23 |
24 | // hide modal
25 |
26 | close.addEventListener("click", ()=> modal.classList.remove('show-modal'))
27 |
28 |
29 | // hide modal on outside click
30 |
31 | window.addEventListener("click", e=> e.target == modal ?
32 | modal.classList.remove('show-modal') :false)
33 |
34 |
--------------------------------------------------------------------------------
/Modal-Menu/style.css:
--------------------------------------------------------------------------------
1 | @import url("https://fonts.googleapis.com/css2?family=PT+Sans&display=swap");
2 |
3 | * {
4 | box-sizing: border-box;
5 | font-family: "PT Sans", sans-serif;
6 | }
7 |
8 | :root {
9 | --modal-duration: 1s;
10 | --primary-color: #eb4545;
11 | --secondary-color: #643f2e;
12 | --tertiary-color: #b95638;
13 | }
14 |
15 | * {
16 | box-sizing: border-box;
17 | }
18 |
19 | body {
20 | margin: 0;
21 | transition: transform 0.6s ease-in-out;
22 | }
23 |
24 | body.show-nav {
25 | /* Width of nav */
26 | transform: translateX(200px);
27 | }
28 |
29 | nav {
30 | background-color: var(--tertiary-color);
31 | border-right: 10px solid rgb(58, 10, 10, 0.2);
32 | color: whitesmoke;
33 | position: fixed;
34 | top: 0;
35 | left: 0;
36 | width: 200px;
37 | height: 100vh;
38 | z-index: 100;
39 | transform: translateX(-100%);
40 | }
41 |
42 | nav .logo {
43 | padding: 30px 0;
44 | text-align: center;
45 | }
46 |
47 | nav .logo img {
48 | height: 95px;
49 | width: 95px;
50 | border-radius: 30px;
51 | box-shadow: 3px 3px 7px 2px rgba(0, 0, 0, 0.3);
52 | }
53 |
54 | nav ul {
55 | padding: 0;
56 | list-style-type: none;
57 | margin: 0;
58 | font-size: 25px;
59 | }
60 |
61 | nav ul li {
62 | border-bottom: 6px solid rgba(200, 200, 200, 0.1);
63 | padding: 20px;
64 | }
65 |
66 | nav ul li:first-of-type {
67 | border-top: 6px solid rgba(200, 200, 200, 0.1);
68 | }
69 |
70 | nav ul li a {
71 | color: whitesmoke;
72 | text-decoration: none;
73 | }
74 |
75 | nav ul li a:hover {
76 | text-decoration: underline;
77 | }
78 |
79 | header {
80 | background-color: var(--primary-color);
81 | color: whitesmoke;
82 | font-size: 130%;
83 | position: relative;
84 | padding: 40px 15px;
85 | text-align: center;
86 | }
87 |
88 | header h1 {
89 | margin: 0;
90 | }
91 |
92 | header p {
93 | margin: 30px 0;
94 | }
95 |
96 | button,
97 | input[type="submit"] {
98 | background-color: var(--secondary-color);
99 | border: 0;
100 | border-radius: 5px;
101 | color: whitesmoke;
102 | cursor: pointer;
103 | padding: 8px 12px;
104 | }
105 |
106 | button:focus {
107 | outline: none;
108 | }
109 |
110 | .toggle {
111 | background-color: rgba(7, 6, 6, 0.3);
112 | position: absolute;
113 | top: 20px;
114 | left: 20px;
115 | }
116 |
117 | .cta-btn {
118 | padding: 12px 30px;
119 | font-size: 20px;
120 | }
121 |
122 | .container {
123 | padding: 15px;
124 | margin: 0 auto;
125 | max-width: 100%;
126 | width: 800px;
127 | }
128 |
129 | .modal-container {
130 | background-color: rgba(0, 0, 0, 0.6);
131 | display: none;
132 | position: fixed;
133 | top: 0;
134 | left: 0;
135 | right: 0;
136 | bottom: 0;
137 | }
138 |
139 | .modal-container.show-modal {
140 | display: block;
141 | }
142 |
143 | .modal {
144 | background-color: #fff;
145 | border-radius: 15px;
146 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.9);
147 | position: absolute;
148 | overflow: hidden;
149 | top: 50%;
150 | left: 50%;
151 | transform: translate(-50%, -50%); /*center placement*/
152 | max-width: 100%;
153 | width: 400px;
154 | animation-name: modalopen;
155 | animation-duration: var(--modal-duration);
156 | }
157 |
158 | .modal-header {
159 | background: var(--primary-color);
160 | color: #fff;
161 | padding: 15px;
162 | }
163 |
164 | .modal-header h3 {
165 | margin: 0;
166 | }
167 |
168 | .modal-content {
169 | padding: 20px;
170 | }
171 |
172 | .modal-form div {
173 | margin: 15px 0;
174 | }
175 |
176 | .modal-form label {
177 | display: block;
178 | margin-bottom: 5px;
179 | }
180 |
181 | .modal-form .form-input {
182 | padding: 8px;
183 | width: 100%;
184 | }
185 |
186 | .close-btn {
187 | background: transparent;
188 | font-size: 25px;
189 | position: absolute;
190 | top: 0;
191 | right: 0;
192 | }
193 |
194 | @keyframes modalopen {
195 | from {
196 | opacity: 0;
197 | }
198 |
199 | to {
200 | opacity: 1;
201 | }
202 | }
203 |
--------------------------------------------------------------------------------
/Movie-Info/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Movie Info
7 |
8 |
9 |
10 |
11 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Movie-Info/script.js:
--------------------------------------------------------------------------------
1 | const apiUrl =
2 | "https://api.themoviedb.org/3/discover/movie?sort_by=popularity.desc&api_key=04c35731a5ee918f014970082a0088b1&page=1";
3 | const imagePath = "https://image.tmdb.org/t/p/w1280";
4 | const searchApi =
5 | "https://api.themoviedb.org/3/search/movie?&api_key=04c35731a5ee918f014970082a0088b1&query=";
6 |
7 | const main = document.getElementById("main");
8 | const form = document.getElementById("form");
9 | const search = document.getElementById("search");
10 |
11 | // most popular in home page
12 | getMovies(apiUrl);
13 |
14 | async function getMovies(url) {
15 | const resp = await fetch(url);
16 | const respData = await resp.json();
17 |
18 | console.log(respData);
19 |
20 | showMovies(respData.results);
21 | }
22 |
23 | let showMovies = (movies) => {
24 | // clear main
25 | main.innerHTML = "";
26 |
27 | movies.forEach((movie) => {
28 | const { poster_path, title, vote_average, overview, release_date } = movie;
29 |
30 | const movieEl = document.createElement("div");
31 | movieEl.classList.add("movie");
32 |
33 | movieEl.innerHTML = `
34 |
35 |
36 |
40 |
41 |
${title}
42 | ${vote_average}
45 |
46 |
47 |
48 |
Overview:
49 | ${overview}
50 |
51 |
52 | Release Date:
53 |
${release_date}
54 |
55 |
56 |
57 | `;
58 |
59 | main.appendChild(movieEl);
60 | });
61 | }
62 |
63 | function getClassByRate(vote) {
64 | if (vote >= 8) {
65 | return "green";
66 | } else if (vote >= 5) {
67 | return "orange";
68 | } else {
69 | return "red";
70 | }
71 | }
72 |
73 | form.addEventListener("submit", (e) => {
74 | e.preventDefault();
75 |
76 | const searchTerm = search.value;
77 |
78 | if (searchTerm) {
79 | getMovies(searchApi + searchTerm);
80 |
81 | search.value = "";
82 | }
83 | });
84 |
--------------------------------------------------------------------------------
/Movie-Info/style.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap');
2 | * {
3 | box-sizing: border-box;
4 | }
5 |
6 | body {
7 |
8 | background-color: #f3eaea;
9 |
10 | font-family: 'Noto Sans',
11 | sans-serif;
12 |
13 |
14 | }
15 |
16 | header {
17 | background-color: #f3eaea;
18 | display: flex;
19 | justify-content: flex-end;
20 | padding: 1rem;
21 | }
22 |
23 | .search {
24 | background-color: transparent;
25 | border: 2px solid #dbc169;
26 | border-radius: 50px;
27 | color: rgb(29, 23, 23);
28 | font-family: inherit;
29 | font-size: 1rem;
30 | padding: 0.5rem 1rem;
31 | }
32 |
33 | .search::placeholder {
34 | color: #000000;
35 | }
36 |
37 | .search:focus {
38 | background-color: #f1eae9;
39 | outline: none;
40 | }
41 |
42 |
43 | main {
44 | display: flex;
45 | flex-wrap: wrap;
46 |
47 | }
48 |
49 | .movie {
50 | background-color: #f5eeed;
51 | border-radius: 12px;
52 | box-shadow: 0 4px 5px rgba(0, 0, 0, 0.3);
53 | overflow: hidden;
54 | position: relative;
55 |
56 | margin: 1rem;
57 | width: 300px;
58 |
59 | }
60 |
61 | .movie img:hover{
62 | opacity: .89;
63 |
64 | }
65 |
66 | .movie img {
67 | width: 100%;
68 | }
69 |
70 | .movie-info {
71 | color: #111;
72 | display: flex;
73 | align-items: center;
74 | justify-content: space-between;
75 | padding: 0.5rem 1rem 1rem;
76 | letter-spacing: 0.5px;
77 | }
78 |
79 | .movie-info h3 {
80 | margin: 0;
81 | }
82 |
83 | .movie-info span {
84 | background-color:transparent;
85 | border-radius: 3px;
86 | font-weight: bold;
87 | padding: 0.25rem 0.5rem;
88 | }
89 | .movie-info span.green {
90 | color: rgb(29, 104, 29);
91 | }
92 |
93 | .movie-info span.orange {
94 | color: rgb(151, 115, 47);
95 | }
96 |
97 | .movie-info span.red {
98 | color: rgb(189, 42, 42);
99 | }
100 |
101 | .overview {
102 | background-color: #fff;
103 | padding: 2rem;
104 | position: absolute;
105 | max-height: 100%;
106 | overflow: auto;
107 | left: 0;
108 | bottom: 0;
109 | right: 0;
110 | transform: translateY(101%);
111 | transition: transform 0.4s ease-in-out;
112 | }
113 |
114 | .overview h3 {
115 | margin-top: 0;
116 | }
117 |
118 | .movie:hover .overview {
119 | transform: translateY(0);
120 | }
121 |
122 |
123 | .date2{
124 | margin-top: -1em;
125 | }
--------------------------------------------------------------------------------
/Movie-Seat-Booking/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
Movie Seat Booking
10 |
11 |
12 |
13 |
14 | Pick a movie:
15 |
16 | The Tree Of Life ($10)
17 | The Fountain ($12)
18 | Prisoners ($8)
19 | Enemy($9)
20 |
21 |
22 |
23 |
24 |
25 |
26 | Available
27 |
28 |
29 |
30 | Selected
31 |
32 |
33 |
34 | Occupied
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 | You have selected 0 seats for a price of $0
105 |
106 |
107 |
108 |
109 |
110 |
--------------------------------------------------------------------------------
/Movie-Seat-Booking/script.js:
--------------------------------------------------------------------------------
1 | const container = document.querySelector('.container')
2 |
3 | const seats = document.querySelectorAll('.row .seat:not(.occupied) ')
4 |
5 | const count = document.getElementById('count')
6 |
7 | const total = document.getElementById('total')
8 |
9 | const movieSelect = document.getElementById('movie')
10 |
11 |
12 | populateUI()
13 | let ticketPrice = +movieSelect.value;
14 |
15 | //save selected movie index & price
16 |
17 | function setMovieData(movieIndex, moviePrice){
18 | localStorage.setItem(' selectedMovieIndex' , movieIndex)
19 | localStorage.setItem(' selectedMoviePrice' , moviePrice)
20 | }
21 |
22 | //updating total and count
23 | function updateSelectedCount(){
24 | const selectedSeats = document.querySelectorAll('.row .seat.selected')
25 |
26 |
27 |
28 |
29 |
30 | //copy selected seats into array
31 | //map thru array
32 | //return a new array index
33 |
34 |
35 | const seatsIndex = [...selectedSeats].map( function(seat){
36 |
37 | return [...seats].indexOf(seat)
38 |
39 | })
40 |
41 |
42 | localStorage.setItem('selectedSeats' , JSON.stringify(seatsIndex))
43 |
44 | const selectedSeatsCount = selectedSeats.length
45 |
46 | count.innerText = selectedSeatsCount
47 | total.innerText = selectedSeatsCount * ticketPrice
48 |
49 |
50 |
51 |
52 | }
53 |
54 |
55 | // get data from local storage and populate UI
56 | function populateUI(){
57 |
58 | const selectedSeats = JSON.parse(localStorage.getItem('selectedSeats'))
59 |
60 | if(selectedSeats!== null && selectedSeats.length >0){
61 | seats.forEach((seat, index)=>{
62 | if(selectedSeats.indexOf(index)>-1)
63 | seat.classList.add('selected')
64 |
65 | })
66 | }
67 |
68 |
69 | const selectedMovieIndex = localStorage.getItem('selectedMovieIndex')
70 |
71 | if(selectedMovieIndex !==null)
72 | movieSelect.selected = selectedMovieIndex
73 |
74 | }
75 |
76 | //movie select event
77 |
78 | movieSelect.addEventListener('change', e=>{
79 | ticketPrice = +e.target.value
80 | updateSelectedCount()
81 | })
82 |
83 | //seat click event
84 | container.addEventListener('click',(e) =>{
85 | if
86 | (e.target.classList.contains('seat') &&
87 | !e.target.classList.contains('occupied'))
88 | {
89 | e.target.classList.toggle('selected')
90 |
91 |
92 |
93 | updateSelectedCount()
94 | }
95 | })
96 |
97 |
98 | //initial count & total set
99 | updateSelectedCount()
100 |
--------------------------------------------------------------------------------
/Movie-Seat-Booking/style.css:
--------------------------------------------------------------------------------
1 | @import url("https://fonts.googleapis.com/css2?family=B612&display=swap");
2 |
3 | * {
4 | font-family: "B612", sans-serif;
5 | box-sizing: border-box;
6 | }
7 |
8 | body {
9 | background-color: #091111;
10 | display: flex;
11 | flex-direction: column;
12 | color: rgb(243, 240, 235);
13 | align-items: center;
14 | height: 100vh;
15 | justify-content: center;
16 | margin: 0;
17 | }
18 |
19 | .movie-container {
20 | margin: 20px 0;
21 | }
22 |
23 | .movie-container select {
24 | background-color: #fff;
25 | border: 0;
26 | border-radius: 5px;
27 | font-size: 14px;
28 | margin-left: 10px;
29 | padding: 5px 15px 5px 15px;
30 | -moz-appearance: none;
31 | -webkit-appearance: none;
32 | appearance: none;
33 | }
34 |
35 | .seat {
36 | background-color: #444451;
37 | height: 12px;
38 | width: 15px;
39 | margin: 3px;
40 | border-top-left-radius: 10px;
41 | border-top-right-radius: 10px;
42 | }
43 |
44 | .seat.selected {
45 | background-color: #6feaf6;
46 | }
47 | .row {
48 | display: flex;
49 | }
50 |
51 | .seat.occupied {
52 | background-color: whitesmoke;
53 | }
54 |
55 | .seat:nth-of-type(2) {
56 | margin-right: 18px;
57 | }
58 |
59 | .seat:nth-last-of-type(2) {
60 | margin-left: 18px;
61 | }
62 |
63 | .seat:not(.occupied):hover {
64 | cursor: pointer;
65 | transform: scale(1.2);
66 | }
67 |
68 | .showcase .seat:not(.occupied):hover {
69 | cursor: default;
70 | transform: scale(1);
71 | }
72 |
73 | .showcase {
74 | padding: 5px 10px;
75 | border-radius: 5px;
76 | color: #777;
77 | list-style-type: none;
78 | display: flex;
79 | justify-content: space-between;
80 | background-color: rgba(24, 18, 18, 0.1);
81 | }
82 |
83 | .showcase li {
84 | display: flex;
85 | align-items: center;
86 | justify-content: center;
87 | margin: 0 10px;
88 | }
89 |
90 | .showcase li small {
91 | margin-left: 2px;
92 | }
93 |
94 | .screen {
95 | background-color: white;
96 | height: 70px;
97 | width: 100%;
98 | margin: 15px 0px;
99 | transform: rotateX(-45deg);
100 | box-shadow: 0 3px 50px rgba(230, 225, 225, 0.5);
101 | }
102 |
103 | .container {
104 | perspective: 1000px;
105 | margin-bottom: 30px;
106 | }
107 |
108 | p.text span {
109 | color: #6feaf6;
110 | }
111 |
112 | p.text {
113 | margin: 5px 0;
114 | }
115 |
--------------------------------------------------------------------------------
/Music-Player/images/hey.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proghead00/Ultimate-JS-Projects-Collection/54411c66a6cd59b628ae457a4d03573c8a52fb79/Music-Player/images/hey.jpg
--------------------------------------------------------------------------------
/Music-Player/images/summer.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proghead00/Ultimate-JS-Projects-Collection/54411c66a6cd59b628ae457a4d03573c8a52fb79/Music-Player/images/summer.jpg
--------------------------------------------------------------------------------
/Music-Player/images/ukulele.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proghead00/Ultimate-JS-Projects-Collection/54411c66a6cd59b628ae457a4d03573c8a52fb79/Music-Player/images/ukulele.jpg
--------------------------------------------------------------------------------
/Music-Player/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
Music Player
13 |
14 |
15 |
Music Player
16 |
17 |
18 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/Music-Player/music/hey.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proghead00/Ultimate-JS-Projects-Collection/54411c66a6cd59b628ae457a4d03573c8a52fb79/Music-Player/music/hey.mp3
--------------------------------------------------------------------------------
/Music-Player/music/summer.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proghead00/Ultimate-JS-Projects-Collection/54411c66a6cd59b628ae457a4d03573c8a52fb79/Music-Player/music/summer.mp3
--------------------------------------------------------------------------------
/Music-Player/music/ukulele.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proghead00/Ultimate-JS-Projects-Collection/54411c66a6cd59b628ae457a4d03573c8a52fb79/Music-Player/music/ukulele.mp3
--------------------------------------------------------------------------------
/Music-Player/script.js:
--------------------------------------------------------------------------------
1 | const musicContainer = document.getElementById('music-container');
2 | const playBtn = document.getElementById('play');
3 | const prevBtn = document.getElementById('prev');
4 | const nextBtn = document.getElementById('next');
5 |
6 | const audio = document.getElementById('audio');
7 | const progress = document.getElementById('progress');
8 | const progressContainer = document.getElementById('progress-container');
9 | const title = document.getElementById('title');
10 | const cover = document.getElementById('cover');
11 |
12 | // Song titles
13 | const songs = ['hey', 'summer', 'ukulele'];
14 |
15 | // Keep track of song
16 | let songIndex = 1;
17 |
18 | // Initially load song details into DOM
19 | loadSong(songs[songIndex]);
20 |
21 | // Update song details
22 | function loadSong(song) {
23 | title.innerText = song;
24 | audio.src = `music/${song}.mp3`;
25 | cover.src = `images/${song}.jpg`;
26 | }
27 |
28 | // Play song
29 | let playSong =() => {
30 | musicContainer.classList.add('play');
31 | playBtn.querySelector('i.fas').classList.remove('fa-play');
32 | playBtn.querySelector('i.fas').classList.add('fa-pause');
33 |
34 | audio.play();
35 | }
36 |
37 | // Pause song
38 | let pauseSong =()=> {
39 | musicContainer.classList.remove('play');
40 | playBtn.querySelector('i.fas').classList.add('fa-play');
41 | playBtn.querySelector('i.fas').classList.remove('fa-pause');
42 |
43 | audio.pause();
44 | }
45 |
46 | // Previous song
47 | let prevSong = () => {
48 | songIndex--;
49 |
50 | if (songIndex < 0) {
51 | songIndex = songs.length - 1;
52 | }
53 |
54 | loadSong(songs[songIndex]);
55 |
56 | playSong();
57 | }
58 |
59 | // Next song
60 | let nextSong = () => {
61 | songIndex++;
62 |
63 | if (songIndex > songs.length - 1) {
64 | songIndex = 0;
65 | }
66 |
67 | loadSong(songs[songIndex]);
68 |
69 | playSong();
70 | }
71 |
72 | // Update progress bar
73 | let updateProgress = (e) => {
74 | const { duration, currentTime } = e.srcElement;
75 | const progressPercent = (currentTime / duration) * 100;
76 | progress.style.width = `${progressPercent}%`;
77 | }
78 |
79 | // Set progress bar
80 | let setProgress = (e) => {
81 | const width = this.clientWidth;
82 | const clickX = e.offsetX;
83 | const duration = audio.duration;
84 |
85 | audio.currentTime = (clickX / width) * duration;
86 | }
87 |
88 | // Event listeners
89 | playBtn.addEventListener('click', () => {
90 | const isPlaying = musicContainer.classList.contains('play');
91 |
92 | if (isPlaying) {
93 | pauseSong();
94 | } else {
95 | playSong();
96 | }
97 | });
98 |
99 | // Change song
100 | prevBtn.addEventListener('click', prevSong);
101 | nextBtn.addEventListener('click', nextSong);
102 |
103 | // Time/song update
104 | audio.addEventListener('timeupdate', updateProgress);
105 |
106 | // Click on progress bar
107 | progressContainer.addEventListener('click', setProgress);
108 |
109 | // Song ends
110 | audio.addEventListener('ended', nextSong);
--------------------------------------------------------------------------------
/Music-Player/style.css:
--------------------------------------------------------------------------------
1 | @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap');
2 |
3 | *{
4 | font-family: 'Poppins',
5 | sans-serif; box-sizing: border-box;
6 |
7 | }
8 | body {
9 | background-image: linear-gradient(0deg,
10 | rgba(247, 247, 247, 1) 23.8%,
11 | rgba(252, 221, 221, 1) 92%);
12 | height: 100vh;
13 | display: flex;
14 | flex-direction: column;
15 | align-items: center;
16 | justify-content: center;
17 | margin: 0;
18 | }
19 |
20 | .music-container {
21 | background-color: rgb(255, 255, 255);
22 | border-radius: 95px;
23 | box-shadow: 0px 20px 28px 0 rgba(245, 187, 187, 0.6);
24 | display: flex;
25 | padding: 20px 30px;
26 | position: relative;
27 | margin: 100px 0;
28 | z-index: 10;
29 | }
30 |
31 | .img-container {
32 | position: relative;
33 | width: 110px;
34 | }
35 |
36 | .img-container::after {
37 | content: '';
38 | background-color: rgb(255, 255, 255);
39 | border-radius: 50%;
40 | position: absolute;
41 | bottom: 100%;
42 | left: 50%;
43 | width: 20px;
44 | height: 20px;
45 | transform: translate(-50%, 100%);
46 | }
47 |
48 | .img-container img {
49 | border-radius: 50%;
50 | object-fit: cover;
51 | height: 110px;
52 | width: inherit;
53 | position: absolute;
54 | bottom: 0;
55 | left: 0;
56 | animation: rotate 3s linear infinite;
57 |
58 | animation-play-state: paused;
59 | }
60 |
61 | .music-container.play .img-container img {
62 | animation-play-state: running;
63 | }
64 |
65 | @keyframes rotate {
66 | from {
67 | transform: rotate(0deg);
68 | }
69 |
70 | to {
71 | transform: rotate(360deg);
72 | }
73 | }
74 |
75 | .navigation {
76 | display: flex;
77 | align-items: center;
78 | justify-content: center;
79 | z-index: 1;
80 | }
81 |
82 | .action-btn {
83 | background-color: #fff;
84 | border: 0;
85 | color: #a555a5;
86 | font-size: 30px;
87 | cursor: pointer;
88 | padding: 10px;
89 | margin: 0 20px;
90 | }
91 |
92 | .action-btn:hover{
93 | transition: 120ms transform ease-in;
94 | transform:scale(1.08)
95 | }
96 | .action-btn.action-btn-big {
97 | color: #844f92;
98 | font-size: 30px;
99 | }
100 |
101 | .action-btn:focus {
102 | outline: 0;
103 | }
104 |
105 | .music-info {
106 | background-color: rgba(255, 249, 252, 0.5);
107 | border-radius: 45px 45px 10px 10px;
108 | position: absolute;
109 | top: 0;
110 | left: 20px;
111 | width: calc(100% - 40px);
112 | padding: 10px 10px 10px 150px;
113 | opacity: 0;
114 | transform: translateY(0%);
115 | transition: transform 0.3s ease-in, opacity 0.3s ease-in;
116 | z-index: 0;
117 | }
118 |
119 | .music-container.play .music-info {
120 | opacity: 1;
121 | transform: translateY(-100%);
122 | }
123 |
124 | .music-info h4 {
125 | margin: 0;
126 | }
127 |
128 | .progress-container {
129 | background: #fff;
130 | border-radius: 5px;
131 | cursor: pointer;
132 | margin: 10px 0;
133 | height: 4px;
134 | width: 100%;
135 | }
136 |
137 | .progress {
138 | background-color: #fe8daa;
139 | border-radius: 5px;
140 | height: 100%;
141 | width: 0%;
142 | transition: width 0.1s linear;
143 | }
144 |
--------------------------------------------------------------------------------
/New-Year-Countdown/README.md:
--------------------------------------------------------------------------------
1 | # There's a .gif file attached as a pre-loader. I didn't add it but you can remove the comments for the pre-loader in the files to generate this loader to avoid temporary "0" values when the page reloads.
2 |
--------------------------------------------------------------------------------
/New-Year-Countdown/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
New Year Countdown
10 |
11 |
12 |
13 |
14 |
15 |
New Year Countdown
16 |
17 |
18 |
19 |
00
20 | days
21 |
22 |
23 |
00
24 | hours
25 |
26 |
27 |
00
28 | minutes
29 |
30 |
31 |
00
32 | seconds
33 |
34 |
35 |
36 |
37 |
to
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/New-Year-Countdown/loaderx.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/proghead00/Ultimate-JS-Projects-Collection/54411c66a6cd59b628ae457a4d03573c8a52fb79/New-Year-Countdown/loaderx.gif
--------------------------------------------------------------------------------
/New-Year-Countdown/script.js:
--------------------------------------------------------------------------------
1 | const days = document.getElementById('days')
2 | const hours = document.getElementById('hours')
3 | const minutes = document.getElementById('minutes')
4 | const seconds = document.getElementById('seconds')
5 | const countdown = document.getElementById('countdown')
6 | const year = document.getElementById("year")
7 | // const loading = document.getElementById("loading")
8 |
9 |
10 |
11 | const currentYear = new Date().getFullYear()
12 |
13 | const newYearTime = new Date(`January 01 ${currentYear +1} 00:00:00`)
14 |
15 |
16 | // coming year
17 | year.innerText = currentYear + 1
18 |
19 |
20 |
21 | // update countdown time
22 | let cd = updateCountDown=()=>{
23 |
24 | const currentTime = new Date()
25 |
26 | const diff = newYearTime - currentTime
27 |
28 | const d = Math.floor(diff / 1000 / 60 / 60 / 24)
29 |
30 | const h = Math.floor(diff / 1000 / 60 / 60 ) % 24
31 |
32 | const m = Math.floor(diff / 1000 / 60 ) % 60
33 |
34 | const s = Math.floor(diff / 1000 ) % 60
35 |
36 | // add values to DOM
37 | days.innerHTML = d
38 | hours.innerHTML = h < 10 ? '0' + h : h
39 | minutes.innerHTML = m < 10 ? '0' + m : m
40 | seconds.innerHTML = s < 10 ? '0' + s : s
41 |
42 | }
43 |
44 |
45 | //show preloader
46 | // setTimeout( ()=>{
47 |
48 | // loading.remove()
49 |
50 | // countdown.style.display = 'flex'
51 | // }, 1000)
52 |
53 | // run every sec
54 | setInterval(updateCountDown, 1000)
55 |
56 | updateCountDown()
--------------------------------------------------------------------------------
/New-Year-Countdown/style.css:
--------------------------------------------------------------------------------
1 | @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400&display=swap");
2 |
3 | * {
4 | box-sizing: border-box;
5 | font-family: "Poppins", sans-serif;
6 | }
7 |
8 | body {
9 | background-image: url("https://images.unsplash.com/photo-1492998680170-81f8863d8d2d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=925&q=80");
10 | background-repeat: no-repeat;
11 | background-size: cover;
12 | background-position: center center;
13 | height: 100vh;
14 | color: #fff;
15 | font-family: "Lato", sans-serif;
16 | display: flex;
17 | flex-direction: column;
18 | align-items: center;
19 | justify-content: center;
20 | text-align: center;
21 | margin: 0;
22 | overflow: hidden;
23 | background-blend-mode: hard-light;
24 | }
25 |
26 | /* dark overlay */
27 | body::after {
28 | content: "";
29 | position: absolute;
30 | top: 0;
31 | left: 0;
32 | width: 100%;
33 | height: 100%;
34 | background-color: rgba(0, 0, 0, 0.77);
35 | }
36 |
37 | body * {
38 | z-index: 1;
39 | }
40 |
41 | h1 {
42 | font-size: 60px;
43 | margin: -80px 0 40px;
44 | color: whitesmoke;
45 | }
46 |
47 | .countdown {
48 | display: flex;
49 | transform: scale(2);
50 | }
51 |
52 | .time {
53 | display: flex;
54 | flex-direction: column;
55 | align-items: center;
56 | justify-content: center;
57 | margin: 15px;
58 | }
59 |
60 | .time h2 {
61 | margin: 0 0 5px;
62 | color: rgb(194, 190, 190);
63 | }
64 |
65 | @media (max-width: 500px) {
66 | h1 {
67 | font-size: 45px;
68 | }
69 |
70 | .time {
71 | margin: 5px;
72 | }
73 |
74 | .time h2 {
75 | font-size: 12px;
76 | margin: 0;
77 | }
78 |
79 | .time small {
80 | font-size: 10px;
81 | }
82 | }
83 |
84 | .year {
85 | font-size: 200px;
86 | /* z-index: -1; */
87 | position: absolute;
88 | bottom: 20px;
89 | left: 50%;
90 | transform: translateX(-50%);
91 | color: rgb(216, 216, 226);
92 | }
93 |
94 | /* .loading {
95 | opacity: 0.5;
96 | } */
97 |
98 | .to {
99 | font-size: 4rem;
100 | color: rgb(184, 247, 228);
101 | }
102 |
--------------------------------------------------------------------------------
/OG-Video-Player/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Custom Video Player
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | There are no search results. Try again!
`;
28 | } else {
29 | mealsEl.innerHTML = data.meals
30 | .map(
31 | meal => `
32 |