1
Fork 0
mirror of https://github.com/Steffo99/unisteffo.git synced 2024-11-25 01:14:21 +00:00

Implement footer

This commit is contained in:
Steffo 2021-01-31 02:09:45 +01:00
parent 64cf2ff96d
commit b921ba28af
Signed by: steffo
GPG key ID: 6965406171929D01
7 changed files with 33 additions and 7 deletions

2
.env Normal file
View file

@ -0,0 +1,2 @@
REACT_APP_VERSION=$npm_package_version
REACT_APP_NAME=$npm_package_name

View file

@ -1,5 +1,5 @@
import React from "react"; import React from "react";
import {Bluelib, Main} from "bluelib/lib/components"; import {Bluelib} from "bluelib/lib/components";
import {Router} from "@reach/router"; import {Router} from "@reach/router";
import Home from "./routes/Home"; import Home from "./routes/Home";
import Error404 from "./routes/Error404"; import Error404 from "./routes/Error404";

20
src/components/Footer.js Normal file
View file

@ -0,0 +1,20 @@
import style from './Footer.module.css';
import {Anchor, Title} from "bluelib/lib/components";
export default function Footer() {
return (
<div className={style.footer}>
<Title size={"xs"}>
© {new Date().getFullYear().toString()}
&nbsp;-&nbsp;
<Anchor href="https://steffo.eu/">Stefano Pigozzi</Anchor>
&nbsp;-&nbsp;
<Anchor href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</Anchor>
&nbsp;-&nbsp;
<Anchor href="https://github.com/Steffo99/uni.steffo.eu">{process.env.REACT_APP_NAME} {process.env.REACT_APP_VERSION} ({process.env.NODE_ENV})</Anchor>
&nbsp;-&nbsp;
<Anchor href="https://ko-fi.com/steffo">Supportami</Anchor>
</Title>
</div>
);
}

View file

@ -0,0 +1,5 @@
.footer {
margin-top: 8px;
text-align: center;
font-size: x-small;
}

View file

@ -2,6 +2,7 @@ import React from "react";
import {Main} from "bluelib/lib/components"; import {Main} from "bluelib/lib/components";
import MainTitle from "./MainTitle"; import MainTitle from "./MainTitle";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import Footer from "./Footer";
export default function Page({children, subtitle}) { export default function Page({children, subtitle}) {
@ -11,6 +12,7 @@ export default function Page({children, subtitle}) {
<Main> <Main>
{children} {children}
</Main> </Main>
<Footer/>
</div> </div>
) )
} }

View file

@ -1,12 +1,11 @@
import React from "react"; import React from "react";
import {Split, Title} from "bluelib/lib/components"; import {Split, Title} from "bluelib/lib/components";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import style from "./TitleSplit.module.css";
export default function TitleSplit({children, title}) { export default function TitleSplit({children, className, title}) {
return ( return (
<div className={style.titlesplit}> <div className={className}>
<Title size={"xl"}> <Title size={"xl"}>
{title} {title}
</Title> </Title>
@ -19,5 +18,6 @@ export default function TitleSplit({children, title}) {
TitleSplit.propTypes = { TitleSplit.propTypes = {
children: PropTypes.node, children: PropTypes.node,
className: PropTypes.string,
title: PropTypes.node title: PropTypes.node
} }

View file

@ -1,3 +0,0 @@
.titlesplit {
margin-top: 32px;
}