Compare commits

...

3 Commits

Author SHA1 Message Date
18e5ffd63f Add font 2026-01-16 13:22:37 +01:00
9f09e651b8 add deploy script 2026-01-16 13:22:21 +01:00
8e4eb7b408 Add copilot instructions 2026-01-16 13:22:11 +01:00
5 changed files with 130 additions and 3 deletions

22
.github/copilot-instructions.md vendored Normal file
View File

@@ -0,0 +1,22 @@
# Development instructions
- This is a personal project that will only ever be used by me. No public distribution is planned.
- This is a template (this is what Dokuwiki calls themes/styles) for my personal Dokuwiki instance.
- The project is written in PHP and targets Dokuwiki.
- Follow general PHP best practices.
- Follow Dokuwiki coding conventions: https://www.dokuwiki.org/devel
- Do not use `phpunit` There are missing dependencies that make it fail.
- Use `php -l <file>` to check for syntax errors.
- Consider The official documentation for writing dokuwiki plugins: https://www.dokuwiki.org/devel:plugins
- Whenever necessary, update the README file to reflect new features or changes.
# General instructions
- This template is intended to be used by me for many years to come
- That means maintainability is more important than cutting edge technologies
- Write code that is easy to understand and modify
- Favor stability over performance unless performance is a clear requirement
- Favor simplicity over cleverness
- Favor explicitness over implicitness
- Favor well-known solutions over new or exotic solutions
- Favor documented solutions over undocumented solutions
- Favor built-in solutions over external dependencies

5
README
View File

@@ -1,2 +1,5 @@
See template.info.txt for main info
See COPYING for license info
See COPYING for license info
Notes:
- Default UI font uses the bundled "Perfect DOS VGA 437" from the fonts directory.

View File

@@ -8,6 +8,14 @@
* @author Anika Henke <anika@selfthinker.org>
*/
@font-face {
font-family: "Perfect DOS VGA 437";
src: url("./fonts/Perfect%20DOS%20VGA%20437%20Win.ttf") format("truetype");
font-weight: normal;
font-style: normal;
font-display: swap;
}
html {
overflow-x: auto;
overflow-y: scroll;
@@ -20,7 +28,7 @@ body {
padding: 0;
}
body {
font: normal 100%/1.4 Frutiger, Calibri, "Myriad Pro", Myriad, "Nimbus Sans L", Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif;
font: normal 100%/1.4 "Perfect DOS VGA 437", Frutiger, Calibri, "Myriad Pro", Myriad, "Nimbus Sans L", Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif;
/* default font size: 100% => 16px; 93.75% => 15px; 87.5% => 14px; 81.25% => 13px; 75% => 12px */
-webkit-text-size-adjust: 100%;
}
@@ -34,7 +42,7 @@ h3,
h4,
h5,
h6 {
font-family: Constantia, Utopia, Lucidabright, Lucida, Georgia, "Nimbus Roman No9 L", serif;
font-family: "Perfect DOS VGA 437", Constantia, Utopia, Lucidabright, Lucida, Georgia, "Nimbus Roman No9 L", serif;
font-weight: bold;
color: __text_neu__;
background-color: inherit;

94
deploy.sh Executable file
View File

@@ -0,0 +1,94 @@
#!/usr/bin/env bash
set -euo pipefail
# Deploy this luxtools template checkout into a mounted DokuWiki plugins dir.
# Default target is the user's mount path.
#
# Usage:
# ./deploy.sh # deploy to /thebe/Web/lib/tpl/luxtools/
# ./deploy.sh --dry-run # show what would change
# ./deploy.sh /path/to/luxtools
# ./deploy.sh --no-delete # don't delete extraneous files at target
TARGET="/thebe/Web/lib/tpl/luxtools"
DRY_RUN=0
DELETE=1
while (($#)); do
case "$1" in
--dry-run|-n)
DRY_RUN=1
shift
;;
--no-delete)
DELETE=0
shift
;;
-h|--help)
sed -n '1,80p' "$0"
exit 0
;;
*)
TARGET="$1"
shift
;;
esac
done
if ! command -v rsync >/dev/null 2>&1; then
echo "Error: rsync is required." >&2
exit 1
fi
SRC_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Safety checks: make sure source looks like luxtools plugin
if [[ ! -f "$SRC_DIR/template.info.txt" ]]; then
echo "Error: '$SRC_DIR' doesn't look like luxtools (missing template.info.txt)." >&2
exit 1
fi
# Ensure target dir exists
mkdir -p "$TARGET"
# Safety check: refuse to deploy to an obviously wrong directory.
# Allow empty dir (fresh install) OR existing luxtools template dir.
if [[ -e "$TARGET/plugin.info.txt" ]]; then
if ! grep -qi "^base\s\+luxtools" "$TARGET/template.info.txt" 2>/dev/null; then
echo "Error: target '$TARGET' has a template.info.txt, but it doesn't look like luxtools." >&2
echo "Refusing to deploy." >&2
exit 1
fi
fi
RSYNC_ARGS=(
-a
--human-readable
--itemize-changes
--chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r
--exclude=deploy.sh
--exclude=.git/
--exclude=_dokuwiki/
--exclude=.github/
--exclude=.vscode/
--exclude=_test/
--exclude=deleted.files
--exclude=*.swp
--exclude=*.swo
--exclude=.DS_Store
)
if ((DRY_RUN)); then
RSYNC_ARGS+=(--dry-run)
fi
if ((DELETE)); then
RSYNC_ARGS+=(--delete)
fi
echo "Deploying luxtools from: $SRC_DIR/"
echo "Deploying luxtools to: $TARGET/"
rsync "${RSYNC_ARGS[@]}" "$SRC_DIR/" "$TARGET/"
echo "Done."

Binary file not shown.