Spaces:
Running
Running
vamos usar uma pega mais moderna e se erros de formatção
Browse files- components/footer.js +120 -2
- components/mobile-menu.js +117 -0
- components/navbar.js +110 -15
- script.js +36 -12
- style.css +90 -21
components/footer.js
CHANGED
|
@@ -3,12 +3,130 @@ class CustomFooter extends HTMLElement {
|
|
| 3 |
this.attachShadow({ mode: 'open' });
|
| 4 |
this.shadowRoot.innerHTML = `
|
| 5 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
.social-icon:hover {
|
|
|
|
| 7 |
transform: translateY(-3px);
|
| 8 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
</style>
|
| 10 |
-
<footer
|
| 11 |
-
|
| 12 |
<div class="grid md:grid-cols-4 gap-8">
|
| 13 |
<div class="md:col-span-2">
|
| 14 |
<div class="flex items-center mb-4">
|
|
|
|
| 3 |
this.attachShadow({ mode: 'open' });
|
| 4 |
this.shadowRoot.innerHTML = `
|
| 5 |
<style>
|
| 6 |
+
:host {
|
| 7 |
+
--footer-bg: var(--color-dark);
|
| 8 |
+
--footer-accent: var(--color-accent);
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
footer {
|
| 12 |
+
background: var(--footer-bg);
|
| 13 |
+
color: white;
|
| 14 |
+
padding: 6rem 0 4rem;
|
| 15 |
+
position: relative;
|
| 16 |
+
overflow: hidden;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
.footer-container {
|
| 20 |
+
max-width: 1440px;
|
| 21 |
+
margin: 0 auto;
|
| 22 |
+
padding: 0 2rem;
|
| 23 |
+
display: grid;
|
| 24 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 25 |
+
gap: 3rem;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
.footer-logo {
|
| 29 |
+
display: flex;
|
| 30 |
+
align-items: center;
|
| 31 |
+
gap: 0.75rem;
|
| 32 |
+
font-size: 1.5rem;
|
| 33 |
+
font-weight: 700;
|
| 34 |
+
margin-bottom: 1.5rem;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.footer-logo-icon {
|
| 38 |
+
width: 2.5rem;
|
| 39 |
+
height: 2.5rem;
|
| 40 |
+
background: var(--color-accent);
|
| 41 |
+
border-radius: 0.5rem;
|
| 42 |
+
display: grid;
|
| 43 |
+
place-items: center;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.footer-heading {
|
| 47 |
+
font-size: 1.25rem;
|
| 48 |
+
font-weight: 600;
|
| 49 |
+
margin-bottom: 1.5rem;
|
| 50 |
+
color: var(--footer-accent);
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.footer-links {
|
| 54 |
+
display: flex;
|
| 55 |
+
flex-direction: column;
|
| 56 |
+
gap: 0.75rem;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.footer-link {
|
| 60 |
+
color: rgba(255, 255, 255, 0.7);
|
| 61 |
+
transition: color 0.2s ease;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
.footer-link:hover {
|
| 65 |
+
color: white;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.contact-item {
|
| 69 |
+
display: flex;
|
| 70 |
+
align-items: center;
|
| 71 |
+
gap: 0.75rem;
|
| 72 |
+
margin-bottom: 1rem;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.social-links {
|
| 76 |
+
display: flex;
|
| 77 |
+
gap: 1rem;
|
| 78 |
+
margin-top: 1.5rem;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
.social-icon {
|
| 82 |
+
width: 2.5rem;
|
| 83 |
+
height: 2.5rem;
|
| 84 |
+
border-radius: 50%;
|
| 85 |
+
background: rgba(255, 255, 255, 0.1);
|
| 86 |
+
display: grid;
|
| 87 |
+
place-items: center;
|
| 88 |
+
transition: all 0.2s ease;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
.social-icon:hover {
|
| 92 |
+
background: var(--footer-accent);
|
| 93 |
transform: translateY(-3px);
|
| 94 |
}
|
| 95 |
+
|
| 96 |
+
.footer-bottom {
|
| 97 |
+
margin-top: 4rem;
|
| 98 |
+
padding-top: 2rem;
|
| 99 |
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
| 100 |
+
display: flex;
|
| 101 |
+
flex-direction: column;
|
| 102 |
+
align-items: center;
|
| 103 |
+
gap: 1rem;
|
| 104 |
+
text-align: center;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.legal-links {
|
| 108 |
+
display: flex;
|
| 109 |
+
gap: 1.5rem;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
.legal-link {
|
| 113 |
+
color: rgba(255, 255, 255, 0.5);
|
| 114 |
+
font-size: 0.875rem;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
.copyright {
|
| 118 |
+
color: rgba(255, 255, 255, 0.5);
|
| 119 |
+
font-size: 0.875rem;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
@media (max-width: 768px) {
|
| 123 |
+
.footer-container {
|
| 124 |
+
grid-template-columns: 1fr;
|
| 125 |
+
}
|
| 126 |
+
}
|
| 127 |
</style>
|
| 128 |
+
<footer>
|
| 129 |
+
<div class="container mx-auto px-4">
|
| 130 |
<div class="grid md:grid-cols-4 gap-8">
|
| 131 |
<div class="md:col-span-2">
|
| 132 |
<div class="flex items-center mb-4">
|
components/mobile-menu.js
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class MobileMenu extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
:host {
|
| 7 |
+
display: none;
|
| 8 |
+
position: fixed;
|
| 9 |
+
top: 0;
|
| 10 |
+
right: 0;
|
| 11 |
+
width: 100%;
|
| 12 |
+
height: 100vh;
|
| 13 |
+
background: rgba(0, 0, 0, 0.8);
|
| 14 |
+
backdrop-filter: blur(8px);
|
| 15 |
+
z-index: 1000;
|
| 16 |
+
opacity: 0;
|
| 17 |
+
pointer-events: none;
|
| 18 |
+
transition: opacity 0.3s ease;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
:host([open]) {
|
| 22 |
+
display: block;
|
| 23 |
+
opacity: 1;
|
| 24 |
+
pointer-events: all;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.menu-container {
|
| 28 |
+
position: absolute;
|
| 29 |
+
top: 0;
|
| 30 |
+
right: 0;
|
| 31 |
+
width: min(90vw, 400px);
|
| 32 |
+
height: 100vh;
|
| 33 |
+
background: white;
|
| 34 |
+
padding: 2rem;
|
| 35 |
+
box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
|
| 36 |
+
transform: translateX(100%);
|
| 37 |
+
transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
:host([open]) .menu-container {
|
| 41 |
+
transform: translateX(0);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.menu-header {
|
| 45 |
+
display: flex;
|
| 46 |
+
justify-content: space-between;
|
| 47 |
+
align-items: center;
|
| 48 |
+
margin-bottom: 3rem;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
.close-btn {
|
| 52 |
+
border: none;
|
| 53 |
+
background: none;
|
| 54 |
+
padding: 0.5rem;
|
| 55 |
+
cursor: pointer;
|
| 56 |
+
border-radius: 0.25rem;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
.close-btn:hover {
|
| 60 |
+
background: rgba(0, 0, 0, 0.05);
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.menu-links {
|
| 64 |
+
display: flex;
|
| 65 |
+
flex-direction: column;
|
| 66 |
+
gap: 1rem;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.menu-link {
|
| 70 |
+
padding: 1rem;
|
| 71 |
+
font-size: 1.1rem;
|
| 72 |
+
color: var(--color-dark);
|
| 73 |
+
text-decoration: none;
|
| 74 |
+
border-radius: 0.5rem;
|
| 75 |
+
transition: all 0.2s ease;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.menu-link:hover {
|
| 79 |
+
background: rgba(79, 70, 229, 0.1);
|
| 80 |
+
color: var(--color-primary);
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.mobile-cta {
|
| 84 |
+
margin-top: 2rem;
|
| 85 |
+
width: 100%;
|
| 86 |
+
}
|
| 87 |
+
</style>
|
| 88 |
+
|
| 89 |
+
<div class="menu-container">
|
| 90 |
+
<div class="menu-header">
|
| 91 |
+
<h3>Menu</h3>
|
| 92 |
+
<button class="close-btn">
|
| 93 |
+
<i data-feather="x"></i>
|
| 94 |
+
</button>
|
| 95 |
+
</div>
|
| 96 |
+
|
| 97 |
+
<div class="menu-links">
|
| 98 |
+
<a href="#cursos" class="menu-link">Cursos</a>
|
| 99 |
+
<a href="#sobre" class="menu-link">Sobre</a>
|
| 100 |
+
<a href="#" class="menu-link">Mentores</a>
|
| 101 |
+
<a href="#" class="menu-link">Contato</a>
|
| 102 |
+
</div>
|
| 103 |
+
|
| 104 |
+
<a href="#" class="cta-button mobile-cta">
|
| 105 |
+
Inscreva-se
|
| 106 |
+
<i data-feather="arrow-right"></i>
|
| 107 |
+
</a>
|
| 108 |
+
</div>
|
| 109 |
+
`;
|
| 110 |
+
|
| 111 |
+
this.shadowRoot.querySelector('.close-btn').addEventListener('click', () => {
|
| 112 |
+
this.removeAttribute('open');
|
| 113 |
+
});
|
| 114 |
+
}
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
customElements.define('mobile-menu', MobileMenu);
|
components/navbar.js
CHANGED
|
@@ -3,34 +3,129 @@ class CustomNavbar extends HTMLElement {
|
|
| 3 |
this.attachShadow({ mode: 'open' });
|
| 4 |
this.shadowRoot.innerHTML = `
|
| 5 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
.nav-link {
|
| 7 |
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
}
|
| 9 |
-
|
| 10 |
-
|
|
|
|
| 11 |
}
|
|
|
|
| 12 |
.nav-link::after {
|
| 13 |
content: '';
|
| 14 |
position: absolute;
|
| 15 |
left: 0;
|
| 16 |
-
bottom:
|
| 17 |
-
width: 0
|
| 18 |
height: 2px;
|
| 19 |
-
background
|
| 20 |
-
transition: width 0.3s
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
}
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
}
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
</style>
|
| 32 |
-
<nav
|
| 33 |
-
|
| 34 |
<div class="flex justify-between items-center py-4">
|
| 35 |
<a href="/" class="flex items-center">
|
| 36 |
<div class="w-10 h-10 bg-blue-600 rounded-lg flex items-center justify-center mr-2">
|
|
|
|
| 3 |
this.attachShadow({ mode: 'open' });
|
| 4 |
this.shadowRoot.innerHTML = `
|
| 5 |
<style>
|
| 6 |
+
:host {
|
| 7 |
+
--nav-height: 5rem;
|
| 8 |
+
--nav-bg: rgba(255, 255, 255, 0.86);
|
| 9 |
+
--nav-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
|
| 10 |
+
--nav-blur: blur(10px);
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
nav {
|
| 14 |
+
background: var(--nav-bg);
|
| 15 |
+
backdrop-filter: var(--nav-blur);
|
| 16 |
+
-webkit-backdrop-filter: var(--nav-blur);
|
| 17 |
+
box-shadow: var(--nav-shadow);
|
| 18 |
+
position: sticky;
|
| 19 |
+
top: 0;
|
| 20 |
+
z-index: 999;
|
| 21 |
+
height: var(--nav-height);
|
| 22 |
+
display: flex;
|
| 23 |
+
align-items: center;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
.nav-container {
|
| 27 |
+
width: 100%;
|
| 28 |
+
max-width: 1440px;
|
| 29 |
+
margin: 0 auto;
|
| 30 |
+
padding: 0 2rem;
|
| 31 |
+
display: flex;
|
| 32 |
+
justify-content: space-between;
|
| 33 |
+
align-items: center;
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
.logo {
|
| 37 |
+
display: flex;
|
| 38 |
+
align-items: center;
|
| 39 |
+
gap: 0.75rem;
|
| 40 |
+
font-weight: 700;
|
| 41 |
+
font-size: 1.25rem;
|
| 42 |
+
text-decoration: none;
|
| 43 |
+
color: var(--color-dark);
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
.logo-icon {
|
| 47 |
+
width: 2.5rem;
|
| 48 |
+
height: 2.5rem;
|
| 49 |
+
background: var(--color-primary);
|
| 50 |
+
color: white;
|
| 51 |
+
border-radius: 0.5rem;
|
| 52 |
+
display: grid;
|
| 53 |
+
place-items: center;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
.nav-links {
|
| 57 |
+
display: flex;
|
| 58 |
+
gap: 2rem;
|
| 59 |
+
align-items: center;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
.nav-link {
|
| 63 |
position: relative;
|
| 64 |
+
color: var(--color-dark);
|
| 65 |
+
text-decoration: none;
|
| 66 |
+
font-weight: 500;
|
| 67 |
+
padding: 0.5rem 0;
|
| 68 |
}
|
| 69 |
+
|
| 70 |
+
.nav-link:hover {
|
| 71 |
+
color: var(--color-primary);
|
| 72 |
}
|
| 73 |
+
|
| 74 |
.nav-link::after {
|
| 75 |
content: '';
|
| 76 |
position: absolute;
|
| 77 |
left: 0;
|
| 78 |
+
bottom: 0;
|
| 79 |
+
width: 0%;
|
| 80 |
height: 2px;
|
| 81 |
+
background: var(--color-primary);
|
| 82 |
+
transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.nav-link:hover::after {
|
| 86 |
+
width: 100%;
|
| 87 |
}
|
| 88 |
+
|
| 89 |
+
.cta-button {
|
| 90 |
+
display: inline-flex;
|
| 91 |
+
align-items: center;
|
| 92 |
+
gap: 0.5rem;
|
| 93 |
+
padding: 0.75rem 1.5rem;
|
| 94 |
+
background: var(--color-primary);
|
| 95 |
+
color: white;
|
| 96 |
+
border-radius: 0.5rem;
|
| 97 |
+
font-weight: 600;
|
| 98 |
+
border: none;
|
| 99 |
+
cursor: pointer;
|
| 100 |
+
transition: all 0.2s ease;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.cta-button:hover {
|
| 104 |
+
background: var(--color-secondary);
|
| 105 |
+
transform: translateY(-2px);
|
| 106 |
+
box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
|
| 107 |
}
|
| 108 |
+
|
| 109 |
+
.menu-toggle {
|
| 110 |
+
display: none;
|
| 111 |
+
background: none;
|
| 112 |
+
border: none;
|
| 113 |
+
cursor: pointer;
|
| 114 |
+
padding: 0.5rem;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
@media (max-width: 768px) {
|
| 118 |
+
.nav-links {
|
| 119 |
+
display: none;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
.menu-toggle {
|
| 123 |
+
display: block;
|
| 124 |
+
}
|
| 125 |
}
|
| 126 |
</style>
|
| 127 |
+
<nav>
|
| 128 |
+
<div class="container mx-auto px-4">
|
| 129 |
<div class="flex justify-between items-center py-4">
|
| 130 |
<a href="/" class="flex items-center">
|
| 131 |
<div class="w-10 h-10 bg-blue-600 rounded-lg flex items-center justify-center mr-2">
|
script.js
CHANGED
|
@@ -1,17 +1,41 @@
|
|
|
|
|
| 1 |
// Main scripts for the application
|
| 2 |
document.addEventListener('DOMContentLoaded', function() {
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
});
|
|
|
|
| 14 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
| 1 |
+
|
| 2 |
// Main scripts for the application
|
| 3 |
document.addEventListener('DOMContentLoaded', function() {
|
| 4 |
+
// Initialize animations
|
| 5 |
+
const animateElements = () => {
|
| 6 |
+
const elements = document.querySelectorAll('.animate-fade, .animate-slide');
|
| 7 |
+
elements.forEach((el, i) => {
|
| 8 |
+
el.style.animationDelay = `${i * 100}ms`;
|
| 9 |
+
el.style.opacity = 0;
|
| 10 |
+
setTimeout(() => {
|
| 11 |
+
el.style.opacity = 1;
|
| 12 |
+
}, i * 100);
|
| 13 |
+
});
|
| 14 |
+
};
|
| 15 |
+
|
| 16 |
+
// Smooth scrolling for anchor links
|
| 17 |
+
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 18 |
+
anchor.addEventListener('click', function(e) {
|
| 19 |
+
e.preventDefault();
|
| 20 |
+
const targetId = this.getAttribute('href');
|
| 21 |
+
if (targetId !== '#') {
|
| 22 |
+
document.querySelector(targetId).scrollIntoView({
|
| 23 |
+
behavior: 'smooth'
|
| 24 |
});
|
| 25 |
+
}
|
| 26 |
});
|
| 27 |
+
});
|
| 28 |
+
|
| 29 |
+
// Initialize mobile menu toggle
|
| 30 |
+
document.addEventListener('click', (e) => {
|
| 31 |
+
if (e.target.closest('[data-toggle-menu]')) {
|
| 32 |
+
const menu = document.querySelector('mobile-menu');
|
| 33 |
+
menu.hasAttribute('open')
|
| 34 |
+
? menu.removeAttribute('open')
|
| 35 |
+
: menu.setAttribute('open', '');
|
| 36 |
+
}
|
| 37 |
+
});
|
| 38 |
|
| 39 |
+
// Initialize animations on page load
|
| 40 |
+
animateElements();
|
| 41 |
+
});
|
style.css
CHANGED
|
@@ -1,36 +1,105 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
-
.
|
| 12 |
-
|
| 13 |
}
|
| 14 |
|
| 15 |
-
/*
|
| 16 |
::-webkit-scrollbar {
|
| 17 |
-
|
|
|
|
| 18 |
}
|
| 19 |
|
| 20 |
::-webkit-scrollbar-track {
|
| 21 |
-
|
| 22 |
}
|
| 23 |
|
| 24 |
::-webkit-scrollbar-thumb {
|
| 25 |
-
|
| 26 |
-
|
|
|
|
| 27 |
}
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
| 31 |
}
|
| 32 |
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
:root {
|
| 3 |
+
--color-primary: #4f46e5;
|
| 4 |
+
--color-secondary: #7c3aed;
|
| 5 |
+
--color-accent: #f59e0b;
|
| 6 |
+
--color-dark: #1e293b;
|
| 7 |
+
--color-light: #f8fafc;
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
/* Base styles with modern reset */
|
| 11 |
+
*, *::before, *::after {
|
| 12 |
+
margin: 0;
|
| 13 |
+
padding: 0;
|
| 14 |
+
box-sizing: border-box;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
html {
|
| 18 |
+
scroll-behavior: smooth;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
body {
|
| 22 |
+
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
| 23 |
+
line-height: 1.5;
|
| 24 |
+
color: var(--color-dark);
|
| 25 |
+
background-color: var(--color-light);
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
/* Modern animations */
|
| 29 |
+
@keyframes fadeIn {
|
| 30 |
+
from { opacity: 0; }
|
| 31 |
+
to { opacity: 1; }
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
@keyframes slideUp {
|
| 35 |
+
from { transform: translateY(20px); opacity: 0; }
|
| 36 |
+
to { transform: translateY(0); opacity: 1; }
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.animate-fade {
|
| 40 |
+
animation: fadeIn 0.6s ease-out forwards;
|
| 41 |
}
|
| 42 |
|
| 43 |
+
.animate-slide {
|
| 44 |
+
animation: slideUp 0.6s ease-out forwards;
|
| 45 |
}
|
| 46 |
|
| 47 |
+
/* Modern scrollbar */
|
| 48 |
::-webkit-scrollbar {
|
| 49 |
+
width: 10px;
|
| 50 |
+
height: 10px;
|
| 51 |
}
|
| 52 |
|
| 53 |
::-webkit-scrollbar-track {
|
| 54 |
+
background: transparent;
|
| 55 |
}
|
| 56 |
|
| 57 |
::-webkit-scrollbar-thumb {
|
| 58 |
+
background: var(--color-primary);
|
| 59 |
+
border-radius: 10px;
|
| 60 |
+
border: 2px solid var(--color-light);
|
| 61 |
}
|
| 62 |
|
| 63 |
+
/* Typography enhancements */
|
| 64 |
+
h1, h2, h3, h4 {
|
| 65 |
+
font-weight: 700;
|
| 66 |
+
line-height: 1.2;
|
| 67 |
+
margin-bottom: 1rem;
|
| 68 |
}
|
| 69 |
|
| 70 |
+
h1 {
|
| 71 |
+
font-size: clamp(2.5rem, 5vw, 4rem);
|
| 72 |
+
background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
|
| 73 |
+
-webkit-background-clip: text;
|
| 74 |
+
background-clip: text;
|
| 75 |
+
color: transparent;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
h2 {
|
| 79 |
+
font-size: clamp(1.75rem, 4vw, 2.5rem);
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
/* Custom transitions */
|
| 83 |
+
a, button {
|
| 84 |
+
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
/* Modern focus states */
|
| 88 |
+
a:focus-visible,
|
| 89 |
+
button:focus-visible {
|
| 90 |
+
outline: 2px solid var(--color-accent);
|
| 91 |
+
outline-offset: 2px;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
/* Utility classes for animations */
|
| 95 |
+
.delay-100 {
|
| 96 |
+
animation-delay: 100ms;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
.delay-200 {
|
| 100 |
+
animation-delay: 200ms;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.delay-300 {
|
| 104 |
+
animation-delay: 300ms;
|
| 105 |
+
}
|