|
124 | 124 | filter: invert(1); |
125 | 125 | } |
126 | 126 |
|
| 127 | + /* Hamburger Menu */ |
| 128 | + .hamburger { |
| 129 | + display: none; |
| 130 | + flex-direction: column; |
| 131 | + gap: 5px; |
| 132 | + background: transparent; |
| 133 | + border: none; |
| 134 | + cursor: pointer; |
| 135 | + padding: 8px; |
| 136 | + } |
| 137 | + |
| 138 | + .hamburger span { |
| 139 | + width: 24px; |
| 140 | + height: 2px; |
| 141 | + background: var(--accent-green); |
| 142 | + transition: all 0.3s; |
| 143 | + border-radius: 2px; |
| 144 | + } |
| 145 | + |
| 146 | + .hamburger.active span:nth-child(1) { |
| 147 | + transform: rotate(45deg) translate(7px, 7px); |
| 148 | + } |
| 149 | + |
| 150 | + .hamburger.active span:nth-child(2) { |
| 151 | + opacity: 0; |
| 152 | + } |
| 153 | + |
| 154 | + .hamburger.active span:nth-child(3) { |
| 155 | + transform: rotate(-45deg) translate(7px, -7px); |
| 156 | + } |
| 157 | + |
| 158 | + .mobile-menu { |
| 159 | + display: none; |
| 160 | + position: fixed; |
| 161 | + top: 60px; |
| 162 | + left: 0; |
| 163 | + right: 0; |
| 164 | + background: var(--bg-darker); |
| 165 | + border-bottom: 1px solid var(--border-color); |
| 166 | + max-height: 0; |
| 167 | + overflow: hidden; |
| 168 | + transition: max-height 0.3s ease; |
| 169 | + z-index: 99; |
| 170 | + } |
| 171 | + |
| 172 | + .mobile-menu.active { |
| 173 | + max-height: 400px; |
| 174 | + } |
| 175 | + |
| 176 | + .mobile-menu-content { |
| 177 | + display: flex; |
| 178 | + flex-direction: column; |
| 179 | + padding: 16px; |
| 180 | + gap: 8px; |
| 181 | + } |
| 182 | + |
| 183 | + .mobile-menu-content a { |
| 184 | + padding: 12px 16px; |
| 185 | + border-radius: 6px; |
| 186 | + color: var(--text-light); |
| 187 | + font-size: 0.9rem; |
| 188 | + transition: background 0.2s; |
| 189 | + } |
| 190 | + |
| 191 | + .mobile-menu-content a:hover { |
| 192 | + background: var(--bg-card); |
| 193 | + } |
| 194 | + |
127 | 195 | /* Hero Section */ |
128 | 196 | .hero { |
129 | 197 | min-height: 100vh; |
|
754 | 822 |
|
755 | 823 | /* Responsive */ |
756 | 824 | @media (max-width: 768px) { |
757 | | - .nav-links { |
758 | | - gap: 16px; |
| 825 | + nav { |
| 826 | + position: relative; |
759 | 827 | } |
760 | 828 |
|
761 | | - .nav-links > a[href^="#"] { |
| 829 | + .nav-container { |
| 830 | + height: 60px; |
| 831 | + flex-direction: row; |
| 832 | + align-items: center; |
| 833 | + justify-content: space-between; |
| 834 | + padding: 0 16px; |
| 835 | + } |
| 836 | + |
| 837 | + .nav-logo { |
| 838 | + width: auto; |
| 839 | + } |
| 840 | + |
| 841 | + .nav-links { |
762 | 842 | display: none; |
763 | 843 | } |
764 | 844 |
|
765 | | - .btn-github { |
766 | | - padding: 6px 12px; |
767 | | - font-size: 0.8rem; |
| 845 | + .hamburger { |
| 846 | + display: flex; |
| 847 | + } |
| 848 | + |
| 849 | + .mobile-menu { |
| 850 | + display: block; |
| 851 | + position: absolute; |
| 852 | + top: 60px; |
768 | 853 | } |
769 | 854 |
|
770 | 855 | #version-badge { |
|
790 | 875 | } |
791 | 876 |
|
792 | 877 | .hero { |
793 | | - padding: 60px 16px 24px; |
| 878 | + padding: 40px 16px 24px; |
794 | 879 | min-height: auto; |
795 | 880 | justify-content: flex-start; |
796 | 881 | } |
|
897 | 982 | <a href="#" class="nav-logo"> |
898 | 983 | >_ Fresh <span id="version-badge"></span> |
899 | 984 | </a> |
| 985 | + <button class="hamburger" onclick="toggleMobileMenu()" aria-label="Menu"> |
| 986 | + <span></span> |
| 987 | + <span></span> |
| 988 | + <span></span> |
| 989 | + </button> |
900 | 990 | <div class="nav-links"> |
901 | 991 | <a href="#features">Features</a> |
902 | 992 | <a href="#install">Install</a> |
|
914 | 1004 | </div> |
915 | 1005 | </nav> |
916 | 1006 |
|
| 1007 | + <!-- Mobile Menu --> |
| 1008 | + <div class="mobile-menu" id="mobile-menu"> |
| 1009 | + <div class="mobile-menu-content"> |
| 1010 | + <a href="#features" onclick="toggleMobileMenu()">Features</a> |
| 1011 | + <a href="#install" onclick="toggleMobileMenu()">Install</a> |
| 1012 | + <a href="docs/">Docs</a> |
| 1013 | + <a href="https://github.com/sinelaw/fresh/blob/master/CHANGELOG.md" target="_blank">Changelog</a> |
| 1014 | + <a href="https://discord.gg/qUutBj9t" target="_blank">Discord</a> |
| 1015 | + <a href="https://github.com/sinelaw/fresh" target="_blank">GitHub</a> |
| 1016 | + </div> |
| 1017 | + </div> |
| 1018 | + |
917 | 1019 | <!-- Hero Section --> |
918 | 1020 | <section class="hero"> |
919 | 1021 | <div class="hero-content"> |
@@ -1239,6 +1341,13 @@ <h2>What People Are Saying</h2> |
1239 | 1341 | </footer> |
1240 | 1342 |
|
1241 | 1343 | <script> |
| 1344 | + function toggleMobileMenu() { |
| 1345 | + const menu = document.getElementById('mobile-menu'); |
| 1346 | + const hamburger = document.querySelector('.hamburger'); |
| 1347 | + menu.classList.toggle('active'); |
| 1348 | + hamburger.classList.toggle('active'); |
| 1349 | + } |
| 1350 | + |
1242 | 1351 | function copyCode(elementId, btn) { |
1243 | 1352 | const text = document.getElementById(elementId).textContent; |
1244 | 1353 | navigator.clipboard.writeText(text).then(() => { |
|
0 commit comments