Website and nginx fancyindex theme for mirror.funami.tech — fast, laid-back package mirrors for Arch-based distros, served from Seoul.
- Tailwind CSS 4 (CSS-first config in
src/assets/css/input.css— notailwind.config.js) - A ~90-line template builder (
build.js) that expands shared partials into static pages - Vanilla JS, self-hosted Inter variable font, inline SVG icon sprite — no CDNs, no frameworks
- nginx + ngx-fancyindex for directory listings
mirror/
├── templates/ # HTML sources — EDIT THESE
│ ├── partials/ # head, nav, footer, icon sprite, error-page shell
│ ├── index.html, donate.html
│ ├── error/ # 403 / 404 / 50x (one include line each)
│ └── theme/ # fancyindex header/footer fragments
├── src/ # deployable webroot — generated pages + static assets
│ └── assets/ # css (input.css + built tailwind.css), js, fonts, img
├── build.js # expands templates/ -> src/
├── dev/
│ ├── server.js # dev server with a fancyindex emulator (no Docker needed)
│ └── fixtures.json # fake mirror tree served by the emulator
└── docker-* # real nginx + fancyindex for full-fidelity testing
src/*.html and src/assets/css/tailwind.css are build artifacts (committed so that
src/ can be deployed as-is). Edit templates/ and input.css, then rebuild.
npm install
npm run dev # http://localhost:8080 — templates re-expand on every refresh
npm run build-css # Tailwind in watch mode (run alongside `npm run dev`)The dev server emulates fancyindex listings (with sorting) from dev/fixtures.json,
so /arch/core/os/x86_64/ etc. are browsable without Docker. Append ?theme=dark
or ?theme=light to force a color scheme while testing. A fixture value like
"@generate:16000" synthesizes a directory with that many files
(/arch/pool/packages/) for testing listing performance at real pool/ scale.
npm run build # expand templates + minified CSSDeploy the src/ directory as the webroot. Point fancyindex at the theme:
fancyindex on;
fancyindex_exact_size off;
fancyindex_show_path off;
fancyindex_localtime on;
fancyindex_header "/theme/header.html";
fancyindex_footer "/theme/footer.html";See docker-nginx.conf for a complete example including themed error pages.
sudo docker compose up --build -d # real nginx + fancyindex on :8080Update these spots (they're small and grep-able by the repo path, e.g. /arch/):
templates/partials/nav.html— Distros dropdown + mobile menutemplates/partials/footer.html— Mirrors columntemplates/index.html— repository card gridsrc/assets/js/listing.js—DISTROSdisplay-name mapdev/fixtures.json— optional, for dev-server previews
npm run dev— dev server with fancyindex emulatornpm run build— templates + minified CSS (production)npm run build-css— CSS watch modenpm run lint/npm run lint:fix— ESLint
GPL — see LICENSE. The listing enhancements are partially based on nginx-fancyindex-flat-theme by Alexander Haase.