Compare commits

3 Commits
Author SHA1 Message Date
mtpsandClaude Opus 5.5 0fc299e174 Waves as the page background instead of an avatar ring
body gets class="waves": light or dark with prefers-color-scheme,
the way mtps/homepage does it (@mtps/waves 0.2.0). Header and grid
sit straight on it, so they use new --page-* colours (near-white
text, translucent lines and tile placeholders); --bg/--fg stay for
the photo detail panel. The avatar ring is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:53:49 +00:00
mtpsandClaude Opus 5.5 e666e4670e Keep the avatar round
The img's height="300" attribute beat aspect-ratio, so with the width
capped at 150px the avatar rendered as a 150x300 ellipse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:30:30 +00:00
mtpsandClaude Opus 5.5 a1dd42f710 Make folio site-agnostic and add the @mtps/waves avatar ring
- Drop `site: 'https://ig.mtps.pl'`. Nothing reads it (no canonical,
  og:url or sitemap), and the app shouldn't know which site it builds.
- Example content and README samples use a placeholder profile
  instead of mtps / mtps.pl.
- Ring the avatar with @mtps/waves, Instagram-style; without an avatar
  the initial sits on the waves. `.npmrc` points @mtps at the Gitea
  registry, and pnpm-workspace.yaml exempts the scope from
  minimumReleaseAge.
