neiam
/bismuth
MOTHER-FUCKING-BISMUTH
public · Issues · Pulls · Labels · Forks · Compare · Actions success · Badges · Packages
Log in to mark this repository.
bismuth: KDE-chrome code cards, embeddable in presentato
d76cd01 · gmorell · 2026-11-09 18:18
Message
{commit_body(@commit)}
Files changed
added
.dockerignore
+11
−0
| 1 | +target/ | |
| 2 | +**/target/ | |
| 3 | +.git/ | |
| 4 | +.idea/ | |
| 5 | +.vscode/ | |
| 6 | +assets/node_modules/ | |
| 7 | +assets/f/css/app.css | |
| 8 | +assets/f/js/app.js | |
| 9 | +README.md | |
| 10 | +Justfile | |
| 11 | +cargo-generate.toml |
added
.forgejo/workflows/image.yml
+66
−0
| 1 | +# Builds the bismuth image and pushes it to the forge's own OCI registry on | |
| 2 | +# every push to master, as ggr.neiam.co/neiam/bismuth:{latest,master,sha-…}. | |
| 3 | +# keel polls :latest for the rollout (argo-01-bos/bismuth). | |
| 4 | +# | |
| 5 | +# No secrets. The per-job token is accepted by the registry's /v2/token | |
| 6 | +# endpoint and authorized to push this repository's own image path. | |
| 7 | +name: image | |
| 8 | +on: | |
| 9 | + push: | |
| 10 | + branches: [master] | |
| 11 | + | |
| 12 | +jobs: | |
| 13 | + image: | |
| 14 | + runs-on: arc-runner-set | |
| 15 | + steps: | |
| 16 | + - uses: actions/checkout@v4 | |
| 17 | + | |
| 18 | + - uses: docker/setup-buildx-action@v3 | |
| 19 | + | |
| 20 | + # An unset CI_REGISTRY resolves to the empty string, and | |
| 21 | + # login-action then silently defaults to docker.io while | |
| 22 | + # metadata-action builds a nonsense "/owner/repo" reference. Say | |
| 23 | + # what is missing instead. | |
| 24 | + - name: Check the registry variable is set | |
| 25 | + env: | |
| 26 | + CI_REGISTRY: ${{ vars.CI_REGISTRY }} | |
| 27 | + run: | | |
| 28 | + set -euo pipefail | |
| 29 | + if [ -z "${CI_REGISTRY:-}" ]; then | |
| 30 | + echo "CI_REGISTRY is not set for this repository." >&2 | |
| 31 | + echo "Set it as an Actions variable on the repo or its owner" >&2 | |
| 32 | + echo "(the registry hostname, ggr.neiam.co)." >&2 | |
| 33 | + exit 1 | |
| 34 | + fi | |
| 35 | + echo "pushing to $CI_REGISTRY" | |
| 36 | + | |
| 37 | + # The username is ignored by the token endpoint but login-action | |
| 38 | + # requires it to be non-empty. | |
| 39 | + - uses: docker/login-action@v3 | |
| 40 | + with: | |
| 41 | + registry: ${{ vars.CI_REGISTRY }} | |
| 42 | + username: ci | |
| 43 | + password: ${{ github.token }} | |
| 44 | + | |
| 45 | + # Push to the job's OWN repo path (<registry>/<owner>/<repo>); the | |
| 46 | + # per-job token only grants push there. | |
| 47 | + - uses: docker/metadata-action@v5 | |
| 48 | + id: meta | |
| 49 | + with: | |
| 50 | + images: ${{ vars.CI_REGISTRY }}/${{ github.repository }} | |
| 51 | + tags: | | |
| 52 | + type=sha,format=long | |
| 53 | + type=ref,event=branch | |
| 54 | + # Unconditional: `{{is_default_branch}}` evaluates false on this | |
| 55 | + # forge. The workflow only runs on master anyway. | |
| 56 | + type=raw,value=latest | |
| 57 | + | |
| 58 | + - uses: docker/build-push-action@v6 | |
| 59 | + with: | |
| 60 | + context: . | |
| 61 | + file: ./Dockerfile | |
| 62 | + push: true | |
| 63 | + tags: ${{ steps.meta.outputs.tags }} | |
| 64 | + labels: ${{ steps.meta.outputs.labels }} | |
| 65 | + cache-from: type=registry,ref=${{ vars.CI_REGISTRY }}/${{ github.repository }}:buildcache | |
| 66 | + cache-to: type=registry,ref=${{ vars.CI_REGISTRY }}/${{ github.repository }}:buildcache,mode=max |
added
.gitignore
+3
−0
Click to load diff…
added
Cargo.toml
+73
−0
Click to load diff…
added
Dockerfile
+73
−0
Click to load diff…
added
Justfile
+74
−0
Click to load diff…
added
README.md
+164
−0
Click to load diff…
added
assets/.gitignore
+4
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
added
assets/f/css/style.css
+13
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
added
assets/f/js/src.js
+102
−0
Click to load diff…
added
assets/package-lock.json
+1524
−0
Click to load diff…
added
assets/package.json
+15
−0
Click to load diff…
added
assets/tailwind.config.js
+112
−0
Click to load diff…
added
build.rs
+6
−0
Click to load diff…
added
compose.yml
+37
−0
Click to load diff…
added
examples/contact_sheet.rs
+26
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
modified
?
+0
−0
Click to load diff…
added
fonts/OFL.txt
+93
−0
Click to load diff…
added
migration/Cargo.toml
+19
−0
Click to load diff…
added
migration/README.md
+28
−0
Click to load diff…
added
migration/src/lib.rs
+16
−0
Click to load diff…
added
migration/src/m20240101_000001_create_auth_tables.rs
+188
−0
Click to load diff…
added
migration/src/m20261109_000002_create_snippets.rs
+88
−0
Click to load diff…
added
migration/src/main.rs
+6
−0
Click to load diff…
added
src/auth/mod.rs
+14
−0
Click to load diff…
added
src/auth/password.rs
+44
−0
Click to load diff…
added
src/auth/tokens.rs
+160
−0
Click to load diff…
added
src/auth/users.rs
+171
−0
Click to load diff…
added
src/bin/registration-token.rs
+85
−0
Click to load diff…
added
src/bin/webservice.rs
+118
−0
Click to load diff…
added
src/config.rs
+53
−0
Click to load diff…
added
src/entities/mod.rs
+9
−0
Click to load diff…
added
src/entities/prelude.rs
+4
−0
Click to load diff…
added
src/entities/registration_tokens.rs
+40
−0
Click to load diff…
added
src/entities/snippets.rs
+62
−0
Click to load diff…
added
src/entities/user_sessions.rs
+34
−0
Click to load diff…
added
src/entities/users.rs
+40
−0
Click to load diff…
added
src/handlers/auth.rs
+203
−0
Click to load diff…
added
src/handlers/cards.rs
+220
−0
Click to load diff…
added
src/handlers/mod.rs
+38
−0
Click to load diff…
added
src/handlers/snippets.rs
+350
−0
Click to load diff…
added
src/lib.rs
+37
−0
Click to load diff…
added
src/middleware/auth.rs
+111
−0
Click to load diff…
added
src/middleware/mod.rs
+5
−0
Click to load diff…
added
src/render/chrome.rs
+528
−0
Click to load diff…
added
src/render/fonts.rs
+60
−0
Click to load diff…
added
src/render/highlight.rs
+238
−0
Click to load diff…
added
src/render/mod.rs
+376
−0
Click to load diff…
added
src/render/palette.rs
+202
−0
Click to load diff…
added
src/render/svg.rs
+50
−0
Click to load diff…
added
templates/_theme_toggle.html
+17
−0
Click to load diff…
added
templates/auth/invites.html
+57
−0
Click to load diff…
added
templates/auth/login.html
+30
−0
Click to load diff…
added
templates/auth/profile.html
+41
−0
Click to load diff…
added
templates/auth/register.html
+51
−0
Click to load diff…
added
templates/editor.html
+152
−0
Click to load diff…
added
templates/embed.html
+64
−0
Click to load diff…
added
templates/root.html
+109
−0
Click to load diff…
added
templates/snippets/list.html
+31
−0
Click to load diff…
added
templates/snippets/show.html
+64
−0
Click to load diff…
added
tests/templates.rs
+138
−0
Click to load diff…
Parents: