updated homesick link list look
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export interface GalleryEntry {
|
export interface LinkEntry {
|
||||||
title: string;
|
title: string;
|
||||||
subtitle: string;
|
subtitle: string;
|
||||||
img: string;
|
img: string;
|
||||||
@@ -11,27 +11,25 @@
|
|||||||
let {
|
let {
|
||||||
entries,
|
entries,
|
||||||
}: {
|
}: {
|
||||||
entries: GalleryEntry[];
|
entries: LinkEntry[];
|
||||||
} = $props();
|
} = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="post-list">
|
<div class="hs-post-list">
|
||||||
{#each entries as entry}
|
{#each entries as entry}
|
||||||
{@render galleryEntry({entry})}
|
{@render linkEntry({entry})}
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#snippet galleryEntry({entry}: {entry: GalleryEntry})}
|
{#snippet linkEntry({entry}: {entry: LinkEntry})}
|
||||||
<a class="gallery-container blurred-background-hover" href="{entry.link}">
|
<a class="hs-list-container blurred-background-hover" href="{entry.link}">
|
||||||
{#if entry.img && entry.img !== ""}
|
<div class="hs-list-img-container">
|
||||||
<img class="gallery-img" src="{entry.img}" alt="{entry.imgAlt}">
|
<img class="hs-list-img" src="{entry.img}" alt="{entry.imgAlt}">
|
||||||
{:else}
|
</div>
|
||||||
<div class="gallery-img-placeholder"></div>
|
<div class="hs-list-text-container">
|
||||||
{/if}
|
<p class="hs-list-subtitle">{@html entry.subtitle}</p>
|
||||||
<div class="gallery-text-container">
|
<p class="hs-list-title">{entry.title}</p>
|
||||||
<p class="gallery-subtitle">{@html entry.subtitle}</p>
|
<p class="hs-list-description">{entry.description}</p>
|
||||||
<p class="gallery-title">{entry.title}</p>
|
|
||||||
<p class="gallery-description">{entry.description}</p>
|
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
@@ -42,13 +40,13 @@
|
|||||||
--color-laura-darker: #A55051CC;
|
--color-laura-darker: #A55051CC;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-list {
|
.hs-post-list {
|
||||||
max-width: 1600px;
|
max-width: 1600px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-container {
|
.hs-list-container {
|
||||||
box-sizing: content-box;
|
box-sizing: content-box;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -58,23 +56,26 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border: var(--border-style) transparent var(--border-dash-size);
|
border: var(--border-style) transparent var(--border-dash-size);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
transition: border-color var(--duration-animation) var(--anim-curve);
|
transition: border-color var(--duration-animation) var(--anim-curve);
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-img, .gallery-img-placeholder {
|
.hs-list-img-container {
|
||||||
width: 180px;
|
width: 220px;
|
||||||
min-width: 180px;
|
min-width: 220px;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: border-radius var(--duration-animation) var(--anim-curve);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-list-img {
|
||||||
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0;
|
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
transition: width var(--duration-animation) var(--anim-curve);
|
transition: scale var(--duration-animation) var(--anim-curve);
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-img-placeholder {
|
.hs-list-text-container {
|
||||||
background-color: var(--color-highlight-dark);
|
|
||||||
}
|
|
||||||
|
|
||||||
.gallery-text-container {
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-auto-columns: 1fr;
|
grid-auto-columns: 1fr;
|
||||||
grid-template-rows: 1fr 1fr 0fr;
|
grid-template-rows: 1fr 1fr 0fr;
|
||||||
@@ -86,84 +87,85 @@
|
|||||||
grid-template-rows var(--duration-blur) var(--anim-curve);
|
grid-template-rows var(--duration-blur) var(--anim-curve);
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-title, .gallery-subtitle, .gallery-description {
|
.hs-list-title, .hs-list-subtitle, .hs-list-description {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
transition: color var(--duration-animation) var(--anim-curve),
|
transition: color var(--duration-animation) var(--anim-curve),
|
||||||
opacity var(--duration-animation) var(--anim-curve);
|
opacity var(--duration-animation) var(--anim-curve);
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-title {
|
.hs-list-title {
|
||||||
font-family: var(--font-mono);
|
font-family: var(--font-mono);
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-subtitle, .gallery-description {
|
.hs-list-subtitle, .hs-list-description {
|
||||||
font-size: 1.0rem;
|
font-size: 1.0rem;
|
||||||
line-height: 1.2rem;
|
line-height: 1.2rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-description {
|
.hs-list-description {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-container:hover {
|
.hs-list-container:hover {
|
||||||
border-color: var(--color-highlight);
|
border-color: var(--color-highlight-alt);
|
||||||
background-color: var(--color-background-highlight);
|
background-color: var(--color-background-highlight-alt);
|
||||||
}
|
|
||||||
.gallery-container:hover p {
|
|
||||||
color: var(--color-highlight);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 800px) {
|
@media screen and (min-width: 800px) {
|
||||||
.gallery-title {
|
.hs-list-title {
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
line-height: 2.0rem;
|
line-height: 2.0rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .gallery-container:hover .gallery-img, .gallery-container:hover .gallery-img-placeholder {
|
.hs-list-container:hover .hs-list-img {
|
||||||
width: 260px;
|
scale: 1.2;
|
||||||
} */
|
}
|
||||||
|
|
||||||
.gallery-container:hover .gallery-text-container {
|
.hs-list-container:hover .hs-list-img-container {
|
||||||
|
border-top-left-radius: var(--border-radius);
|
||||||
|
border-bottom-left-radius: var(--border-radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hs-list-container:hover .hs-list-text-container {
|
||||||
grid-template-rows: 0fr 1fr 1fr;
|
grid-template-rows: 0fr 1fr 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-container:hover .gallery-subtitle {
|
.hs-list-container:hover .hs-list-subtitle {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-container:hover .gallery-description {
|
.hs-list-container:hover .hs-list-description {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
.gallery-title {
|
.hs-list-title {
|
||||||
font-size: 1.0rem;
|
font-size: 1.0rem;
|
||||||
line-height: 1.1rem;
|
line-height: 1.1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-description {
|
.hs-list-description {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-subtitle {
|
.hs-list-subtitle {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
line-height: 1rem;
|
line-height: 1rem;
|
||||||
/* display: none; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-container {
|
.hs-list-container {
|
||||||
height: 72px;
|
height: 72px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-text-container {
|
.hs-list-text-container {
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gallery-img, .gallery-img-placeholder {
|
.hs-list-img-container {
|
||||||
width: 110px;
|
width: 110px;
|
||||||
min-width: 110px;
|
min-width: 110px;
|
||||||
}
|
}
|
||||||
@@ -2,11 +2,11 @@
|
|||||||
import Banner2 from "$lib/banner2.svelte";
|
import Banner2 from "$lib/banner2.svelte";
|
||||||
import Content from "$lib/viewport/content.svelte";
|
import Content from "$lib/viewport/content.svelte";
|
||||||
import { posts, type DevlogPostLink } from "./devlog/posts";
|
import { posts, type DevlogPostLink } from "./devlog/posts";
|
||||||
import Gallery, { type GalleryEntry } from "$lib/lists/gallery.svelte";
|
import HomesickLinkList, { type LinkEntry } from "$lib/lists/homesick-link-list.svelte";
|
||||||
|
|
||||||
let entries: GalleryEntry[] = posts.map(mapEntries);
|
let entries: LinkEntry[] = posts.map(mapEntries);
|
||||||
|
|
||||||
function mapEntries(entry: DevlogPostLink, index: number): GalleryEntry {
|
function mapEntries(entry: DevlogPostLink, index: number): LinkEntry {
|
||||||
return {
|
return {
|
||||||
title: `${entry.post.title}`,
|
title: `${entry.post.title}`,
|
||||||
subtitle: `#${(posts.length - index).toString().padStart(2, '0')} // ${entry.post.date}`,
|
subtitle: `#${(posts.length - index).toString().padStart(2, '0')} // ${entry.post.date}`,
|
||||||
@@ -44,5 +44,5 @@
|
|||||||
|
|
||||||
<p>Development log entries in reverse chronological order (newest to oldest).</p>
|
<p>Development log entries in reverse chronological order (newest to oldest).</p>
|
||||||
|
|
||||||
<Gallery {entries} />
|
<HomesickLinkList {entries} />
|
||||||
</Content>
|
</Content>
|
||||||
Reference in New Issue
Block a user