- package.json version 0.3.0, matching the next tag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 13:10:46 +00:00
9 changed files with 40 additions and 18 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
@mtps:registry=https://git.app.ygg/api/packages/mtps/npm/
+6 -4
View File
@@ -34,21 +34,23 @@ location: # never taken from EXIF
`profile/profile.yml`:
```yaml
name: mtps
name: Jane Doe
bio: Photos I'm happy with.
link:
url: https://www.mtps.pl
label: mtps.pl
url: https://example.com
label: example.com
```
Published images are resized copies without EXIF. The build deletes the originals from `dist/`, and `pnpm check:metadata` fails if any published image still has GPS data or a capture time. Run it before publishing a build.
## Development
The page background is [@mtps/waves](https://git.app.ygg/mtps/waves) (light or dark with the OS), installed from the Gitea npm registry; `.npmrc` points `@mtps` there.
```sh
pnpm install
pnpm dev # example content, http://localhost:4321
FOLIO_CONTENT=../ig.mtps.pl pnpm dev # a site's content
FOLIO_CONTENT=../my-site pnpm dev # a site's content
pnpm check # types
pnpm build && pnpm check:metadata # dist/
```
+1 -2
View File
@@ -33,11 +33,10 @@ const dropUnusedOriginals = () => ({
});
// photos/ and profile/ to build from; the example content by default, a site
// repo's checkout when building a real site (FOLIO_CONTENT=../ig.mtps.pl)
// repo's checkout when building a real site (FOLIO_CONTENT=../my-site)
const content = resolve(process.env.FOLIO_CONTENT ?? 'content');
export default defineConfig({
site: 'https://ig.mtps.pl',
// p/<slug>.html instead of p/<slug>/index.html: static-server's nginx
// serves $uri.html, so /p/<slug> works without a trailing-slash redirect
build: { format: 'file' },
+3 -3
View File
@@ -1,7 +1,7 @@
# Shown at the top of the page. Drop avatar.jpg (or .png/.webp) next to
# this file for a profile picture; without one the initial is shown.
name: mtps
name: Jane Doe
bio: Photos I'm happy with.
link:
url: https://www.mtps.pl
label: mtps.pl
url: https://example.com
label: example.com
+2 -1
View File
@@ -1,6 +1,6 @@
{
"name": "folio",
"version": "0.1.0",
"version": "0.4.0",
"private": true,
"type": "module",
"packageManager": "pnpm@11.28.5",
@@ -12,6 +12,7 @@
"check:metadata": "node scripts/check-metadata.mjs"
},
"dependencies": {
"@mtps/waves": "0.2.0",
"astro": "7.3.8",
"exifr": "7.1.3",
"sharp": "0.35.5",
+8
View File
@@ -8,6 +8,9 @@ importers:
.:
dependencies:
'@mtps/waves':
specifier: 0.2.0
version: 0.2.0
astro:
specifier: 7.3.8
version: 7.3.8(@types/node@24.19.2)(yaml@2.9.1)
@@ -425,6 +428,9 @@ packages:
'@jridgewell/sourcemap-codec@1.6.0':
resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==}
'@mtps/waves@0.2.0':
resolution: {integrity: sha512-Js5mhFB+sgab7YsFQ46LjkuyxExU9Ly95BQueJucSK0q08rx6O2Nx7AEtLEUZlM5rmexJ73+zPgK5RDT6YD70A==, tarball: https://git.app.ygg/api/packages/mtps/npm/@mtps%2Fwaves/-/0.2.0/waves-0.2.0.tgz}
'@napi-rs/wasm-runtime@1.2.4':
resolution: {integrity: sha512-AJxoUD2/15ESHbvpcyjU274nsAPLuOtPHCk0vKJM5pj//Fg/B1FXNWjPnXTT9PymCYYiHo4zPj0ZomXBKhoy7g==}
engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0}
@@ -1941,6 +1947,8 @@ snapshots:
'@jridgewell/sourcemap-codec@1.6.0': {}
'@mtps/waves@0.2.0': {}
'@napi-rs/wasm-runtime@1.2.4(@emnapi/core@1.11.3)(@emnapi/runtime@1.11.3)':
dependencies:
'@emnapi/core': 1.11.3
+3
View File
@@ -0,0 +1,3 @@
# our own packages, published from git.app.ygg; no point waiting for them to age
minimumReleaseAgeExclude:
- '@mtps/*'
+11 -3
View File
@@ -1,5 +1,6 @@
---
import { profile } from '../lib/profile';
import '@mtps/waves/waves.css';
import '../styles/detail.css';
interface Props {
@@ -18,7 +19,7 @@ const { title, description = profile.bio } = Astro.props;
{description && <meta name="description" content={description} />}
<link rel="icon" href="data:," />
</head>
<body>
<body class="waves">
<slot />
</body>
</html>
@@ -32,6 +33,12 @@ const { title, description = profile.bio } = Astro.props;
--tile: #efefef;
--link: #00376b;
--backdrop: rgb(0 0 0 / 0.85);
/* text and lines straight on the waves background (header, grid);
--bg/--fg/… are for the panels on top of it (photo detail) */
--page-fg: hsl(0 0% 98%);
--page-muted: hsl(0 0% 98% / 0.75);
--page-line: hsl(0 0% 98% / 0.35);
--page-tile: hsl(0 0% 98% / 0.12);
color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
@@ -49,10 +56,11 @@ const { title, description = profile.bio } = Astro.props;
*::after {
box-sizing: border-box;
}
/* the background is @mtps/waves (class="waves"), light or dark with the OS */
body {
margin: 0;
background: var(--bg);
color: var(--fg);
min-height: 100vh;
color: var(--page-fg);
font:
15px/1.45 system-ui,
-apple-system,
+5 -5
View File
@@ -73,14 +73,15 @@ const photos = await getPhotos();
.avatar {
flex: none;
width: clamp(77px, 20vw, 150px);
/* override the img's height="300" so aspect-ratio keeps it round */
height: auto;
aspect-ratio: 1;
border-radius: 50%;
object-fit: cover;
background: var(--tile);
background: var(--page-tile);
display: grid;
place-items: center;
font-size: clamp(32px, 8vw, 64px);
color: var(--muted);
}
h1 {
margin: 0;
@@ -95,7 +96,6 @@ const photos = await getPhotos();
white-space: pre-line;
}
.link {
color: var(--link);
font-weight: 600;
text-decoration: none;
}
@@ -113,7 +113,7 @@ const photos = await getPhotos();
max-width: 1280px;
margin: 0 auto;
padding: 0 0 48px;
border-top: 1px solid var(--line);
border-top: 1px solid var(--page-line);
padding-top: 3px;
}
/* soaks up the leftover width so the last row isn't stretched */
@@ -124,7 +124,7 @@ const photos = await getPhotos();
.tile {
width: calc(var(--r) * var(--row));
aspect-ratio: var(--r);
background: var(--tile);
background: var(--page-tile);
}
.tile :global(img) {
width: 100%;