diff --git a/.gitignore b/.gitignore index 28a6f0f..d88b3ae 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,7 @@ web/__pycache__/ web/*.py[cod] **/__pycache__/ **/*.pyc + +# Tailwind standalone CLI +web/tailwindcss +web/app/static/css/output.css diff --git a/web/Dockerfile b/web/Dockerfile index 9b6a89b..408855e 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -14,6 +14,12 @@ RUN UV_NO_DEV=1 uv sync --frozen --no-cache && chown -R appuser:appuser /app COPY --chown=appuser:appuser . . +# Build Tailwind CSS +RUN curl -sL https://github.com/tailwindlabs/tailwindcss/releases/download/v4.3.0/tailwindcss-linux-x64 -o /tmp/tailwindcss && \ + chmod +x /tmp/tailwindcss && \ + /tmp/tailwindcss -i app/static/css/input.css -o app/static/css/output.css --minify && \ + rm /tmp/tailwindcss + USER appuser EXPOSE 8000 diff --git a/web/app/static/css/input.css b/web/app/static/css/input.css new file mode 100644 index 0000000..d7a54ef --- /dev/null +++ b/web/app/static/css/input.css @@ -0,0 +1,17 @@ +@import "tailwindcss"; + +@theme { + --color-surface: #0f0f1a; + --color-surface-alt: #1a1a2e; + --color-surface-raised: #24243e; + --color-primary: #ec4899; + --color-primary-hover: #db2777; + --color-primary-muted: rgba(236, 72, 153, 0.15); + --color-text: #e2e8f0; + --color-text-muted: #94a3b8; + --color-border: #334155; + --color-border-light: #1e293b; + --color-success: #22c55e; + --color-warning: #f59e0b; + --color-danger: #ef4444; +} diff --git a/web/app/templates/base.html b/web/app/templates/base.html index e07aaea..1f69f5b 100644 --- a/web/app/templates/base.html +++ b/web/app/templates/base.html @@ -1,29 +1,27 @@ - + {% block title %}Myst{% endblock %} - + - -
- + +
-
+
{% block content %}{% endblock %}
diff --git a/web/app/templates/dashboard.html b/web/app/templates/dashboard.html index baedddc..54fb6fe 100644 --- a/web/app/templates/dashboard.html +++ b/web/app/templates/dashboard.html @@ -3,18 +3,18 @@ {% block title %}Dashboard — Myst{% endblock %} {% block content %} -

Dashboard

-

Welcome, {{ user.display_name or user.email }}!

+

Dashboard

+

Welcome, {{ user.display_name or user.email }}!

-
-

Forgejo Personal Access Token

-

Register a read:repository-scoped PAT to enable share link viewing.

- -
+
+

Forgejo Access Token

+

Register a read:repository-scoped PAT to enable share link viewing.

+ +
-
-

Share Links

-

You haven't created any share links yet.

- -
+
+

Share Links

+

You haven't created any share links yet.

+ +
{% endblock %} diff --git a/web/app/templates/index.html b/web/app/templates/index.html index e9593cd..711c0a7 100644 --- a/web/app/templates/index.html +++ b/web/app/templates/index.html @@ -1,13 +1,17 @@ {% extends "base.html" %} -{% block title %}Myst — share Forgejo repositories easily{% endblock %} +{% block title %}Myst{% endblock %} {% block content %} -
-
-

Myst

-

Share Forgejo repository snapshots via time-limited links.

-
- Sign in with Forgejo -
+
+

Myst

+

+ Share self-hosted repository snapshots via time-limited, view-only links. +

+ {% if not user %} + + Sign in with Forgejo + + {% endif %} +
{% endblock %} diff --git a/web/dev.sh b/web/dev.sh new file mode 100755 index 0000000..6f8071e --- /dev/null +++ b/web/dev.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -euo pipefail + +echo "Starting Myst dev server..." +echo " FastAPI: http://localhost:8000" +echo " CSS: watching app/static/css/input.css" + +# Start Tailwind CSS watcher in background +./tailwindcss -i ./app/static/css/input.css -o ./app/static/css/output.css --watch & +TW_PID=$! + +# Trap to kill tailwind watcher on exit +trap "kill $TW_PID 2>/dev/null" EXIT + +# Start uvicorn +uv run uvicorn app.main:app --reload --port 8000