before push commit
This commit is contained in:
parent
bd920f1731
commit
5217bba8f9
15 changed files with 125 additions and 59 deletions
|
@ -1,34 +1,31 @@
|
|||
---
|
||||
import Navigation from "./Navigation.astro";
|
||||
import conf from "~/site.config";
|
||||
import { isBlog } from "~/lib/metadata";
|
||||
|
||||
let headertext = conf.siteName;
|
||||
let headerurl = "/";
|
||||
let headerarrow = false;
|
||||
|
||||
function isBlog() {
|
||||
return Astro.url.pathname.startsWith("/blog");
|
||||
}
|
||||
|
||||
if (isBlog()) {
|
||||
headertext = "Everything And The Girl";
|
||||
headerurl = "/blog";
|
||||
headerarrow = true;
|
||||
if (isBlog(Astro.url.pathname)) {
|
||||
headertext = "Everything And The Girl";
|
||||
headerurl = "/blog";
|
||||
headerarrow = true;
|
||||
}
|
||||
---
|
||||
|
||||
<header class="md:flex md:justify-between md:items-center mb-4">
|
||||
<h1 class="text-2xl font-bold">
|
||||
{
|
||||
headerarrow && (
|
||||
<span class="mr-2">
|
||||
<a href="/">
|
||||
<i class="fa-solid fa-arrow-left text-light-pu dark:text-dark-pu" />
|
||||
</a>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
<a href={headerurl}>{headertext}</a>
|
||||
</h1>
|
||||
<Navigation />
|
||||
<h1 class="text-2xl font-bold">
|
||||
{
|
||||
headerarrow && (
|
||||
<span class="mr-2">
|
||||
<a href="/">
|
||||
<i class="fa-solid fa-arrow-left text-light-pu dark:text-dark-pu" />
|
||||
</a>
|
||||
</span>
|
||||
)
|
||||
}
|
||||
<a href={headerurl}>{headertext}</a>
|
||||
</h1>
|
||||
<Navigation />
|
||||
</header>
|
||||
|
|
24
src/components/ui/Notif.astro
Normal file
24
src/components/ui/Notif.astro
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
import { clsx } from "clsx";
|
||||
|
||||
interface Props {
|
||||
level: number;
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
// level 0: info/note
|
||||
// level 1: warning
|
||||
// level 2: attn needed: oh fuck
|
||||
|
||||
const { level } = Astro.props;
|
||||
---
|
||||
|
||||
<div
|
||||
class={clsx("sm:block md:hidden text-black", {
|
||||
"bg-light-ye dark:bg-dark-ye": level === 0,
|
||||
"bg-light-or dark:bg-dark-or": level === 1,
|
||||
"bg-light-re dark:bg-dark-re": level === 2,
|
||||
})}
|
||||
>
|
||||
<slot />
|
||||
</div>
|
|
@ -1,3 +0,0 @@
|
|||
<div class="bg-light-ye dark:bg-dark-ye sm:block md:hidden text-black">
|
||||
<p>This view port may be too small.</p> <p>Try ivyneeds.rest on a bigger screen.</p>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue