feat(ui): migrate to Tailwind (compiled) + Flowbite JS; new navbar/layout; Docker CSS build
- Add multi-stage CSS build that compiles Tailwind into app/static/tw.css
- Add Tailwind config with dark tokens (bg/nav/card) and purge globs
- Add assets/input.css (@tailwind base/components/utilities + small utilities)
- Replace Tailwind CDN + REMOVE Flowbite CSS (keep Flowbite JS only)
- New base_tailwind.html (top navbar, responsive container, {%- block scripts -%})
- Port pages to Tailwind look/feel with wider content column:
- index: single-column form + recent results, fullscreen spinner overlay, copy-UUID
- result: sticky jump list, Tailwind tables/badges, Suspicious Scripts/Forms sections
- viewer: Monaco-based code viewer in Tailwind card, actions (copy/wrap/raw)
- ssl_tls macro: rewritten with Tailwind (details/summary for raw JSON)
- Dockerfile: add css-builder stage and copy built tw.css into /app/app/static
- Remove Flowbite stylesheet to avoid overrides; Flowbite JS loaded with defer
BREAKING CHANGE:
Legacy CSS classes/components (.card, .badge, etc.) are replaced by Tailwind utilities.
All templates now expect tw.css to be served from /static.
This commit is contained in:
24
Dockerfile
24
Dockerfile
@@ -1,3 +1,24 @@
|
||||
# --- Stage 1: CSS builder (no npm) ---
|
||||
FROM alpine:3.20 AS css-builder
|
||||
WORKDIR /css
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
# Download Tailwind standalone CLI
|
||||
# (Update version if desired; linux-x64 works on Alpine)
|
||||
RUN curl -sL https://github.com/tailwindlabs/tailwindcss/releases/download/v3.4.10/tailwindcss-linux-x64 \
|
||||
-o /usr/local/bin/tailwindcss && chmod +x /usr/local/bin/tailwindcss
|
||||
|
||||
# Config + sources
|
||||
COPY tailwind/tailwind.config.js ./
|
||||
COPY assets ./assets
|
||||
COPY app/templates ./app/templates
|
||||
COPY app/static ./app/static
|
||||
|
||||
# Build Tailwind CSS
|
||||
RUN tailwindcss -i ./assets/input.css -o ./tw.css --minify
|
||||
|
||||
# --- Stage 2: Playwright python image with requirements.
|
||||
|
||||
# Use the official Playwright image with browsers preinstalled
|
||||
FROM mcr.microsoft.com/playwright/python:v1.45.0-jammy
|
||||
|
||||
@@ -19,6 +40,9 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
# Copy application code (the double app is needed because the app folder needs to be inside the app folder)
|
||||
COPY app/ /app/app/
|
||||
|
||||
# Bring in the compiled CSS from Stage 1
|
||||
COPY --from=css-builder /css/tw.css /app/app/static/tw.css
|
||||
|
||||
COPY entrypoint.sh ./entrypoint.sh
|
||||
RUN chmod +x /app/entrypoint.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user