chore: update to new guestbook module style

This commit is contained in:
Lewis Wynne 2026-04-28 16:27:07 +01:00
parent 8699a1ab69
commit 0c82c86c50
3 changed files with 46 additions and 126 deletions

View file

@ -25,34 +25,42 @@
}; };
}; };
features = {
submissions.enable = true; submissions.enable = true;
websites.enable = true; websites.enable = true;
content.required = false;
message.required = false;
drawing = { drawing = {
enable = true; enable = true;
canvasWidth = 300; required = false;
canvasHeight = 140;
}; };
voiceNote = {
voice = {
enable = true; enable = true;
maxDuration = 20; required = false;
}; };
telegram = { telegram = {
enable = true; enable = true;
chatId = 8669496383; chatId = 8669496383;
botTokenFile = config.sops.secrets.telegram_bot_token.path; botTokenFile = config.sops.secrets.telegram_bot_token.path;
}; };
security = { security = {
htmlInjection.enable = true; htmlInjection.enable = true;
honeypot.enable = true; honeypot.enable = true;
captcha.enable = false; captcha.enable = false;
}; };
};
limits = { limits = {
name = 0; name.length = 0;
message = 0; message.length = 0;
website = 0; website.length = 0;
drawing = {
width = 300;
height = 140;
};
voice.duration = 20;
}; };
styles = { styles = {

View file

@ -1,90 +0,0 @@
/* 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 {}

View file

@ -3,20 +3,22 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{title}}</title> <title>{{title}} — ily.rs</title>
<link rel="stylesheet" href="/style.css"> <link rel="stylesheet" href="/style.css">
{{style}} {{style}}
</head> </head>
<body> <body>
<div class="page-container"> <nav>
<nav style="white-space:normal;">
<a href="/">ily [dot] rs</a> | <a href="/">ily [dot] rs</a> |
<a href="/links/">links</a> | <a href="/links/">links</a> |
<a href="/now/">now</a> | <a href="/now/">now</a> |
sign the <a href="/g/">guestbook</a> sign the <a href="/guestbook/">guestbook</a>
</nav> </nav>
{{form}} <details class="guestbook-details" style="margin-top: 0.5em">
{{entries}} <summary class="guestbook-summary">Click me to leave an entry</summary>
</div> {{form}}
</details>
<h1>messages</h1>
{{entries}}
</body> </body>
</html> </html>