Major rewrite for 0.1.6 - Dynamic database entry generation based on json files, dynamic run page generation and more
This commit is contained in:
parent
e75a575417
commit
7fe9e8c25f
28 changed files with 2954 additions and 45 deletions
src/layouts
|
@ -1,7 +1,11 @@
|
|||
---
|
||||
import Navbar from '../components/navbar.astro'
|
||||
import NavbarEntry from '../components/navbarEntry.astro'
|
||||
import navdata from '../../static/assets/data/_navdata.json'
|
||||
import navdata from '../../static/data/_navdata.json'
|
||||
import embed from '../assets/embed.png'
|
||||
import home from 'iconoir/icons/home.svg'
|
||||
import database from 'iconoir/icons/database.svg'
|
||||
import type { IconsLookup } from '../types/icons'
|
||||
|
||||
export interface Props {
|
||||
title: string
|
||||
|
@ -9,6 +13,11 @@ export interface Props {
|
|||
descriptionOverride?: string
|
||||
}
|
||||
|
||||
const icons: IconsLookup = {
|
||||
home: home,
|
||||
database: database
|
||||
}
|
||||
|
||||
const { descriptionOverride, currentpage, title } = Astro.props
|
||||
let description
|
||||
|
||||
|
@ -22,6 +31,11 @@ let currPage = 'https://fgo-ta.com/'
|
|||
if (currentpage !== 'home') {
|
||||
currPage += currentpage
|
||||
}
|
||||
|
||||
const mapped_navdata = navdata.map((item) => ({
|
||||
...item,
|
||||
...{ icon: icons[item.icon] },
|
||||
}))
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
@ -36,23 +50,19 @@ if (currentpage !== 'home') {
|
|||
<meta property="og:title" content={title} />
|
||||
<meta property="og:url" content={currPage} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:image" content="/assets/embed.png" />
|
||||
<meta property="og:image" content={embed.src} />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta name="theme-color" content="#b86cff" />
|
||||
<!-- Links -->
|
||||
<link rel="icon" type="image/ico" href="/assets/favicon.ico" />
|
||||
<link rel="icon" type="image/ico" href="/favicon.ico" />
|
||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||
<link href="https://mastodon.neshweb.net/@Firq" rel="me" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/gh/iconoir-icons/iconoir@main/css/iconoir.css"
|
||||
/>
|
||||
</head>
|
||||
<body>
|
||||
<Navbar>
|
||||
{
|
||||
navdata.map((item) => (
|
||||
mapped_navdata.map((item) => (
|
||||
<NavbarEntry currentPage={currentpage} {...item} />
|
||||
))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue