diff --git a/Public/tesla clone/img/accessories.jpg b/Public/tesla clone/img/accessories.jpg new file mode 100644 index 00000000..69743059 Binary files /dev/null and b/Public/tesla clone/img/accessories.jpg differ diff --git a/Public/tesla clone/img/model-3.jpg b/Public/tesla clone/img/model-3.jpg new file mode 100644 index 00000000..ca66525e Binary files /dev/null and b/Public/tesla clone/img/model-3.jpg differ diff --git a/Public/tesla clone/img/model-s.jpg b/Public/tesla clone/img/model-s.jpg new file mode 100644 index 00000000..d4259575 Binary files /dev/null and b/Public/tesla clone/img/model-s.jpg differ diff --git a/Public/tesla clone/img/model-x.jpg b/Public/tesla clone/img/model-x.jpg new file mode 100644 index 00000000..42f4c4a6 Binary files /dev/null and b/Public/tesla clone/img/model-x.jpg differ diff --git a/Public/tesla clone/img/model-y.jpg b/Public/tesla clone/img/model-y.jpg new file mode 100644 index 00000000..cec742ea Binary files /dev/null and b/Public/tesla clone/img/model-y.jpg differ diff --git a/Public/tesla clone/img/roof.jpg b/Public/tesla clone/img/roof.jpg new file mode 100644 index 00000000..3313a6cf Binary files /dev/null and b/Public/tesla clone/img/roof.jpg differ diff --git a/Public/tesla clone/img/solarpanels.jpg b/Public/tesla clone/img/solarpanels.jpg new file mode 100644 index 00000000..b8194ca2 Binary files /dev/null and b/Public/tesla clone/img/solarpanels.jpg differ diff --git a/Public/tesla clone/tesla.css b/Public/tesla clone/tesla.css new file mode 100644 index 00000000..fd9525c9 --- /dev/null +++ b/Public/tesla clone/tesla.css @@ -0,0 +1,157 @@ +*{ + margin: 0; + padding: 0; + box-sizing: border-box; + scroll-behavior: smooth; +} +body { + font-family: 'poppins', sans-serif; + color: #171a20; + +} + +.desktop { + display: none; +} + +@media (min-width: 1200px) { + .desktop { + display: initial; + } +} + +header { + display: grid; + grid-template-columns: auto 1fr auto; + padding: 5px 10px; + position: fixed; + top: 0; + z-index: 2; + width: 100%; + font-weight: 500; +} + +a.logo { + height: 12px; + width: 100px; + color: inherit; +} + +header a { + color: inherit; +} + +header nav a { + text-decoration: none; + padding: 5px 10px; +} + +header nav.center { + text-align: center; +} + +header nav.right{ + text-align: end; +} + +section{ + height: 100vh; + background-size: cover; + background-position: center center; +} + +section .content{ + width: 100%; + height: 100vh; + padding-top: 15vh; + padding-bottom: 15vh; + text-align: center; + display: grid; + grid-template-rows: min-content auto min-content; +} + +section h1{ + font-size: 3rem; +} + +section a{ + color: inherit; +} + +section .buttons a{ + display: block; + background-color: #eee; + color: inherit; + border-radius: 25px; + padding: 12px 50px; + text-transform: uppercase; + text-decoration: none; + font-size: 12px; + font-weight: 500; +} + +section .buttons a:first-child{ + background-color: #222; + color: #fff; +} + +section .buttons{ + display: grid; + row-gap: 20px; +} +@media (min-width: 768px) { + section .buttons{ + max-width: 640px; + margin: 0 auto; + grid-template-columns: 1fr 1fr; + column-gap: 20px; + } +} + +aside{ + position: fixed; + transition: right .4s ease-in-out; + right: -320px; + width: 320px; + height: 100vh; + background-color: white; + padding: 80px 30px; + z-index: 4; + font-weight: 500; +} + +aside.active{ + right: 0; +} + +aside a{ + display: block; + color: inherit; + text-decoration: none; + padding: 8px 0; + font-size: 15px; +} + +aside button.close{ + position: absolute; + top: 10px; + right: 10px; + border: none; + font-size: 30px; + padding: 10px; + background-color: transparent; + font-family: sans-serif; + cursor: pointer; +} + +.backdrop{ + display: none; + position: fixed; + inset: 0; + background-color: rgba(0, 0, 0, .35); + backdrop-filter: blur(5px); +} + +.backdrop.active{ + display: block; +} \ No newline at end of file diff --git a/Public/tesla clone/tesla.html b/Public/tesla clone/tesla.html new file mode 100644 index 00000000..8eacea84 --- /dev/null +++ b/Public/tesla clone/tesla.html @@ -0,0 +1,138 @@ + + + + + + + + + + + Electric Cars, Solar Clean Energy + + + + +
+ + + +
+
+ + +
+
+

Model 3

+

Order online for Touchless Delivery

+ +
+
+
+
+

Model 3

+

Order online for Touchless Delivery

+ +
+
+
+
+

Model 3

+

Order online for Touchless Delivery

+ +
+
+
+
+

Model 3

+

Order online for Touchless Delivery

+ +
+
+
+
+

Model 3

+

Order online for Touchless Delivery

+ +
+
+
+
+

Model 3

+

Order online for Touchless Delivery

+ +
+
+
+
+

Model 3

+

Order online for Touchless Delivery

+ +
+
+ + + + + \ No newline at end of file diff --git a/Public/tesla clone/tesla.js b/Public/tesla clone/tesla.js new file mode 100644 index 00000000..c6177a0d --- /dev/null +++ b/Public/tesla clone/tesla.js @@ -0,0 +1,22 @@ +const openMenu = () =>{ + document.querySelector('.backdrop').className = 'backdrop active'; + document.querySelector('aside').className = 'active'; +} +const closeMenu = () =>{ + document.querySelector('.backdrop').className = 'backdrop'; + document.querySelector('aside').className = ''; +} + +document.getElementById('menubtn').onclick = e =>{ + e.preventDefault(); + openMenu(); +} + +document.querySelector('aside button.close').onclick = e => { + closeMenu(); +} + +document.querySelector('.backdrop').onclick = e => { + closeMenu(); +} + diff --git a/README.md b/README.md index d092bd7e..5272a12d 100644 --- a/README.md +++ b/README.md @@ -266,6 +266,7 @@ git push -u origin | 172. | [Dynamic Picture Frame](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/picture-frame.html)| 173. | [FAQ Collapse](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/FAQcollapse.html)| 174. | [Multiplication Table Generator](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/multiplication-table-generator.html) | 175. | [Expense Tracker Calculator](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/trackerExpense/index.html)| 176. | [Check my IP](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/check-my-ip/check-my-ip.html) | 177. | [SocialTray](https://rococo-praline-28f4e4.netlify.app/) | 178. | [SimplyRecipes](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/SimplyRecipes/) | 179. | [Employee DataBase](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/employeeDatabase.html) +| 180. | [Tesla Clone](https://zerooctave.github.io/ZeroOctave-Javascript-Projects/Public/tesla.html)
diff --git a/assets/Js/tesla.js b/assets/Js/tesla.js new file mode 100644 index 00000000..c6177a0d --- /dev/null +++ b/assets/Js/tesla.js @@ -0,0 +1,22 @@ +const openMenu = () =>{ + document.querySelector('.backdrop').className = 'backdrop active'; + document.querySelector('aside').className = 'active'; +} +const closeMenu = () =>{ + document.querySelector('.backdrop').className = 'backdrop'; + document.querySelector('aside').className = ''; +} + +document.getElementById('menubtn').onclick = e =>{ + e.preventDefault(); + openMenu(); +} + +document.querySelector('aside button.close').onclick = e => { + closeMenu(); +} + +document.querySelector('.backdrop').onclick = e => { + closeMenu(); +} +