From 8274dad0870a52f318da9ed7ea1ab761b08c166f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 13 Oct 2026 20:45:05 +0000 Subject: [PATCH] Web forum: themes along the YaBB lineage yabb1 (Gold, as YaBB 1 Gold), yabb2 (Default, as YaBB 2.0-2.4, wearing yabb1's pages under its own head and board index) and yabb25 (Silver, as YaBB 2.5, wearing yabb2's with its own head, board index and topic). Layouts follow the templates and stylesheets in YaBB's releases on SourceForge, and colors follow those stylesheets and, for 2.5, its translucent images laid over their colors; the templates and CSS are written for this BBS and take no code or images from YaBB (folders, lamps, orbs, stars and icons are drawn in CSS). Adds YaBB's two date styles, the second with its ordinal day. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr --- README.md | 2 +- bbs.conf.sample | 10 +- docs/wiki/HTTP-API.md | 2 +- docs/wiki/Home.md | 2 +- docs/wiki/Web-Forum.md | 5 +- internal/forum/format.go | 19 ++ internal/forum/forum.go | 3 + internal/forum/forum_test.go | 24 +++ internal/forum/static/yabb1.css | 256 +++++++++++++++++++++++ internal/forum/static/yabb2.css | 151 +++++++++++++ internal/forum/static/yabb25.css | 184 ++++++++++++++++ internal/forum/themes/yabb1/area.html | 40 ++++ internal/forum/themes/yabb1/index.html | 47 +++++ internal/forum/themes/yabb1/layout.html | 51 +++++ internal/forum/themes/yabb1/profile.html | 23 ++ internal/forum/themes/yabb1/topic.html | 89 ++++++++ internal/forum/themes/yabb2/index.html | 59 ++++++ internal/forum/themes/yabb2/layout.html | 54 +++++ internal/forum/themes/yabb25/index.html | 46 ++++ internal/forum/themes/yabb25/layout.html | 47 +++++ internal/forum/themes/yabb25/topic.html | 80 +++++++ 21 files changed, 1186 insertions(+), 8 deletions(-) create mode 100644 internal/forum/static/yabb1.css create mode 100644 internal/forum/static/yabb2.css create mode 100644 internal/forum/static/yabb25.css create mode 100644 internal/forum/themes/yabb1/area.html create mode 100644 internal/forum/themes/yabb1/index.html create mode 100644 internal/forum/themes/yabb1/layout.html create mode 100644 internal/forum/themes/yabb1/profile.html create mode 100644 internal/forum/themes/yabb1/topic.html create mode 100644 internal/forum/themes/yabb2/index.html create mode 100644 internal/forum/themes/yabb2/layout.html create mode 100644 internal/forum/themes/yabb25/index.html create mode 100644 internal/forum/themes/yabb25/layout.html create mode 100644 internal/forum/themes/yabb25/topic.html diff --git a/README.md b/README.md index 9263bab..5f1e2ae 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ What there is: elsewhere by telnet or RLogin, and the door networks BBSLink and DoorParty - [chat](https://github.com/Neo-Desktop/bbs-sec/wiki/Chat-and-Paging): rooms, messages to a node, paging the sysop - [finger and gopher](https://github.com/Neo-Desktop/bbs-sec/wiki/Finger-and-Gopher): who is on, and chosen areas in gopherspace -- [a web forum](https://github.com/Neo-Desktop/bbs-sec/wiki/Web-Forum): the message areas as a bulletin board in the browser, in the manner of Invision Power Board 3, or of IPB 5, 4, 2 or 1, Ikonboard, vBulletin 6 back to 2 or Lite, XenForo 2.3 back to 1, MyBB 1.8 back to 1.2, PunBB 1.4 and 1.2, FluxBB 1.5, Simple Machines Forum 3.0 back to 1, or phpBB 3.3 back to 1 (themes) +- [a web forum](https://github.com/Neo-Desktop/bbs-sec/wiki/Web-Forum): the message areas as a bulletin board in the browser, in the manner of Invision Power Board 3, or of IPB 5, 4, 2 or 1, Ikonboard, vBulletin 6 back to 2 or Lite, XenForo 2.3 back to 1, MyBB 1.8 back to 1.2, PunBB 1.4 and 1.2, FluxBB 1.5, YaBB 2.5 back to 1, Simple Machines Forum 3.0 back to 1, or phpBB 3.3 back to 1 (themes) - [a web terminal](https://github.com/Neo-Desktop/bbs-sec/wiki/HTTP-API#the-web-terminal): the BBS in a browser (xterm.js, built in) - [an HTTP API](https://github.com/Neo-Desktop/bbs-sec/wiki/HTTP-API): REST, server-sent events, and WebSockets (JSON or protobuf) where web clients chat with terminal callers; Prometheus metrics - [customization](https://github.com/Neo-Desktop/bbs-sec/wiki/Customization): ANSI art and 3270 screens, menus of the sysop's, @-codes, the prompts' words diff --git a/bbs.conf.sample b/bbs.conf.sample index 905ea1f..ae4edc3 100644 --- a/bbs.conf.sample +++ b/bbs.conf.sample @@ -221,10 +221,12 @@ address = 127.0.0.1:2513 ; XenForo 2), xf1 (classic, as XenForo 1), mybb18 (flat, as MyBB 1.8), ; mybb16 (classic, as MyBB 1.6), mybb12 (original, as MyBB 1.2), pun14 ; (oxygen 2, as PunBB 1.4), flux15 (air, as FluxBB 1.5), pun12 (oxygen, as -; PunBB 1.2), smf30 (natural, as Simple Machines Forum 3.0), smf21 (simple, -; as SMF 2.1), smf20 (curve, as SMF 2.0), smf1 (core, as SMF 1), phpbb33, -; phpbb32, phpbb31 and phpbb30 (prosilver, as phpBB 3.3, 3.2, 3.1 and 3.0), -; phpbb2 (silver, as phpBB 2) or phpbb1 (dark, as phpBB 1) +; PunBB 1.2), yabb25 (silver, as YaBB 2.5), yabb2 (default, as YaBB 2), +; yabb1 (gold, as YaBB 1 Gold), smf30 (natural, as Simple Machines Forum +; 3.0), smf21 (simple, as SMF 2.1), smf20 (curve, as SMF 2.0), smf1 (core, +; as SMF 1), phpbb33, phpbb32, phpbb31 and phpbb30 (prosilver, as phpBB 3.3, +; 3.2, 3.1 and 3.0), phpbb2 (silver, as phpBB 2) or phpbb1 (dark, as phpBB +; 1) ;forum_theme = ipb3 ; Access levels: a user's level (0-255) gets what the [level] at or diff --git a/docs/wiki/HTTP-API.md b/docs/wiki/HTTP-API.md index ef27979..d7cdd48 100644 --- a/docs/wiki/HTTP-API.md +++ b/docs/wiki/HTTP-API.md @@ -26,7 +26,7 @@ key_file = /etc/bbs/tls/key.pem | `rate`, `burst` | `10`, `20` | requests a second per token (per address without one), and how many may come at once | | `session_hours` | `24` | how long a login's token lasts | | `terminal` | `yes` | the web terminal page (below) | -| `forum`, `forum_guests`, `forum_theme` | `yes`, `yes`, `ipb3` | the [web forum](Web-Forum), guests reading it, and its theme (`ipb3`, `ipb5`, `ipb4`, `ipb2`, `ipb1`, `ikon`, `vb6`, `vb5`, `vb4`, `vb3`, `vb2`, `vblite`, `xf23`, `xf2`, `xf1`, `mybb18`, `mybb16`, `mybb12`, `pun14`, `flux15`, `pun12`, `smf30`, `smf21`, `smf20`, `smf1`, `phpbb33`, `phpbb32`, `phpbb31`, `phpbb30`, `phpbb2` or `phpbb1`) | +| `forum`, `forum_guests`, `forum_theme` | `yes`, `yes`, `ipb3` | the [web forum](Web-Forum), guests reading it, and its theme (`ipb3`, `ipb5`, `ipb4`, `ipb2`, `ipb1`, `ikon`, `vb6`, `vb5`, `vb4`, `vb3`, `vb2`, `vblite`, `xf23`, `xf2`, `xf1`, `mybb18`, `mybb16`, `mybb12`, `pun14`, `flux15`, `pun12`, `yabb25`, `yabb2`, `yabb1`, `smf30`, `smf21`, `smf20`, `smf1`, `phpbb33`, `phpbb32`, `phpbb31`, `phpbb30`, `phpbb2` or `phpbb1`) | The OpenAPI 3.1 description is at `/api/v1/openapi.json`. diff --git a/docs/wiki/Home.md b/docs/wiki/Home.md index 22c76f3..2a0403a 100644 --- a/docs/wiki/Home.md +++ b/docs/wiki/Home.md @@ -83,7 +83,7 @@ What there is: [IRC](IRC) channels too, for IRC clients, and [MRC](MRC)'s rooms join the BBSes' Multi Relay Chat - [finger and gopher](Finger-and-Gopher): who is on, and chosen areas in gopherspace -- [a web forum](Web-Forum): the message areas as a bulletin board in the browser, in the manner of Invision Power Board 3, or of IPB 5, 4, 2 or 1, Ikonboard, vBulletin 6 back to 2 or Lite, XenForo 2.3 back to 1, MyBB 1.8 back to 1.2, PunBB 1.4 and 1.2, FluxBB 1.5, Simple Machines Forum 3.0 back to 1, or phpBB 3.3 back to 1 (themes) +- [a web forum](Web-Forum): the message areas as a bulletin board in the browser, in the manner of Invision Power Board 3, or of IPB 5, 4, 2 or 1, Ikonboard, vBulletin 6 back to 2 or Lite, XenForo 2.3 back to 1, MyBB 1.8 back to 1.2, PunBB 1.4 and 1.2, FluxBB 1.5, YaBB 2.5 back to 1, Simple Machines Forum 3.0 back to 1, or phpBB 3.3 back to 1 (themes) - [a web terminal](HTTP-API#the-web-terminal): the BBS in a browser (xterm.js, built in) - [an HTTP API](HTTP-API): REST, server-sent events, and WebSockets (JSON or protobuf) where web clients chat with terminal callers; Prometheus metrics - [customization](Customization): ANSI art and 3270 screens, menus of the sysop's, @-codes, the prompts' words diff --git a/docs/wiki/Web-Forum.md b/docs/wiki/Web-Forum.md index 0f0e9ff..347c5d0 100644 --- a/docs/wiki/Web-Forum.md +++ b/docs/wiki/Web-Forum.md @@ -94,6 +94,9 @@ On a post: | `pun14` | oxygen 2: PunBB 1.3 and 1.4's Oxygen, a lighter look over pages of its own: a grey head with the board's name, a blue bar of links and a white welcome strip, each forum list and topic in a box with a blue head and a grey row naming the columns, bevelled square forum icons, posts with a grey *Reply by* strip and the date at the right, the author with picture and counts at the left, *Profile*, *Like* and *Quote* in a row beneath, *Quick reply* at the foot | | `flux15` | air: FluxBB 1.4 and 1.5's Air over PunBB 1.2's pages (the pun12 theme's): a white rounded frame on a pale blue page, a slate-blue menu of tabs, teal headings over pale blue column rows, posts in pale blue with the author at the left, quotes in pale yellow boxes, Arial | | `pun12` | oxygen: a lightweight PHP board of 2004-2008 in the manner of PunBB 1.2's (and FluxBB 1.2's) Oxygen: small Verdana, a blue title bar with a menu of plain links, tables of forums with blue heads and grey column rows, square forum lamps, posts with a blue strip giving the number and date, the author at the left on grey, *Quick post* at the foot, *Board information* | +| `yabb25` | silver: YaBB 2.5's default look over 2's pages (the yabb2 theme's): a silver page in a grey frame, a glossy clock strip, glossy grey tabs with the chosen one lit and a search box, each category under a rounded glossy title, boards on pale grey rows shaded at the top with a grey folder and a glowing orange orb for new posts, posts with the poster across the top on a grey band over the message, in rounded grey frames | +| `yabb2` | default: YaBB 2.0-2.4's default template over 1's pages (the yabb1 theme's): a blue-white page, tables in grey frames with a pale ledge, a bright blue title row with the greeting and a search box, the way here in bold blue, pale blue category rows with a speech balloon, rounded lamps with a tick (orange for new), the last post before the counts, posts ruled off in pale blue with smaller grey type, little validator buttons at the foot | +| `yabb1` | gold: a Perl board of 2001-2004 in the manner of YaBB 1 Gold: everything in tables ruled with a one-pixel slate grid, a head with the board's name and *Hey, alice* over a pale menu row of words split by bars, the way here as a tree of open folders, pale steel title and category rows, manila folders for boards and topics (a blue badge for new, a flag when hot), posts with the poster and their stars at the left, *Reply #1 on: 10/12/26 at 23:12:05*, an *Info Center* | | `smf30` | natural: Simple Machines Forum 3.0's refinement of 2.1 (the smf21 theme's pages): the top strip and the menu each on a soft blue-to-white band, a rounded breadcrumb, a deep slate foot, and a dark scheme in slate blues and warm orange when the reader's device asks for one | | `smf21` | simple: Simple Machines Forum 2.1's default look, grown out of Curve (the smf20 theme's pages): a white strip across the top with the member's name and a search box, a dark blue page edge, a bordered frame with the board's name in orange, orange pills for the current menu item, a boxed breadcrumb, flat steel-blue category bars, title bars edged in orange, posts as bordered boxes, small capital buttons in a row, a dark blue foot | | `smf20` | curve: a PHP board of 2011-2019 in the manner of Simple Machines Forum 2.0's Curve: a slate blue band fading to a pale page, a white rounded frame, *Hello* with the member's picture and the news beside it, rounded menu buttons, a breadcrumb with little arrows, rounded steel-blue category bars over rounded pale-blue blocks, orange board and poster names, *Posts / Topics* and *Last post by … in … on …*, an *Info Center*, posts with the poster's group, stars and post count on the left and *« Reply #1 on: … »* above, *Quick Reply* | @@ -110,7 +113,7 @@ they recall; no code or images are taken from them. `forum_theme` is the forum's; anyone (guests too) may choose another at the foot of every page, kept in a cookie (`bbs_forum_theme`) for a year. A theme lays out the board, topic lists, topics and profiles its own way, and shows the rest -(posting, searching, signing in) in its colors. A theme may build on another's templates (the phpBB 3.2 and 3.3 themes wear 3.1's, vBulletin 6's wears 5's, SMF 3.0's and 2.1's wear Curve's, XenForo 2.3's wears 2's, MyBB 1.8's wears 1.6's, which wears 1.2's, and FluxBB 1.5's wears PunBB 1.2's, with stylesheets of their own). +(posting, searching, signing in) in its colors. A theme may build on another's templates (the phpBB 3.2 and 3.3 themes wear 3.1's, vBulletin 6's wears 5's, SMF 3.0's and 2.1's wear Curve's, XenForo 2.3's wears 2's, MyBB 1.8's wears 1.6's, which wears 1.2's, FluxBB 1.5's wears PunBB 1.2's, and YaBB 2.5's wears 2's, which wears 1's, with stylesheets of their own). ## Logins diff --git a/internal/forum/format.go b/internal/forum/format.go index 13bfa3a..dc10376 100644 --- a/internal/forum/format.go +++ b/internal/forum/format.go @@ -27,6 +27,8 @@ var funcs = template.FuncMap{ "vbtime": func(t time.Time) string { return t.Format("03:04 PM") }, "smfdate": func(t time.Time) string { return t.Format("January 02, 2006, 03:04:05 PM") }, "ymd": func(t time.Time) string { return t.Format("2006-01-02") }, + "yabbdate": func(t time.Time) string { return t.Format("01/02/06 at 15:04:05") }, + "yabb2date": yabb2Date, "mod5": func(n int) int { return n % 5 }, "shortdate": func(t time.Time) string { return t.Format("Jan. 02, 2006") }, "clock": func(t time.Time) string { return t.Format("03:04 PM") }, @@ -312,3 +314,20 @@ func newPages(base string, count, cur int) pages { } func urlEscape(s string) string { return url.QueryEscape(s) } + +// yabb2Date writes a time as YaBB 2 did by default: "Oct 12th, 2026, 11:12pm". +func yabb2Date(t time.Time) string { + d := t.Day() + suffix := "th" + if d < 11 || d > 13 { + switch d % 10 { + case 1: + suffix = "st" + case 2: + suffix = "nd" + case 3: + suffix = "rd" + } + } + return fmt.Sprintf("%s %d%s, %d, %s", t.Format("Jan"), d, suffix, t.Year(), t.Format("3:04pm")) +} diff --git a/internal/forum/forum.go b/internal/forum/forum.go index 0b35284..c90d91b 100644 --- a/internal/forum/forum.go +++ b/internal/forum/forum.go @@ -70,6 +70,9 @@ var Themes = []Theme{ {"pun14", "Oxygen 2 (PunBB 1.4 style)", ""}, {"flux15", "Air (FluxBB 1.5 style)", "pun12"}, {"pun12", "Oxygen (PunBB 1.2 style)", ""}, + {"yabb25", "Silver (YaBB 2.5 style)", "yabb2"}, + {"yabb2", "Default (YaBB 2 style)", "yabb1"}, + {"yabb1", "Gold (YaBB 1 style)", ""}, {"smf30", "Natural (SMF 3.0 style)", "smf21"}, {"smf21", "Simple (SMF 2.1 style)", "smf20"}, {"smf20", "Curve (SMF 2.0 style)", ""}, diff --git a/internal/forum/forum_test.go b/internal/forum/forum_test.go index de0acf8..4b441e3 100644 --- a/internal/forum/forum_test.go +++ b/internal/forum/forum_test.go @@ -429,6 +429,9 @@ func TestThemes(t *testing.T) { "pun12": {{"postleft", "Quick post", "Post reply", "/forum/static/pun12.css"}, {"Board information", "Total number of registered users", "You are not logged in."}}, "flux15": {{"postleft", "Quick post", "Post reply", "/forum/static/flux15.css"}, {"Board information", "You are not logged in.", "/forum/static/flux15.css"}}, "pun14": {{"post-author", "Quick reply to", "entry-content", "/forum/static/pun14.css"}, {"Forum statistics", "Currently online", "brd-navlinks"}}, + "yabb1": {{"Reply #1 on:", "Post reply", `class="bordercolor yypost`, "/forum/static/yabb1.css"}, {"Info Center", "Welcome, Guest. Please", "yytree", "/forum/static/yabb1.css"}}, + "yabb2": {{"Reply #1 on:", "navbarcontainer", "/forum/static/yabb2.css"}, {"Info Center", "boardcontainer", "Welcome, Guest. Please", "/forum/static/yabb2.css"}}, + "yabb25": {{`class="userinfo"`, "Reply #1 - ", "Quick Reply", "/forum/static/yabb25.css"}, {"Forum Statistics", "tabtitle", "Welcome, Guest", "/forum/static/yabb25.css"}}, "smf1": {{"Author", "Quick Reply", "(Read ", "Reply #1 on:"}, {"Info Center", "Forum Stats", "Hello Guest", `class="board_icon`}}, "smf20": {{"Author Topic: ", "Quick Reply", `class="post_wrapper"`, "Reply #1 on:"}, {"Info Center", "Users Online", "Login with username and password", "/forum/static/smf20.css"}}, "smf21": {{"Author Topic: ", `class="post_wrapper"`, "/forum/static/smf21.css"}, {"Info Center", `id="top_info"`, "/forum/static/smf21.css"}}, @@ -466,6 +469,11 @@ func TestThemeLineage(t *testing.T) { if th.Parent != "" && !KnownTheme(th.Parent) { t.Errorf("%s: no parent %s", th.Name, th.Parent) } + if th.Name == "yabb25" { + if got := strings.Join(lineage(th), " "); got != "yabb1 yabb2 yabb25" { + t.Errorf("yabb25's lineage: %s", got) + } + } if th.Name == "phpbb33" { if got := strings.Join(lineage(th), " "); got != "phpbb31 phpbb32 phpbb33" { t.Errorf("phpbb33's lineage: %s", got) @@ -494,3 +502,19 @@ func TestAgo(t *testing.T) { } } } + +func TestYabb2Date(t *testing.T) { + for _, c := range []struct { + day int + want string + }{ + {1, "Oct 1st, 2026, 11:12pm"}, {2, "Oct 2nd, 2026, 11:12pm"}, {3, "Oct 3rd, 2026, 11:12pm"}, + {4, "Oct 4th, 2026, 11:12pm"}, {11, "Oct 11th, 2026, 11:12pm"}, {12, "Oct 12th, 2026, 11:12pm"}, + {13, "Oct 13th, 2026, 11:12pm"}, {21, "Oct 21st, 2026, 11:12pm"}, {22, "Oct 22nd, 2026, 11:12pm"}, + {23, "Oct 23rd, 2026, 11:12pm"}, {31, "Oct 31st, 2026, 11:12pm"}, + } { + if got := yabb2Date(time.Date(2026, 10, c.day, 23, 12, 0, 0, time.UTC)); got != c.want { + t.Errorf("yabb2Date(day %d) = %q, want %q", c.day, got, c.want) + } + } +} diff --git a/internal/forum/static/yabb1.css b/internal/forum/static/yabb1.css new file mode 100644 index 0000000..24acdcd --- /dev/null +++ b/internal/forum/static/yabb1.css @@ -0,0 +1,256 @@ +/* + * The forum's YaBB theme: laid out in the manner of the Perl boards of + * 2001-2004 (YaBB 1 Gold's default template and its kind): a light + * grey page, everything in tables ruled with a one-pixel slate-blue + * grid, a head with the board's name and a "Hey, alice" greeting over a + * pale menu row of words split by bars, the way to the page as a little + * tree of open folders, pale steel title rows and category rows, cells + * in pale blue and white, manila folders for boards and topics (a blue + * badge when there is something new, a flag when a topic runs hot), + * posts with the poster and their stars in a column at the left, + * "Reply #1 on: 10/12/26 at 23:12:05" over a rule, Verdana. Colors + * follow YaBB 1 Gold's template; the CSS is our own and no images are + * taken (the folders, stars and icons are drawn here). + */ + +:root { + --page: #f5f5f5; + --grid: #b1bdc9; + --wb: #dde3eb; + --wb2: #fefefe; + --title: #e8ebef; + --title-text: #304b58; + --cat: #d2d9e2; + --cat-text: #304b58; + --text: #000; + --link: #75879a; + --link-hover: #75879a; + --nav: #000; + --nav-hover: #cc3333; + --hr: #273f49; + --quote: #e8ebef; + --quote-line: #b1bdc9; + --input: #e8ebef; + --folder-a: #fff3c8; + --folder-b: #e9d27c; + --folder-line: #8a7a3c; + --badge: #2a5fc8; + --font: Verdana, Arial, Helvetica, sans-serif; +} + +* { box-sizing: border-box; } +body.yabb { margin: 0; padding: 16px 0; background: var(--page); color: var(--text); font: 13px/1.35 var(--font); } +#container { width: 92%; margin: 0 auto; } +a:link, a:visited { color: var(--link); text-decoration: none; } +a:hover { color: var(--link-hover); border-bottom: 1px solid currentColor; } +b, strong { font-weight: bold; } +.small, .desc { font-size: 11px; } +.inline-form { display: inline; } +.linkish { padding: 0; margin: 0; border: 0; background: none; color: var(--link); font: inherit; cursor: pointer; } +.linkish:hover { text-decoration: underline; } +.menusep { color: var(--title-text); } +hr.hr, .yabb hr { height: 1px; margin: 4px 0; border: 0; background: var(--hr); } + +/* --- the tables: a one-pixel grid of slate blue */ +table.bordercolor { width: 100%; margin: 0 0 16px; border-spacing: 1px; background: var(--grid); font-size: 13px; } +table.bordercolor td, table.bordercolor th { padding: 4px; text-align: left; vertical-align: middle; font-weight: normal; } +.windowbg { background: var(--wb); } +.windowbg2 { background: var(--wb2); } +th.titlebg, td.titlebg, .titlebg { background: var(--title); color: var(--title-text); font-weight: bold; } +.catbg { background: var(--cat); color: var(--cat-text); font-weight: bold; } +table.bordercolor .titlebg, table.bordercolor .catbg { font-weight: bold; } +.catbg a:link, .catbg a:visited, .titlebg a:link, .titlebg a:visited { color: var(--cat-text); } +.num { width: 1%; text-align: center !important; white-space: nowrap; } +td.icon { width: 6%; text-align: center !important; } +.last { width: 24%; } + +/* the head */ +.yyheader { margin-bottom: 20px; } +.yyheader td { padding: 3px 6px; } +.yylogo { width: 230px; } +.yylogo a, .yylogo a:hover { display: block; padding: 6px 4px; border: 0; } +.yylogo-name { display: block; color: #3c5b6c; font: bold italic 26px/1 Georgia, "Times New Roman", serif; letter-spacing: -0.5px; text-shadow: 1px 1px 0 #c8d2dc; } +.yylogo-sub { display: block; margin-top: 2px; color: #75879a; font: bold 10px var(--font); letter-spacing: 4px; text-transform: uppercase; } +.yywelcome { vertical-align: top !important; padding-top: 12px !important; font-size: 13px; } +.yytime { font-size: 11px; } +.yynews { margin-top: 10px; font-size: 13px; } +td.yymenu { height: 30px; text-align: center !important; font-size: 11px; } +.yymenu a:link, .yymenu a:visited, .yymenu .linkish { color: #000; font-weight: bold; font-size: 11px; } +.yymenu a:hover, .yymenu .linkish:hover { color: var(--nav-hover); border: 0; text-decoration: underline; } +.yynotice { margin: 0 0 14px; padding: 6px 8px; border: 1px solid var(--grid); background: var(--wb2); text-align: center; } + +/* the way here: a tree of open folders */ +.yytree { margin: 0 0 6px; font-size: 11px; font-weight: bold; } +.yytree-row { display: flex; align-items: flex-end; gap: 4px; min-height: 17px; } +.yytree-row.d1 { padding-left: 4px; } +.yytree-row.d2 { padding-left: 22px; } +.yytree-row.d3 { padding-left: 40px; } +.yytree-row.d4 { padding-left: 58px; } +.tline { display: inline-block; width: 12px; height: 10px; margin-bottom: 4px; border-left: 1px dotted #7b7b7b; border-bottom: 1px dotted #7b7b7b; } +.nav a:link, .nav a:visited, a.nav:link, a.nav:visited { color: var(--nav); } +.nav a:hover, a.nav:hover { color: var(--nav-hover); border: 0; text-decoration: underline; } + +/* manila folders, drawn: boards, topics and the tree */ +.ficon { position: relative; display: inline-block; width: 20px; height: 13px; margin: 4px 1px 0; vertical-align: middle; border: 1px solid var(--folder-line); border-radius: 1px; background: linear-gradient(var(--folder-a), var(--folder-b)); box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.7); } +.ficon::before { content: ""; position: absolute; top: -4px; left: -1px; width: 8px; height: 3px; border: 1px solid var(--folder-line); border-bottom: 0; border-radius: 2px 2px 0 0; background: var(--folder-a); } +.ficon.open::after { content: ""; position: absolute; left: 2px; right: -3px; bottom: -1px; height: 8px; border: 1px solid var(--folder-line); background: linear-gradient(#fff8dc, var(--folder-a)); transform: skewX(-24deg); } +.ficon.board::after { content: ""; position: absolute; left: -5px; bottom: -4px; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #fff 0 1.5px, #9a9a9a 2px 3px, #6a6a6a 3.5px); } +.ficon.board.on::after { background: radial-gradient(circle at 50% 50%, #fff 0 1.5px, #5d8de6 2px 3px, var(--badge) 3.5px); } +.ficon.hot::after, .ficon.veryhot::after { content: ""; position: absolute; left: -3px; top: -6px; width: 8px; height: 17px; border-left: 1px solid #555; background: linear-gradient(#f2dc00, #f2dc00) no-repeat 0 0 / 7px 6px; } +.ficon.veryhot::after { background-image: linear-gradient(#e0201c, #e0201c); } +.yylegend-topics { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: -8px 0 16px; } + +/* little pictures: a page for the message, information, who is on */ +.yyicon { display: inline-block; vertical-align: middle; } +.yyicon.xx { width: 11px; height: 13px; border: 1px solid #999; background: repeating-linear-gradient(#fff 0 2px, #b8b8b8 2px 3px) 2px 2px / 5px 8px no-repeat, #f4f4f4; } +.yyicon.info { position: relative; width: 18px; height: 14px; border: 1px solid #44444a; border-radius: 2px; background: #eaebff; } +.yyicon.info::before { content: "i"; position: absolute; inset: 0; color: #22224a; font: bold 11px/12px Georgia, serif; text-align: center; } +.yyicon.online { width: 22px; height: 15px; background: radial-gradient(circle at 7px 4px, #c96 0 2.5px, transparent 3px), radial-gradient(circle at 15px 4px, #963 0 2.5px, transparent 3px), radial-gradient(ellipse 4px 6px at 7px 14px, #3b6db0 0 99%, transparent), radial-gradient(ellipse 4px 6px at 15px 14px, #8a3b2e 0 99%, transparent); } +.yyicon.ip { position: relative; width: 14px; height: 10px; margin-bottom: 3px; border: 1px solid #69727a; background: #a6b0ba; } +.yyicon.ip::after { content: ""; position: absolute; left: 3px; right: 3px; bottom: -4px; height: 2px; background: #69727a; } +.yyicon.poll { width: 14px; height: 12px; background: linear-gradient(#3a6ea5, #3a6ea5) 1px 5px / 3px 7px no-repeat, linear-gradient(#c33, #c33) 5px 1px / 3px 11px no-repeat, linear-gradient(#e2b000, #e2b000) 9px 7px / 3px 5px no-repeat; } +.yyicon.profile { width: 12px; height: 13px; background: radial-gradient(circle at 6px 3.5px, #996633 0 3px, transparent 3.5px), radial-gradient(ellipse 6px 5px at 6px 13px, #4a6c8c 0 99%, transparent); } +td.yycat { padding: 4px 6px !important; height: 18px; font-size: 13px; } + +/* the board index */ +.yyboards td.info .boardname { font-size: 13px; } +.yyboards td.info .small { margin-top: 1px; } +.yyinfo th.titlebg { text-align: center; } +.yylegend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-weight: normal; } +.yylegend .ficon { margin-right: 4px; } +.yyinfo td.icon { width: 30px; } +.yycols { display: flex; flex-wrap: wrap; gap: 4px 0; } +.yycols > div:first-child { flex: 0 0 60%; } +.yycols > div { padding: 2px 3px; } + +/* the bars with page links and buttons */ +table.yybar { margin-bottom: 0; } +table.yybar + table, table.yybar + .yylegend-topics { margin-top: 0; } +.yybar td.catbg { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; } +.yypages { font-weight: normal; } +.yypages b { font-weight: bold; } +.yybuttons { font-size: 11px; } +.yybuttons a:link, .yybuttons a:visited, .yybuttons .linkish { color: #000; font-weight: bold; } +.yybuttons a:hover, .yybuttons .linkish:hover { color: var(--nav-hover); border: 0; text-decoration: underline; } +.yytopics { margin-top: 0; } +.yytopics .micon { width: 4%; } +.yytopics .subject { width: 44%; } +.yytopics .starter { width: 14%; text-align: center !important; } +.yynew { display: inline-block; padding: 0 3px; border: 1px solid #c33 !important; background: #fee; color: #c33 !important; font: bold 9px/12px var(--font); text-transform: uppercase; } +td.none { padding: 10px !important; text-align: center !important; } + +/* the topic */ +table.yytitle { margin: 0; } +.yytitle th.author { width: 20%; } +.yytitle .ficon { margin-right: 6px; } +.yyread { font-weight: normal; } +table.yypost { margin: 0; border-spacing: 0; border: 1px solid var(--grid); border-top: 0; } +.yypost.alt1 td { background: var(--wb); } +.yypost.alt2 td { background: var(--wb2); } +.yypost td { padding: 6px !important; vertical-align: top !important; } +.yypost td.poster { width: 20%; overflow-wrap: anywhere; } +.yypost .yyname { font-size: 13px; } +.yypic { margin: 10px 0 8px; } +.yyposts { margin-top: 6px; } +.yystars { color: #f0b416; font-size: 13px; letter-spacing: 1px; text-shadow: 0 0 1px #996600; } +.yymsghead { display: flex; align-items: center; gap: 8px; } +.yysubj { flex: 1; font-size: 13px; } +.yypostbtns { align-self: flex-end; white-space: nowrap; } +.yypostbtns a:link, .yypostbtns a:visited, .yypostbtns .linkish { color: #000; } +.yypostbtns a:hover, .yypostbtns .linkish:hover { color: var(--nav-hover); border: 0; text-decoration: underline; } +.yymessage { min-height: 60px; font-size: 13px; overflow-wrap: anywhere; } +.yymessage p { margin: 0 0 10px; } +td.msgfoot { vertical-align: bottom !important; } +.yymsgfoot { display: flex; justify-content: space-between; gap: 10px; } +.yyip { white-space: nowrap; } + +/* quotes: "Quote from: alice" over a pale box */ +.yabb .citation { margin: 6px 0 0; font-size: 11px; font-weight: bold; } +.yabb blockquote.quote { margin: 2px 0 10px 18px; padding: 4px 6px; border: 1px solid var(--quote-line); background: var(--quote); font: 11px/1.4 Arial, Verdana, sans-serif; } +.yabb .citation + blockquote.quote { margin-top: 1px; } +.yabb pre, .yabb code { font-family: "Courier New", monospace; } +.yabb pre { padding: 4px 6px; background: #ccc; overflow: auto; } + +/* polls */ +.yypoll .answer { width: 30%; } +.yypoll .bar { width: 50%; } +.yypoll meter { width: 100%; height: 12px; } +.yypoll .votes { white-space: nowrap; } +.pollvote { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; } + +/* the reply form and the profile */ +table.yyform { margin-top: 16px; } +.yyform td.label, .yyprofile td.label { width: 25%; vertical-align: top !important; } +.yyform textarea { width: 100%; max-width: 600px; } +.yyform td.buttons { text-align: center !important; } +.yyprofile .yystars { margin-left: 4px; } + +/* --- forms and the plain pages, in tables of the same make */ +input[type=text], input[type=password], input[type=email], input[type=search], select, textarea { padding: 2px; border: 1px solid var(--grid); background: var(--input); color: #000; font: 12px var(--font); } +button, .button { padding: 1px 8px; border: 1px solid var(--grid); background: var(--input); color: #000; font: 12px var(--font); cursor: pointer; } +button.linkish { padding: 0; border: 0; background: none; color: var(--link); } +.box { margin: 0 0 16px; padding: 1px; background: var(--grid); } +.box > * { background: var(--wb2); } +.box > * + * { margin-top: 1px; } +.box > h2.maintitle { display: flex; gap: 8px; margin: 0; padding: 4px 6px; background: var(--title); color: var(--title-text); font-size: 13px; font-weight: bold; } +.box .count { margin-left: auto; font-weight: normal; } +.box.narrow { max-width: 560px; margin-left: auto; margin-right: auto; } +.box-body { padding: 8px; } +.field { display: grid; grid-template-columns: 35% 1fr; align-items: center; gap: 6px; padding: 3px 0; font-weight: bold; } +.field input, .field textarea { font-weight: normal; } +.editor .field { grid-template-columns: 1fr; } +.editor-foot { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; } +.signin .desc { margin-bottom: 6px; } +.poll-maker { margin: 8px 0; } +.poll-maker summary { cursor: pointer; font-weight: bold; } +.searchform { display: flex; gap: 6px; } +.searchform input { flex: 1; } +.message.error { color: #c33; font-weight: bold; } +p.message { margin: 0 0 16px; padding: 6px; border: 1px solid var(--grid); background: var(--wb2); } +table.board { width: 100%; border-spacing: 1px; background: var(--grid); } +table.board th { padding: 4px; background: var(--cat); color: var(--cat-text); text-align: left; } +table.board td { padding: 4px; background: var(--wb); vertical-align: top; } +table.board h3 { margin: 0; font-size: 13px; } +table.board p { margin: 2px 0 0; } +.snippet { color: #555; } + +/* letter pictures for those without one */ +.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; font: bold 14px var(--font); vertical-align: middle; } +.avatar.tiny { width: 16px; height: 16px; font-size: 9px; } +.avatar.mini { width: 24px; height: 24px; font-size: 12px; } +.avatar.small { width: 32px; height: 32px; font-size: 15px; } +.avatar.large { width: 64px; height: 64px; font-size: 30px; } +.avatar.huge { width: 80px; height: 80px; font-size: 38px; } +.av0 { background: #4f7bb0; } .av1 { background: #b0574f; } .av2 { background: #4f9a6b; } +.av3 { background: #8a5fb0; } .av4 { background: #c0862d; } .av5 { background: #3e8f9e; } +.av6 { background: #a24f86; } .av7 { background: #6b7a3c; } .av8 { background: #c06a3e; } +.av9 { background: #546478; } .av10 { background: #2f7f5f; } .av11 { background: #9b4545; } + +/* --- the foot */ +.copyright { margin-top: 10px; color: #000; font-size: 11px; text-align: center; line-height: 1.7; } +.yyfoot-theme { margin-bottom: 6px; } +.themepicker { display: inline-flex; align-items: center; gap: 4px; } +.themepicker select, .themepicker .button { font-size: 11px; } + +/* --- narrow screens */ +@media (max-width: 760px) { + body.yabb { padding: 6px 0; } + #container { width: auto; margin: 0 6px; } + .yyheader tr, .yyheader td { display: block; width: auto; } + .yywelcome { padding-top: 4px !important; } + .yylogo-name { font-size: 20px; } + .yyboards th.num, .yyboards td.num { display: none; } + .yyboards td.last { width: 34%; } + .yytopics .micon, .yytopics th.starter, .yytopics td.starter, .yytopics th.num, .yytopics td.num { display: none; } + .yytopics th[colspan] { display: none; } + .yytitle th.author { display: none; } + .yypost, .yypost tbody, .yypost tr, .yypost td { display: block; width: auto !important; } + .yypost td.poster { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding-bottom: 0 !important; } + .yypic { order: -1; margin: 0; } + .yypic .avatar.large { width: 32px; height: 32px; font-size: 15px; } + .yyposts { margin: 0; } + .yymsghead { flex-wrap: wrap; } + .yycols > div:first-child { flex-basis: 100%; } + .yyform td.label, .yyprofile td.label { width: 32%; } + .field { grid-template-columns: 1fr; } +} diff --git a/internal/forum/static/yabb2.css b/internal/forum/static/yabb2.css new file mode 100644 index 0000000..423e072 --- /dev/null +++ b/internal/forum/static/yabb2.css @@ -0,0 +1,151 @@ +/* + * The forum's YaBB 2 theme: YaBB 2.0-2.4's default template over the + * yabb1 theme's pages, with a head and board index of its own: a cool + * blue-white page, the tables in grey frames with a pale ledge beneath + * (the "seperator"), a bright blue title row carrying the greeting and a + * search box over the board's name, the time and the news, the way here + * as one line of bold blue links split by single angles, category rows + * in pale blue with white letters and a speech balloon, rounded lamps + * with a tick (orange when there is something new, blue when not), the + * last post before the counts, posts with their header and foot ruled + * off in pale blue, smaller grey message text, and the little validator + * buttons at the foot. Colors follow YaBB 2.1's default.css; the CSS is + * our own and no images are taken. + */ +@import url("yabb1.css"); + +:root { + --page: #f2f6f9; + --grid: #b1bdc9; + --frame: #bbbbbb; + --wb: #dde3eb; + --wb2: #fefefe; + --title: #6699cc; + --title-text: #fff; + --cat: #adc7e1; + --cat-text: #fff; + --text: #304b58; + --link: #62686f; + --link-hover: #000; + --nav: #5488c1; + --nav-hover: #cc3333; + --divider: #a7b8cc; + --quote: #e8ebef; + --quote-line: #34689a; + --msg: #62686f; + --msglink: #900000; +} + +body.yabb2 { padding-top: 5px; font-size: 12px; } +.yabb2 #container { width: 90%; } +.yabb2 a:hover { border: 0; text-decoration: underline; } +.yabb2 table.bordercolor { margin-bottom: 0; font-size: 12px; } +.yabb2 .titlebg, .yabb2 .catbg { font-size: 13px; } +.yabb2 .catbg { text-shadow: 0 0 2px #6d8eb0; } +.yabb2 .catbg a:link, .yabb2 .catbg a:visited, .yabb2 .titlebg a:link, .yabb2 .titlebg a:visited { color: #fff; } + +/* grey frames with a pale ledge, as YaBB 2 wrapped its tables */ +.seperator, .boardcontainer { margin-bottom: 18px; border-bottom: 3px solid #eee; border-left: 1px solid #eee; background: var(--frame); } +.seperator > table.bordercolor, .boardcontainer > table.bordercolor { background: var(--frame); } +.seperator:has(+ .boardcontainer) { margin-bottom: 0; border-bottom: 0; } + +/* the head */ +.yyhead2 { margin-bottom: 26px; } +.yyheadtable { width: 100%; border-spacing: 1px; } +.yyheadtable td { padding: 2px 4px; } +td.yywelcbar { display: flex; align-items: center; justify-content: center; position: relative; min-height: 28px; } +.headerwelc { color: #fff; font-size: 13px; font-weight: bold; text-align: center; } +.headerwelc a:link, .headerwelc a:visited { color: #fff; } +.yysearchbox { position: absolute; right: 4px; display: flex; gap: 2px; } +.yysearchbox input { width: 120px; font-size: 10px; } +.yysearchbox button { font-size: 10px; padding: 0 4px; } +.yylogorow { padding: 6px 8px !important; } +.yylogobox { display: flex; align-items: flex-start; gap: 20px; } +.yylogo2, .yylogo2:hover { flex: 0 0 auto; width: 480px; max-width: 50%; padding: 4px 0 6px; border: 0; } +.yylogo2 .yylogo-name { color: #34689a; font: bold 30px/1 "Trebuchet MS", Verdana, sans-serif; letter-spacing: -1px; text-shadow: 2px 2px 0 #d5e2ef; } +.yylogo2 .yylogo-sub { margin-top: 4px; color: #6699cc; font: bold 10px Verdana, sans-serif; letter-spacing: 1px; text-transform: none; } +.yytimenews { padding: 10px 0 0 20px; font-size: 12px; } +.yytimenews .yytime { font-weight: bold; font-size: 12px; } +.yytimenews .yynews { margin-top: 5px; font-size: 12px; } +.yymenu2 { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--divider); text-align: center; font-size: 11px; } +.yymenu2 > * + *::before { content: "|"; margin: 0 7px; color: var(--divider); font-weight: normal; } +.yymenu2 a:link, .yymenu2 a:visited, .yymenu2 .linkish { color: #000; font-weight: bold; font-size: 11px; } +.yymenu2 a.selected { color: var(--nav); } + +/* the way here */ +.navbarcontainer { margin: 0 0 6px; } +.yabb2 .nav { font-size: 13px; font-weight: bold; color: var(--nav); } +.yabb2 .nav a:link, .yabb2 .nav a:visited { color: var(--nav); } +.yabb2 .nav a:hover { color: var(--nav-hover); } + +/* lamps: rounded squares with a tick, orange for new */ +.yylamp { position: relative; display: inline-block; width: 18px; height: 18px; vertical-align: middle; border: 1px solid #9696a2; border-radius: 4px; background: linear-gradient(#f4f8fc, #dde8f3); } +.yylamp::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #34699e; border-width: 0 3px 3px 0; transform: rotate(40deg); } +.yylamp.on::after { border-color: #e39a1c; } +.yyicon.balloon { position: relative; width: 18px; height: 12px; margin-bottom: 3px; border-radius: 50%; background: radial-gradient(ellipse at 40% 35%, #9cc0e6, #4f86c0); box-shadow: 0 0 0 1px #fff; } +.yyicon.balloon::after { content: ""; position: absolute; left: 3px; bottom: -4px; border: 3px solid transparent; border-top-color: #4f86c0; border-left-color: #4f86c0; } + +/* the board index */ +.yyboards { table-layout: fixed; } +.yyboards col.c-icon { width: 5%; } +.yyboards col.c-info { width: 55%; } +.yyboards col.c-last { width: 24%; } +.yyboards col.c-num { width: 8%; } +.yyboards td.info { color: var(--text); overflow-wrap: anywhere; } +.yyboards td.info .boardname { font-size: 12px; } +.yyboards td.last { padding-left: 12px; overflow-wrap: anywhere; } +.yyboards .num { width: auto; } +.yyboards td.icon { width: auto; } +.yabb2 .yypostbtns .menusep, .yabb2 .yybuttons .menusep { color: var(--divider); } +.yylegendbar { margin: 0; } +.yyinfo td.icon { width: 5%; } +.yyinfo th.titlebg { text-align: center; } + +/* topic lists and bars */ +.yabb2 .yybar td.catbg { font-size: 12px; } +.yabb2 .yybar + * { margin-top: 1px; } +.yabb2 .yybuttons a:link, .yabb2 .yybuttons a:visited, .yabb2 .yybuttons .linkish { color: #fff; } +.yabb2 table.yytopics { margin-top: 1px; } +.yabb2 .yylegend-topics { margin-top: 6px; } +.yabb2 .ficon.board::after { display: none; } + +/* the topic: a title row, and posts ruled within */ +.yabb2 .yytitle th.author { display: none; } +.yabb2 table.yytitle { margin-top: 1px; } +.yabb2 table.yypost { margin-top: 1px; border: 1px solid var(--frame); } +.yabb2 .yypost td.poster { width: 140px; } +.yabb2 .yymsghead { padding-bottom: 4px; border-bottom: 1px solid var(--divider); } +.yabb2 .yypost hr.hr { display: none; } +.yabb2 .yymessage { padding-top: 6px; color: var(--msg); font-size: 11px; } +.yabb2 .yymessage a:link, .yabb2 .yymessage a:visited { color: var(--msglink); } +.yabb2 .yysubj { font-size: 12px; } +.yabb2 .yymsgfoot { padding-top: 5px; border-top: 1px solid var(--divider); } +.yabb2 .yystars { color: #3f4fc2; text-shadow: none; font-size: 12px; } +.yabb2 .yyname { font-size: 12px; } +.yabb2 blockquote.quote { width: 90%; margin-left: 0; padding: 4px; border-color: var(--quote-line); font: 11px Verdana, Helvetica, Arial, sans-serif; color: #000; } +.yabb2 table.yyform { margin-top: 18px; } +.yabb2 .box { background: var(--frame); border-bottom: 3px solid #eee; } +.yabb2 .box > h2.maintitle { color: #fff; } +.yabb2 table.board th { color: #fff; text-shadow: 0 0 2px #6d8eb0; } + +/* the foot: the little validator buttons */ +.yabb2 .copyright { color: var(--text); } +.yybadges { display: flex; justify-content: center; gap: 4px; margin-top: 8px; } +.yybadges span { width: 50px; padding: 1px 0; border: 1px solid; border-color: #fff #889 #889 #fff; background: linear-gradient(#f4f6f8, #cfd6de); color: #456; font: bold 8px/11px Verdana, sans-serif; letter-spacing: 1px; text-align: center; } + +@media (max-width: 760px) { + .yabb2 #container { width: auto; } + td.yywelcbar { flex-direction: column; gap: 4px; } + .yysearchbox { position: static; } + .yylogobox { flex-direction: column; gap: 4px; } + .yylogo2, .yylogo2:hover { width: auto; max-width: none; } + .yylogo2 .yylogo-name { font-size: 22px; } + .yytimenews { padding: 0; } + .yyboards col.c-num { width: 0; } + .yyboards th.num, .yyboards td.num { display: none; } + .yyboards col.c-icon { width: 30px; } + .yyboards col.c-info { width: auto; } + .yyboards col.c-last { width: 38%; } + .yyboards td.last { padding-left: 4px; } + .yabb2 .yypost td.poster { width: auto; } +} diff --git a/internal/forum/static/yabb25.css b/internal/forum/static/yabb25.css new file mode 100644 index 0000000..8753618 --- /dev/null +++ b/internal/forum/static/yabb25.css @@ -0,0 +1,184 @@ +/* + * The forum's YaBB 2.5 theme: YaBB 2.5's default template (its + * "Advanced Edition" look) over the yabb2 theme's pages, with a head, + * board index and topic of its own: a silver page in a grey frame, a + * glossy grey strip with the clock, glossy grey tabs with the chosen one + * lit and a search box at the right, the way here in small bold navy, + * each category under a rounded glossy title, boards on pale grey rows + * shaded at the top with a grey folder and a glowing orange orb when + * there is something new, the counts stacked beside them, and posts + * that put the poster across the top on a grey band (picture, name, + * online or not, rank, stars) over the message in small grey type, in + * rounded grey frames. Colors follow YaBB 2.5.2's yabb25.css and its + * translucent images laid over their colors; the CSS is our own and no + * images are taken. + */ +@import url("yabb2.css"); + +:root { + --page: #eeeeee; + --frame: #cccccc; + --grid: #b1bdc9; + --wb: #dddddd; + --wb2: #eeeeee; + --title: #b5b5b5; + --title-text: #01005f; + --cat: #aaaaa9; + --cat-text: #01005f; + --text: #000033; + --link: #333366; + --link-hover: #333366; + --nav: #000033; + --nav-hover: #333366; + --divider: #a7b8cc; + --msg: #62686f; + --msglink: #900000; + --gloss: linear-gradient(#e3e2e2, #d7d6d6 25%, #cdcdcc 48%, #b4b4b4 52%, #a4a4a3 80%, #9b9b9a); + --tab: linear-gradient(#e0e0e0, #d6d6d6 30%, #cacaca 50%, #b5b5b5 55%, #a7a7a7 80%, #9d9d9d); + --tab-on: linear-gradient(#e3e3e3, #d6d6d6 30%, #cacaca 50%, #b5b5b5 55%, #bdbdbd 75%, #c5c5c5); +} + +body.yabb25 { padding-top: 5px; background: var(--page); color: var(--text); font-size: 12px; } +#maincontainer { width: 92%; margin: 0 auto 10px; } +.yabb25 #container { width: auto; padding: 0 1px; background: var(--frame); color: var(--text); } +.yabb25 a:link, .yabb25 a:visited { color: var(--link); } +.yabb25 .small { font-size: 10px; } +.yabb25 .button, .yabb25 button:not(.linkish) { padding: 1px 8px; border: 1px solid #b1bdc9; background: linear-gradient(#f7f7f7, #ececec 45%, #d3d3d3 55%, #b1b1b1); color: #000; font-size: 11px; cursor: pointer; } + +/* the head */ +.menutop { display: flex; align-items: center; min-height: 24px; padding: 0 2%; background: linear-gradient(#ebebeb, #dbdbdb 40%, #d1d1d1 70%, #cccccc); } +.yyclockbar { font-size: 10px; } +.yyhead25 { display: flex; align-items: center; gap: 12px; min-height: 100px; padding: 4px 8px; background: var(--wb2); } +.yylogo25, .yylogo25:hover { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; width: 600px; max-width: 60%; border: 0; text-decoration: none; } +.yyorb-logo { flex: none; width: 78px; height: 78px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 8%, #c9d6ea 18%, #6f8fc4 48%, #2d4a85 75%, #1b2f5c); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35), inset 0 -4px 8px rgba(0, 0, 0, 0.3); } +.yylogo25 .yylogo-name { display: block; color: #1f2c5c; font: bold 30px/1 "Trebuchet MS", Verdana, sans-serif; letter-spacing: -1px; text-shadow: 0 1px 0 #fff, 0 2px 3px rgba(0, 0, 0, 0.25); } +.yylogo25 .yylogo-sub { display: block; margin-top: 5px; color: #5d6b84; font: italic 12px Georgia, serif; letter-spacing: 0; text-transform: none; } +.yyhead25-right { flex: 1; display: flex; flex-direction: column; gap: 14px; } +.yyuname { font-size: 12px; } +.yyspacer { min-height: 22px; } +.yytabrow { display: flex; align-items: stretch; height: 23px; background: var(--tab); } +.tabmenu { display: flex; flex: 1; padding-left: 40px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), transparent 40px); } +.tabmenu > span { display: flex; align-items: center; padding: 0 14px; border-right: 1px solid #a3a3a3; border-left: 1px solid #e4e4e4; background: var(--tab); font-size: 11px; white-space: nowrap; } +.tabmenu > span:first-child { border-left-color: #a3a3a3; } +.tabmenu > span.selected { background: var(--tab-on); font-weight: bold; } +.tabmenu a:link, .tabmenu a:visited, .tabmenu .linkish { color: #000033; font-size: 11px; } +.tabmenu > span:hover { background: var(--tab-on); } +.tabmenu a:hover { color: #444; } +.rightbox { display: flex; align-items: center; gap: 3px; padding: 0 8px; border-left: 1px solid #a3a3a3; background: linear-gradient(#e1e1e1, #d2d2d2 45%, #b3b3b3 55%, #9d9d9d); } +.rightbox input { width: 110px; padding: 1px 3px; font-size: 10px; } +.rightbox .button { font-size: 10px; padding: 0 5px; } +.yynav25 { display: flex; align-items: center; min-height: 30px; padding: 0 2%; color: var(--nav); font-size: 10px; font-weight: bold; } +.yabb25 .nav a:link, .yabb25 .nav a:visited { color: var(--nav); } +.yabb25 #yymain { width: 96%; margin: 0 auto; padding-bottom: 14px; } +.yabb25 .yynotice { width: 96%; margin: 0 auto 12px; border-radius: 8px; } + +/* glossy rounded title strips over each block */ +.yycat25 { margin-bottom: 14px; } +.tabtitle { color: #01005f; font-size: 11px; font-weight: bold; } +.yystrip { display: flex; align-items: center; min-height: 25px; padding: 0 12px; border-radius: 9px 9px 0 0; background: var(--gloss); } +.yystrip-name { flex: 1 1 63%; } +.yystrip-last { flex: 0 0 27%; } +.yabb25 table.bordercolor { margin: 0; border-spacing: 0; background: var(--grid); } +.shadow { background: linear-gradient(#bbbbbb, #c9c9c9 3px, #dbdbdb 7px, #eeeeee 11px) #eeeeee; color: #304b58; font-size: 12px; } +.yabb25 table.bordercolor td.shadow { padding: 5px 4px; vertical-align: middle; } +.yyboards25 td.pic { width: 5%; text-align: center; } +.yyboards25 td.info { width: 54%; } +.yyboards25 td.counts { width: 10%; padding-left: 8px !important; white-space: nowrap; } +.yyboards25 td.last { width: 24%; padding-left: 12px !important; } +.yyboards25 .boardname { font-size: 12px; } +.yyboardpic { position: relative; display: inline-block; width: 34px; height: 26px; margin-top: 6px; border-radius: 2px; background: linear-gradient(#f0f0f0, #c6c6c6 40%, #8f8f8f); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); } +.yyboardpic::before { content: ""; position: absolute; left: 0; top: -5px; width: 14px; height: 6px; border-radius: 3px 3px 0 0; background: #d9d9d9; } +.yyboardpic:hover { border: 0; } +.yyorb { display: inline-block; width: 13px; height: 13px; vertical-align: -2px; border-radius: 50%; background: radial-gradient(circle at 50% 45%, #fafafa 0 15%, #b7b7b7 45%, #7b7b7b 70%, #c7c7c7 78%, #e9e9e9); box-shadow: 0 0 1px #888; } +.yyorb.on { background: radial-gradient(circle at 50% 45%, #fff6b0 0 15%, #ffc400 40%, #e07a00 68%, #e9b46a 78%, #f7e2c4); box-shadow: 0 0 3px rgba(255, 160, 0, 0.8); } +.yyicon.cat25 { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff 0 15%, #8a95b8 55%, #3c4878); vertical-align: -1px; } +.yyinfo25 td.icon { width: 5%; text-align: center; } +.yyicon.info25 { position: relative; width: 26px; height: 20px; border-radius: 50%; background: radial-gradient(ellipse at 40% 35%, #f0f0f0, #9a9a9a); } +.yyicon.info25::before { content: "i"; position: absolute; inset: 0; color: #555; font: bold italic 13px/20px Georgia, serif; text-align: center; } +.yyicon.people25 { width: 26px; height: 20px; background: radial-gradient(circle at 8px 5px, #9b9b9b 0 3.5px, transparent 4px), radial-gradient(circle at 18px 5px, #b0b0b0 0 3.5px, transparent 4px), radial-gradient(ellipse 6px 9px at 8px 19px, #8a8a8a 0 99%, transparent), radial-gradient(ellipse 6px 9px at 18px 19px, #a5a5a5 0 99%, transparent); } +.useronline { color: #138a03 !important; font-weight: bold; } +.useroffline { color: #818281; font-weight: bold; } +.yylegend25 { margin-bottom: 14px !important; } + +/* rounded grey frames: bars, titles and posts */ +.displaycontainer { margin-bottom: 1px; padding: 1px; border-radius: 10px; background: var(--frame); } +.displaycontainer > :first-child { border-radius: 9px 9px 0 0; } +.displaycontainer > :last-child { border-radius: 0 0 9px 9px; } +.displaycontainer > :only-child { border-radius: 9px; } +.yabb25 .catbg { background: linear-gradient(#a2a2a2, #bbbbba 4%, #aaaaaa 30%, #9d9d9c 50%, #aaaaaa 70%, #afafaf); color: #01005f; font-size: 11px; text-shadow: none; } +.yabb25 .titlebg { background: #b5b5b5; color: #01005f; font-size: 11px; } +.yabb25 .catbg a:link, .yabb25 .catbg a:visited, .yabb25 .titlebg a:link, .yabb25 .titlebg a:visited, .yabb25 .yybuttons a:link, .yabb25 .yybuttons a:visited, .yabb25 .yybuttons .linkish { color: #01005f; } +.yybar25 .catbg { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 5px 10px; } +.yybar25 { margin-bottom: 8px; } +.yybar25:has(+ .yytitle25), .yybar25:has(+ .yypoll25) { margin-bottom: 8px; } +.yytitle25 .titlebg { padding: 6px 10px; } +.yytitle25 { margin-bottom: 8px; } +.yydoc, .yabb25 .ficon { position: relative; display: inline-block; width: 12px; height: 15px; margin: 0 2px; vertical-align: -3px; border: 1px solid #6aa0ad; border-radius: 0 4px 0 0; background: linear-gradient(135deg, #f4fbfd, #cbe3ea); box-shadow: none; } +.yydoc.hot, .yabb25 .ficon.hot, .yabb25 .ficon.veryhot { border-color: #d0700a; background: linear-gradient(135deg, #ffd27a, #f08a10); } +.yabb25 .ficon::before, .yabb25 .ficon::after, .yabb25 .ficon.hot::after, .yabb25 .ficon.veryhot::after { display: none; } +.yypost25 { margin-bottom: 10px; } +.yydate25 { padding: 5px 8px; } +.yydate25 a:link, .yydate25 a:visited { color: #01005f; } +.userinfo { display: flex; align-items: center; gap: 10px; padding: 6px 8px; background: linear-gradient(#aeadad, #c7c7c7 12%, #d8d7d7 25%, #e8e7e7 45%, #ebebeb 55%, #e0e0e0 80%, #d2d2d2); color: #304b58; } +.yyuserleft { flex: 1; line-height: 1.5; } +.yyname25 { font-size: 12px; } +.yyuserright { flex: 0 0 15%; line-height: 1.5; } +.yabb25 .yystars { color: #2c6fd6; text-shadow: 0 0 1px #0d3a8a; font-size: 12px; } +.yabb25 .yyuserpic .avatar.large { width: 56px; height: 56px; font-size: 26px; border: 1px solid #999; } +.yybody25 { display: flow-root; padding: 6px 8px; } +.yabb25 .windowbg { background: var(--wb); } +.yabb25 .windowbg2 { background: var(--wb2); } +.yybody25 .yypostbtns { float: right; display: flex; gap: 3px; margin: 0 0 6px 10px; } +.yybtn, .yabb25 button.yybtn { display: inline-block; padding: 1px 6px; border: 1px solid #a8a8a8; border-radius: 3px; background: linear-gradient(#fafafa, #e3e3e3 50%, #cfcfcf 51%, #dcdcdc); color: #000033 !important; font: 10px Verdana, sans-serif; cursor: pointer; } +.yybtn:hover { border-color: #777; } +.yabb25 .yymessage { min-height: 50px; padding-top: 2px; color: var(--msg); font-size: 8pt; } +.yylikes { color: #555; } +.yabb25 .yymsgfoot { display: flex; justify-content: space-between; margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--divider); } +.yabb25 blockquote.quote { background: #e8ebef; border-color: #34689a; } + +/* polls and the quick reply */ +.yypollbody, .yyformbody { padding: 8px 10px; } +.yypollres { width: 100%; margin-bottom: 6px; } +.yypollres td { padding: 2px 4px; } +.yypollres .answer { width: 30%; } +.yypollres .bar { width: 50%; } +.yypollres meter { width: 100%; } +.yypoll25 { margin-bottom: 8px; } +.yypoll25 .titlebg, .yyform25 .titlebg { padding: 6px 10px; } +.yyform25 { display: block; margin-top: 14px; } +.yyformbody { display: flex; flex-direction: column; gap: 5px; } +.yyformbody textarea { width: 100%; max-width: 640px; } +.yyformfoot { text-align: center; } + +/* yabb1's pages under this frame: tables with rounded heads */ +.yabb25 table.yybar { border-radius: 9px; overflow: hidden; margin-bottom: 8px; } +.yabb25 table.yytopics, .yabb25 table.yyprofile { border-spacing: 1px; border-radius: 9px 9px 0 0; overflow: hidden; } +.yabb25 table.yytopics th.titlebg, .yabb25 table.yyprofile th.titlebg { background: var(--gloss); } +.yabb25 .yylegend-topics { margin-top: 8px; } +.yabb25 .box { border-radius: 9px; border-bottom: 0; overflow: hidden; } +.yabb25 .box > h2.maintitle { background: var(--gloss); color: #01005f; font-size: 11px; } +.yabb25 table.board th { background: #b5b5b5; color: #01005f; text-shadow: none; font-size: 11px; } +.yabb25 table.board td { background: var(--wb2); } + +/* the foot */ +.yyfootbar { justify-content: space-between; gap: 10px; min-height: 26px; flex-wrap: wrap; background: var(--gloss); } +.yyfootbar .themepicker { font-weight: normal; } +.yabb25 .copyright { color: #62686f; } +.yabb25 .copyright a:link, .yabb25 .copyright a:visited { color: #333366; } + +@media (max-width: 760px) { + #maincontainer { width: auto; margin: 0 4px; } + .yyhead25 { flex-direction: column; align-items: flex-start; min-height: 0; } + .yylogo25, .yylogo25:hover { width: auto; max-width: none; } + .yyorb-logo { width: 44px; height: 44px; } + .yylogo25 .yylogo-name { font-size: 22px; } + .yytabrow { height: auto; flex-wrap: wrap; } + .tabmenu { flex-wrap: wrap; padding-left: 0; } + .tabmenu > span { min-height: 23px; padding: 0 9px; } + .rightbox { flex: 1 0 100%; min-height: 26px; border-left: 0; } + .yabb25 #yymain { width: auto; margin: 0 4px; } + .yystrip-last, .yyboards25 td.counts, .yyboards25 td.pic { display: none; } + .yyboards25 td.last { width: 38%; padding-left: 4px !important; } + .userinfo { flex-wrap: wrap; } + .yyuserright { flex-basis: 100%; } +} diff --git a/internal/forum/themes/yabb1/area.html b/internal/forum/themes/yabb1/area.html new file mode 100644 index 0000000..320710b --- /dev/null +++ b/internal/forum/themes/yabb1/area.html @@ -0,0 +1,40 @@ +{{define "area.html"}}{{template "head" .}} +{{$b := .Body}} +{{template "crumbs" .}} +
+ {{template "pages" $b.Pages}} + {{if $b.CanPost}}Start new topic{{end}}{{if .User}}{{if $b.CanPost}} | {{end}}
{{end}}
+
+ + + + + + + + + + {{range $t := $b.Topics}} + + + + + + + + + {{else}} + + {{end}} + +
 SubjectStarted byRepliesLast post
{{if $t.Unread}}new {{end}}{{$t.Root.Subject}}{{if gt $t.Pages 1}} « {{range (seq $t.Pages)}}{{.}} {{end}}»{{end}}{{$t.Root.From}}{{num $t.Replies}}{{template "yydate" $t.Last.Created}}
by {{$t.Last.From}}
There are no topics in this board yet.
+
+ {{template "pages" $b.Pages}} + {{if $b.CanPost}}Start new topic{{end}} +
+
+ Normal Topic + Hot Topic (More than 15 Replies) + Very Hot Topic (More than 25 Replies) +
+{{template "foot" .}}{{end}} diff --git a/internal/forum/themes/yabb1/index.html b/internal/forum/themes/yabb1/index.html new file mode 100644 index 0000000..d647462 --- /dev/null +++ b/internal/forum/themes/yabb1/index.html @@ -0,0 +1,47 @@ +{{define "index.html"}}{{template "head" .}} +{{$st := .Body.Stats}} +{{template "crumbs" .}} + + + + + + + + {{range $c := .Body.Categories}} + + + {{range $f := $c.Forums}} + + + + + + + + {{end}} + + {{end}} + {{if .User}}{{end}} +
Forum nameTopicsPostsLast post
{{$c.Name}}
{{$f.Area.Name}}{{if $f.Area.Description}}
{{$f.Area.Description}}
{{end}}
Moderator: N/A
{{num $f.Topics}}{{num $f.Area.Messages}}{{with $f.Last}}{{template "yydate" .Created}}
by {{.From}}{{else}}N/A{{end}}
+ New Posts   No New Posts + Show new posts +
+ + + + + + + + + + + + + +
Info Center
Forum Statistics
+
Total Topics: {{num $st.Topics}}   -   Total Posts: {{num $st.Posts}}
+
Total Members: {{num $st.Members}}{{with $st.Newest}}
Newest Member: {{.Name}}{{end}}
+
Users online
0 Guests, {{len .Body.Online}} Users{{if .Body.Online}}
{{range $i, $n := .Body.Online}}{{if $i}}, {{end}}{{$n.User}}{{end}}{{end}}
+{{template "foot" .}}{{end}} diff --git a/internal/forum/themes/yabb1/layout.html b/internal/forum/themes/yabb1/layout.html new file mode 100644 index 0000000..9f429ad --- /dev/null +++ b/internal/forum/themes/yabb1/layout.html @@ -0,0 +1,51 @@ +{{define "head"}} + + + + +{{if eq .Title .BBS}}{{.BBS}}{{else}}{{.Title}}{{end}} + + + +
+ + + + + + + + +
+ {{if .User}}Hey, {{.User.Name}}, you have new posts to read.{{else}}Welcome, Guest. Please login{{if .Register}} or register{{end}}.{{end}}
+ {{template "yydate" .Now}} +
News: Dial in, log on, say hello.
+
+ Home | Search | Members{{if .Terminal}} | Terminal{{end}}{{if .User}} | Profile |
{{else}} | Login{{if .Register}} | Register{{end}}{{end}} +
+{{if and (eq .Notice "welcome") .User}}
Registration successful. Welcome to {{.BBS}}, {{.User.Name}}.
{{end}} +
+{{end}} + +{{define "crumbs"}}{{end}} + +{{define "foot"}} +
+ +
+ + +{{end}} + +{{define "pages"}}Pages: {{$cur := .Cur}}{{$p := .}}{{if gt .Total 1}}{{range .Shown}}{{if eq . 0}}… {{else if eq . $cur}}[{{.}}] {{else}}{{.}} {{end}}{{end}}{{else}}[1]{{end}}{{end}} + +{{define "yyrank"}}{{if .Sysop}}Administrator{{else if ge .Posts 500}}Forum God{{else if ge .Posts 250}}Senior Member{{else if ge .Posts 100}}Full Member{{else if ge .Posts 50}}Junior Member{{else}}Newbie{{end}}{{end}} +{{define "yystars"}}{{if .Sysop}}★★★★★{{else if ge .Posts 500}}★★★★★{{else if ge .Posts 250}}★★★★{{else if ge .Posts 100}}★★★{{else if ge .Posts 50}}★★{{else}}★{{end}}{{end}} +{{define "yydate"}}{{yabbdate .}}{{end}} diff --git a/internal/forum/themes/yabb1/profile.html b/internal/forum/themes/yabb1/profile.html new file mode 100644 index 0000000..20bdcfa --- /dev/null +++ b/internal/forum/themes/yabb1/profile.html @@ -0,0 +1,23 @@ +{{define "profile.html"}}{{template "head" .}} +{{$u := .Body.U}} +{{template "crumbs" .}} + + + + + + + + + + + + + + {{range $r := .Body.Recent}} + + {{else}} + + {{end}} +
View Profile: {{$u.Name}}
Name:{{$u.Name}}
Posts:{{num $u.Posts}}
Position:{{template "yyrank" $u}} {{template "yystars" $u}}
Date Registered:{{template "yydate" $u.Created}}
Last visit:{{template "yydate" $u.LastLogin}}
Calls:{{num $u.Logins}}
Location:{{if $u.Location}}{{$u.Location}}{{else}}N/A{{end}}
Status:{{if .Body.On}}Online{{range .Body.On}} (node {{.Num}} by {{.Via}}: {{.Activity}}){{end}}{{else}}Offline{{end}}
Personal Text:{{if $u.About}}{{$u.About}}{{else}} {{end}}
Picture:{{template "avatar" (av $u.Name "huge")}}
Most recent posts
{{template "yydate" $r.Created}}{{$r.Subject}}
{{snippet $r.Body 160}}
No posts yet.
+{{template "foot" .}}{{end}} diff --git a/internal/forum/themes/yabb1/topic.html b/internal/forum/themes/yabb1/topic.html new file mode 100644 index 0000000..02c85ed --- /dev/null +++ b/internal/forum/themes/yabb1/topic.html @@ -0,0 +1,89 @@ +{{define "topic.html"}}{{template "head" .}} +{{$b := .Body}}{{$csrf := .CSRF}}{{$me := .User}} +{{template "crumbs" .}} +
+ {{template "pages" $b.Pages}} + {{if $b.CanPost}}Reply{{end}} +
+ +{{with $b.Poll}} + + + {{if or .Voted (not $me)}} + {{range $i, $a := .Answers}} + + + + {{end}} + + {{end}} + {{if $me}}{{end}} +
Poll: {{$b.Root.Subject}}
{{$a.Text}}{{if $a.Mine}} (your vote){{end}}{{$a.Count}} ({{$a.Pct}}%)
Total votes: {{.Total}}{{if not $me}} · Login to vote{{end}}
+
+ + {{if .Voted}}Change your vote{{else}}Cast your vote{{end}}: + {{range .Answers}}{{end}} + +
+
+{{end}} + + + + +
AuthorTopic: {{$b.Root.Subject}}  ({{plural $b.Count "post" "posts"}})
+ +{{range $b.Posts}} + + + + + + + + +
+
{{if .Author}}{{.M.From}}{{else}}{{.M.From}}{{end}}
+ {{if .Author}}
{{template "yyrank" .Author}}
+
{{template "yystars" .Author}}
+
{{template "avatar" (av .M.From "large")}}
+ {{if .Author.Location}}
{{.Author.Location}}
{{end}} +
Posts: {{num .Author.Posts}}
{{else}}
Guest
{{if .Where}}
{{.Where}}
{{end}}{{end}} +
+
+ +
{{if ne .Num 1}}Re: {{end}}{{$b.Root.Subject}}
« {{if ne .Num 1}}Reply #{{add .Num -1}} {{end}}on: {{template "yydate" .M.Created}} »
+
+ {{if $b.CanPost}}Quote{{end}} + {{if .CanLike}} |
{{end}} + {{if .CanDelete}} |
{{end}} +
+
+
+
{{body .M.Body}}
+
+
{{if .Likes}}« {{plural .Likes "member likes" "members like"}} this post »{{end}} Logged
+
+{{end}} + +
+ {{template "pages" $b.Pages}} + {{if $b.CanPost}}Reply{{end}} +
+ +{{if $b.CanPost}} +
+ + {{if $b.QuoteID}}{{end}} + + + + + {{if $b.Aliases}}{{end}} + +
Post reply
Subject:Re: {{$b.Root.Subject}}
Message:
Quote with > at the start of a line.
Post as:
+
+{{else if not .User}} +

Please login to reply to this topic.

+{{end}} +{{template "foot" .}}{{end}} diff --git a/internal/forum/themes/yabb2/index.html b/internal/forum/themes/yabb2/index.html new file mode 100644 index 0000000..35083d2 --- /dev/null +++ b/internal/forum/themes/yabb2/index.html @@ -0,0 +1,59 @@ +{{define "index.html"}}{{template "head" .}} +{{$st := .Body.Stats}} +{{template "crumbs" .}} +
+ + + + + + + + +
Forum nameLast postTopicsPosts
+
+{{range $c := .Body.Categories}} +
+ + + + {{range $f := $c.Forums}} + + + + + + + + {{end}} +
{{$c.Name}}
{{$f.Area.Name}}{{if $f.Area.Description}}
{{$f.Area.Description}}
{{end}}
Moderator: N/A
{{with $f.Last}}{{template "yydate" .Created}}
Topic: {{with $f.LastTopic}}{{truncate .Subject 25}}{{else}}{{truncate .Subject 25}}{{end}}
by: {{.From}}{{else}}N/A{{end}}
{{num $f.Topics}}{{num $f.Area.Messages}}
+
+{{end}} +{{if .User}} +
+
+ New Posts   No New Posts + Show new posts +
+
+{{end}} + +
+ + + + + + + + + + + + +
Info Center
Forum Statistics
+
{{num $st.Posts}} Posts in {{num $st.Topics}} Topics.
+
{{num $st.Members}} Members.{{with $st.Newest}}
Latest Member: {{.Name}}{{end}}
+
Users Online
Users: {{len .Body.Online}}{{if .Body.Online}}
{{range $i, $n := .Body.Online}}{{if $i}}, {{end}}{{$n.User}}{{end}}{{end}}
Guests: 0
+
+{{template "foot" .}}{{end}} diff --git a/internal/forum/themes/yabb2/layout.html b/internal/forum/themes/yabb2/layout.html new file mode 100644 index 0000000..92f9dc4 --- /dev/null +++ b/internal/forum/themes/yabb2/layout.html @@ -0,0 +1,54 @@ +{{define "head"}} + + + + +{{if eq .Title .BBS}}{{.BBS}}{{else}}{{.Title}}{{end}} + + + +
+
+ + + + + + + +
+
{{if .User}}Hey, {{.User.Name}}, you have new posts to read.{{else}}Welcome, Guest. Please login{{if .Register}} or register{{end}}.{{end}}
+
+
+
+ {{.BBS}}Yet another bulletin board +
+
{{template "yydate" .Now}}
+
News: Dial in, log on, say hello.
+
+
+
+ HomeSearchMembers{{if .Terminal}}Terminal{{end}}{{if .User}}Profile
{{else}}Login{{if .Register}}Register{{end}}{{end}} +
+
+
+{{if and (eq .Notice "welcome") .User}}
Registration successful. Welcome to {{.BBS}}, {{.User.Name}}.
{{end}} +
+{{end}} + +{{define "crumbs"}}{{end}} + +{{define "foot"}} +
+ +
+ + +{{end}} + +{{define "yydate"}}{{yabb2date .}}{{end}} diff --git a/internal/forum/themes/yabb25/index.html b/internal/forum/themes/yabb25/index.html new file mode 100644 index 0000000..e9e316e --- /dev/null +++ b/internal/forum/themes/yabb25/index.html @@ -0,0 +1,46 @@ +{{define "index.html"}}{{template "head" .}} +{{$st := .Body.Stats}} +{{range $c := .Body.Categories}} +
+
{{$c.Name}}Last post
+ + {{range $f := $c.Forums}} + + + + + + + {{end}} +
{{$f.Area.Name}}{{if $f.Area.Description}}
{{$f.Area.Description}}
{{end}}
Moderator: N/A
Topics: {{num $f.Topics}}
Posts: {{num $f.Area.Messages}}
{{with $f.Last}}{{template "yydate" .Created}}
Topic: {{with $f.LastTopic}}{{truncate .Subject 25}}{{else}}{{truncate .Subject 25}}{{end}}
by: {{.From}}{{else}}N/A{{end}}
+
+{{end}} +{{if .User}} +
+ New Posts   No New Posts + Show new posts +
+{{end}} + +
+
Forum Statistics
+ + + + + +
+
{{num $st.Posts}} Posts in {{num $st.Topics}} Topics.
+
{{num $st.Members}} Members.{{with $st.Newest}}
Latest Member: {{.Name}}{{end}}
+
+
+
+
Users Online
+ + + + + +
Users: {{len .Body.Online}}{{if .Body.Online}}
{{range $i, $n := .Body.Online}}{{if $i}}, {{end}}{{$n.User}}{{end}}{{end}}
Guests: 0
Bots: 0
+
+{{template "foot" .}}{{end}} diff --git a/internal/forum/themes/yabb25/layout.html b/internal/forum/themes/yabb25/layout.html new file mode 100644 index 0000000..1d21058 --- /dev/null +++ b/internal/forum/themes/yabb25/layout.html @@ -0,0 +1,47 @@ +{{define "head"}} + + + + +{{if eq .Title .BBS}}{{.BBS}}{{else}}{{.Title}}{{end}} + + + +
+
+ +
+ {{.BBS}}Yet another Bulletin Board +
+
{{if .User}}Hey, {{.User.Name}}
You have new posts to read.{{else}}Welcome, Guest. Please login{{if .Register}} or register{{end}}.{{end}}
+
News: Dial in, log on, say hello.
+
+
+ +
+
+ HomeSearchMembers{{if .Terminal}}Terminal{{end}}{{if .User}}My Profile
{{else}}Login{{if .Register}}Register{{end}}{{end}} +
+
+
+ +{{if and (eq .Notice "welcome") .User}}
Registration successful. Welcome to {{.BBS}}, {{.User.Name}}.
{{end}} +
+{{end}} + +{{define "crumbs"}}{{with .}}{{end}}{{end}} + +{{define "foot"}} +
+ +
+ +
+ + +{{end}} + diff --git a/internal/forum/themes/yabb25/topic.html b/internal/forum/themes/yabb25/topic.html new file mode 100644 index 0000000..3b41c5f --- /dev/null +++ b/internal/forum/themes/yabb25/topic.html @@ -0,0 +1,80 @@ +{{define "topic.html"}}{{template "head" .}} +{{$b := .Body}}{{$csrf := .CSRF}}{{$me := .User}} +
+ {{template "pages" $b.Pages}} + {{if $b.CanPost}}Reply{{end}} +
+ +{{with $b.Poll}} +
+
Poll: {{$b.Root.Subject}}
+
+ {{if or .Voted (not $me)}} + + {{range $i, $a := .Answers}}{{end}} +
{{$a.Text}}{{if $a.Mine}} (your vote){{end}}{{$a.Count}} ({{$a.Pct}}%)
+
Total votes: {{.Total}}{{if not $me}} · Login to vote{{end}}
+ {{end}} + {{if $me}} +
+ + {{if .Voted}}Change your vote{{else}}Cast your vote{{end}}: + {{range .Answers}}{{end}} + +
+ {{end}} +
+
+{{end}} + +
{{$b.Root.Subject}} ({{plural $b.Count "post" "posts"}})
+ +{{range $b.Posts}} +
+
{{if ne .Num 1}}Reply #{{add .Num -1}} - {{end}}{{template "yydate" .M.Created}}
+
+
{{template "avatar" (av .M.From "large")}}
+
+ {{if .Author}}{{.M.From}}{{else}}{{.M.From}}{{end}}   Offline
+ {{if .Author}}{{template "yyrank" .Author}}{{if .Author.Location}}
{{.Author.Location}}{{end}}{{else}}Guest{{if .Where}}
{{.Where}}{{end}}{{end}} +
+ {{if .Author}}
+ Posts: {{num .Author.Posts}}
+ {{template "yystars" .Author}} +
{{end}} +
+
+
+ {{if $b.CanPost}}Quote{{end}} + {{if .CanLike}}
{{end}} + {{if .CanDelete}}
{{end}} +
+
{{body .M.Body}}
+ {{if .Likes}}
{{plural .Likes "member likes" "members like"}} this post.
{{end}} + +
+
+{{end}} + +
+ {{template "pages" $b.Pages}} + {{if $b.CanPost}}Reply{{end}} +
+ +{{if $b.CanPost}} +
+ + {{if $b.QuoteID}}{{end}} +
Quick Reply
+
+
Subject: Re: {{$b.Root.Subject}}
+ +
Quote with > at the start of a line.
+ {{if $b.Aliases}}{{end}} +
+
+
+{{else if not .User}} +

Please login to reply to this topic.

+{{end}} +{{template "foot" .}}{{end}}