This commit is contained in:
2023-09-14 10:18:54 +02:00
parent e4d1b83108
commit b2f2c2af44
5 changed files with 36 additions and 36 deletions

View File

@@ -10,7 +10,7 @@ body {
background-image: var(--background-image); background-image: var(--background-image);
background-size: cover; background-size: cover;
background-position: center; background-position: center;
color: var(--text) !important; color: var(--text);
transition: background-color cubic-bezier(0.165, 0.84, 0.44, 1) 300ms; transition: background-color cubic-bezier(0.165, 0.84, 0.44, 1) 300ms;
} }
@@ -22,21 +22,11 @@ a {
} }
.title { .title {
color: var(--text-title) !important; color: var(--text-title);
} }
.subtitle { .subtitle {
color: var(--text-subtitle) !important; color: var(--text-subtitle);
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.7rem;
margin-top: 2rem;
margin-bottom: 1rem;
} }
header { header {
@@ -67,9 +57,11 @@ header {
h2 { h2 {
font-size: 0.9em; font-size: 0.9em;
line-height: 1em; line-height: 1em;
margin: 0;
} }
h1 { h1 {
margin: 0;
font-size: 2em; font-size: 2em;
line-height: 1em; line-height: 1em;
} }

View File

@@ -37,7 +37,6 @@ services:
type: sonarr type: sonarr
keywords: 'movies tracker torrent usenet' keywords: 'movies tracker torrent usenet'
- title: '/Cloud' - title: '/Cloud'
icon: 'fas fa-cloud' icon: 'fas fa-cloud'
items: items:
@@ -54,6 +53,6 @@ services:
- title: 'PiHole' - title: 'PiHole'
subtitle: 'A DNS to send telemetry and ads to the void' subtitle: 'A DNS to send telemetry and ads to the void'
target: '_blank' target: '_blank'
url: 'https://pihole.lan/admin' url: 'http://pihole.lan/admin'
type: 'pihole' type: 'pihole'
keywords: 'dns ads blocker internet' keywords: 'dns ads blocker internet'

View File

@@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import type { ServiceConfig } from '$lib/config'; import type { BrandConfig, ServiceConfig } from '$lib/config';
import { getServiceComponent } from '$lib/services/services'; import { getServiceComponent } from '$lib/services/services';
import Brand from './Brand.svelte'; import Brand from './Brand.svelte';
@@ -8,25 +8,32 @@
const component = getServiceComponent(service.type || ''); const component = getServiceComponent(service.type || '');
console.log(service); function brand(): BrandConfig {
if (data?.logo != undefined && service.logo == undefined && service.icon == undefined) {
return { logo: data.logo, asmask: service.asmask || false };
}
return service;
}
</script> </script>
<div class="card"> <a href={service.url} target={service.target || ''}>
<div class="card-content"> <div class="card">
<div class="media"> <div class="card-content">
<div class="media-left"> <div class="media">
<figure class="image"> <div class="media-left">
<Brand brand={service} /> <figure class="image">
</figure> <Brand brand={brand()} />
</div> </figure>
<div class="media-content"> </div>
<p class="title is-4">{service.title}</p> <div class="media-content">
{#if component != undefined} <p class="title is-4">{service.title}</p>
<p class="subtitle is-6"><svelte:component this={component} {data} /></p> {#if component != undefined}
{:else} <p class="subtitle is-6"><svelte:component this={component} {data} /></p>
<p class="subtitle is-6">{service.subtitle}</p> {:else}
{/if} <p class="subtitle is-6">{service.subtitle}</p>
{/if}
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </a>

View File

@@ -1,7 +1,9 @@
import { type ServiceComponentPath, type ServiceHandler } from '../service'; import { type ServiceComponentPath, type ServiceHandler } from '../service';
export const handle: ServiceHandler = () => { export const handle: ServiceHandler = () => {
return { piholedata: 'coucou' }; const res = { logo: 'https://cdn.rawgit.com/pi-hole/graphics/master/Vortex/Vortex.svg' };
return res;
}; };
export const path: ServiceComponentPath = 'pihole/PiHoleContent.svelte'; export const path: ServiceComponentPath = 'pihole/PiHoleContent.svelte';

View File

@@ -1,7 +1,7 @@
<script lang="ts"> <script lang="ts">
import '/src/app.scss';
import 'bulma/css/bulma.min.css';
import '@fortawesome/fontawesome-free/css/all.min.css'; import '@fortawesome/fontawesome-free/css/all.min.css';
import 'bulma/css/bulma.min.css';
import '/src/app.scss';
import { themeVariant } from '$lib/stores/themeVariant'; import { themeVariant } from '$lib/stores/themeVariant';
import { browser } from '$app/environment'; import { browser } from '$app/environment';