diff --git a/.gitignore b/.gitignore index 61a2f04..c574055 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -repos/ebook-fonts +public/repos/ebook-fonts .env diff --git a/README.md b/README.md index 8e00f4c..b9ae325 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,26 @@ -# ebook-fonts showcase +# Showcase for ebook-fonts -A website to showcase my [font collection](https://github.com/nicoverbruggen/ebook-fonts). +**This repository is just to make the source code available.** You can visit the interactive showcase here: [ebook-fonts.nicoverbruggen.be](https://ebook-fonts.nicoverbruggen.be). -You can visit the website at: https://ebook-fonts.nicoverbruggen.be. \ No newline at end of file +A website to showcase my [font collection](https://github.com/nicoverbruggen/ebook-fonts). Browse and preview fonts with adjustable size, line height, dark mode, and bezel color. + +## Project structure + +``` +public/ Web root (served to browsers) + assets/ CSS, JS, SVGs, favicons +src/ PHP includes (not web-accessible) + load_fonts.php Scans the font repo and builds the font list +``` + +## Local development + +```bash +./serve-locally.sh +``` + +Starts a PHP dev server on `http://localhost:8888`. Set `PORT` to use a different port. + +## Deployment + +Fonts are cloned from [ebook-fonts](https://github.com/nicoverbruggen/ebook-fonts) during the build phase (see `nixpacks.toml`). diff --git a/nixpacks.toml b/nixpacks.toml index 1f9d8c2..0a28c14 100644 --- a/nixpacks.toml +++ b/nixpacks.toml @@ -1,6 +1,6 @@ [phases.setup] nixPkgs = ["php84"] -cmds = ["git clone --branch trunk --depth 1 https://github.com/nicoverbruggen/ebook-fonts.git ./repos/ebook-fonts"] +cmds = ["git clone --branch trunk --depth 1 https://github.com/nicoverbruggen/ebook-fonts.git ./public/repos/ebook-fonts"] [start] -cmd = "php -S 0.0.0.0:${PORT:-8080} -t ." +cmd = "php -S 0.0.0.0:${PORT:-8080} -t public" diff --git a/assets/app.js b/public/assets/app.js similarity index 100% rename from assets/app.js rename to public/assets/app.js diff --git a/public/assets/favicon/apple-touch-icon.png b/public/assets/favicon/apple-touch-icon.png new file mode 100644 index 0000000..a9a1fb4 Binary files /dev/null and b/public/assets/favicon/apple-touch-icon.png differ diff --git a/public/assets/favicon/favicon-96x96.png b/public/assets/favicon/favicon-96x96.png new file mode 100644 index 0000000..84cbd2c Binary files /dev/null and b/public/assets/favicon/favicon-96x96.png differ diff --git a/public/assets/favicon/favicon.ico b/public/assets/favicon/favicon.ico new file mode 100644 index 0000000..cf1d9b7 Binary files /dev/null and b/public/assets/favicon/favicon.ico differ diff --git a/assets/showcase.svg b/public/assets/favicon/favicon.svg similarity index 100% rename from assets/showcase.svg rename to public/assets/favicon/favicon.svg diff --git a/public/assets/favicon/site.webmanifest b/public/assets/favicon/site.webmanifest new file mode 100644 index 0000000..8db9ab0 --- /dev/null +++ b/public/assets/favicon/site.webmanifest @@ -0,0 +1,21 @@ +{ + "name": "eBook Fonts Showcase", + "short_name": "Font Showcase", + "icons": [ + { + "src": "assets/favicon/web-app-manifest-192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "any" + }, + { + "src": "assets/favicon/web-app-manifest-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any" + } + ], + "theme_color": "#f6e9de", + "background_color": "#fffdf8", + "display": "standalone" +} diff --git a/public/assets/favicon/web-app-manifest-192x192.png b/public/assets/favicon/web-app-manifest-192x192.png new file mode 100644 index 0000000..43c05a1 Binary files /dev/null and b/public/assets/favicon/web-app-manifest-192x192.png differ diff --git a/public/assets/favicon/web-app-manifest-512x512.png b/public/assets/favicon/web-app-manifest-512x512.png new file mode 100644 index 0000000..7f61431 Binary files /dev/null and b/public/assets/favicon/web-app-manifest-512x512.png differ diff --git a/assets/ofl.svg b/public/assets/ofl.svg similarity index 100% rename from assets/ofl.svg rename to public/assets/ofl.svg diff --git a/assets/sample.html b/public/assets/sample.html similarity index 100% rename from assets/sample.html rename to public/assets/sample.html diff --git a/public/assets/showcase.svg b/public/assets/showcase.svg new file mode 100644 index 0000000..affc451 --- /dev/null +++ b/public/assets/showcase.svg @@ -0,0 +1,13 @@ + + + diff --git a/assets/styles.css b/public/assets/styles.css similarity index 100% rename from assets/styles.css rename to public/assets/styles.css diff --git a/index.php b/public/index.php similarity index 95% rename from index.php rename to public/index.php index 7477140..c1a1218 100644 --- a/index.php +++ b/public/index.php @@ -1,6 +1,6 @@ @@ -12,7 +12,11 @@ require __DIR__ . '/web/load_fonts.php'; - + + + + +