Skeleton for a yaml config.
This commit is contained in:
36
src/config.ts
Normal file
36
src/config.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import configData from './config.yml';
|
||||
|
||||
export type Brand = {
|
||||
logo?: string;
|
||||
icon?: string;
|
||||
usemask?: boolean;
|
||||
};
|
||||
|
||||
export type Section = {
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
} & Brand;
|
||||
|
||||
export type Service = {
|
||||
url: string;
|
||||
target?: string;
|
||||
type?: string;
|
||||
|
||||
[x: string]: unknown;
|
||||
} & Section;
|
||||
|
||||
export type ServiceGroup = {
|
||||
items: Service[];
|
||||
} & Section;
|
||||
|
||||
export type Config = {
|
||||
services: ServiceGroup[];
|
||||
} & Section;
|
||||
|
||||
export const config: Config = {
|
||||
...{
|
||||
title: 'Flanders',
|
||||
services: []
|
||||
},
|
||||
...configData
|
||||
};
|
||||
14
src/config.yml
Normal file
14
src/config.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
title: 'Hello World !!'
|
||||
subtitle: 'I am a new pilot.'
|
||||
|
||||
services:
|
||||
- title: '/Cloud'
|
||||
subtitle: 'Private Cloud Utilities'
|
||||
icon: 'fas fa-cloud'
|
||||
items:
|
||||
- title: 'NAS'
|
||||
subtitle: 'Network Attached Storage'
|
||||
icon: 'fas fa-hard-drive'
|
||||
target: '_blank'
|
||||
url: '/NAS'
|
||||
keywords: 'cloud storage files'
|
||||
@@ -1,2 +1,8 @@
|
||||
<h1>Welcome to SvelteKit</h1>
|
||||
<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
|
||||
<script lang="ts">
|
||||
import { config } from '../config';
|
||||
</script>
|
||||
|
||||
<h1>{config.title}</h1>
|
||||
{#if config.subtitle}
|
||||
<h2>{config.subtitle}</h2>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user