Improved embed (Now generated dynamically)

This commit is contained in:
Firq 2023-03-05 23:10:37 +01:00
parent 89efb44feb
commit 440591efa9
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
6 changed files with 27 additions and 9 deletions

View file

@ -6,10 +6,22 @@ import navdata from '../../static/_navdata.json'
export interface Props {
title: string;
currentpage: string;
descriptionOverride?: string;
}
const { currentpage, title } = Astro.props;
const description: string = "A reference for all esports Servants, CEs and already completed TAs that Firq can provide. Contact information available as well.";
const { descriptionOverride, currentpage, title } = Astro.props;
let description;
if(descriptionOverride === undefined) {
description = "Firqs own site!";
} else {
description = descriptionOverride;
}
let currPage = "https://firq.pages.neshweb.net/fgosite/"
if (currentpage !== "home") {
currPage += currentpage;
}
---
<!DOCTYPE html>
@ -19,8 +31,8 @@ const description: string = "A reference for all esports Servants, CEs and alrea
<meta name="viewport" content="width=device-width" />
<link rel="icon" type="image/ico" href="/fgosite/favicon.ico" />
<meta name="generator" content={Astro.generator} />
<meta property="og:title" content="Firq TA Reference" />
<meta property="og:url" content="https://firq.pages.neshweb.net/fgosite/" />
<meta property="og:title" content={title} />
<meta property="og:url" content={currPage} />
<meta name="description" content={description}/>
<meta property="og:description" content={description}/>
<meta property="og:image" content="https://firq.pages.neshweb.net/fgosite/link_192.png" />

View file

@ -24,9 +24,11 @@ const techologydata = [{
"link": "https://www.typescriptlang.org/",
"image": "typescript"
},]
const description = "A summary of the technologies used as well as my contact information. You'll also find disclaimers and thank you notes for the people that helped me.";
---
<Layout title="About - Firq FGO Site" currentpage="about">
<Layout title="About - Firq FGO Site" currentpage="about" descriptionOverride={description}>
<BasicSection title="About">
This is a small sideproject that I'm creating. First time doing webdev in general, and first project using Typescript.
</BasicSection>

View file

@ -2,9 +2,10 @@
import Layout from '../layouts/Layout.astro';
import BasicSection from '../layouts/basicSection.astro';
const description = "A placeholder until I get to designing the Blog pages. Future topics will include FGO, TA, Programming, web technologies and more!"
---
<Layout title="Blog - Firq FGO Site" currentpage="blog">
<Layout title="Blog - Firq FGO Site" currentpage="blog" descriptionOverride={description}>
<BasicSection title="Work in Progress">
Nothing to see here (yet)<br>
Topics will range from FGO to technologies and programming.

View file

@ -5,9 +5,10 @@ import BaseSection from '../layouts/baseSection.astro';
import FavouriteCard from '../components/favouriteCard.astro';
import favouritesdata from '../../static/_favouritesdata.json';
const description = "The very own page of Firq for providing informating about TA servants, listing past TA achievements and (in the future) hosting a blog for talking about FGO, Programming and other stuff"
---
<Layout title="Home - Firq FGO Site" currentpage="home">
<Layout title="Home - Firq FGO Site" currentpage="home" descriptionOverride={description}>
<Hero/>
<BaseSection title="Favourites">
{favouritesdata.map((item) => (<FavouriteCard {...item}/>))}

View file

@ -8,9 +8,10 @@ import servantdata from '../../static/_servantdata.json'
import CeCard from '../components/ceCard.astro';
import cedata from '../../static/_cedata.json'
const description = "A list of all the servants and ces that Firq can offer up on support for TA."
---
<Layout title="Servants - Firq FGO Site" currentpage="servants">
<Layout title="Servants - Firq FGO Site" currentpage="servants" descriptionOverride={description}>
<BaseSection title="Servant Offering">
{servantdata.map((item) => (<ServantCard {...item}/>))}
</BaseSection>

View file

@ -5,9 +5,10 @@ import TaSection from '../layouts/taSection.astro';
import TaCard from '../components/taCard.astro';
import tadata from '../../static/_tadata.json'
const description = "A collection of TAs previously completed be Firq."
---
<Layout title="TA Collection - Firq FGO Site" currentpage="ta-collection">
<Layout title="TA Collection - Firq FGO Site" currentpage="ta-collection" descriptionOverride={description}>
<TaSection title="Completed TAs">
{tadata.map((item) => (<TaCard {...item}/>))}
</TaSection>