Added link to simplify truths page, and backlink to home
This commit is contained in:
parent
a93e082765
commit
1ddbe435b1
@ -7,7 +7,6 @@ const Footer: Component<SimpleProps> = ({ className }) => {
|
||||
return (
|
||||
<footer class={ `text-center py-5 absolute bottom-0 container ${ className }` }>
|
||||
<p>Kildekode på <Link to={ "https://github.com/h600878/martials.no" }>GitHub</Link></p>
|
||||
<p>Self-hosted on Raspberry Pi 4</p>
|
||||
</footer>
|
||||
);
|
||||
};
|
||||
|
@ -1,13 +1,24 @@
|
||||
/* @refresh reload */
|
||||
|
||||
import { type Component } from "solid-js";
|
||||
import { type Component, Show } from "solid-js";
|
||||
import type { TitleProps } from "../types/interfaces";
|
||||
import { Icon } from "solid-heroicons";
|
||||
import { chevronLeft } from "solid-heroicons/solid";
|
||||
import { Link } from "./link";
|
||||
|
||||
const Header: Component<TitleProps> = ({ className, title }) => {
|
||||
return (
|
||||
<header class={ className }>
|
||||
<h1 class={ "text-center text-cyan-500" }>{ title }</h1>
|
||||
<div class={"mx-auto w-fit"}>
|
||||
<div class={ "flex-row-center mx-auto w-fit" }>
|
||||
|
||||
<Show when={ typeof location !== "undefined" && location.pathname !== "/" } keyed>
|
||||
<Link to={ "/" } newTab={ false } title={ "Back to homepage" }>
|
||||
<Icon path={ chevronLeft } class={ "text-cyan-500" } />
|
||||
</Link>
|
||||
</Show>
|
||||
|
||||
<h1 class={ "text-center text-cyan-500" }>{ title }</h1>
|
||||
</div>
|
||||
<div class={ "mx-auto w-fit" }>
|
||||
<p>Av Martin Berg Alstad</p>
|
||||
</div>
|
||||
</header>
|
||||
|
@ -10,9 +10,10 @@ export const Link: Component<LinkProps> = (
|
||||
className,
|
||||
id,
|
||||
newTab = true,
|
||||
title,
|
||||
}) => {
|
||||
return (
|
||||
<a href={ to } id={ id }
|
||||
<a href={ to } id={ id } title={ title }
|
||||
rel={ `${ rel } ${ newTab ? "noreferrer" : undefined }` }
|
||||
target={ newTab ? "_blank" : undefined }
|
||||
class={ `link ${ className }` }>
|
||||
|
@ -29,6 +29,11 @@ const cards = [
|
||||
title: "Hjemmeside",
|
||||
children: <p>Sjekk ut mine andre prosjekter</p>,
|
||||
to: "https://h600878.github.io/",
|
||||
},
|
||||
{
|
||||
title: "Forenkle sannhetsverdier",
|
||||
children: <p>Implementering av API</p>,
|
||||
to: `/simplify-truths.html`,
|
||||
}
|
||||
] satisfies CardProps[];
|
||||
|
||||
|
@ -5,6 +5,7 @@ export interface SimpleProps {
|
||||
className?: string,
|
||||
style?: JSX.CSSProperties,
|
||||
id?: string,
|
||||
title?: string,
|
||||
}
|
||||
|
||||
export interface ChildProps extends SimpleProps {
|
||||
|
Loading…
x
Reference in New Issue
Block a user