add source code link
This commit is contained in:
parent
f7771c7df3
commit
7fab3d0d9f
2 changed files with 60 additions and 3 deletions
40
public/forgejo-logo-primary.svg
Normal file
40
public/forgejo-logo-primary.svg
Normal file
|
@ -0,0 +1,40 @@
|
|||
<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="https://codeberg.org/forgejo/meta/src/branch/readme/branding#logo">
|
||||
<dc:title>Forgejo logo</dc:title>
|
||||
<cc:creator rdf:resource="https://caesarschinas.com/"><cc:attributionName>Caesar Schinas</cc:attributionName></cc:creator>
|
||||
<cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<style type="text/css">
|
||||
circle {
|
||||
fill: none;
|
||||
stroke: #000;
|
||||
stroke-width: 15;
|
||||
}
|
||||
path {
|
||||
fill: none;
|
||||
stroke: #000;
|
||||
stroke-width: 25;
|
||||
}
|
||||
.orange {
|
||||
stroke: oklch(55.1% 0.027 264.364);
|
||||
}
|
||||
.red {
|
||||
--color-primary-700: var(--color-gray-700);
|
||||
}
|
||||
</style>
|
||||
<g transform="translate(28,28)">
|
||||
<path d="M58 168 v-98 a50 50 0 0 1 50-50 h20" class="orange" />
|
||||
<path d="M58 168 v-30 a50 50 0 0 1 50-50 h20" class="red" />
|
||||
<circle cx="142" cy="20" r="18" class="orange" />
|
||||
<circle cx="142" cy="88" r="18" class="red" />
|
||||
<circle cx="58" cy="180" r="18" class="red" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
|
@ -8,9 +8,26 @@ export default function NavBar({ children }: PropsWithChildren<NavBarProps>) {
|
|||
const user = useUser()
|
||||
const isSuperUser = user?.roles.includes(Role.SuperUser)
|
||||
return (
|
||||
<nav className={`w-full flex flex-row justify-end gap-4 px-4 md:px-8 py-3`}>
|
||||
<nav className={`w-full flex flex-row justify-between px-4 md:px-8 py-3`}>
|
||||
<div className={`flex flex-row justify-start gap-4`}></div>
|
||||
<div className={`flex flex-row justify-end gap-4`}>
|
||||
{children}
|
||||
{isSuperUser && <NavButton to={'/admin/codes'}>admin</NavButton>}
|
||||
<SourceCodeLink />
|
||||
</div>
|
||||
</nav>
|
||||
)
|
||||
}
|
||||
|
||||
function SourceCodeLink() {
|
||||
return (
|
||||
<a
|
||||
className={`size-6`}
|
||||
href="https://git.botris.dev/botris.social"
|
||||
target="_blank"
|
||||
title={'source code'}
|
||||
>
|
||||
<img style={{ color: 'red' }} src="/forgejo-logo-primary.svg" alt="Forgejo Logo" />
|
||||
</a>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue