2024-04-07 12:12:40 +00:00
|
|
|
import { pathToRoot } from "../util/path"
|
|
|
|
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
|
|
|
import { classNames } from "../util/lang"
|
|
|
|
import { i18n } from "../i18n"
|
|
|
|
|
|
|
|
const Homebar: QuartzComponent = ({ fileData, cfg, displayClass }: QuartzComponentProps) => {
|
|
|
|
const title = cfg?.pageTitle ?? i18n(cfg.locale).propertyDefaults.title
|
|
|
|
const baseDir = pathToRoot(fileData.slug!)
|
|
|
|
return (
|
|
|
|
<div class={classNames(displayClass, "homebar")}>
|
2024-04-07 12:15:42 +00:00
|
|
|
<a href="index">Home</a>
|
2024-04-07 12:12:40 +00:00
|
|
|
<a href="Characters">Characters</a>
|
|
|
|
<a href="Links">Where you can find me</a>
|
|
|
|
<a href="Projects">Projects</a>
|
|
|
|
<a href="Articles">Articles</a>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
Homebar.css = `
|
|
|
|
.homebar {
|
|
|
|
margin: 0;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
}
|
2024-04-07 12:15:42 +00:00
|
|
|
.homebar > a {
|
2024-04-07 12:12:40 +00:00
|
|
|
border-radius: 25%;
|
|
|
|
background-color: rgba(100,100,100, 0.3);
|
|
|
|
padding: 0.2rem 0.4rem;
|
|
|
|
margin: 0.2rem 0.4rem;
|
|
|
|
text-decoration: none;
|
2024-04-07 12:13:47 +00:00
|
|
|
width: fit-content;
|
|
|
|
height: fit-content;
|
2024-04-07 12:12:40 +00:00
|
|
|
}
|
2024-04-07 12:15:42 +00:00
|
|
|
.homebar > a:hover {
|
2024-04-07 12:12:40 +00:00
|
|
|
background-color: rgba(100,100,100, 0.5);
|
|
|
|
}
|
|
|
|
`
|
|
|
|
|
|
|
|
export default (() => Homebar) satisfies QuartzComponentConstructor
|