diff --git a/hosts/lab/guestbook.nix b/hosts/lab/guestbook.nix index ae346b8..ec2059e 100644 --- a/hosts/lab/guestbook.nix +++ b/hosts/lab/guestbook.nix @@ -1,11 +1,5 @@ -{ guestbook, config, ... }: +{ guestbook, ... }: { - sops.secrets.guestbook-telegram-token = { - sopsFile = ../../secrets/guestbook.yaml; - key = "telegram_bot_token"; - owner = "guestbook"; - }; - services.guestbook = { enable = true; package = guestbook.packages.aarch64-linux.default; @@ -33,8 +27,7 @@ maxDuration = 20; }; telegram = { - enable = true; - botTokenFile = config.sops.secrets.guestbook-telegram-token.path; + enable = false; chatId = 8669496383; }; security = { @@ -51,6 +44,8 @@ }; styles = { + templateFile = "./templates/default.html"; + successTemplateFile = "./templates/success.html"; separator = "-----------"; labels = { submit = "Submit"; diff --git a/hosts/lab/templates/default.css b/hosts/lab/templates/default.css new file mode 100644 index 0000000..f0fc797 --- /dev/null +++ b/hosts/lab/templates/default.css @@ -0,0 +1,90 @@ +/* Page container */ +.page-container { + max-width: 70ch; + margin: 0 auto; + padding: 1rem; + white-space: pre-wrap; + word-wrap: break-word; +} + +/* Form */ +.guestbook-prompt {} +.guestbook-form {} +.guestbook-label {} +.guestbook-input {} +.guestbook-textarea { + box-sizing: border-box; +} +.guestbook-button { + display: block; + margin-top: 1em; +} + +/* Drawings */ +.guestbook-canvas { + border: 1px solid #000; + cursor: crosshair; + display: block; +} +.guestbook-canvas-tools { + display: block; +} +.guestbook-canvas-tools a { + cursor: pointer; +} +.guestbook-drawing-inline a { + cursor: pointer; +} +.guestbook-drawing-content { + display: block; + margin-bottom: 1em; +} +.guestbook-swatch { + display: inline-block; + width: 0.85em; + height: 0.85em; + border: 1px solid #000; + cursor: pointer; + vertical-align: middle; + box-sizing: border-box; + margin: 0 1px; +} +.guestbook-swatch.active { + border: 1px solid #000; + outline: 1px solid #000; +} +.guestbook-size-slider { + width: 4em; + vertical-align: middle; +} +.entry-drawing { + max-width: 100%; +} + +/* Voice notes */ +.guestbook-voice-record.recording { + color: red; +} +.guestbook-voice-timer { + font-variant-numeric: tabular-nums; +} +.guestbook-voice-playback:empty { + display: none; +} +.guestbook-voice-playback { + display: block; + white-space: normal; +} +audio { + display: block; + margin-top: 0.6em; + height: 2em; +} + +/* Entries */ +.entry-header {} +.entry-date {} +.entry-name {} +.entry-website {} +.entry-body {} +.entry-separator {} diff --git a/hosts/lab/templates/default.html b/hosts/lab/templates/default.html new file mode 100644 index 0000000..70565a1 --- /dev/null +++ b/hosts/lab/templates/default.html @@ -0,0 +1,24 @@ + + +
+ + +