2021-06-14 20:41:10 -05:00
|
|
|
import HomePage from "../components/home-page";
|
2021-05-01 01:15:09 -05:00
|
|
|
import IDBlock from "../components/identity-block";
|
2021-04-18 23:14:21 -05:00
|
|
|
import WCard from "../components/werefox-card";
|
2021-05-01 01:15:09 -05:00
|
|
|
import PBlock from "../components/page-block";
|
2021-04-07 15:46:55 -05:00
|
|
|
|
2021-06-11 03:10:41 -05:00
|
|
|
// An object listing pages folks can visit
|
|
|
|
export async function getStaticProps() {
|
|
|
|
const fs = require("fs");
|
|
|
|
const yaml = require("js-yaml");
|
|
|
|
let IDENTITIES = {};
|
|
|
|
let PAGES = {};
|
2021-06-14 23:30:03 -05:00
|
|
|
let PARTNERS = {};
|
2021-06-11 03:10:41 -05:00
|
|
|
|
|
|
|
try {
|
|
|
|
let fileContent = fs.readFileSync("./data/identities.yml", "utf8");
|
|
|
|
IDENTITIES = yaml.load(fileContent);
|
|
|
|
fileContent = fs.readFileSync("./data/pages.yml", "utf8");
|
|
|
|
PAGES = yaml.load(fileContent);
|
2021-06-14 23:30:03 -05:00
|
|
|
fileContent = fs.readFileSync("./data/partners.yml", "utf8");
|
|
|
|
PARTNERS = yaml.load(fileContent);
|
2021-06-11 03:10:41 -05:00
|
|
|
} catch (e) {
|
|
|
|
console.log(e);
|
|
|
|
}
|
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
IDENTITIES,
|
|
|
|
PAGES,
|
2021-06-14 23:30:03 -05:00
|
|
|
PARTNERS,
|
2021-06-11 03:10:41 -05:00
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2021-06-14 23:30:03 -05:00
|
|
|
export default function Home({ IDENTITIES, PAGES, PARTNERS }) {
|
|
|
|
const partnerslen = PARTNERS ? Object.keys(PARTNERS).length : 0;
|
2021-04-07 15:46:55 -05:00
|
|
|
return (
|
2021-06-14 20:41:10 -05:00
|
|
|
<HomePage page_title="About A Werefox" card_title="Hi! I'm Alexis Werefox!">
|
2021-05-01 01:15:09 -05:00
|
|
|
<WCard innerText="Basic Info">
|
2021-07-08 23:41:35 -05:00
|
|
|
<IDBlock identities={IDENTITIES} partners={partnerslen} />
|
2021-04-26 22:30:21 -05:00
|
|
|
</WCard>
|
2021-05-01 01:15:09 -05:00
|
|
|
<WCard innerText="Welcome to my little info site!">
|
|
|
|
<p className="p-4 text-lg text-center text-werefox-blue-dark dark:text-werefox-blue">
|
|
|
|
I'd describe myself as somewhere between a hot date and a hot mess.
|
|
|
|
Just a witchy foxxo programmer trying to make it in the world tbh.
|
|
|
|
</p>
|
|
|
|
<p className="pl-4 pr-4 pb-4 text-lg text-center text-werefox-blue-dark dark:text-werefox-blue">
|
|
|
|
Feel free to click/tap any of the cute buttons above this to learn
|
|
|
|
more about my different aspects of personality.
|
|
|
|
</p>
|
|
|
|
<p className="pl-4 pr-4 pb-4 text-lg text-center text-werefox-blue-dark dark:text-werefox-blue">
|
|
|
|
Down below, I've got some more neat little pages and useful info you
|
|
|
|
can look at.
|
|
|
|
</p>
|
|
|
|
<p className="pl-4 pr-4 pb-4 text-lg text-center text-werefox-blue-dark dark:text-werefox-blue">
|
|
|
|
Please do look around and enjoy your stay!~ 💙
|
|
|
|
</p>
|
2021-04-26 22:30:21 -05:00
|
|
|
</WCard>
|
2021-05-01 01:15:09 -05:00
|
|
|
<WCard innerText="Neat Pages!">
|
2021-06-11 03:10:41 -05:00
|
|
|
<PBlock pages={PAGES} />
|
2021-04-25 01:57:01 -05:00
|
|
|
</WCard>
|
2021-06-14 20:41:10 -05:00
|
|
|
</HomePage>
|
2021-04-17 21:38:19 -05:00
|
|
|
);
|
2021-04-07 15:46:55 -05:00
|
|
|
}
|