aboutsummaryrefslogtreecommitdiff
path: root/lume/src/_components
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2025-04-15 00:32:10 -0400
committerXe Iaso <me@xeiaso.net>2025-04-15 00:32:10 -0400
commite48aa709b2e4c37b062512c1d5a55b344952c08e (patch)
treec21a602f9993df6ed0a7b1536391d1130f577f41 /lume/src/_components
parent189fe2918ba2e54f68d75698168cc41036586240 (diff)
downloadxesite-e48aa709b2e4c37b062512c1d5a55b344952c08e.tar.xz
xesite-e48aa709b2e4c37b062512c1d5a55b344952c08e.zip
use files.xeiaso.net for some things as a test
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'lume/src/_components')
-rw-r--r--lume/src/_components/Disclaimer.jsx2
-rw-r--r--lume/src/_components/Figure.tsx19
-rw-r--r--lume/src/_components/MastodonShare.tsx29
-rw-r--r--lume/src/_components/XeblogHero.tsx6
-rw-r--r--lume/src/_components/XeblogPicture.tsx8
-rw-r--r--lume/src/_components/XeblogSlide.tsx16
-rw-r--r--lume/src/_components/XeblogVideo.tsx4
7 files changed, 43 insertions, 41 deletions
diff --git a/lume/src/_components/Disclaimer.jsx b/lume/src/_components/Disclaimer.jsx
index 6d1bd21..d27e16e 100644
--- a/lume/src/_components/Disclaimer.jsx
+++ b/lume/src/_components/Disclaimer.jsx
@@ -3,7 +3,7 @@ export default function TecharoDisclaimer({ children }) {
<>
<link
rel="stylesheet"
- href="https://cdn.xeiaso.net/file/christine-static/static/font/inter/inter.css"
+ href="https://files.xeiaso.net/static/font/inter/inter.css"
/>
<div className="font-['Inter'] text-lg mx-auto mt-4 mb-2 rounded-lg bg-bg-2 p-4 dark:bg-bgDark-2 md:max-w-3xl font-extrabold xe-dont-newline">
{children}
diff --git a/lume/src/_components/Figure.tsx b/lume/src/_components/Figure.tsx
index ad8d802..dd15ba0 100644
--- a/lume/src/_components/Figure.tsx
+++ b/lume/src/_components/Figure.tsx
@@ -5,19 +5,16 @@ export interface FigureProps {
alt?: string;
}
-export default function Figure(
- { className, path, alt, desc = alt }: FigureProps,
-) {
+export default function Figure({
+ className,
+ path,
+ alt,
+ desc = alt,
+}: FigureProps) {
return (
<figure className={`max-w-3xl mx-auto ${className}`}>
- <a
- href={`https://cdn.xeiaso.net/file/christine-static/${path}`}
- target="_blank"
- >
- <img
- src={`https://cdn.xeiaso.net/file/christine-static/${path}`}
- alt={desc}
- />
+ <a href={`https://files.xeiaso.net/${path}`} target="_blank">
+ <img src={`https://files.xeiaso.net/${path}`} alt={desc} />
</a>
{desc && <figcaption>{desc}</figcaption>}
</figure>
diff --git a/lume/src/_components/MastodonShare.tsx b/lume/src/_components/MastodonShare.tsx
index be91a78..57e84b3 100644
--- a/lume/src/_components/MastodonShare.tsx
+++ b/lume/src/_components/MastodonShare.tsx
@@ -1,13 +1,13 @@
import { useState } from "npm:preact/hooks";
const u = (url = "", params = {}) => {
- let result = new URL(url, window.location.href);
- Object.entries(params).forEach((kv) => {
- let [k, v] = kv;
- result.searchParams.set(k, v as string);
- });
- return result.toString();
- };
+ let result = new URL(url, window.location.href);
+ Object.entries(params).forEach((kv) => {
+ let [k, v] = kv;
+ result.searchParams.set(k, v as string);
+ });
+ return result.toString();
+};
export interface MastodonShareButtonProps {
title: string;
@@ -16,9 +16,12 @@ export interface MastodonShareButtonProps {
tags: string;
}
-export default function MastodonShareButton(
- { title, url, series, tags }: MastodonShareButtonProps,
-) {
+export default function MastodonShareButton({
+ title,
+ url,
+ series,
+ tags,
+}: MastodonShareButtonProps) {
let defaultURL = localStorage["mastodon_instance"];
if (defaultURL == undefined) {
@@ -49,11 +52,7 @@ ${series ? "#" + series + " " : ""}${
oninput={(e) => setURL(e.target.value)}
/>
<br />
- <textarea
- rows={6}
- cols={40}
- oninput={(e) => setToot(e.target.value)}
- >
+ <textarea rows={6} cols={40} oninput={(e) => setToot(e.target.value)}>
{getToot()}
</textarea>
<br />
diff --git a/lume/src/_components/XeblogHero.tsx b/lume/src/_components/XeblogHero.tsx
index fadb4eb..7b038af 100644
--- a/lume/src/_components/XeblogHero.tsx
+++ b/lume/src/_components/XeblogHero.tsx
@@ -11,17 +11,17 @@ export default function XeblogHero({ ai, file, prompt }: XeblogHeroProps) {
<picture>
<source
type="image/avif"
- srcset={`https://cdn.xeiaso.net/file/christine-static/hero/${file}.avif`}
+ srcset={`https://files.xeiaso.net/hero/${file}.avif`}
/>
<source
type="image/webp"
- srcset={`https://cdn.xeiaso.net/file/christine-static/hero/${file}.webp`}
+ srcset={`https://files.xeiaso.net/hero/${file}.webp`}
/>
<img
alt={`An image of ${prompt}`}
className="hero-image"
loading="lazy"
- src={`https://cdn.xeiaso.net/file/christine-static/hero/${file}.jpg`}
+ src={`https://files.xeiaso.net/hero/${file}.jpg`}
/>
</picture>
{ai !== undefined ? (
diff --git a/lume/src/_components/XeblogPicture.tsx b/lume/src/_components/XeblogPicture.tsx
index b8c7170..e7a95d4 100644
--- a/lume/src/_components/XeblogPicture.tsx
+++ b/lume/src/_components/XeblogPicture.tsx
@@ -11,21 +11,21 @@ export default function XeblogPicture({
}: XeblogPicture) {
return (
<figure className={`max-w-3xl mx-auto not-prose w-full ${className}`}>
- <a href={`https://cdn.xeiaso.net/file/christine-static/${path}.jpg`}>
+ <a href={`https://files.xeiaso.net/${path}.jpg`}>
<picture>
<source
type="image/avif"
- srcset={`https://cdn.xeiaso.net/file/christine-static/${path}.avif`}
+ srcset={`https://files.xeiaso.net/${path}.avif`}
/>
<source
type="image/webp"
- srcset={`https://cdn.xeiaso.net/file/christine-static/${path}.webp`}
+ srcset={`https://files.xeiaso.net/${path}.webp`}
/>
<img
alt={desc}
className={className}
loading="lazy"
- src={`https://cdn.xeiaso.net/file/christine-static/${path}.jpg`}
+ src={`https://files.xeiaso.net/${path}.jpg`}
/>
</picture>
</a>
diff --git a/lume/src/_components/XeblogSlide.tsx b/lume/src/_components/XeblogSlide.tsx
index 09c75bc..91f9ff4 100644
--- a/lume/src/_components/XeblogSlide.tsx
+++ b/lume/src/_components/XeblogSlide.tsx
@@ -4,22 +4,28 @@ export interface XeblogSlideProps {
desc?: string;
}
-export default function XeblogSlide({ name, essential, desc }: XeblogSlideProps) {
+export default function XeblogSlide({
+ name,
+ essential,
+ desc,
+}: XeblogSlideProps) {
return (
- <figure class={essential ? "xeblog-sides-essential" : "xeblog-slides-fluff"}>
+ <figure
+ class={essential ? "xeblog-sides-essential" : "xeblog-slides-fluff"}
+ >
<picture>
<source
type="image/avif"
- srcset={`https://cdn.xeiaso.net/file/christine-static/talks/${name}.avif`}
+ srcset={`https://files.xeiaso.net/talks/${name}.avif`}
/>
<source
type="image/webp"
- srcset={`https://cdn.xeiaso.net/file/christine-static/talks/${name}.webp`}
+ srcset={`https://files.xeiaso.net/talks/${name}.webp`}
/>
<img
alt={desc || `Slide ${name}`}
loading="lazy"
- src={`https://cdn.xeiaso.net/file/christine-static/talks/${name}.jpg`}
+ src={`hhttps://files.xeiaso.net/talks/${name}.jpg`}
/>
</picture>
{desc && <figcaption>{desc}</figcaption>}
diff --git a/lume/src/_components/XeblogVideo.tsx b/lume/src/_components/XeblogVideo.tsx
index 6cb4aa3..65f9972 100644
--- a/lume/src/_components/XeblogVideo.tsx
+++ b/lume/src/_components/XeblogVideo.tsx
@@ -7,13 +7,13 @@ export interface VideoProps {
}
export default function Video({ path, vertical }: VideoProps) {
- const streamURL = `https://cdn.xeiaso.net/file/christine-static/${path}/index.m3u8`;
+ const streamURL = `https://files.xeiaso.net/${path}/index.m3u8`;
const id = sha256(streamURL);
const video = (
<video id={id} className="not-prose sm:max-h-[50vh] mx-auto" controls>
<source src={streamURL} type="application/vnd.apple.mpegurl" />
<source
- src="https://cdn.xeiaso.net/file/christine-static/blog/HLSBROKE.mp4"
+ src="https://files.xeiaso.net/blog/HLSBROKE.mp4"
type="video/mp4"
/>
</video>