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