feat: add some shit
This commit is contained in:
@ -6,7 +6,7 @@ export const GET: RequestHandler = async function ({ params }) {
|
||||
|
||||
const inputName = params.name
|
||||
|
||||
const prompt = `Generate 10 variants of the name ${inputName}. The names should sound very much like the original but also like noble names from the 1900 century. Examples could be "lady rosalind of whitmore" "lord byron of castlemore" "Lord Max Richter". Choose english, german, french and italian sounding names. Only respond with 10 names seperated be newlines`;
|
||||
const prompt = `Generate 10 variants of the name ${inputName}. The names should sound very much like the original but also like noble names. Examples could be "lady rosalind of whitmore" "lord byron of castlemore" "Lord Max Richter". Choose english, german, french and italian sounding names. Only respond with 10 names seperated be newlines`;
|
||||
|
||||
const res = await chat(prompt, { isList: true, temperature: 1 });
|
||||
|
||||
|
8
src/routes/gallery/+page.server.ts
Normal file
8
src/routes/gallery/+page.server.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import * as pb from "$lib/helpers/pb"
|
||||
export async function load() {
|
||||
const res = await pb.getPublicPortraits();
|
||||
|
||||
return {
|
||||
data: res
|
||||
}
|
||||
}
|
66
src/routes/gallery/+page.svelte
Normal file
66
src/routes/gallery/+page.svelte
Normal file
@ -0,0 +1,66 @@
|
||||
<script lang="ts">
|
||||
import ImageFrame from '$lib/components/ImageFrame.svelte';
|
||||
import Confetti from '$lib/components/confetti.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
export let data;
|
||||
|
||||
let last_name: string | null = '';
|
||||
|
||||
const items = data.data
|
||||
.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
marginTop: 20 + Math.random() * 50
|
||||
};
|
||||
})
|
||||
.reverse();
|
||||
onMount(() => {
|
||||
last_name = localStorage.getItem('last-name');
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<h1>Gallerie</h1>
|
||||
<div class="grid">
|
||||
{#each items as item}
|
||||
<div style="margin-top: {item.marginTop}px" class:active={item.noble_name === last_name}>
|
||||
<ImageFrame src={item.portrait} />
|
||||
<p>{item.noble_name}</p>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Confetti />
|
||||
|
||||
<style>
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
h1 {
|
||||
font-size: 4rem;
|
||||
font-family: Parisienne, cursive;
|
||||
color: white;
|
||||
margin-left: 50px;
|
||||
}
|
||||
p {
|
||||
color: white;
|
||||
font-family: Parisienne, cursive;
|
||||
font-size: 1.2em;
|
||||
margin-left: 40px;
|
||||
width: 80%;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.active {
|
||||
filter: drop-shadow(0px 0px 40px #be8630aa) drop-shadow(0px 0px 5px black)
|
||||
drop-shadow(0px 0px 5px black) drop-shadow(0px 0px 5px black);
|
||||
}
|
||||
div {
|
||||
max-width: 1300px;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
@ -12,8 +12,11 @@ html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: black;
|
||||
/* background-image: url(/confetti.png); */
|
||||
background-size: 80%;
|
||||
backdrop-filter: brightness(0.5);
|
||||
}
|
||||
|
||||
html {
|
||||
background: black;
|
||||
background-image: url(/pattern_b.jpg);
|
||||
backdrop-filter: brightness(0.3);
|
||||
}
|
||||
|
@ -1,5 +0,0 @@
|
||||
<script lang="ts">
|
||||
import Questions from '$lib/components/Questions.svelte';
|
||||
</script>
|
||||
|
||||
<Questions />
|
Reference in New Issue
Block a user