feat: add Tailwind CSS pipeline, tag-aware cloning & overhaul CI/CD (#352)

Frontend

* introduce Tailwind CSS (package.json, tailwind.config.js, input CSS)
* build site.css on-the-fly (removed tracked artefact; added .gitignore)
* new favicon/icon assets & template cleanup
* split JS into modular files

Docker

* replace single-stage image with 3-stage build
  • css-builder (Node 20 alpine) → compiles Tailwind
  • python-builder installs project with PEP 621 metadata
  • runtime image copies site-packages + compiled CSS, runs as uid 1000

CI/CD

* ci.yml: cache by pyproject.toml, install with `pip -e .[dev]`
* new frontend job builds/archives CSS after tests
* publish.yml: build CSS first, then wheel/sdist; trusted OIDC upload
* tidy scorecard workflow

Core library

* clone.py, parser & utils now resolve tags in addition to branches/commits
* fallback branch/tag discovery when `git ls-remote` fails
* compat\_func.py back-ports Path.readlink / str.removesuffix for Py 3.8

Tooling & docs

* add `[dev]` extra, drop requirements-dev.txt & its pre-commit fixer
* refreshed CONTRIBUTING.md with Node/Tailwind instructions
* updated tests for new tag logic
This commit is contained in:
Filip Christiansen 2025-07-02 21:31:14 +02:00 committed by GitHub
parent 2b1f228ae1
commit 016817d559
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
50 changed files with 2631 additions and 458 deletions

View file

@ -102,10 +102,7 @@ function handleSubmit(event, showLoading = false) {
}
// Submit the form to /api/ingest
fetch('/api/ingest', {
method: 'POST',
body: formData
})
fetch('/api/ingest', {method: 'POST', body: formData})
.then(response => response.json())
.then(data => {
// Hide loading overlay
@ -310,9 +307,6 @@ function formatSize(sizeInKB) {
return Math.round(sizeInKB) + 'kB';
}
// Initialize slider on page load
document.addEventListener('DOMContentLoaded', initializeSlider);
// Make sure these are available globally
window.copyText = copyText;