mirror of
https://codeberg.org/pronounscc/pronouns.cc.git
synced 2024-11-20 12:39:51 +01:00
feat: add dev badge in navigation for local builds
This commit is contained in:
parent
a49dd09013
commit
65fa7f6d46
2 changed files with 9 additions and 2 deletions
|
@ -26,7 +26,7 @@
|
|||
|
||||
<div class="d-flex flex-column min-vh-100">
|
||||
<div class="flex-grow-1">
|
||||
<Navigation />
|
||||
<Navigation commit={data.git_commit} />
|
||||
<div class="container">
|
||||
<slot />
|
||||
<div class="position-absolute top-0 start-50 translate-middle-x">
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
import { apiFetch, apiFetchClient } from "$lib/api/fetch";
|
||||
import { addToast } from "$lib/toast";
|
||||
|
||||
export let commit: string;
|
||||
|
||||
let theme: string;
|
||||
let currentUser: MeUser | null;
|
||||
let showMenu: boolean = false;
|
||||
|
@ -113,7 +115,12 @@
|
|||
expand="lg"
|
||||
class="mb-4"
|
||||
>
|
||||
<NavbarBrand href="/" aria-label="pronouns.cc landing page"><Logo /></NavbarBrand>
|
||||
<NavbarBrand href="/" aria-label="pronouns.cc landing page">
|
||||
<Logo />
|
||||
{#if commit === "[unknown]"}
|
||||
<Badge color="danger">DEV</Badge>
|
||||
{/if}
|
||||
</NavbarBrand>
|
||||
<NavbarToggler on:click={toggleMenu} aria-label="Toggle menu" />
|
||||
<Collapse isOpen={showMenu} navbar expand="lg">
|
||||
<Nav class="ms-auto" navbar>
|
||||
|
|
Loading…
Reference in a new issue