Web forum: a retro theme in the manner of IPB 1

ipb1: a board of the early 2000s, after Invision Power Board 1.3's
default skin: tables outlined in slate blue with white cell lines,
bright title bars and blue sub-title bars, a flat menu box with round
icons, a Logged in as box, round forum badges, envelope topic icons,
rounded glossy buttons, posts with Posted on and small pill buttons, a
post links bar, a Back to strip, Fast Reply, a big-name profile.  Its
own CSS and templates; no code or images taken from IPB.

The theme test now checks each theme's own layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
This commit is contained in:
Claude committed 2026-10-12 23:51:40 +00:00
1 parent ae228616f2
commit 26409ef5b0
14 files changed
+618 -9

No files matched your search

+1 -1
View File
@@ -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 2 (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 2 or 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
+2 -1
View File
@@ -212,7 +212,8 @@ address = 127.0.0.1:2513
;forum = yes
;forum_guests = yes
; the forum's theme until a caller chooses (at the foot of each page):
; ipb3 (in the manner of Invision Power Board 3) or ipb2 (classic, as IPB 2)
; ipb3 (in the manner of Invision Power Board 3), ipb2 (classic, as IPB 2)
; or ipb1 (retro, as IPB 1)
;forum_theme = ipb3
; Access levels: a user's level (0-255) gets what the [level] at or
+1 -1
View File
@@ -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` or `ipb2`) |
| `forum`, `forum_guests`, `forum_theme` | `yes`, `yes`, `ipb3` | the [web forum](Web-Forum), guests reading it, and its theme (`ipb3`, `ipb2` or `ipb1`) |
The OpenAPI 3.1 description is at `/api/v1/openapi.json`.
+1 -1
View File
@@ -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 2 (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 2 or 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
+2 -1
View File
@@ -3,7 +3,7 @@
The HTTP API's server also serves the message areas as a web forum, at
`/forum/` (and `/`, which goes there). It is laid out like the bulletin
boards of their day: categories of forums, topics, and posts with their
authors beside them, in one of two [themes](#themes). The look is the
authors beside them, in one of several [themes](#themes). The look is the
BBS's own CSS, built into the `bbs` binary; nothing is loaded from
elsewhere, and no script runs on the pages.
@@ -74,6 +74,7 @@ On a post:
| theme | |
|---|---|
| `ipb3` | the default: a board of the early 2010s in the manner of Invision Power Board 3: a dark user bar, a navy header with tabs, rounded blue category bars, posts with their author's column on the left |
| `ipb1` | retro: a board of the early 2000s in the manner of Invision Power Board 1: tables outlined in slate blue with white lines between their cells, bright title bars, a flat menu box, round forum badges and envelope topic icons, rounded glossy buttons, *Posted on* and a post links bar |
| `ipb2` | classic: a board of the mid-2000s in the manner of Invision Power Board 2: a white page, boxes outlined in navy, blue gradient title bars, pale blue rows, small Verdana; *Logged in as* and *Welcome Guest* bars, *Last Post Info*, *Fast Reply*, big blue buttons |
Both are this BBS's own CSS and templates, drawn to look like the boards
+1
View File
@@ -21,6 +21,7 @@ var funcs = template.FuncMap{
"when": when,
"date": func(t time.Time) string { return t.Format("02 January 2006") },
"longdate": longDate,
"odd": func(n int) bool { return n%2 == 1 },
"initial": initial,
"avatar": avatarClass,
"group": groupTitle,
+1
View File
@@ -50,6 +50,7 @@ type Theme struct {
var Themes = []Theme{
{"ipb3", "Default (IPB 3 style)"},
{"ipb2", "Classic (IPB 2 style)"},
{"ipb1", "Retro (IPB 1 style)"},
}
// KnownTheme says whether there is a theme of the name.
+9 -4
View File
@@ -412,11 +412,16 @@ func TestThemes(t *testing.T) {
}
_, _, body := alice.get(topic)
has(t, th.Name+" topic", body, "Remember these?", "I do.", `class="quote"`, `name="answer"`)
// each laid out its own way
own := map[string][2][]string{
"ipb3": {{"Signed in as", "Reply to this topic"}, {"Board Statistics", "Create Account"}},
"ipb2": {{"Logged in as:", "Fast Reply", "Member No.:", `class="postsep"`}, {"Welcome Guest", "Last Post Info", `id="gfooter"`}},
"ipb1": {{"Logged in as:", "Posted on", `class="postlinksbar"`, `class="activeuserstrip"`}, {"Welcome Guest", "Last Post Info", `class="pformstrip"`}},
}[th.Name]
has(t, th.Name+" own topic", body, own[0]...)
_, _, body = guest.get("/forum/")
has(t, th.Name+" own index", body, own[1]...)
}
_, _, body = alice.get(topic)
has(t, "classic topic", body, "Logged in as:", "Fast Reply", "Member No.:", "Add Reply")
_, _, body = guest.get("/forum/")
has(t, "classic index", body, "Welcome Guest", "Last Post Info", "Board Statistics")
// no such theme; an outside page to go back to
if code, _, _ := guest.post("", "/forum/theme", url.Values{"theme": {"nope"}}); code != 400 {
+350
View File
@@ -0,0 +1,350 @@
/*
* The forum's retro theme: laid out in the manner of the bulletin boards
* of the early 2000s (Invision Power Board 1's default skin and its kind):
* a white page, tables outlined in slate blue with white lines between
* their cells, bright blue title bars, a flat menu box, round forum
* badges and envelope topic icons, rounded glossy buttons, small
* Verdana. Written for this BBS; it takes no code or images from any
* board.
*/
:root {
--border: #345487;
--title-top: #78b0ff;
--title-mid: #5e8aca;
--title-bottom: #78b1f3;
--sub-top: #88a9da;
--sub-bottom: #bfd3ee;
--subtext: #3a4f6c;
--row1: #f5f9fd;
--row2: #dfe6ef;
--row3: #eef2f7;
--row4: #e4eaf2;
--post1: #f5f9fd;
--post2: #eef2f7;
--dark1: #c2cfdf;
--dark2: #bcd0ed;
--dark3: #d1dceb;
--strip: #d1dceb;
--muted: #434951;
--hover: #465584;
}
html { overflow-x: auto; }
body {
margin: 0;
padding: 0;
background: #fff;
color: #000;
font: 11px Verdana, Tahoma, Arial, sans-serif;
}
table, tr, td { font: inherit; color: inherit; }
a:link, a:visited, a:active { color: #000; text-decoration: underline; }
a:hover { color: var(--hover); }
p { margin: 0; }
form { display: inline; margin: 0; }
#ipbwrapper { width: 95%; max-width: 1300px; margin: 10px auto 20px; text-align: left; }
.inline-form { display: inline; }
.linkish { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.linkish:hover { color: var(--hover); }
.desc { font-size: 10px; color: var(--muted); }
.center { text-align: center; }
/* --- the header: a logo strip, the menu box, the user's box */
#logostrip {
border: 1px solid var(--border);
background: linear-gradient(to bottom, var(--title-top) 0, var(--title-mid) 4px, var(--title-bottom) 22px, var(--title-bottom));
}
#logostrip .logo { display: flex; align-items: flex-end; gap: 0 10px; flex-wrap: wrap; padding: 5px 10px 6px; text-decoration: none; color: #fff; }
.logo-mark {
width: 34px; height: 30px; align-self: center;
background: linear-gradient(to bottom right, transparent 48%, #fff 48% 62%, transparent 62%), linear-gradient(to bottom left, transparent 48%, #fff 48% 62%, transparent 62%);
opacity: 0.95;
}
.logo-name { font: bold 26px/1 Arial, Verdana, sans-serif; letter-spacing: 1px; text-shadow: 1px 1px 0 rgba(52,84,135,0.6); }
.logo-sub { flex-basis: 100%; margin: 2px 0 0 44px; font-size: 9px; letter-spacing: 7px; text-transform: uppercase; color: #eef4ff; }
#submenu {
display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px;
margin: 3px 0;
padding: 6px;
border: 1px solid var(--dark2);
background: var(--row2);
color: var(--subtext);
font-size: 10px; font-weight: bold;
}
#submenu a:link, #submenu a:visited { color: var(--subtext); text-decoration: none; }
#submenu a:hover { text-decoration: underline; }
#submenu .links { display: flex; gap: 18px; flex-wrap: wrap; }
#submenu .links a { display: inline-flex; align-items: center; gap: 4px; }
.tb { display: inline-block; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #bcd6ff, #3d6fc0); border: 1px solid #2c4f8c; }
.tb.members { border-radius: 50% 50% 3px 3px; background: radial-gradient(circle at 35% 30%, #ffd9a0, #e07a1f); border-color: #9a4d0b; }
.tb.terminal { border-radius: 2px; background: linear-gradient(#333, #000); border-color: #555; box-shadow: inset 0 -3px 0 #2db82d; }
#userlinks {
display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px;
padding: 6px;
border: 1px solid #c2cfdf;
background: #f0f5fa;
}
#navstrip { padding: 14px 0 12px; font-weight: bold; }
#navstrip a { text-decoration: none; }
#navstrip a:hover { text-decoration: underline; }
.navicon { display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #bcd6ff, #3d6fc0); border: 1px solid #2c4f8c; }
.navsep { color: #3d6fc0; margin: 0 2px; }
.pagetop { margin: -4px 0 8px; }
/* --- tables with white lines, their title bars */
.tableborder, .box { border: 1px solid var(--border); background: #fff; margin: 0 0 14px; }
.maintitle, .box > h2.maintitle {
display: flex; align-items: center; flex-wrap: wrap; gap: 0 5px;
margin: 0;
padding: 8px 5px;
background: linear-gradient(to bottom, var(--title-top) 0, var(--title-mid) 3px, var(--title-bottom) 22px, var(--title-bottom));
color: #fff;
font-size: 11px; font-weight: bold;
}
.maintitle a:link, .maintitle a:visited { color: #fff; text-decoration: none; }
.maintitle .tdesc { font-weight: normal; }
.maintitle .count { margin-left: auto; font-weight: normal; padding-right: 4px; }
.caticon { display: inline-block; width: 11px; height: 11px; margin-right: 2px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #b7d2ff 60%, #6d9ae0); border: 1px solid #fff; }
.tablebasic, table.board { width: 100%; border-collapse: separate; border-spacing: 1px; margin: 0; }
.tablebasic td, table.board td { padding: 4px; vertical-align: middle; }
.titlemedium, table.board th {
padding: 7px;
background: linear-gradient(to bottom, var(--sub-top), var(--sub-bottom) 24px);
color: var(--subtext);
font-weight: bold; text-align: left;
}
th.num, td.num { text-align: center; width: 9%; white-space: nowrap; }
th.icon, td.icon { width: 30px; text-align: center; }
.lastcol { width: 25%; }
td.lastcol { white-space: nowrap; font-size: 10px; }
.row1 { background: var(--row1); }
.row2 { background: var(--row2); }
.row3 { background: var(--row3); }
.row4 { background: var(--row4); }
.post1 { background: var(--post1); }
.post2 { background: var(--post2); }
.darkrow1 { background: var(--dark1); color: #4c77b6; }
.darkrow2 { background: var(--dark2); color: var(--subtext); }
.darkrow3 { background: var(--dark3); color: var(--subtext); }
.pformstrip { padding: 7px; margin-top: 1px; background: var(--strip); color: var(--subtext); font-weight: bold; }
.tablepad, .box-body { padding: 6px; background: var(--row1); }
.tablefoot { padding: 4px; text-align: center; }
td.none { text-align: center; padding: 12px; }
.thin { padding: 6px 0; line-height: 140%; margin: 2px 0; border-top: 1px solid #fff; border-bottom: 1px solid #fff; }
/* a forum's badge: round, lit when there is something new */
.bf {
display: inline-flex; align-items: center; justify-content: center;
width: 26px; height: 26px; border-radius: 50%;
background: radial-gradient(circle at 35% 30%, #a9c9ff, #3768b8 70%, #2b5297);
border: 1px solid #23457f;
box-shadow: inset 0 -2px 3px rgba(0,0,0,0.25);
}
.bf::after { content: "bbs"; color: #fff; font: bold 9px/1 Arial, sans-serif; letter-spacing: -0.2px; text-shadow: 0 1px 0 rgba(0,0,0,0.35); }
.bf.nonew { background: radial-gradient(circle at 35% 30%, #f2f6fd, #c6d6ee 70%, #b3c6e4); border-color: #9fb3d3; box-shadow: none; }
.bf.nonew::after { color: #fff; text-shadow: 0 0 1px #8ea6cc; }
.bf.mini { width: 13px; height: 13px; vertical-align: middle; }
.bf.mini::after { content: ""; }
/* a topic's icon: an envelope, blue when new, orange when hot */
.env {
display: inline-block; position: relative; width: 20px; height: 13px; vertical-align: middle;
border: 1px solid #2c5aa0; border-radius: 1px;
background: linear-gradient(to bottom, #e9f1ff, #9fc0f0);
overflow: hidden;
}
.env::before, .env::after { content: ""; position: absolute; top: -9px; width: 14px; height: 14px; border: 1px solid #2c5aa0; background: #d7e6ff; transform: rotate(45deg); }
.env::before { left: -7px; transform: rotate(45deg) translate(5px, -1px); }
.env::after { left: 2px; top: -9px; border-width: 0 1px 1px 0; background: transparent; transform: rotate(45deg); }
.env.nonew { border-color: #97aacb; background: linear-gradient(to bottom, #fafcff, #dde7f5); }
.env.nonew::before, .env.nonew::after { border-color: #97aacb; }
.env.nonew::before { background: #f0f5fd; }
.env.hot { border-color: #b55a0d; background: linear-gradient(to bottom, #fff0db, #f3a656); }
.env.hot::before, .env.hot::after { border-color: #b55a0d; }
.env.hot::before { background: #ffe1bd; }
.env.nonew.hot { background: linear-gradient(to bottom, #fffaf3, #f9d6ae); }
.statsicon { display: inline-block; width: 22px; height: 20px; border: 1px solid #2c4f8c; border-radius: 3px; background: linear-gradient(to right, transparent 3px, #3d6fc0 3px 7px, transparent 7px 9px, #e07a1f 9px 13px, transparent 13px 15px, #2db82d 15px 19px, transparent 19px) bottom / 100% 70% no-repeat, #f5f9fd; }
.statsicon.users { border-radius: 50% 50% 4px 4px; background: radial-gradient(circle at 50% 35%, #ffd9a0 0 5px, transparent 5.5px), linear-gradient(to bottom, transparent 55%, #3d6fc0 55%), #f5f9fd; }
.statlinks { margin: 4px 0 10px; text-align: center; }
/* --- a forum's topics */
.gonew { font-weight: bold; text-decoration: none !important; color: #c2470b !important; }
.minipages { font-size: 10px; margin-left: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 30px; margin: 0 0 14px; line-height: 1.9em; }
/* pages on the left, buttons on the right */
.topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.tright { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.pagelinks { font-size: 11px; }
.pagelinks a { text-decoration: none; padding: 0 1px; }
.pagelinks a:hover { text-decoration: underline; }
.pagecount { font-weight: bold; margin-right: 3px; }
/* the rounded, glossy buttons */
.ibutton:link, .ibutton:visited {
display: inline-flex; align-items: center; gap: 5px;
padding: 4px 12px 4px 6px;
border: 1px solid #2f5a9e; border-radius: 12px;
background: linear-gradient(to bottom, #c4dcff 0%, #8db7f2 48%, #5f8fd8 52%, #7aa8ea 100%);
box-shadow: 0 1px 1px rgba(0,0,0,0.25);
color: #fff; font: bold 11px Verdana, Arial, sans-serif; text-transform: uppercase; text-decoration: none;
text-shadow: 0 1px 1px #1e3f78, 0 0 2px #1e3f78;
}
.ibutton:hover { background: linear-gradient(to bottom, #d6e7ff 0%, #9cc2f6 48%, #6c9ce2 52%, #89b4ef 100%); }
.ibicon { display: inline-block; width: 12px; height: 15px; border: 1px solid #6d7d94; background: repeating-linear-gradient(to bottom, #fff 0 3px, #b9c4d4 3px 4px); position: relative; }
.ibicon.reply::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #c8ff9e, #2a9a1a); border: 1px solid #1f6b14; }
.ibicon.newtopic::after { content: ""; position: absolute; right: -4px; top: -2px; width: 3px; height: 13px; background: linear-gradient(#ffcf3f 0 70%, #555 70%); transform: rotate(35deg); }
/* --- a topic's posts */
.postlinksbar { padding: 7px; margin-top: 1px; background: linear-gradient(to bottom, var(--sub-top), var(--sub-bottom) 24px); font-size: 10px; font-weight: bold; text-align: right; }
.postlinksbar a { color: var(--subtext); }
.post { margin: 0; }
.pname { width: 170px; white-space: nowrap; }
.normalname { font-size: 12px; font-weight: bold; color: #003 !important; text-decoration: none !important; }
.normalname.admin { color: #900 !important; }
.normalname.unreg { color: #900 !important; font-size: 11px; }
.phead { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; }
.postdetails { font-size: 10px; }
.posticon { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; border-radius: 2px; background: linear-gradient(to bottom, #fff, #9fc0f0); border: 1px solid #2c5aa0; }
.pdetails { vertical-align: top !important; width: 170px; }
.ptitle { font-weight: bold; }
.ptitle.admin { color: #900; }
.pips { color: #3d6fc0; letter-spacing: 2px; font-size: 10px; }
.pbody { vertical-align: top !important; }
.postcolor { font-size: 12px; line-height: 160%; min-height: 50px; overflow-wrap: anywhere; }
.signature { margin-top: 10px; font-size: 10px; color: #339; line-height: 150%; }
.pbuttons { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.pbutton:link, .pbutton:visited, button.pbutton {
display: inline-block; padding: 1px 8px;
border: 1px solid #2f5a9e; border-radius: 5px;
background: linear-gradient(to bottom, #b5d1fb, #6b9ae0);
color: #fff; font: bold 10px Verdana, Arial, sans-serif; text-decoration: none; cursor: pointer;
text-shadow: 0 1px 1px #1e3f78;
}
.ptop { text-align: right; }
.upbutton:link, .upbutton:visited { display: inline-block; width: 15px; height: 15px; line-height: 15px; text-align: center; border: 1px solid #2f5a9e; border-radius: 3px; background: linear-gradient(to bottom, #e9f1ff, #9fc0f0); color: #2f5a9e; font-size: 8px; text-decoration: none; }
.postsep { height: 5px; }
.activeuserstrip { padding: 6px; background: var(--dark2); text-align: center; }
/* quotes: a plain box with a title */
.citation { margin: 6px 0 0; font-size: 10px; font-weight: bold; }
.citation::before { content: "QUOTE "; }
blockquote.quote {
margin: 2px 0 8px; padding: 4px;
border: 1px solid #000;
background: #fafcfe; color: #465584; font-size: 11px;
}
p.citation + blockquote.quote { margin-top: 2px; }
blockquote.quote:not(.citation + blockquote.quote)::before { content: "QUOTE"; display: block; margin-bottom: 3px; color: #000; font-size: 10px; font-weight: bold; }
.bbc_url:link, .bbc_url:visited { color: #00c; }
/* polls */
.poll { border-bottom: 1px solid var(--border); }
.pollresults { border-collapse: collapse; margin: 0 auto 6px; min-width: 60%; }
.pollresults td { padding: 3px 6px; }
.pollresults td.answer { font-weight: bold; }
.pollresults .mine { color: #c2470b; }
.pollresults td.bar { width: 220px; }
meter { width: 100%; height: 11px; }
meter::-webkit-meter-bar { background: #fff; border: 1px solid var(--border); border-radius: 0; }
meter::-webkit-meter-optimum-value { background: linear-gradient(to bottom, #c4dcff, #5f8fd8); }
meter::-moz-meter-bar { background: linear-gradient(to bottom, #c4dcff, #5f8fd8); }
.poll .desc { text-align: center; }
.poll-form { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 4px; }
.pollbutton { margin-top: 4px; }
/* --- forms */
.pformleft, .pformright { padding: 6px; background: var(--row1); border-top: 1px solid #c2cfdf; }
.pformleft { width: 25%; border-right: 1px solid #c2cfdf; font-weight: bold; vertical-align: top !important; }
input[type=text], input[type=password], input[type=search], textarea, select {
font: 11px Verdana, Helvetica, sans-serif; vertical-align: middle;
border: 2px inset #eef2f7; padding: 2px; background: #fff;
}
textarea { width: 100%; box-sizing: border-box; font-size: 12px; }
.button, button.button, a.button:link, a.button:visited {
display: inline-block; padding: 1px 6px; margin: 0 2px;
font: 11px Verdana, Helvetica, sans-serif; color: #000; text-decoration: none; cursor: pointer;
background: #eef2f7; border: 2px outset #eef2f7;
}
.button:active { border-style: inset; }
.button.important { font-weight: bold; }
.button.danger { color: #900; }
.editor-foot { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px -6px -6px; padding: 7px; background: var(--strip); }
.message { margin: 0 0 14px; padding: 6px; border: 1px solid var(--border); background: var(--row1); }
.message.error { border-color: #900; color: #900; background: #fff2f2; font-weight: bold; }
.box-body .message { margin: 0 0 8px; }
.message.good { border-color: #2d7a2d; color: #1e5a1e; background: #effaef; }
/* the default theme's pages this one shows as they are */
.box.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.field { display: grid; grid-template-columns: 30% 1fr; align-items: center; gap: 6px; padding: 6px; margin: 0 -6px; border-top: 1px solid #c2cfdf; font-weight: bold; }
.field input, .field textarea { font-weight: normal; }
.editor .field { grid-template-columns: 1fr; }
.signin .desc { margin-bottom: 6px; }
.poll-maker { margin: 8px 0; }
.poll-maker summary { cursor: pointer; font-weight: bold; color: var(--subtext); }
.searchform { display: flex; gap: 6px; }
.searchform input { flex: 1; }
table.board td { background: var(--row4); vertical-align: top; }
table.board tr:nth-child(even) td { background: var(--row2); }
table.board h3 { margin: 0; font-size: 11px; }
.snippet { color: #555; }
/* letter pictures for those without one */
.avatar {
display: inline-flex; align-items: center; justify-content: center;
color: #fff; font-family: "Comic Sans MS", Verdana, sans-serif; font-weight: bold;
text-shadow: 1px 1px 0 rgba(0,0,0,0.4);
border: 1px solid #000;
vertical-align: middle;
}
.avatar.tiny { width: 16px; height: 16px; font-size: 10px; }
.avatar.mini { width: 24px; height: 24px; font-size: 12px; }
.avatar.large { width: 64px; height: 64px; font-size: 34px; }
.avatar.huge { width: 90px; height: 90px; font-size: 48px; }
.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 profile */
.profilehead { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 14px; border: 1px solid #c2cfdf; background: #f0f5fa; }
#profilename { font-size: 28px; font-weight: bold; line-height: 1.2; }
.online-now { color: green; font-weight: bold; }
.profilecols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
td.key { width: 35%; font-weight: bold; }
/* --- the foot */
#boardfoot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.themepicker, .quicksearch { display: flex; align-items: center; gap: 4px; }
.copyright { margin-top: 10px; text-align: center; font-size: 9px; line-height: 12px; }
/* --- narrow screens */
@media (max-width: 760px) {
#ipbwrapper { width: auto; margin: 6px; }
.logo-name { font-size: 20px; }
.logo-sub { letter-spacing: 4px; }
.lastcol, th.num, td.num { display: none; }
table.post, table.post tbody, table.post tr, table.post td { display: block; width: auto; }
.pdetails .avatar.large { width: 40px; height: 40px; font-size: 20px; float: left; margin: 0 8px 0 0; }
.pdetails br:nth-of-type(-n+2) { display: none; }
.pdetails { overflow: hidden; }
.profilecols { grid-template-columns: 1fr; }
.field { grid-template-columns: 1fr; }
.legend { display: none; }
}
+36
View File
@@ -0,0 +1,36 @@
{{define "area.html"}}{{template "head" .}}
{{$b := .Body}}
<div class="topbar">
<div class="tleft">{{template "pages" $b.Pages}}</div>
<div class="tright">{{if $b.CanPost}}<a href="/forum/area/{{$b.Area.ID}}/new" class="ibutton"><span class="ibicon newtopic" aria-hidden="true"></span>New Topic</a>
{{else if not .User}}<a href="/forum/login?back={{urlq (printf "/forum/area/%d" $b.Area.ID)}}" class="ibutton">Log In to Post</a>{{end}}</div>
</div>
<div class="tableborder">
<div class="maintitle"><span class="caticon" aria-hidden="true"></span>{{$b.Area.Name}}</div>
<table class="tablebasic">
<tr><th class="titlemedium icon"></th><th class="titlemedium">Topic Title</th><th class="titlemedium num">Topic Starter</th><th class="titlemedium num">Replies</th><th class="titlemedium lastcol">Last Action</th></tr>
{{range $b.Topics}}
<tr>
<td class="row4 icon"><span class="env {{if .Unread}}new{{else}}nonew{{end}}{{if ge .Replies 15}} hot{{end}}" title="{{if .Unread}}New replies{{else}}No new replies{{end}}"></span></td>
<td class="row4">{{if .Unread}}<a href="/forum/post/{{.Last.ID}}" class="gonew" title="Go to the newest post">&raquo;</a> {{end}}<a href="/forum/topic/{{.Root.ID}}" title="Topic started {{when .Root.Created}}">{{.Root.Subject}}</a>
{{if gt .Pages 1}}<span class="minipages">( {{$root := .Root.ID}}{{range (seq .Pages)}}<a href="/forum/topic/{{$root}}{{if gt . 1}}?page={{.}}{{end}}">{{.}}</a> {{end}})</span>{{end}}
<br><span class="desc">{{snippet .Root.Body 70}}</span></td>
<td class="row2 num">{{.Root.From}}</td>
<td class="row4 num">{{num .Replies}}</td>
<td class="row2 lastcol"><span class="desc">{{when .Last.Created}}<br><a href="/forum/post/{{.Last.ID}}">Last post by:</a> <b>{{.Last.From}}</b></span></td>
</tr>
{{else}}
<tr><td colspan="5" class="row4 none">No topics were found in this forum.{{if $b.CanPost}} <a href="/forum/area/{{$b.Area.ID}}/new">Start the first one.</a>{{end}}</td></tr>
{{end}}
</table>
<div class="darkrow2 tablefoot">Showing {{plural $b.Count "topic" "topics"}}{{if .User}} &middot; <form method="post" action="/forum/area/{{$b.Area.ID}}/read" class="inline-form"><input type="hidden" name="csrf" value="{{.CSRF}}"><button class="linkish">Mark this forum as read</button></form>{{end}}</div>
</div>
<div class="topbar">
<div class="tleft">{{template "pages" $b.Pages}}</div>
<div class="tright">{{if $b.CanPost}}<a href="/forum/area/{{$b.Area.ID}}/new" class="ibutton"><span class="ibicon newtopic" aria-hidden="true"></span>New Topic</a>{{end}}</div>
</div>
<div class="legend">
<div class="wrapmini"><span class="env new"></span>&nbsp; Open topic (new replies)<br><span class="env nonew"></span>&nbsp; Open topic (no new replies)</div>
<div class="wrapmini"><span class="env new hot"></span>&nbsp; Hot topic (new replies)<br><span class="env nonew hot"></span>&nbsp; Hot topic (no new replies)</div>
</div>
{{template "foot" .}}{{end}}
+38
View File
@@ -0,0 +1,38 @@
{{define "index.html"}}{{template "head" .}}
{{if .User}}<div class="pagetop">Welcome back, <b>{{.User.Name}}</b>. The board's newest posts are marked <span class="bf new mini" aria-hidden="true"></span> below.</div>{{end}}
{{range .Body.Categories}}
<div class="tableborder">
<div class="maintitle"><span class="caticon" aria-hidden="true"></span>{{.Name}}</div>
<table class="tablebasic">
<tr><th class="titlemedium icon"></th><th class="titlemedium">Forum</th><th class="titlemedium num">Topics</th><th class="titlemedium num">Replies</th><th class="titlemedium lastcol">Last Post Info</th></tr>
{{range $f := .Forums}}
<tr>
<td class="row4 icon"><span class="bf {{if $f.Unread}}new{{else}}nonew{{end}}" title="{{if $f.Unread}}New posts{{else}}No new posts{{end}}"></span></td>
<td class="row4"><b><a href="/forum/area/{{$f.Area.ID}}">{{$f.Area.Name}}</a></b>{{if $f.Area.Description}}<br><span class="desc">{{$f.Area.Description}}</span>{{end}}</td>
<td class="row2 num">{{num $f.Topics}}</td>
<td class="row2 num">{{num $f.Replies}}</td>
<td class="row2 lastcol">{{with $f.Last}}{{when .Created}}<br>In:&nbsp;<a href="/forum/post/{{.ID}}">{{truncate $f.LastTopic.Subject 30}}</a><br>By: {{.From}}{{else}}-----{{end}}</td>
</tr>
{{end}}
<tr><td class="darkrow2" colspan="5">&nbsp;</td></tr>
</table>
</div>
{{else}}
<div class="tableborder"><div class="maintitle"><span class="caticon" aria-hidden="true"></span>Forums</div>
<div class="tablepad">There are no forums open to you yet.{{if not .User}} <a href="/forum/login">Log in</a> to see more.{{end}}</div></div>
{{end}}
<div class="statlinks"><a href="/forum/online">Who's Online</a> | <a href="/forum/search">Search the Board</a>{{if .Terminal}} | <a href="/terminal">Web Terminal</a>{{end}}</div>
<div class="tableborder">
<div class="maintitle">Board Statistics</div>
<table class="tablebasic">
<tr><td class="pformstrip" colspan="2">{{plural (len .Body.Online) "user is" "users are"}} on just now</td></tr>
<tr><td class="row2 icon"><span class="statsicon users" aria-hidden="true"></span></td>
<td class="row4"><div class="thin">{{range $i, $n := .Body.Online}}{{if $i}}, {{end}}<a href="/forum/user/{{path $n.User}}">{{$n.User}}</a> <span class="desc">({{$n.Via}})</span>{{else}}<span class="desc">No one is on just now.</span>{{end}}</div></td></tr>
<tr><td class="pformstrip" colspan="2">Board Statistics</td></tr>
<tr><td class="row2 icon"><span class="statsicon" aria-hidden="true"></span></td>
<td class="row4">Our members have made a total of <b>{{num .Body.Stats.Posts}}</b> posts in <b>{{num .Body.Stats.Topics}}</b> topics<br>
We have <b>{{num .Body.Stats.Members}}</b> registered members{{with .Body.Stats.Newest}}<br>The newest member is <b><a href="/forum/user/{{path .Name}}">{{.Name}}</a></b>{{end}}</td></tr>
</table>
</div>
{{template "foot" .}}{{end}}
+49
View File
@@ -0,0 +1,49 @@
{{define "head"}}<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{if ne .Title .BBS}}{{.Title}} - {{end}}{{.BBS}}</title>
<link rel="stylesheet" href="/forum/static/ipb1.css">
</head>
<body id="top">
<div id="ipbwrapper">
<div id="logostrip"><a href="/forum/" class="logo" title="Board Home"><span class="logo-mark" aria-hidden="true"></span><span class="logo-name">{{.BBS}}</span><span class="logo-sub">bulletin board</span></a></div>
<div id="submenu">
<div class="home"><a href="/forum/">{{.BBS}}</a></div>
<div class="links">
<a href="/forum/search"><span class="tb search" aria-hidden="true"></span>Search</a>
<a href="/forum/online"><span class="tb members" aria-hidden="true"></span>Online ({{.Online}})</a>
{{if .Terminal}}<a href="/terminal"><span class="tb terminal" aria-hidden="true"></span>Terminal</a>{{end}}
</div>
</div>
<div id="userlinks">
{{if .User}}
<div><strong>Logged in as: <a href="/forum/user/{{path .User.Name}}">{{.User.Name}}</a></strong>
( <form method="post" action="/forum/logout" class="inline-form"><input type="hidden" name="csrf" value="{{.CSRF}}"><button class="linkish">Log Out</button></form> )</div>
<div class="right"><b><a href="/forum/user/{{path .User.Name}}">My Profile</a></b> &middot; <a href="/forum/search">Search</a> &middot; <a href="/forum/online">Who's Online</a></div>
{{else}}
<div>Welcome Guest ( <a href="/forum/login">Log In</a>{{if .Register}} | <a href="/forum/register">Register</a>{{end}} )</div>
<div class="right"><a href="/forum/search">Search</a></div>
{{end}}
</div>
<div id="navstrip"><span class="navicon" aria-hidden="true"></span><a href="/forum/">{{.BBS}}</a>{{range .Crumbs}} <span class="navsep">&rsaquo;</span> {{if .URL}}<a href="{{.URL}}">{{.Name}}</a>{{else}}{{.Name}}{{end}}{{end}}</div>
{{if eq .Notice "welcome"}}<div class="tableborder notice"><div class="maintitle">Welcome!</div><div class="tablepad">Your account is made, and you are logged in.</div></div>{{end}}
{{end}}
{{define "foot"}}
<div id="boardfoot">
{{template "themepicker" .}}
<form action="/forum/search" method="get" class="quicksearch">Search the board&nbsp;<input type="search" name="q" aria-label="Search"><button class="button">Go</button></form>
</div>
<div class="copyright">{{.BBS}} &middot; the forums of a BBS, powered by bbs-sec<br>Time is now: {{longdate .Now}}</div>
</div>
</body>
</html>
{{end}}
{{define "pages"}}{{if gt .Total 1}}<span class="pagelinks"><span class="pagecount">Pages: ({{.Total}})</span>
{{if gt .Cur 1}}<a href="{{.URL .Prev}}" rel="prev" title="Previous page">&laquo;</a>{{end}}
{{$cur := .Cur}}{{$p := .}}{{range .Shown}}{{if eq . 0}}&hellip;{{else if eq . $cur}}<b>[{{.}}]</b>{{else}}<a href="{{$p.URL .}}">{{.}}</a>{{end}} {{end}}
{{if .Next}}<a href="{{.URL .Next}}" rel="next" title="Next page">&raquo;</a>{{end}}
</span>{{end}}{{end}}
+36
View File
@@ -0,0 +1,36 @@
{{define "profile.html"}}{{template "head" .}}
{{$u := .Body.U}}
<div class="profilehead">
{{template "avatar" (av $u.Name "huge")}}
<div><div id="profilename">{{$u.Name}}</div>
<div class="desc">{{group $u}}{{if .Body.On}} &middot; <span class="online-now">Online now</span>{{else}} &middot; Offline{{end}}</div></div>
</div>
<div class="profilecols">
<div class="tableborder">
<div class="maintitle">Active Stats</div>
<table class="tablebasic">
<tr><td class="row3 key">Joined:</td><td class="row1">{{date $u.Created}}</td></tr>
<tr><td class="row3 key">Last visit:</td><td class="row1">{{when $u.LastLogin}}</td></tr>
<tr><td class="row3 key">Total posts:</td><td class="row1">{{num $u.Posts}}</td></tr>
<tr><td class="row3 key">Calls:</td><td class="row1">{{num $u.Logins}}</td></tr>
<tr><td class="row3 key">Member No.:</td><td class="row1">{{$u.ID}}</td></tr>
{{range .Body.On}}<tr><td class="row3 key">Now:</td><td class="row1">On node {{.Num}} by {{.Via}}: {{.Activity}}</td></tr>{{end}}
</table>
</div>
<div class="tableborder">
<div class="maintitle">Information</div>
<table class="tablebasic">
<tr><td class="row3 key">Location:</td><td class="row1">{{if $u.Location}}{{$u.Location}}{{else}}<i>No Information</i>{{end}}</td></tr>
<tr><td class="row3 key">About:</td><td class="row1">{{if $u.About}}{{$u.About}}{{else}}<i>No Information</i>{{end}}</td></tr>
</table>
</div>
</div>
<div class="tableborder">
<div class="maintitle"><span class="caticon" aria-hidden="true"></span>Recent Posts</div>
<table class="tablebasic">
{{range .Body.Recent}}
<tr><td class="row4"><b><a href="/forum/post/{{.ID}}">{{.Subject}}</a></b> <span class="desc">{{when .Created}}</span><br><span class="snippet">{{snippet .Body 160}}</span></td></tr>
{{else}}<tr><td class="row4 none">No posts to show.</td></tr>{{end}}
</table>
</div>
{{template "foot" .}}{{end}}
+91
View File
@@ -0,0 +1,91 @@
{{define "topic.html"}}{{template "head" .}}
{{$b := .Body}}{{$csrf := .CSRF}}{{$me := .User}}
<div class="topbar">
<div class="tleft">{{template "pages" $b.Pages}}</div>
<div class="tright">{{if $b.CanPost}}<a href="#reply" class="ibutton"><span class="ibicon reply" aria-hidden="true"></span>Add Reply</a>
<a href="/forum/area/{{$b.Area.ID}}/new" class="ibutton"><span class="ibicon newtopic" aria-hidden="true"></span>New Topic</a>{{end}}</div>
</div>
<div class="tableborder topic">
<div class="maintitle"><span class="caticon" aria-hidden="true"></span><b>{{$b.Root.Subject}}</b><span class="tdesc">, started by {{$b.Root.From}}</span></div>
{{with $b.Poll}}
<div class="poll">
<div class="pformstrip">Poll</div>
<div class="tablepad">
{{if or .Voted (not $me)}}
<table class="pollresults">
{{range .Answers}}<tr><td class="answer">{{.Text}}{{if .Mine}} <span class="mine">*</span>{{end}}</td><td class="bar"><meter min="0" max="100" value="{{.Pct}}"></meter></td><td>[ {{.Count}} ]</td><td>[{{.Pct}}%]</td></tr>{{end}}
</table>
<p class="desc">Total Votes: {{.Total}}{{if not $me}} &middot; <a href="/forum/login">Log in</a> to vote{{end}}</p>
{{end}}
{{if $me}}
<form method="post" action="/forum/post/{{.ID}}/answer" class="poll-form">
<input type="hidden" name="csrf" value="{{$csrf}}">
{{range .Answers}}<label><input type="radio" name="answer" value="{{.Index}}"{{if .Mine}} checked{{end}}> {{.Text}}</label>{{end}}
<div class="pollbutton"><button class="button">{{if .Voted}}Change Vote{{else}}Vote!{{end}}</button></div>
</form>
{{end}}
</div>
</div>
{{end}}
<div class="postlinksbar"><a href="/forum/area/{{$b.Area.ID}}">{{$b.Area.Name}}</a>{{if $b.CanPost}} | <a href="#reply">Reply</a> | <a href="/forum/area/{{$b.Area.ID}}/new">Start new topic</a>{{end}}</div>
{{range $b.Posts}}{{$css := "post1"}}{{if not (odd .Num)}}{{$css = "post2"}}{{end}}
<table class="tablebasic post" id="entry{{.M.ID}}">
<tr>
<td class="row4 pname">{{if .Author}}<a href="/forum/user/{{path .Author.Name}}" class="normalname{{if .Author.Sysop}} admin{{end}}">{{.M.From}}</a>{{else}}<span class="normalname unreg">{{.M.From}}</span>{{end}}</td>
<td class="row4 phead">
<span class="postdetails"><span class="posticon" aria-hidden="true"></span><b><a href="/forum/post/{{.M.ID}}" title="Link to this post">Posted on</a></b> {{longdate .M.Created}}{{if and .M.To (ne .M.To "All")}}, to {{.M.To}}{{end}}</span>
<span class="pbuttons">
{{if .CanDelete}}<form method="post" action="/forum/post/{{.M.ID}}/delete" class="inline-form"><input type="hidden" name="csrf" value="{{$csrf}}"><button class="pbutton">&#10006; Delete</button></form>{{end}}
{{if .CanLike}}<form method="post" action="/forum/post/{{.M.ID}}/like" class="inline-form"><input type="hidden" name="csrf" value="{{$csrf}}"><input type="hidden" name="like" value="{{if .Liked}}0{{else}}1{{end}}"><button class="pbutton">{{if .Liked}}Unlike{{else}}&#9829; Like{{end}}</button></form>{{end}}
{{if $b.CanPost}}<a href="/forum/topic/{{$b.Root.ID}}?quote={{.M.ID}}{{if gt $b.Pages.Cur 1}}&amp;page={{$b.Pages.Cur}}{{end}}#reply" class="pbutton">&#8220; Quote</a>{{end}}
</span>
</td>
</tr>
<tr>
<td class="{{$css}} pdetails"><span class="postdetails">
{{template "avatar" (av .M.From "large")}}<br><br>
{{if .Author}}
<span class="ptitle{{if .Author.Sysop}} admin{{end}}">{{if .Author.Sysop}}Sysop{{else}}Member{{end}}</span><br>
<span class="pips" aria-hidden="true">{{if ge .Author.Posts 10}}&#9679;{{end}}{{if ge .Author.Posts 50}}&#9679;{{end}}{{if ge .Author.Posts 200}}&#9679;{{end}}&#9679;</span><br><br>
Group: {{group .Author}}<br>Posts: {{num .Author.Posts}}<br>Member No.: {{.Author.ID}}<br>Joined: {{date .Author.Created}}{{if .Author.Location}}<br>From: {{.Author.Location}}{{end}}
{{else}}
{{if .Where}}Group: Visitors<br>From: {{.Where}}{{else}}Group: Members{{end}}
{{end}}
</span></td>
<td class="{{$css}} pbody">
<div class="postcolor">{{body .M.Body}}</div>
{{if .Likes}}<div class="signature">-----<br>&#9829; {{plural .Likes "member likes" "members like"}} this post</div>{{end}}
</td>
</tr>
<tr>
<td class="darkrow3"></td>
<td class="darkrow3 ptop"><a href="#top" title="Top" class="upbutton" aria-label="Top">&#9650;</a></td>
</tr>
</table>
<div class="darkrow1 postsep"></div>
{{end}}
<div class="activeuserstrip">&laquo; <a href="/forum/area/{{$b.Area.ID}}">Back to {{$b.Area.Name}}</a> &raquo;</div>
</div>
<div class="topbar">
<div class="tleft">{{template "pages" $b.Pages}}</div>
<div class="tright">{{if $b.CanPost}}<a href="#reply" class="ibutton"><span class="ibicon reply" aria-hidden="true"></span>Add Reply</a>
<a href="/forum/area/{{$b.Area.ID}}/new" class="ibutton"><span class="ibicon newtopic" aria-hidden="true"></span>New Topic</a>{{end}}</div>
</div>
{{if $b.CanPost}}
<div class="tableborder reply" id="reply">
<div class="maintitle"><span class="caticon" aria-hidden="true"></span>Fast Reply</div>
<form method="post" action="/forum/topic/{{$b.Root.ID}}/reply">
<input type="hidden" name="csrf" value="{{.CSRF}}">
{{if $b.QuoteID}}<input type="hidden" name="reply_to" value="{{$b.QuoteID}}">{{end}}
<table class="tablebasic">
<tr><td class="pformleft">Your reply</td><td class="pformright"><textarea name="body" rows="9" required aria-label="Your reply">{{$b.Quote}}</textarea></td></tr>
{{if $b.Aliases}}<tr><td class="pformleft">Options</td><td class="pformright"><label><input type="checkbox" name="alias"> Post as {{$me.Alias}}</label></td></tr>{{end}}
</table>
<div class="pformstrip center"><button class="button important">Add Reply</button></div>
</form>
</div>
{{else if not .User}}
<div class="tableborder"><div class="tablepad">You need to be a member to reply. <a href="/forum/login?back={{urlq (printf "/forum/topic/%d" $b.Root.ID)}}">Log in</a>{{if .Register}} or <a href="/forum/register">register</a>{{end}}.</div></div>
{{end}}
{{template "foot" .}}{{end}}