diff --git a/README.md b/README.md index 4cd25e2..cc9160a 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 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 diff --git a/bbs.conf.sample b/bbs.conf.sample index ecb5c59..86a8a84 100644 --- a/bbs.conf.sample +++ b/bbs.conf.sample @@ -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 diff --git a/docs/wiki/HTTP-API.md b/docs/wiki/HTTP-API.md index 1e5abac..610dc00 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` 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`. diff --git a/docs/wiki/Home.md b/docs/wiki/Home.md index 0f42b5f..ada88b7 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 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 diff --git a/docs/wiki/Web-Forum.md b/docs/wiki/Web-Forum.md index 1bd0903..01d64ac 100644 --- a/docs/wiki/Web-Forum.md +++ b/docs/wiki/Web-Forum.md @@ -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 diff --git a/internal/forum/format.go b/internal/forum/format.go index 200c9db..0c867e4 100644 --- a/internal/forum/format.go +++ b/internal/forum/format.go @@ -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, diff --git a/internal/forum/forum.go b/internal/forum/forum.go index b2ca587..e1ac083 100644 --- a/internal/forum/forum.go +++ b/internal/forum/forum.go @@ -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. diff --git a/internal/forum/forum_test.go b/internal/forum/forum_test.go index 27aa7c8..367efb1 100644 --- a/internal/forum/forum_test.go +++ b/internal/forum/forum_test.go @@ -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 { diff --git a/internal/forum/static/ipb1.css b/internal/forum/static/ipb1.css new file mode 100644 index 0000000..1ff5560 --- /dev/null +++ b/internal/forum/static/ipb1.css @@ -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; } +} diff --git a/internal/forum/themes/ipb1/area.html b/internal/forum/themes/ipb1/area.html new file mode 100644 index 0000000..4aa9337 --- /dev/null +++ b/internal/forum/themes/ipb1/area.html @@ -0,0 +1,36 @@ +{{define "area.html"}}{{template "head" .}} +{{$b := .Body}} +
+| Topic Title | Topic Starter | Replies | Last Action | |
|---|---|---|---|---|
| + | {{if .Unread}}» {{end}}{{.Root.Subject}}
+ {{if gt .Pages 1}}( {{$root := .Root.ID}}{{range (seq .Pages)}}{{.}} {{end}}){{end}}
+ {{snippet .Root.Body 70}} |
+ {{.Root.From}} | +{{num .Replies}} | +{{when .Last.Created}} Last post by: {{.Last.From}} |
+
| No topics were found in this forum.{{if $b.CanPost}} Start the first one.{{end}} | ||||
| Forum | Topics | Replies | Last Post Info | |
|---|---|---|---|---|
| + | {{$f.Area.Name}}{{if $f.Area.Description}} {{$f.Area.Description}}{{end}} |
+ {{num $f.Topics}} | +{{num $f.Replies}} | +{{with $f.Last}}{{when .Created}} In: {{truncate $f.LastTopic.Subject 30}} By: {{.From}}{{else}}-----{{end}} |
+
| {{plural (len .Body.Online) "user is" "users are"}} on just now | |
| + | {{range $i, $n := .Body.Online}}{{if $i}}, {{end}}{{$n.User}} ({{$n.Via}}){{else}}No one is on just now.{{end}} |
| Board Statistics | |
| + | Our members have made a total of {{num .Body.Stats.Posts}} posts in {{num .Body.Stats.Topics}} topics + We have {{num .Body.Stats.Members}} registered members{{with .Body.Stats.Newest}} The newest member is {{.Name}}{{end}} |
| Joined: | {{date $u.Created}} |
| Last visit: | {{when $u.LastLogin}} |
| Total posts: | {{num $u.Posts}} |
| Calls: | {{num $u.Logins}} |
| Member No.: | {{$u.ID}} |
| Now: | On node {{.Num}} by {{.Via}}: {{.Activity}} |
| Location: | {{if $u.Location}}{{$u.Location}}{{else}}No Information{{end}} |
| About: | {{if $u.About}}{{$u.About}}{{else}}No Information{{end}} |
| {{.Subject}} {{when .Created}} {{snippet .Body 160}} |
| No posts to show. |
| {{.Text}}{{if .Mine}} *{{end}} | [ {{.Count}} ] | [{{.Pct}}%] |
Total Votes: {{.Total}}{{if not $me}} · Log in to vote{{end}}
+ {{end}} + {{if $me}} + + {{end}} +| {{if .Author}}{{.M.From}}{{else}}{{.M.From}}{{end}} | ++ Posted on {{longdate .M.Created}}{{if and .M.To (ne .M.To "All")}}, to {{.M.To}}{{end}} + + | +
|
+ {{template "avatar" (av .M.From "large")}} + {{if .Author}} + {{if .Author.Sysop}}Sysop{{else}}Member{{end}} + + Group: {{group .Author}} Posts: {{num .Author.Posts}} Member No.: {{.Author.ID}} Joined: {{date .Author.Created}}{{if .Author.Location}} From: {{.Author.Location}}{{end}} + {{else}} + {{if .Where}}Group: Visitors From: {{.Where}}{{else}}Group: Members{{end}} + {{end}} + |
+
+ {{body .M.Body}}
+ {{if .Likes}}----- {{end}}
+ ♥ {{plural .Likes "member likes" "members like"}} this post |
+
| + | ▲ | +