update services list

This commit is contained in:
Alexander Bocken 2023-11-13 13:07:42 +01:00
parent 29e1b3be76
commit 144a0132fa
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8
12 changed files with 37 additions and 200 deletions

View File

@ -1,7 +0,0 @@
import { get_username } from '$lib/js/get_username';;
import type { Actions, PageServerLoad } from "./$types"
import { error } from "@sveltejs/kit"
export const load = (async ({cookies}) => {
return { user: await get_username(cookies) }
});

View File

@ -1,20 +0,0 @@
<script>
import Header from '$lib/components/Header.svelte'
import UserHeader from '$lib/components/UserHeader.svelte';
export let data
let username = ""
if(data.user){
username = data.user.username
}
</script>
<Header>
<ul class=site_header slot=links>
<li><a href="/rezepte">Rezepte</a></li>
<li><a href="/bilder">Bilder</a></li>
<li><a href="/git">Git</a></li>
<li><a href="/transmission">Transmission</a></li>
</ul>
<UserHeader {username} slot=right_side></UserHeader>
<slot></slot>
</Header>

View File

@ -1,14 +0,0 @@
import type { PageServerLoad } from "./$types";
export async function load({ fetch }) {
const res = await fetch(`/api/payments/items/10`, {method: "POST",
body: JSON.stringify({
start: 0
}),
headers: {
credentials: "include"
}
});
const item = await res.json();
return { ...item};
};

View File

