feat: přidáno URL pole pro bloky – klikatelný odkaz v PDF
Some checks failed
Build & Push Docker / build (push) Has been cancelled

- Block model: nové volitelné pole 'url' (Optional[str])
- Frontend: URL input v modálu pro přidání/editaci bloku
- PDF generátor: c.linkURL() – celý blok je klikatelný odkaz
- sample.json: ukázkový blok s URL
- index.html: dokumentace URL pole
- .github/copilot-instructions.md: přidány Copilot instrukce
This commit is contained in:
Martin Sukany
2026-03-14 19:10:13 +01:00
parent 5d712494a5
commit 0a694ce63a
7 changed files with 315 additions and 68 deletions

View File

@@ -1,14 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
# Pre-commit hook: run tests and prevent commit on failures.
# By default run fast tests (exclude integration). To include integration tests set RUN_INTEGRATION=1.
# By default run fast tests (exclude integration). To include integration tests
# set RUN_INTEGRATION=1.
# Use venv pytest if available, otherwise fall back to system pytest
REPO_DIR="$(git rev-parse --show-toplevel)"
if [ -x "${REPO_DIR}/.venv/bin/pytest" ]; then
PYTEST="${REPO_DIR}/.venv/bin/pytest"
else
PYTEST="pytest"
fi
echo "Running pytest (fast) before commit..."
if [ "${RUN_INTEGRATION:-0}" = "1" ]; then
echo "RUN_INTEGRATION=1: including integration tests"
pytest -q
$PYTEST -q
else
pytest -q -m "not integration"
$PYTEST -q -m "not integration"
fi
echo "Tests passed. Proceeding with commit."