Make menu links configurable

This commit is contained in:
Korbs 2024-06-10 21:36:01 -04:00
parent aadfb3fb2e
commit 6ba7b4afe5
2 changed files with 48 additions and 7 deletions

41
config.json Normal file
View file

@ -0,0 +1,41 @@
{
"HeaderItems": [
{
"text": "Link",
"link": "#"
},
{
"text": "Link",
"link": "#"
},
{
"text": "Link",
"link": "#"
}
],
"SidebarItems": [
{
"heading": "Heading"
},
{
"text": "Document Title",
"link": "#"
},
{
"text": "Document Title",
"link": "#"
},
{
"text": "Document Title",
"link": "#"
},
{
"text": "Document Title",
"link": "#"
},
{
"text": "Document Title",
"link": "#"
}
]
}

View file

@ -1,11 +1,11 @@
---
// Environment Variables
import {
SITE_NAME,
META_COLOR,
COLOR,
THEME
SITE_NAME
} from '@utils/GetConfig'
// Configuration
import { HeaderItems } from '../../../config.json'
---
<header>
@ -14,9 +14,9 @@ import {
<h2><a style="text-decoration: none;" href="/">{SITE_NAME}</a></h2>
</div>
<div class="end">
<a href="#">Link</a>
<a href="#">Social</a>
<a href="#">Status</a>
{HeaderItems.map((item) => (
<a href={item.link}>{item.text}</a>
))}
</div>
</div>
</header>