You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bump version to 1.0.4 and implement several feature additions and markup/UI improvements:
- Database: add polls, poll_options and poll_votes tables with UNIQUE(poll_id, ip_hash) to enforce one vote per IP; helper queries for creating polls, fetching poll data (with vote counts and user choice), casting votes, and resolving poll context.
- Handlers: accept poll fields in new-thread multipart parsing; create polls when OP supplies question + ≥2 options (duration clamped 1 minute–30 days); new POST /vote handler to cast votes with CSRF and expiry checks.
- Templates/UI: show permanent thread numeric badges and clickable [#id] links; new poll creator UI in new-thread form (add/remove options, duration), poll rendering on thread pages (voting form and results view anchored at #poll); markup hint bar; resizable expanded images and media improvements.
- Sanitizer/markup: add cross-board links (>>>/board/123 and >>>/board/), spoiler tags, emoji shortcodes, improved greentext handling (collapsible groups), URL/reply handling and ordering of transforms; word filters run on raw text before escaping.
- Static/CSS: per-board uploads route (/boards), styles for thread IDs, spoilers, poll UI, cross-board links, and media resize/rotation; fix greentext/quote class mismatch.
Also update CHANGELOG with feature list and adjust upload/data directory naming. The commit focuses on adding polls and richer post markup while preserving XSS-safe escaping and enforcing CSRF and vote uniqueness.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,30 @@
2
2
3
3
All notable changes to RustChan will be documented in this file.
4
4
5
+
## [1.0.4] - 2026-03-03
6
+
7
+
### Added
8
+
-**Thread IDs** — every thread is now assigned a permanent numeric ID displayed as a badge (`Thread No.1234`) at the top of its page. Board index thread summaries show a clickable `[ #1234 ]` link beside each post number.
9
+
-**Cross-board links** — post bodies now parse `>>>/board/123` into a clickable link to that thread and `>>>/board/` into a board index link. Cross-board links are styled in amber to distinguish them from local reply links.
10
+
-**Emoji shortcodes** — 25 shortcodes supported in post bodies (e.g. `:fire:` → 🔥, `:think:` → 🤔, `:based:` → 🗿, `:kek:` → 🤣). Applied after HTML transforms to avoid conflicts.
11
+
-**Spoiler tags** — `[spoiler]text[/spoiler]` hides content behind a same-color block; clicking or hovering reveals it with a smooth transition.
12
+
-**Markup hint bar** — a compact row of syntax reminders is shown below the body textarea in the new thread form listing available markup options.
13
+
-**Thread polls** — the new thread form includes a collapsible `[ 📊 Add a Poll ]` section. Polls are OP-only, support 2–10 options (dynamically added/removed), and require a duration in hours or minutes (clamped to 1 minute–30 days). Votes are cast via a radio-button form, one vote per IP enforced at the database level. Results display as a percentage bar chart after voting or once the poll closes. Polls are anchored at `#poll` on their thread page.
14
+
-**Resizable expanded images** — expanded images support `resize: both`, allowing users to drag the corner to any size without reloading.
15
+
-**Per-board upload directories** — files are now stored under `rustchan-data/boards/{board}/` and thumbnails under `rustchan-data/boards/{board}/thumbs/` for clean per-board organisation.
16
+
17
+
### Changed
18
+
-**Data directory renamed** from `chan-data/` to `rustchan-data/` for clarity.
19
+
-**Upload directory renamed** from `uploads/` to `boards/` inside the data directory. The static file route changed from `/uploads/` to `/boards/` accordingly.
20
+
-**Bold** (`**text**`) and **italic** (`__text__`) markup now render correctly in all post bodies.
21
+
22
+
### Fixed
23
+
- Greentext CSS class mismatch — renderer emits `class="quote"` but the stylesheet only targeted `.greentext`; both are now covered.
24
+
- Spoiler CSS specificity — `.post-body` color was overriding the spoiler hide rule; selectors updated to `.post-body .spoiler`.
25
+
- Poll "Question" input overflowing the form on narrow layouts — label and input now use `width: 100%; box-sizing: border-box` and `min-width: 0`.
0 commit comments