1
Fork 0

Add a basic footer.

This commit is contained in:
Bauke 2023-06-16 10:06:38 +02:00
parent 21fb058055
commit df0433c0c7
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
4 changed files with 51 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import {Component} from "preact";
import {PageFooter} from "./components/page-footer.js";
import {PageHeader} from "./components/page-header.js";
import {Tours} from "./components/tours.js";
@ -8,6 +9,7 @@ export class App extends Component {
<>
<PageHeader />
<Tours />
<PageFooter />
</>
);
}

View File

@ -0,0 +1,41 @@
import {Component} from "preact";
import browser from "webextension-polyfill";
export class PageFooter extends Component {
render() {
const manifest = browser.runtime.getManifest();
const copyright = (
<p>
&copy;{" "}
<a
target="_blank"
href="https://git.bauke.xyz/tildes-community/tildes-shepherd/src/branch/main/LICENSE"
>
AGPL-3.0-or-later
</a>
</p>
);
const messageCommunity = (
<a target="_blank" href="https://tildes.net/user/Community/new_message">
Message @Community
</a>
);
const version = (
<a
target="_blank"
href={`https://git.bauke.xyz/tildes-community/tildes-shepherd/releases/tag/${manifest.version}`}
>
v{manifest.version}
</a>
);
return (
<footer class="page-footer">
{messageCommunity} / {version} / {copyright}
</footer>
);
}
}

View File

@ -0,0 +1,7 @@
.page-footer {
border-top: 2px solid var(--background-secondary);
display: flex;
gap: 8px;
margin: 16px;
padding: 16px;
}

View File

@ -1,4 +1,5 @@
@use "reset";
@use "components/page-footer";
@use "components/page-header";
@use "components/tours";