added file for transparent phone case feed post; added images for that post; added images and imagesAlt attributes to feed posts
This commit is contained in:
@@ -38,21 +38,28 @@
|
||||
subtitle="subtitle missing"
|
||||
/>
|
||||
|
||||
{@render pageButtons(data.currentPage)}
|
||||
|
||||
<p>Welcome to my (new) art feed! It is heavily inspired by <a href="https://deathsurplus.com/">DeathSurplus' art blog</a> – definitely go check out his page!</p>
|
||||
|
||||
<p>This page is intended to be a contrasting companion to the <a href="/projects"><code>projects</code> page</a>; I'll use this page for smaller things that don't fit the dedicated-page-format.</p>
|
||||
|
||||
<!-- <TableOfContents /> -->
|
||||
|
||||
{@render pageButtons(data.currentPage)}
|
||||
|
||||
{#each data.feedEntries as entry}
|
||||
<h2>{entry.title}</h2>
|
||||
<p class="subtitle">{entry.subtitle}</p>
|
||||
<p class="subtitle">{entry.date}</p>
|
||||
<svelte:component this={entry.content} />
|
||||
{#if entry.images && entry.images.length > 0}
|
||||
{#each entry.images as i, index}
|
||||
<img src="{entry.path}/{i}" alt={entry.imageAlts[index]}>
|
||||
{/each}
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
{@render pageButtons(data.currentPage)}
|
||||
|
||||
</Content>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import { entries } from './feed';
|
||||
|
||||
interface FeedEntry {
|
||||
path: string;
|
||||
content: any;
|
||||
title: string;
|
||||
subtitle: string;
|
||||
date: string;
|
||||
images: string[];
|
||||
imageAlts: string[];
|
||||
}
|
||||
|
||||
let entriesPerPage = 8;
|
||||
@@ -26,16 +29,20 @@ export async function load({ params, url }) {
|
||||
if (i >= entries.length) {
|
||||
break;
|
||||
}
|
||||
let pathArray = entries[i].split("/");
|
||||
let path = `./${pathArray[0]}/${pathArray[1]}`;
|
||||
// Vite complains if I don't do this even though it's stupid
|
||||
const path = entries[i].split("/");
|
||||
const page = await import(`./${path[0]}/${path[1]}.md`);
|
||||
const md = page.metadata;
|
||||
let page = await import(`./${pathArray[0]}/${pathArray[1]}.md`);
|
||||
let md = page.metadata;
|
||||
|
||||
feedEntries.push({
|
||||
path,
|
||||
content: page.default,
|
||||
title: md.title,
|
||||
subtitle: md.subtitle,
|
||||
date: md.date,
|
||||
images: md.images,
|
||||
imageAlts: md.imageAlts,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
title: asdf
|
||||
subtitle: asd
|
||||
date: aaa
|
||||
images:
|
||||
imageAlts:
|
||||
---
|
||||
@@ -2,4 +2,6 @@
|
||||
title: asdf
|
||||
subtitle: asd
|
||||
date: aaa
|
||||
images:
|
||||
imageAlts:
|
||||
---
|
||||
15
src/routes/feed/electronics/trans-phone.md
Normal file
15
src/routes/feed/electronics/trans-phone.md
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Transparent Phone Back
|
||||
subtitle: asd
|
||||
date: aaa
|
||||
images:
|
||||
- scratching.webp
|
||||
- halfway.webp
|
||||
- clear.webp
|
||||
- final.webp
|
||||
imageAlts:
|
||||
- The back of a Samsung Galaxy S20 FE lying face-down on a deskmat. Toothpicks, cotton pads, and a metal spudger are lying nearby.
|
||||
- A white phone back that's half-scratched off to reveal the clear plastic.
|
||||
- An entirely clear phone back.
|
||||
- A Samsung Galaxy S20 FE with a clear back inside a clear phone case. The phone has a sticker in the middle of the back that shows a lantern with leaves around it.
|
||||
---
|
||||
@@ -1,6 +1,7 @@
|
||||
export let entries: string[] = [
|
||||
// 2026
|
||||
// "misc/lightyears-font",
|
||||
"electronics/trans-phone",
|
||||
"drawings/mossig-gender",
|
||||
"drawings/2026-march",
|
||||
// 2024
|
||||
|
||||
Reference in New Issue
Block a user