Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fc299e174 | ||
|
|
e666e4670e | ||
|
|
a1dd42f710 |
No files matched your search
@@ -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
@@ -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' },
|
||||
|
||||
@@ -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
@@ -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",
|
||||
|
||||
Generated
+8
@@ -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
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# our own packages, published from git.app.ygg; no point waiting for them to age
|
||||
minimumReleaseAgeExclude:
|
||||
- '@mtps/*'
|
||||
+11
-3
@@ -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,
|
||||
|
||||
@@ -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%;
|
||||
|
||||
Reference in new issue
Block a user