feat(directory): add color to fast navigation

This commit is contained in:
Haoyu Xu
2023-06-24 06:32:47 -04:00
parent b0a46ac838
commit 1fc288f903
4 changed files with 16 additions and 8 deletions

View File

@@ -1 +1 @@
1.2.16
1.2.17

View File

@@ -55,6 +55,7 @@ export default function Dropdown(props) {
props.onClick(item)
toggleDropdown()
}}
style={item.color ? { color: item.color } : {}}
>
{
item.icon ? (

View File

@@ -110,18 +110,20 @@
cursor: pointer;
padding: 0.5rem;
font-size: 1rem;
transition: color cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;
display: flex;
flex-direction: row;
justify-content: flex-start;
justify-content: space-between;
align-items: center;
flex-wrap: nowrap;
.text {
flex: 1;
transition: color cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;
margin-left: 1rem;
}
.item_icon {
height: inherit;
width: 1rem;
fill: var(--text-color);
margin-right: 0.5rem;
transition: fill cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;
}
&:hover,
@@ -130,6 +132,9 @@
.text {
color: currentColor;
}
.item_icon {
fill: currentColor;
}
}
}
}

View File

@@ -81,7 +81,8 @@ export default function Home() {
dict[item.date].push({
codename: item.codename,
link: item.link,
type: item.type
type: item.type,
color: item.color
})
})
return dict
@@ -102,6 +103,7 @@ export default function Home() {
name: item.codename[language],
value: item.link,
type: "item",
color: item.color,
icon: <CharIcon
type={item.type}
viewBox={