mirror of
https://github.com/hyprwm/hyprland-website.git
synced 2025-05-13 05:30:36 +01:00
home: restyle news slice (#86)
* restyle news slice * restyle news-thumb card
This commit is contained in:
parent
46b73ec248
commit
3fd7ff6f3e
2 changed files with 23 additions and 15 deletions
|
@ -7,18 +7,26 @@
|
||||||
$: link = `/news/${entry.slug}`
|
$: link = `/news/${entry.slug}`
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<li class="flex gap-14" use:animateIn={{ fade: 0, slide: 24 }}>
|
<li class="flex" use:animateIn={{ fade: 0, slide: 24 }}>
|
||||||
<article class="flex flex-col gap-4 rounded">
|
<a href={link} class="w-full transition-transform hover:-translate-y-0.5">
|
||||||
<div class="flex flex-col gap-4 text-sm font-medium text-slate-400">
|
<article
|
||||||
<p class="font-bold text-slate-400">{formatDate(entry.date)}</p>
|
class="flex flex-col justify-between gap-3 rounded hover:outline-sky-500/80 md:flex-row md:rounded-3xl md:bg-gradient-to-tr md:from-cyan-500/10 md:to-transparent md:p-8 md:shadow-xl md:outline md:outline-1 md:outline-sky-500/30"
|
||||||
</div>
|
|
||||||
<h2 class="title text-3xl font-bold hover:text-slate-200 md:text-5xl lg:text-6xl">
|
|
||||||
<a href={link}>{entry.title}</a>
|
|
||||||
</h2>
|
|
||||||
<a
|
|
||||||
href={link}
|
|
||||||
class="group flex max-w-max items-center gap-4 font-medium text-slate-300 transition-all hover:text-white"
|
|
||||||
>Read up <ArrowRight class="transition-transform group-hover:translate-x-0.5" /></a
|
|
||||||
>
|
>
|
||||||
</article>
|
<div>
|
||||||
|
<div class="flex flex-col gap-4 font-medium text-slate-400">
|
||||||
|
<p class="font-bold text-slate-400">{formatDate(entry.date)}</p>
|
||||||
|
</div>
|
||||||
|
<h2 class="title text-xl font-bold hover:text-slate-200 md:text-2xl lg:text-3xl">
|
||||||
|
{entry.title}
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
<p
|
||||||
|
class="group flex min-w-max max-w-max flex-row-reverse items-center justify-center gap-2 font-medium text-slate-300 transition-transform hover:text-white md:flex-col"
|
||||||
|
>
|
||||||
|
<ArrowRight
|
||||||
|
class="h-4 w-4 transition-transform group-hover:translate-y-0.5 md:h-9 md:w-9"
|
||||||
|
/> Read up
|
||||||
|
</p>
|
||||||
|
</article>
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<TitleHeading slot="title" class="">Latest news</TitleHeading>
|
<TitleHeading slot="title" class="">Latest news</TitleHeading>
|
||||||
</Title>
|
</Title>
|
||||||
|
|
||||||
<ul class="flex flex-col gap-12">
|
<ul class="mt-8 flex flex-col gap-10">
|
||||||
{#each news as entry}
|
{#each news as entry}
|
||||||
<NewsThumb {entry} />
|
<NewsThumb {entry} />
|
||||||
{/each}
|
{/each}
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
width: 200%;
|
width: 200%;
|
||||||
min-height: 500px;
|
min-height: 500px;
|
||||||
height: 220%;
|
height: 220%;
|
||||||
translate: -25% 0%;
|
translate: -25% 0;
|
||||||
margin-top: -100px;
|
margin-top: -100px;
|
||||||
|
|
||||||
background: url('/imgs/grain.webp'),
|
background: url('/imgs/grain.webp'),
|
||||||
|
|
Loading…
Reference in a new issue