diff options
Diffstat (limited to 'src/styles')
| -rw-r--r-- | src/styles/Navbar.css | 72 | ||||
| -rw-r--r-- | src/styles/index.css | 46 |
2 files changed, 105 insertions, 13 deletions
diff --git a/src/styles/Navbar.css b/src/styles/Navbar.css index e17decd..9dbf797 100644 --- a/src/styles/Navbar.css +++ b/src/styles/Navbar.css @@ -25,3 +25,75 @@ a.nav-link:hover { a.nav-link:active { color: #609460; } + +@media (max-width: 768px) { + ul.nav-list { + flex-direction: column; + align-items: center; + gap: 2vh; + } +} + +.nav-toggle { + background: transparent; + border: none; + cursor: pointer; + display: none; +} + +.nav-toggle .hamburger { + width: 30px; + height: 2px; + background: white; + display: block; + position: relative; +} + +.nav-toggle .hamburger::before, .nav-toggle .hamburger::after { + content: ''; + background: white; + display: block; + position: absolute; + width: 100%; + height: 100%; +} + +.nav-toggle .hamburger::before { + top: -10px; +} + +.nav-toggle .hamburger::after { + bottom: -10px; +} + +@media (max-width: 768px) { + .nav-toggle { + display: block; + padding: 20px; + } + + + ul.nav-list { + flex-direction: column; + align-items: center; + gap: 2vh; + display: none; + } + + ul.nav-list.show { + display: flex; + } + + @keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 1; + } + } + + .nav-list.show a.nav-link { + animation: fadeIn 0.5s ease-in-out forwards; + } +} diff --git a/src/styles/index.css b/src/styles/index.css index 5c05c0b..9f383cd 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -8,19 +8,10 @@ border-radius: 20%; } -h1 { - font-weight: 500; -} - #title { font-size: 4vh; } -h2 { - font-weight: 500; - font-size: 2.5vh; -} - ul { padding-left: 20px; font-size: 1.1em; @@ -48,11 +39,11 @@ p { } .information { - display: flex; - flex-direction: column; - flex-wrap: wrap; + display: grid; + grid-template-columns: 1fr 0.7fr; + grid-template-rows: auto auto; gap: 2vh; - padding: 30px 30px 30px 30px + padding: 30px; } .box { @@ -61,3 +52,32 @@ p { background: #3B513B; border-radius: 20px; } + +.box:nth-child(1), .box:nth-child(2) { + grid-column: 1; +} + +.latest-posts { + grid-column: 2; + grid-row: 1 / span 2; +} + +/* Mobile view */ +@media (max-width: 768px) { + .social { + font-size: 5vh; + gap: 3vh; + } + + .information { + grid: auto auto auto / 1fr; + } + + .box:nth-child(1), .box:nth-child(2), .latest-posts { + grid-column: 1; + } + + .latest-posts { + grid-row: auto; + } +} |
