forked from mirrors/pronouns.cc
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="d-flex flex-column min-vh-100">
|
||||||
<div class="flex-grow-1">
|
<div class="flex-grow-1">
|
||||||
<Navigation />
|
<Navigation commit={data.git_commit} />
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<slot />
|
<slot />
|
||||||
<div class="position-absolute top-0 start-50 translate-middle-x">
|
<div class="position-absolute top-0 start-50 translate-middle-x">
|
||||||
|
|
|
@ -27,6 +27,8 @@
|
||||||
import { apiFetch, apiFetchClient } from "$lib/api/fetch";
|
import { apiFetch, apiFetchClient } from "$lib/api/fetch";
|
||||||
import { addToast } from "$lib/toast";
|
import { addToast } from "$lib/toast";
|
||||||
|
|
||||||
|
export let commit: string;
|
||||||
|
|
||||||
let theme: string;
|
let theme: string;
|
||||||
let currentUser: MeUser | null;
|
let currentUser: MeUser | null;
|
||||||
let showMenu: boolean = false;
|
let showMenu: boolean = false;
|
||||||
|
@ -113,7 +115,12 @@
|
||||||
expand="lg"
|
expand="lg"
|
||||||
class="mb-4"
|
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" />
|
<NavbarToggler on:click={toggleMenu} aria-label="Toggle menu" />
|
||||||
<Collapse isOpen={showMenu} navbar expand="lg">
|
<Collapse isOpen={showMenu} navbar expand="lg">
|
||||||
<Nav class="ms-auto" navbar>
|
<Nav class="ms-auto" navbar>
|
||||||
|
|
Loading…
Reference in a new issue