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;
websites.enable = true;
content.required = false;
message.required = false;
drawing = {
enable = true;
canvasWidth = 300;
canvasHeight = 140;
required = false;
};
voiceNote = {
voice = {
enable = true;
maxDuration = 20;
required = false;
};
telegram = {
enable = true;
chatId = 8669496383;
botTokenFile = config.sops.secrets.telegram_bot_token.path;
};
security = {
htmlInjection.enable = true;
honeypot.enable = true;
captcha.enable = false;
};
};
limits = {
name = 0;
message = 0;
website = 0;
name.length = 0;
message.length = 0;
website.length = 0;
drawing = {
width = 300;
height = 140;
};
voice.duration = 20;
};
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>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{title}}</title>
<title>{{title}} — ily.rs</title>
<link rel="stylesheet" href="/style.css">
{{style}}
</head>
<body>
<div class="page-container">
<nav style="white-space:normal;">
<nav>
<a href="/">ily [dot] rs</a> |
<a href="/links/">links</a> |
<a href="/now/">now</a> |
sign the <a href="/g/">guestbook</a>
</nav>
{{form}}
{{entries}}
</div>
sign the <a href="/guestbook/">guestbook</a>
</nav>
<details class="guestbook-details" style="margin-top: 0.5em">
<summary class="guestbook-summary">Click me to leave an entry</summary>
{{form}}
</details>
<h1>messages</h1>
{{entries}}
</body>
</html>