Skip to content

Commit

Permalink
feat: dev indicator (elk-zone#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 authored Nov 27, 2022
1 parent 72d40ed commit 75aaf85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { APP_NAME } from './constants'
useHead({
titleTemplate: title => `${title ? `${title} | ` : ''}${APP_NAME}${import.meta.env.DEV ? ' (dev)' : ''}`,
titleTemplate: title => `${title ? `${title} | ` : ''}${APP_NAME}${import.meta.env.DEV ? ' (dev)' : window.location.hostname.includes('deploy-preview') ? '(preview)' : ''}`,
link: [
{
rel: 'icon', type: 'image/svg+png', href: '/favicon.png',
Expand Down
6 changes: 5 additions & 1 deletion components/nav/NavTitle.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<script setup>
const sub = import.meta.env.DEV ? 'dev' : window.location.hostname.includes('deploy-preview') ? 'preview' : 'alpha'
</script>

<template>
<!-- Use external to force refresh page and jump to top of timeline -->
<NuxtLink flex px3 py2 items-center text-2xl gap-2 hover:bg-active focus-visible:ring="2 current" rounded-full to="/" external>
<img aria-label="Elk Logo" src="/logo.svg" w-10 h-10>
<div>
Elk <sup text-sm italic text-secondary mt-1>alpha</sup>
Elk <sup text-sm italic text-secondary mt-1>{{ sub }}</sup>
</div>
</NuxtLink>
</template>

0 comments on commit 75aaf85

Please sign in to comment.