Compare commits

...

2 Commits

Author SHA1 Message Date
Fred Boniface 70fb62fd6f Adjust CSS 2024-04-17 10:11:45 +01:00
Fred Boniface 33fb2a607f Add icons to menu and versions page 2024-04-17 09:59:32 +01:00
3 changed files with 34 additions and 15 deletions

View File

@ -3,27 +3,31 @@
{ {
title: 'Home', title: 'Home',
path: '/', path: '/',
svgPath: '/images/navigation/home.svg' svgPath: '/images/navigation/home.svg',
icon: IconHome
}, },
{ {
title: 'PIS Finder', title: 'PIS Finder',
path: '/pis/', path: '/pis/',
svgPath: '/images/navigation/info.svg' svgPath: '/images/navigation/info.svg',
icon: IconNumbers
}, },
{ {
title: 'Menu', title: 'Menu',
path: '/more/', path: '/more/',
svgPath: '/images/navigation/more.svg' svgPath: '/images/navigation/more.svg',
icon: IconMenu2
} }
]; ];
import { page } from '$app/stores'; import { page } from '$app/stores';
import { IconHome, IconMenu2, IconNumbers } from '@tabler/icons-svelte';
</script> </script>
<footer> <footer>
{#each links as item} {#each links as item}
<a href={item.path} class:active={$page.url.pathname == item.path}> <a href={item.path} class:active={$page.url.pathname == item.path}>
<img src={item.svgPath} alt={item.title} /> <svelte:component this={item.icon} />
<br /> <br />
<span>{item.title}</span> <span>{item.title}</span>
</a> </a>

View File

@ -1,19 +1,20 @@
<script> <script>
import Header from '$lib/navigation/header.svelte'; import Header from '$lib/navigation/header.svelte';
import Nav from '$lib/navigation/nav.svelte'; import Nav from '$lib/navigation/nav.svelte';
import { IconCode, IconHelp, IconInfoCircle, IconLocation, IconMessageCode, IconNumber, IconSettings, IconSpy, IconUser, IconUserPlus, IconVersions } from '@tabler/icons-svelte';
const title = 'More'; const title = 'More';
const links = [ const links = [
{ title: 'Your Data', path: '/more/data' }, { title: 'Your Data', path: '/more/data', icon: IconUser},
{ title: 'Registration', path: '/more/reg' }, { title: 'Registration', path: '/more/reg', icon: IconUserPlus },
{ title: 'Settings', path: '/more/settings' }, { title: 'Settings', path: '/more/settings', icon: IconSettings },
{ title: 'Help', path: '/more/help' }, { title: 'Help', path: '/more/help', icon: IconHelp },
{ title: 'About', path: '/more/about' }, { title: 'About', path: '/more/about', icon: IconInfoCircle },
{ title: 'Location Reference Code Lookup', path: '/more/corpus' }, { title: 'Location Reference Code Lookup', path: '/more/corpus', icon: IconLocation },
{ title: 'Reason Code Lookup', path: '/more/reasons' }, { title: 'Reason Code Lookup', path: '/more/reasons', icon: IconMessageCode },
{ title: 'Privacy Policy', path: '/more/privacy' }, { title: 'Privacy Policy', path: '/more/privacy', icon: IconSpy },
{ title: 'Component Versions', path: '/more/versions' }, { title: 'Component Versions', path: '/more/versions', icon: IconVersions },
{ title: 'Statistics', path: '/more/statistics' } { title: 'Statistics', path: '/more/statistics', icon: IconNumber }
]; ];
</script> </script>
@ -22,6 +23,7 @@
{#each links as item} {#each links as item}
<a href={item.path}> <a href={item.path}>
<div> <div>
<svelte:component this={item.icon} />
<p>{item.title}</p> <p>{item.title}</p>
</div> </div>
</a> </a>
@ -37,13 +39,19 @@
border-width: 1px; border-width: 1px;
border-style: solid; border-style: solid;
border-left: none; border-left: none;
padding-left: 0.5rem;
overflow-x: hidden;
border-right: none; border-right: none;
height: 50px; height: 50px;
display: flex;
align-items: center;
margin-bottom: 0.5rem;
} }
a { a {
text-decoration: none; text-decoration: none;
height: 100%; height: 100%;
vertical-align: middle; vertical-align: middle;
overflow-x: hidden;
} }
p { p {
color: white; color: white;
@ -54,6 +62,7 @@
vertical-align: middle; vertical-align: middle;
font-weight: 600; font-weight: 600;
font-size: 20px; font-size: 20px;
overflow-x: hidden;
} }
@media (min-width: 600px) { @media (min-width: 600px) {
p { p {

View File

@ -6,6 +6,7 @@
import LargeLogo from '$lib/images/large-logo.svelte'; import LargeLogo from '$lib/images/large-logo.svelte';
import { version, versionTag } from '$lib/stores/version'; import { version, versionTag } from '$lib/stores/version';
import { getApiUrl } from '$lib/scripts/upstream'; import { getApiUrl } from '$lib/scripts/upstream';
import { IconBrandGolang, IconBrandJavascript, IconBrandPython, IconBrandSvelte, IconBrandTypescript, IconFileTypeSql } from '@tabler/icons-svelte';
const title = 'Versions'; const title = 'Versions';
async function getData() { async function getData() {
@ -24,6 +25,7 @@
{:then data} {:then data}
<Island> <Island>
<p> <p>
<IconBrandSvelte />
<a class="data" href="https://git.fjla.uk/owlboard/owlboard-svelte" target="_blank" <a class="data" href="https://git.fjla.uk/owlboard/owlboard-svelte" target="_blank"
>Web-app version<br /><span class="data" >Web-app version<br /><span class="data"
>{version}{#if versionTag}-{versionTag}{/if}</span >{version}{#if versionTag}-{versionTag}{/if}</span
@ -31,19 +33,23 @@
> >
</p> </p>
<p> <p>
<IconBrandTypescript /><br>
<a class="data" href="https://git.fjla.uk/owlboard/backend" target="_blank">API Server version<br /><span class="data">{data?.backend || 'Unknown'}</span></a> <a class="data" href="https://git.fjla.uk/owlboard/backend" target="_blank">API Server version<br /><span class="data">{data?.backend || 'Unknown'}</span></a>
</p> </p>
<p> <p>
<IconBrandPython /><br>
<a class="data" href="https://git.fjla.uk/owlboard/db-manager" target="_blank">DB Manager version<br /><span class="data">{data?.['db-manager'] || 'Unknown'}</span></a> <a class="data" href="https://git.fjla.uk/owlboard/db-manager" target="_blank">DB Manager version<br /><span class="data">{data?.['db-manager'] || 'Unknown'}</span></a>
</p> </p>
<p> <p>
<IconBrandGolang /><br>
<a class="data" href="https://git.fjla.uk/owlboard/mq-client" target="_blank">MQ Client version<br /><span class="data">{data?.['mq-client'] || 'Not installed'}</span></a> <a class="data" href="https://git.fjla.uk/owlboard/mq-client" target="_blank">MQ Client version<br /><span class="data">{data?.['mq-client'] || 'Not installed'}</span></a>
</p> </p>
</Island> </Island>
{:catch} {:catch}
<Island> <Island>
<p> <p>
Web-app Version<br /><span class="data">{version}-{versionTag}</span> <IconBrandSvelte /><IconBrandJavascript /><IconBrandTypescript /><br>
Web-app Version<br /><span class="data">{version}{#if versionTag}-{versionTag}{/if}</span>
</p> </p>
<p>Unable to fetch server versions</p> <p>Unable to fetch server versions</p>
</Island> </Island>