11---
22import { PAGES } from " ../../../consts" ;
33import { themes } from " ../../../theme" ;
4+ import PageLink from " ./PageLink.astro" ;
45---
56
67<div id =" mobile-header" class =" header" >
78 <div id =" mobile-nav-dropdown" class =" dropdown" >
89 <i id =" burger-menu-icon" class =" fa-solid fa-bars" ></i >
910 <div class =" dropdown-items" >
1011 <nav class =" dropdown-item" >
11- {
12- PAGES .map (({ link , name , leetName }) => (
13- <a href = { link } title = { name } >
14- { leetName }
15- </a >
16- ))
17- }
12+ { PAGES .map ((pageProps ) => <PageLink { ... pageProps } />)}
1813 </nav >
19- <div class =" dropdown-item" >
14+ <div id = " theme-row " class =" dropdown-item" >
2015 <label for =" theme" >Theme:</label >
2116 <select name =" theme" id =" theme-select" >
2217 {
@@ -36,12 +31,14 @@ import { themes } from "../../../theme";
3631 const dropdown = document.getElementById("mobile-nav-dropdown")!;
3732 const burgerIcon = document.getElementById("burger-menu-icon")!;
3833 burgerIcon.addEventListener("click", () =>
39- dropdown.classList.toggle("active")
34+ dropdown.classList.toggle("active"),
4035 );
4136
42- document.getElementById("theme-select")!.addEventListener("change", (e: any) => {
43- setTheme(e.currentTarget.value);
44- });
37+ document
38+ .getElementById("theme-select")!
39+ .addEventListener("change", (e: any) => {
40+ setTheme(e.currentTarget.value);
41+ });
4542</script >
4643
4744<style lang =" scss" >
@@ -60,14 +57,24 @@ import { themes } from "../../../theme";
6057
6158 .dropdown-items {
6259 background-color: var(--bg-color);
60+ padding-top: 15px;
61+ background-clip: padding-box;
6362 }
6463
6564 .dropdown-item {
6665 background-color: var(--bg-hoverable);
66+ padding-left: 15px;
67+ padding-right: 15px
6768 }
6869
6970 nav {
7071 display: flex;
7172 flex-direction: column;
73+ padding-top: 15px;
74+ padding-bottom: 10px;
75+ }
76+
77+ #theme-row {
78+ padding-bottom: 15px;
7279 }
7380</style >
0 commit comments