mirror of
https://github.com/hyprwm/hyprland-website.git
synced 2024-12-22 18:29:48 +01:00
.
This commit is contained in:
parent
660eb6f0bb
commit
6777fad41a
7 changed files with 40 additions and 32 deletions
|
@ -95,3 +95,7 @@ export function getIsMobile() {
|
|||
export function getBlurredPath(path) {
|
||||
return `${path.substring(0, path.lastIndexOf('/'))}/generated_${path.split('/').at(-1)}`
|
||||
}
|
||||
|
||||
export function getRandom(array) {
|
||||
return array.at(Math.floor(Math.random() * array.length))
|
||||
}
|
||||
|
|
13
src/lib/components/Quotes.js
Executable file
13
src/lib/components/Quotes.js
Executable file
|
@ -0,0 +1,13 @@
|
|||
export const quotes = [
|
||||
`Lt. Dixon Piper:
|
||||
Why did he do it? Why did Cunth kill your wife?
|
||||
|
||||
MacGruber:
|
||||
To this day, I have no idea. We actually all went to college together. Believe it or not, we were very close friends. \nThen after graduation, he got engaged to her. He asked me to be his best man and right about that time, I started banging her and mowing her box. \nShe was actually the first person I felt comfortable enough around to let eat out my butt. \nAnyway, shortly thereafter, she left him for me. She was actually carrying his child at the time. I asked her to terminate it, obviously, so we could start fresh. And she agreed. We were so in love. \nAnd he took that from me.
|
||||
|
||||
Lt. Dixon Piper:
|
||||
That's really f***ed up.
|
||||
|
||||
MacGruber:
|
||||
Thanks.`
|
||||
]
|
|
@ -1,9 +1,17 @@
|
|||
<script>
|
||||
import Footer from '$lib/components/Footer.svelte'
|
||||
import { onMount } from 'svelte'
|
||||
import Navbar from './Navbar.svelte'
|
||||
import './styles.css'
|
||||
import '@fontsource-variable/work-sans'
|
||||
import '@fontsource/ibm-plex-mono/500.css'
|
||||
import { quotes } from '$lib/components/Quotes'
|
||||
|
||||
onMount(() => {
|
||||
if (import.meta.env.PROD) {
|
||||
console.log(quotes.at(Math.floor(Math.random() * quotes.length)))
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<Navbar />
|
||||
|
|
|
@ -5,25 +5,8 @@
|
|||
import Hero from './Hero.svelte'
|
||||
import InstallSlice from './InstallSlice.svelte'
|
||||
import PreviewRiceSlice from './PreviewRiceSlice.svelte'
|
||||
import { onMount } from 'svelte'
|
||||
|
||||
export let data
|
||||
|
||||
onMount(() => {
|
||||
import.meta.env.DEV &&
|
||||
console.log(`
|
||||
Lt. Dixon Piper:
|
||||
Why did he do it? Why did Cunth kill your wife?
|
||||
|
||||
MacGruber:
|
||||
To this day, I have no idea. We actually all went to college together. Believe it or not, we were very close friends. \nThen after graduation, he got engaged to her. He asked me to be his best man and right about that time, I started banging her and mowing her box. \nShe was actually the first person I felt comfortable enough around to let eat out my butt. \nAnyway, shortly thereafter, she left him for me. She was actually carrying his child at the time. I asked her to terminate it, obviously, so we could start fresh. And she agreed. We were so in love. \nAnd he took that from me.
|
||||
|
||||
Lt. Dixon Piper:
|
||||
That's really f***ed up.
|
||||
|
||||
MacGruber:
|
||||
Thanks.`)
|
||||
})
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
function onViewEnter() {
|
||||
setTimeout(() => (hasEnteredView = true), 550)
|
||||
|
||||
// Only load the library if the element entered the view, to improve performance
|
||||
import('interactjs').then(({ default: interact }) => {
|
||||
interactionjs = interact(imageElement).draggable({
|
||||
inertia: { resistance: lerp(5, 200, relativeSize) },
|
||||
|
@ -115,10 +116,7 @@
|
|||
/>
|
||||
|
||||
{#if quote}
|
||||
<div
|
||||
class="pointer-events-none absolute -top-6 left-1/2 -translate-x-1/2 select-none rounded bg-slate-800/50 px-2 py-1 text-sm font-medium tracking-wide opacity-0 duration-150 group-hover:opacity-100"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<div class="quote" aria-hidden="true">
|
||||
{quote}
|
||||
</div>
|
||||
{/if}
|
||||
|
@ -139,6 +137,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
.quote {
|
||||
@apply pointer-events-none absolute -top-6 left-1/2 -translate-x-1/2 select-none rounded bg-slate-800/50 px-2 py-1 text-sm font-medium tracking-wide opacity-0 duration-150 group-hover:opacity-100;
|
||||
}
|
||||
|
||||
@keyframes reveal {
|
||||
from {
|
||||
opacity: 0%;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
import clsx from 'clsx'
|
||||
import { getIsMobile } from '$lib/Helper.mjs'
|
||||
|
||||
// Idea: Boid behavior
|
||||
// Currently this is unused. I left it in here, in case it would be useful in the future
|
||||
|
||||
const maxSize = 24
|
||||
const minSize = 7
|
||||
|
@ -21,9 +21,6 @@
|
|||
let x = 0
|
||||
let y = 0
|
||||
|
||||
// TODO add mouse following behaviour - flock behaviour
|
||||
// A couple following the mouse throughout the website
|
||||
|
||||
onMount(() => {
|
||||
x = window.innerWidth / (Math.random() * 4) - maxSize * 6
|
||||
y = window.innerHeight / (Math.random() * 4) + 100
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
import colors from 'tailwindcss/colors'
|
||||
|
||||
const wisdoms = [
|
||||
'炊き込みご飯',
|
||||
'罰は米の硬さによる',
|
||||
'米どころでの休日',
|
||||
'マッサージライス',
|
||||
'フォーバイデン米術',
|
||||
'天国の米',
|
||||
'ジーンズの中には何キロもの米が入っているから、毎日がトレーニングなんだ。',
|
||||
'田んぼで撃たれたんだ!',
|
||||
'田んぼでの作業',
|
||||
'タイ式マッサージライス 秘伝のソース添え',
|
||||
'国の保護による田んぼでの仕事',
|
||||
'巨大な米ベースの子猫用フードがある。',
|
||||
'スパイシー米麺',
|
||||
'私たちは田んぼで一生懸命働いている。',
|
||||
'激辛炊飯器',
|
||||
'絶対にご飯を炊いた'
|
||||
]
|
||||
|
@ -140,8 +140,6 @@
|
|||
width: 100%;
|
||||
margin-bottom: min(-10vh, -6rem);
|
||||
background: radial-gradient(70% 50% at 50% 0%, theme(colors.cyan.500 / 50%), transparent);
|
||||
|
||||
animation: enter 1200ms ease-in-out;
|
||||
}
|
||||
|
||||
.japanese {
|
||||
|
@ -152,7 +150,8 @@
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
user-select: none;
|
||||
animation: enter 1200ms ease-in-out;
|
||||
animation: enter 200ms ease-in-out both;
|
||||
z-index: -10;
|
||||
}
|
||||
|
||||
.rice-symbol {
|
||||
|
@ -173,12 +172,14 @@
|
|||
gap: 1rem;
|
||||
z-index: -10;
|
||||
opacity: 0.6;
|
||||
margin-top: -2rem;
|
||||
/* font-size: 1.5rem; */
|
||||
}
|
||||
|
||||
.wisdom {
|
||||
width: max-content;
|
||||
height: max-content;
|
||||
/* max-height: 15ch; */
|
||||
text-align: center;
|
||||
color: theme(colors.cyan.700);
|
||||
text-shadow: 0px 0px 8px blue;
|
||||
|
|
Loading…
Reference in a new issue