2023-08-04 22:00:39 -04:00
|
|
|
export default function({ nav }) {
|
|
|
|
const defaultIcon = "https://static.fosterhangdaan.com/icons/tabler-icons/latest/svg/question-mark.svg";
|
|
|
|
|
2023-08-04 18:16:39 -04:00
|
|
|
const iconStyle = {
|
2023-08-04 22:47:55 -04:00
|
|
|
filter: "var(--filter-green)",
|
2023-08-04 18:16:39 -04:00
|
|
|
};
|
|
|
|
|
2023-07-26 09:50:04 -04:00
|
|
|
return (
|
|
|
|
<nav className="navbar">
|
|
|
|
<ul className="navbar-list">
|
|
|
|
<li className="navbar-list-item home">
|
2023-08-04 18:16:39 -04:00
|
|
|
<a href="/">
|
|
|
|
<img
|
|
|
|
src="https://static.fosterhangdaan.com/icons/tabler-icons/latest/svg/home.svg"
|
|
|
|
className="icon"
|
|
|
|
style={iconStyle}
|
|
|
|
/>
|
|
|
|
</a>
|
2023-07-26 09:50:04 -04:00
|
|
|
</li>
|
2023-08-04 22:00:39 -04:00
|
|
|
{nav.menu().children.map(navItem => (
|
|
|
|
<li className="navbar-list-item">
|
|
|
|
<a href={`/${navItem.slug}`} title={navItem.data.title}>
|
|
|
|
<img
|
|
|
|
src={navItem.data.nav_icon || defaultIcon}
|
|
|
|
className="icon"
|
|
|
|
style={iconStyle}
|
|
|
|
/>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
))}
|
2023-07-26 09:50:04 -04:00
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
);
|
|
|
|
}
|