@ -1,11 +0,0 @@
<script>
export let data;
console.log("DATA:", data)
console.log("payments:", data.payments)
import PaymentCard from "$lib/components/PaymentCard.svelte";
</script>
{#if data.payments}
{#each data.payments as payment}
<PaymentCard {payment}></PaymentCard>
{/each}
{/if}

View File

@ -1,11 +0,0 @@
import type { PageServerLoad } from "./$types";
export async function load({ fetch }) {
const res = await fetch(`/api/payments/payees`, {method: "GET",
headers: {
credentials: "include"
}
});
const item = await res.json();
return { ...item};
};

View File

@ -1,78 +0,0 @@
<script>
export let data;
import "$lib/css/form.css"
function simplify(e){
const res = eval(e.path[0].value)
if(res){
e.path[0].value = res
}
}
async function handleSubmit(event) {
event.preventDefault();
const formData = new FormData();
const form = event.target;
// Iterate through all form elements and append them to the FormData
for (const element of form.elements) {
// Check if the element is a file input
if (element.type === 'file') {
const fileInput = element;
if (fileInput.files.length === 0) {
console.log('No file selected.');
continue; // Skip to the next element
}
const file = fileInput.files[0];
formData.append('file', file);
} else if (element.name && element.value) {
// Append all other input elements (except file input) with non-empty values
formData.append(element.name, element.value);
}
}
// Now you can submit the form data to your API endpoint using fetch or any other method
try {
const response = await fetch('/api/payments/add', {
method: 'POST',
body: formData,
headers: {credentials : 'include'}
});
if (response.ok) {
console.log('Added successfully.');
} else {
console.error('Failed to add the payment.');
// Handle upload failure, if needed
}
} catch (error) {
console.error('Failed to add the payment:', error);
}
}
</script>
<form method="POST" action="?/add" on:submit|preventDefault={handleSubmit}>
<label>
Zahler
<select name="payee" id="">
{#each data.users as user}
<option value="{user.username}">{user.username}</option>
{/each}
</select>
</label>
<label>
Menge:
<input type="text" name="amount" required on:blur={simplify}>
</label>
<label>
Für sich selbst:
<input type="text" name="for_self" on:blur={simplify}>
</label>
<label>
Für den Anderen:
<input type="text" name="for_other" on:blur={simplify}>
</label>
<label>
Bild:
<input type="file" name="fileInput">
</label>
<button type=submit>Hinzufügen</button>
</form>

View File

@ -11,9 +11,12 @@ if(data.user){
<Header>
<ul class=site_header slot=links>
<li><a href="/rezepte">Rezepte</a></li>
<li><a href="/bilder">Bilder</a></li>
<li><a href="/git">Git</a></li>
<li><a href="/transmission">Transmission</a></li>
<li><a href="https://stream.bocken.org">Streaming</a></li>
<li><a href="/bilder">Bilder</a></li>
<li><a href="https://meet.bocken.org">Jitsi</a></li>
<li><a href="https://cloud.bocken.org">Cloud</a></li>
<li><a href="/searx">Searx</a></li>
</ul>
<UserHeader {username} slot=right_side></UserHeader>
<slot></slot>

View File

@ -38,7 +38,6 @@ width: 66%;
.flex > *:last-child{
position: relative;
max-width: 34%;
background-color: red;
}
.flex > *:last-child img{
position:absolute;
@ -66,7 +65,7 @@ section:has(a:hover){
<section>
<a href="/rezepte" class=flex>
<div class=text>
<h2>Rezepte</h2>
<h2>Re&shy;zep&shy;te</h2>
<p>Die eigenen Rezepte für das ganze Jahr kann man hier finden. Von traditionell Kärntner Küche zu Schweizer Klassikern oder auch das ein oder andere Hipsterrezept findet man für das ganze Jahr Rezepte. An den Rezepten wird kontinuirlich gefeilscht. </p>
</div>
<div>
@ -91,7 +90,7 @@ section:has(a:hover){
<section>
<a href="https://stream.bocken.org" class=flex>
<div class=text>
<h2>Filme und TV Shows</h2>
<h2>Strea&shy;ming</h2>
<p>Die persönliche Filme und TV-Shows zum streamen gehosted via Jellyfin. Somit wird Netflix und Co. vollends ersetzt. Login notwendiged. (Zur Zeit noch separat von main-page login)</p>
</div>
<div>
@ -104,19 +103,40 @@ section:has(a:hover){
<section>
<a href="/bilder" class=flex>
<div class=text>
<h2>Familienbilder</h2>
<p>Lorem ipsum dolor sit amet consectetur, adipisicing elit. Iste vel, iure eius veniam, ex recusandae libero ratione tempora, molestiae vitae eos dolorum rerum enim exercitationem tempore magnam cupiditate neque quia?</p>
<h2>Fa&shy;mil&shy;ien&shy;bil&shy;der</h2>
<p></p>
</div>
<div>
<img src="/familie.jpg" alt="">
<img src="/icons/Photoprism.svg" alt="">
</div>
</a>
</section>
<section>
<a href="https://cloud.bocken.org" class=flex>
<div class=text>
<h2>Cloud</h2>
<p>Die priavte Cloud für Datensynchronisiserung, Kontakte und Kalender.</p>
</div>
<div><img src="/icons/Nextcloud.svg" alt=""></div>
</a>
</section>
<section>
<a href="https://meet.bocken.org" class=flex>
<div class=text>
<h2>Jitsi</h2>
<p>Für die eigenene Meetings ohne ein mithören von Zoom oder Microsoft</p>
</div>
<div>
<img src="/icons/Jitsi.svg" alt="">
</div>
</a>
</section>
<section>
<a href="/searx" class=flex>
<div class=text>
<h2>Private Suchmaschine</h2>
<h2>Pri&shy;va&shy;te Such&shy;ma&shy;schi&shy;ne</h2>
<p>Eine selbsgehostete Searx-Instanz für private Suche durch diese Metasuchmaschine. Überraschend gut für Manches, überraschend schlecht für Anderes.</p>
</div>
<div>
@ -125,58 +145,10 @@ section:has(a:hover){
</a>
</section>
<section>
<a href="/flims" class=flex>
<div class="text">
<h2>Flims (WIP)</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Unde cum suscipit aliquid nam facilis ipsa omnis natus. Quisquam nisi ducimus minima asperiores laboriosam modi unde quos, earum odio repellat quam.</p>
</div>
<div>
<img src="/flims.jpg" alt="">
</div>
</a>
</section>
<section>
<a href="/abrechnung" class="flex">
<span class="text">
<h2>Abrechnung (WIP)</h2>
<p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Nobis voluptate accusamus hic quasi quae assumenda accusantium excepturi voluptatem tempore sunt, mollitia rem. Doloribus natus quis accusamus atque quas explicabo illum?</p>
</span>
<div>
<img src="/icons/shopping_cart.svg" alt="">
</div>
</a>
</section>
<section>
<a href="/christ" class="flex">
<div class="text">
<h2>Glaube (WIP)</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat, quasi! Delectus totam rem officiis ea odit quaerat, vel nihil quod commodi deleniti quo eos aut voluptatum eligendi quasi nesciunt quidem!</p>
</div>
<div>
<img src="" alt="">
</div>
</a>
</section>
<section>
<a href="jitsi" class=flex>
<div class=text>
<h2>Jitsi (WIP)</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Libero doloremque atque totam nam voluptatum at facere itaque autem quae? Saepe hic iure delectus vero culpa maiores fuga, provident ipsam consectetur.</p>
</div>
<div>
<img src="/icons/Jitsi.svg" alt="">
</div>
</a>
</section>
<section>
<a href="/transmission" class=flex>
<div class=text>
<h2>Transmission</h2>
<h2>Trans&shy;mis&shy;sion</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Libero doloremque atque totam nam voluptatum at facere itaque autem quae? Saepe hic iure delectus vero culpa maiores fuga, provident ipsam consectetur.</p>
</div>
<div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 585 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1 @@
<svg data-name="Ebene 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 266 266"><defs><linearGradient id="a" x1="45.04" y1="231.72" x2="231.72" y2="45.04" gradientUnits="userSpaceOnUse" gradientTransform="translate(-5.38 -5.38)"><stop offset="0" stop-color="#fff"/><stop offset="0" stop-color="#b8edff"/><stop offset="1" stop-color="#d4b8ff"/></linearGradient></defs><circle cx="133" cy="133" r="132" style="fill:url(#a)"/><path data-name="Logo Pfad" d="m224.19 176.51-4 24.19M41.91 177.5l14.81 14m95.76-137.65L56.62 191.31a.09.09 0 0 0 .07.15l163.41 9.37a.09.09 0 0 0 .09-.13L152.62 53.87a.1.1 0 0 0-.14-.02zm-19.74-13.29L41.8 177.31a.13.13 0 0 0 .11.19l182.18-.8a.12.12 0 0 0 .1-.19L132.95 40.56a.12.12 0 0 0-.21 0zm.11-.16 19.77 13.32" style="fill:none;stroke:#1d1d1b;stroke-miterlimit:10;stroke-width:6px"/></svg>

After

Width:  |  Height:  |  Size: 819 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 576 512" style="fill: #2E3440;"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M253.3 35.1c6.1-11.8 1.5-26.3-10.2-32.4s-26.3-1.5-32.4 10.2L117.6 192H32c-17.7 0-32 14.3-32 32s14.3 32 32 32L83.9 463.5C91 492 116.6 512 146 512H430c29.4 0 55-20 62.1-48.5L544 256c17.7 0 32-14.3 32-32s-14.3-32-32-32H458.4L365.3 12.9C359.2 1.2 344.7-3.4 332.9 2.7s-16.3 20.6-10.2 32.4L404.3 192H171.7L253.3 35.1zM192 304v96c0 8.8-7.2 16-16 16s-16-7.2-16-16V304c0-8.8 7.2-16 16-16s16 7.2 16 16zm96-16c8.8 0 16 7.2 16 16v96c0 8.8-7.2 16-16 16s-16-7.2-16-16V304c0-8.8 7.2-16 16-16zm128 16v96c0 8.8-7.2 16-16 16s-16-7.2-16-16V304c0-8.8 7.2-16 16-16s16 7.2 16 16z"/></svg>

Before

Width:  |  Height:  |  Size: 843 B