mirror of
https://github.com/D-Modem/bbs.git
synced 2026-11-28 17:38:04 -08:00
Web forum: a prosilver theme in the manner of phpBB 3.0
phpbb30: a board of 2007-2014, after phpBB 3.0's prosilver: a rounded blue gradient header with the board's name and a search box, a pale blue navigation bar with the Board index trail and small icon links, forums in rounded blue boxes with uppercase headings and pale gradient rows, round sheet icons (red when unread), white NEW TOPIC and POST REPLY buttons, posts in rounded panels with the subject, "by X » date" and the poster's profile on the right, beige quotes, red poll bars, Who is online and Statistics, a login box for guests and a quick reply. Its own CSS and templates; no code or images taken from phpBB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
This commit is contained in:
13 files changed
+617
-5
No files matched your search
@@ -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 or 1, Ikonboard, or phpBB 2 or 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 2 or 1, Ikonboard, or phpBB 3.0, 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
-2
@@ -213,8 +213,8 @@ address = 127.0.0.1:2513
|
||||
;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), ipb2 (classic, as IPB 2)
|
||||
; ipb1 (retro, as IPB 1), ikon (grey, as Ikonboard 2), phpbb2 (silver,
|
||||
; as phpBB 2) or phpbb1 (dark, as phpBB 1)
|
||||
; ipb1 (retro, as IPB 1), ikon (grey, as Ikonboard 2), phpbb30 (prosilver,
|
||||
; as phpBB 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
|
||||
|
||||
@@ -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`, `ipb2`, `ipb1`, `ikon`, `phpbb2` or `phpbb1`) |
|
||||
| `forum`, `forum_guests`, `forum_theme` | `yes`, `yes`, `ipb3` | the [web forum](Web-Forum), guests reading it, and its theme (`ipb3`, `ipb2`, `ipb1`, `ikon`, `phpbb30`, `phpbb2` or `phpbb1`) |
|
||||
|
||||
The OpenAPI 3.1 description is at `/api/v1/openapi.json`.
|
||||
|
||||
|
||||
+1
-1
@@ -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 or 1, Ikonboard, or phpBB 2 or 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 2 or 1, Ikonboard, or phpBB 3.0, 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
|
||||
|
||||
@@ -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 |
|
||||
| `phpbb30` | prosilver: a board of 2007-2014 in the manner of phpBB 3.0's prosilver: a rounded blue gradient header with the board's name and a search box, a pale blue navigation bar with *Board index*, forums in rounded blue boxes with uppercase headings and pale gradient rows, round folder icons, white *NEW TOPIC* and *POST REPLY* buttons, posts in rounded panels with the poster on the right, *Who is online* and *Statistics*, a quick reply |
|
||||
| `phpbb2` | silver: a PHP board of 2002-2008 in the manner of phpBB 2's subSilver: a grey page round a white panel, a rounded logo beside the board's title and a menu of little icons, tables in a thick blue border with blue gradient headings in orange, silver category bars fading to white, rows in three silvers, *new topic* and *post reply* pill buttons, *Posted / Post subject* above each post and *Back to top* beneath, *Who is Online* and a login box on the index |
|
||||
| `phpbb1` | dark: a PHP board of 2001 in the manner of phpBB 1: a black page with white text and teal links, a glowing italic logo, glowing *New Topic* and *Reply* buttons, [bracketed] menu links, the *-N-* statistics block, near-black table lines with cells in alternating grey and navy, small folder icons, posts between rules with little labelled links beneath |
|
||||
| `ikon` | grey: a Perl board of 2001 in the manner of Ikonboard 2: a narrow centered page, grey tables with one-pixel lines between cells, a title box with a menu row and a *Welcome* box, a brushed-metal logo beside a folder tree of where you are, dark red links, grey bevelled buttons, folder badges and gem icons, posts with *Total Posts, Joined, Posted on* beneath |
|
||||
|
||||
@@ -22,6 +22,7 @@ var funcs = template.FuncMap{
|
||||
"date": func(t time.Time) string { return t.Format("02 January 2006") },
|
||||
"longdate": longDate,
|
||||
"odd": func(n int) bool { return n%2 == 1 },
|
||||
"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") },
|
||||
"stamp": func(t time.Time) string { return t.Format("2006-01-02 15:04") },
|
||||
|
||||
@@ -54,6 +54,7 @@ var Themes = []Theme{
|
||||
{"ikon", "Grey (Ikonboard style)"},
|
||||
{"phpbb1", "Dark (phpBB 1 style)"},
|
||||
{"phpbb2", "Silver (phpBB 2 style)"},
|
||||
{"phpbb30", "prosilver (phpBB 3.0 style)"},
|
||||
}
|
||||
|
||||
// KnownTheme says whether there is a theme of the name.
|
||||
|
||||
@@ -0,0 +1,349 @@
|
||||
/*
|
||||
* The forum's prosilver theme: laid out in the manner of phpBB 3.0's
|
||||
* prosilver and the boards of 2007-2014: a white page, a rounded blue
|
||||
* gradient header with the board's name and a search box, a pale blue
|
||||
* navigation bar, forums in rounded blue boxes with uppercase headings,
|
||||
* pale gradient rows, round folder icons, posts in rounded panels with
|
||||
* the poster on the right. Written for this BBS; it takes no code or
|
||||
* images from any board.
|
||||
*/
|
||||
|
||||
:root {
|
||||
--text: #536482;
|
||||
--link: #105289;
|
||||
--hover: #d31141;
|
||||
--hdr-top: #6aceff;
|
||||
--hdr-a: #017ab6;
|
||||
--hdr-b: #12a2ea;
|
||||
--list-a: #0f9be1;
|
||||
--list-b: #0077b2;
|
||||
--navbar: #cadceb;
|
||||
--bg1: #ecf3f7;
|
||||
--bg2: #e1ebf2;
|
||||
--bg3: #cadceb;
|
||||
--panel: #ecf1f3;
|
||||
--rowline: #00608f;
|
||||
--radius: 7px;
|
||||
}
|
||||
|
||||
html { font-size: 100%; }
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 12px 0;
|
||||
background: #fff;
|
||||
color: var(--text);
|
||||
font: 10px Verdana, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
a:link, a:visited { color: var(--link); text-decoration: none; }
|
||||
a:hover { color: var(--hover); text-decoration: underline; }
|
||||
p { margin: 0 0 1.5em; font-size: 1.1em; line-height: 1.3em; }
|
||||
form { margin: 0; }
|
||||
h2 { margin: 0.8em 0 0.2em; color: #28313f; font: normal 2em "Trebuchet MS", Arial, Helvetica, sans-serif; }
|
||||
h2 a:link, h2 a:visited { color: #28313f; }
|
||||
h3 {
|
||||
margin: 20px 0 3px; padding-bottom: 2px;
|
||||
border-bottom: 1px solid #ccc; color: #115098;
|
||||
font: bold 1.05em Arial, Helvetica, sans-serif; text-transform: uppercase;
|
||||
}
|
||||
h3 a:link, h3 a:visited { color: #115098; }
|
||||
strong { color: #000; }
|
||||
.right { text-align: right; }
|
||||
.center { text-align: center; }
|
||||
dfn { display: none; }
|
||||
|
||||
#wrap { padding: 0 20px; min-width: 0; max-width: 1400px; margin: 0 auto; }
|
||||
.rounded { border-radius: var(--radius); }
|
||||
|
||||
.inline-form { display: inline; }
|
||||
.linkish { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: var(--link); cursor: pointer; }
|
||||
.linkish:hover { color: var(--hover); text-decoration: underline; }
|
||||
.desc { color: #536482; }
|
||||
|
||||
/* --- the header: blue gradient, the name, the search box */
|
||||
|
||||
.headerbar {
|
||||
display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap;
|
||||
margin-bottom: 4px; padding: 8px 10px 10px;
|
||||
background: linear-gradient(to bottom, var(--hdr-top) 0, var(--hdr-a) 2px, var(--hdr-b) 92px, var(--hdr-b));
|
||||
color: #fff;
|
||||
}
|
||||
#site-description { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; flex: 1; min-width: 0; }
|
||||
#logo { grid-row: span 2; display: flex; flex-direction: column; text-decoration: none !important; padding: 2px 0 4px; }
|
||||
.logo-name { color: #fff; font: bold 28px/1 "Trebuchet MS", Arial, sans-serif; letter-spacing: -1px; text-transform: lowercase; white-space: nowrap; text-shadow: 0 1px 1px rgba(0,60,100,0.5); }
|
||||
.logo-sub { color: #e1f4ff; font: 10px "Trebuchet MS", Arial, sans-serif; letter-spacing: 1px; }
|
||||
#site-description h1 { margin: 6px 0 0; color: #fff; font: bold 2em "Trebuchet MS", Arial, Helvetica, sans-serif; }
|
||||
#site-description p { margin: 0; font-size: 1.1em; }
|
||||
#search-box { margin-top: 26px; text-align: right; white-space: nowrap; font-size: 1.1em; }
|
||||
#search-box .inputbox { width: 160px; border-color: #0075b0; }
|
||||
#search-box a:link, #search-box a:visited { color: #fff; }
|
||||
|
||||
.navbar { padding: 0 10px; background: var(--navbar); }
|
||||
ul.linklist { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 10px; margin: 0; padding: 0; list-style: none; }
|
||||
ul.linklist li { font-size: 1.1em; line-height: 2.2em; }
|
||||
ul.linklist li.rightside { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
|
||||
ul.navlinks { border-bottom: 1px solid #fff; font-weight: bold; }
|
||||
.icon-home::before, .icon-ucp::before, .icon-members::before, .icon-register::before, .icon-logout::before, .icon-terminal::before {
|
||||
content: ""; display: inline-block; width: 13px; height: 12px; margin-right: 4px; vertical-align: -2px;
|
||||
}
|
||||
.icon-home::before { background: linear-gradient(to bottom, transparent 45%, #536482 45%) bottom / 9px 7px no-repeat, linear-gradient(135deg, transparent 50%, #536482 50%) 0 0 / 7px 6px no-repeat, linear-gradient(225deg, transparent 50%, #536482 50%) 6px 0 / 7px 6px no-repeat; }
|
||||
.icon-ucp::before { border-radius: 2px; background: linear-gradient(#fff, #9cb6cc); border: 1px solid #536482; width: 11px; height: 10px; }
|
||||
.icon-members::before, .icon-register::before { border-radius: 50% 50% 2px 2px; background: radial-gradient(circle at 50% 30%, #536482 0 3px, transparent 3.5px), linear-gradient(to bottom, transparent 55%, #536482 55%); }
|
||||
.icon-register::before { background: radial-gradient(circle at 40% 30%, #536482 0 3px, transparent 3.5px), linear-gradient(to bottom, transparent 55%, #536482 55%), linear-gradient(#bc2a4d, #bc2a4d) right top / 4px 4px no-repeat; }
|
||||
.icon-logout::before { border-radius: 50%; border: 2px solid #536482; border-top-color: transparent; width: 8px; height: 8px; }
|
||||
.icon-terminal::before { border-radius: 2px; background: #28313f; box-shadow: inset 0 -3px 0 #4caf50; }
|
||||
.linklist .linkish { font-weight: normal; }
|
||||
|
||||
#page-body { margin: 4px 0; clear: both; }
|
||||
#page-body > p.right { margin: 6px 0 0; }
|
||||
|
||||
/* --- the forum lists in rounded blue boxes */
|
||||
|
||||
.forabg, .forumbg { margin-bottom: 4px; padding: 0 5px 5px; clear: both; }
|
||||
.forabg { background: linear-gradient(to bottom, var(--hdr-top) 0, var(--list-a) 2px, var(--list-b) 92px, var(--list-b)); }
|
||||
.forumbg { background: linear-gradient(to bottom, var(--hdr-top) 0, var(--hdr-a) 2px, var(--hdr-b) 92px, var(--hdr-b)); }
|
||||
ul.topiclist { display: block; list-style: none; margin: 0; padding: 0; }
|
||||
ul.topiclist li { display: block; margin: 0; color: #4c5d77; }
|
||||
ul.topiclist dl { display: flex; align-items: stretch; }
|
||||
ul.topiclist dt { flex: 1; min-width: 0; padding: 5px; font-size: 1.1em; }
|
||||
ul.topiclist dd { flex: none; border-left: 1px solid #fff; padding: 4px 0; display: flex; flex-direction: column; justify-content: center; }
|
||||
li.header dt, li.header dd {
|
||||
margin: 2px 0 4px; padding: 6px 0 4px; border-left-width: 0; line-height: 1em;
|
||||
color: #fff; font: 1em Arial, Helvetica, sans-serif; text-transform: uppercase;
|
||||
}
|
||||
li.header dt { font-weight: bold; padding-left: 5px; }
|
||||
li.header dd { margin-left: 1px; display: block; }
|
||||
li.header dl { align-items: center; }
|
||||
ul.forums { background: linear-gradient(to bottom, #d2e0eb, #edf5f9 199px, #eef5f9); border-radius: 0 0 4px 4px; }
|
||||
ul.topics { background: var(--bg1); border-radius: 0 0 4px 4px; }
|
||||
li.row { border-top: 1px solid #fff; border-bottom: 1px solid var(--rowline); }
|
||||
li.row:last-child { border-bottom: 0; }
|
||||
li.row:hover { background-color: #f6f4d0; }
|
||||
li.row:hover dd { border-left-color: #ccc; }
|
||||
li.row.bg1 { background-color: var(--bg1); }
|
||||
li.row.bg2 { background-color: var(--bg2); }
|
||||
li.row.bg1:hover, li.row.bg2:hover { background-color: #f6f4d0; }
|
||||
dl.icon { min-height: 35px; }
|
||||
dl.icon dt { position: relative; padding-left: 45px; }
|
||||
dd.posts, dd.topics, dd.views { width: 80px; text-align: center; font-size: 1.2em; }
|
||||
dd.lastpost { width: 250px; font-size: 1.1em; }
|
||||
dd.lastpost span { display: block; padding-left: 5px; }
|
||||
li.header dd.lastpost span { padding-left: 5px; }
|
||||
a.forumtitle { font-weight: bold; font-size: 1.2em; font-family: "Trebuchet MS", Helvetica, Arial, sans-serif; }
|
||||
a.topictitle { font-weight: bold; font-size: 1.2em; font-family: "Trebuchet MS", Helvetica, Arial, sans-serif; }
|
||||
li.row .none { padding: 12px; text-align: center; font-size: 1.1em; }
|
||||
|
||||
/* the round icons: a sheet in a circle; the forum's red when unread */
|
||||
.ficon, .ticon {
|
||||
position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
|
||||
width: 25px; height: 25px; border-radius: 50%; box-sizing: border-box;
|
||||
border: 2px solid #4c7598;
|
||||
background: linear-gradient(#4c7598, #4c7598) 8px 7px / 8px 1px no-repeat, linear-gradient(#4c7598, #4c7598) 8px 10px / 8px 1px no-repeat, linear-gradient(#4c7598, #4c7598) 8px 13px / 8px 1px no-repeat, linear-gradient(#fff, #e2ecf3);
|
||||
}
|
||||
.ficon.unread, .ticon.unread { border-color: #c03454; background: linear-gradient(#c03454, #c03454) 8px 7px / 8px 1px no-repeat, linear-gradient(#c03454, #c03454) 8px 10px / 8px 1px no-repeat, linear-gradient(#c03454, #c03454) 8px 13px / 8px 1px no-repeat, linear-gradient(#fff, #f6e3e8); }
|
||||
.ticon.hot::after { content: ""; position: absolute; right: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd27a, #e05a00); border: 1px solid #fff; }
|
||||
a.latest, a.newest, a.target { display: inline-block; width: 11px; height: 9px; vertical-align: 0; text-decoration: none !important; }
|
||||
a.latest { background: linear-gradient(#fff, #fff) 1px 3px / 5px 3px no-repeat, #4c7598; clip-path: polygon(0 20%, 55% 20%, 55% 0, 100% 50%, 55% 100%, 55% 80%, 0 80%); }
|
||||
a.newest { background: #c03454; clip-path: polygon(0 20%, 55% 20%, 55% 0, 100% 50%, 55% 100%, 55% 80%, 0 80%); }
|
||||
a.target { margin-right: 3px; background: linear-gradient(#fff, #fff) 2px 2px / 7px 1px no-repeat, linear-gradient(#fff, #fff) 2px 4px / 7px 1px no-repeat, #8f9db0; }
|
||||
|
||||
/* --- buttons and the bars above and below lists */
|
||||
|
||||
.topic-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 3px; min-height: 28px; font-size: 1.1em; }
|
||||
.pagination { margin-left: auto; text-align: right; }
|
||||
.pagination .pagelinks a, .pagination .pagelinks strong, strong.pagination span a {
|
||||
display: inline-block; margin: 0 1px; padding: 0 3px; border: 1px solid #b4bac0; border-radius: 2px;
|
||||
background: #ecedee; color: #5c758c; font-weight: normal; font-size: 0.9em; line-height: 1.5em; text-decoration: none;
|
||||
}
|
||||
.pagination .pagelinks strong { background: #4692bf; border-color: #4692bf; color: #fff; }
|
||||
.pagination .pagelinks a:hover, strong.pagination span a:hover { background: #368ad2; border-color: #368ad2; color: #fff; }
|
||||
strong.pagination { float: right; font-weight: normal; }
|
||||
strong.pagination span a { background: #fff; }
|
||||
|
||||
/* the white buttons with the red words */
|
||||
.pbutton:link, .pbutton:visited {
|
||||
display: inline-flex; align-items: center; gap: 4px;
|
||||
padding: 5px 9px 5px 10px;
|
||||
border: 1px solid #c7c3bf; border-radius: 4px;
|
||||
background: linear-gradient(#ffffff, #e9e9e2);
|
||||
color: #bc2a4d; font: bold 1.2em/1 "Lucida Grande", Verdana, Arial, sans-serif; text-transform: uppercase; letter-spacing: 0; text-decoration: none;
|
||||
box-shadow: 0 1px 0 rgba(0,0,0,0.05);
|
||||
}
|
||||
.pbutton:hover { border-color: #368ad2; color: #105289; }
|
||||
.pbutton .star, .pbutton .arrow { color: #8a8a8a; font-size: 1.1em; }
|
||||
.pbutton:hover .star, .pbutton:hover .arrow { color: #368ad2; }
|
||||
.button1, .button2, button.button, .button, a.button:link, a.button:visited {
|
||||
display: inline-block; padding: 2px 8px; border: 1px solid #666; border-radius: 0;
|
||||
background: linear-gradient(#ffffff, #e9e9e2); color: #000;
|
||||
font: 1em "Lucida Grande", Verdana, Arial, sans-serif; text-decoration: none; cursor: pointer;
|
||||
}
|
||||
.button1 { font-weight: bold; padding: 2px 10px; }
|
||||
.button2 { border-color: #666; font-size: 1em; }
|
||||
.button.important { font-weight: bold; }
|
||||
.button.danger { color: #bc2a4d; }
|
||||
.button1:hover, .button2:hover, .button:hover { border-color: #0f4987; }
|
||||
|
||||
.inputbox, input[type=text], input[type=password], input[type=search], textarea, select {
|
||||
padding: 2px; border: 1px solid #b4bac0; background: #fff; color: #333;
|
||||
font: 1.1em Verdana, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.inputbox:hover, .inputbox:focus, input:focus, textarea:focus { border-color: #11a3ea; }
|
||||
textarea { width: 100%; box-sizing: border-box; font: 1.3em "Lucida Grande", Verdana, sans-serif; line-height: 1.4em; }
|
||||
|
||||
.panel { margin-bottom: 4px; padding: 6px 10px; background: var(--panel); color: #28313f; }
|
||||
.panel h2 { margin: 0.3em 0 0.4em; padding-bottom: 2px; border-bottom: 1px solid #ccc; color: #115098; font-size: 1.6em; }
|
||||
.panel.bg1 { background: var(--bg1); }
|
||||
.panel.bg2 { background: var(--bg2); }
|
||||
.panel.notice { font-size: 1.2em; }
|
||||
.quick-login { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 6px 0 14px; padding: 0; border: 0; font-size: 1.1em; }
|
||||
.jumpbox-return { margin: 10px 0; }
|
||||
.left-box::before { content: "\2039 "; }
|
||||
|
||||
/* --- posts in rounded panels, the poster on the right */
|
||||
|
||||
.post { position: relative; display: flex; flex-wrap: wrap; margin-bottom: 4px; padding: 8px 10px 4px; }
|
||||
.post.bg1 { background: var(--bg1); }
|
||||
.post.bg2 { background: var(--bg2); }
|
||||
.post:target { outline: 2px solid #368ad2; }
|
||||
.postbody { flex: 0 0 76%; min-width: 0; color: #333; line-height: 1.48em; }
|
||||
.postbody h3 { margin: 0 0 0.3em !important; padding: 2px 0 0; border: 0; text-transform: none; font: bold 1.5em/125% "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif; }
|
||||
.postbody h3 a:link, .postbody h3 a:visited { color: #105289; }
|
||||
.postbody h3.first { font-size: 1.7em; }
|
||||
p.author { margin: 0 15em 0.6em 0; padding: 0 0 5px; font-size: 1em; line-height: 1.2em; }
|
||||
.content { min-height: 3em; overflow: hidden; padding-bottom: 1px; color: #333; font: 1.3em/1.4em "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, Arial, sans-serif; overflow-wrap: anywhere; }
|
||||
.signature { margin-top: 1.5em; padding-top: 0.2em; border-top: 1px solid #ccc; font-size: 1.1em; line-height: 140%; }
|
||||
ul.profile-icons { float: right; display: flex; gap: 4px; margin: 0 0 0 8px; padding: 0; list-style: none; }
|
||||
.picon:link, .picon:visited, button.picon {
|
||||
display: inline-flex; align-items: center; gap: 2px;
|
||||
padding: 3px 6px; border: 1px solid #c7c3bf; border-radius: 4px; background: linear-gradient(#fff, #e9e9e2);
|
||||
color: #bc2a4d; font: bold 1em "Lucida Grande", Verdana, sans-serif; text-transform: uppercase; text-decoration: none; cursor: pointer;
|
||||
}
|
||||
.picon .q { font-size: 1.6em; line-height: 0.5; color: #105289; }
|
||||
button.picon.delete { color: #bc2a4d; padding: 3px 5px; }
|
||||
.postprofile { flex: 0 0 22%; box-sizing: border-box; margin: 5px 0 10px 2%; padding: 0 0 0 8px; border-left: 1px solid #fff; min-height: 80px; color: #666; }
|
||||
.postprofile dt, .postprofile dd { margin: 0; line-height: 1.2em; font-size: 1.1em; }
|
||||
.postprofile dt { margin-bottom: 2px; }
|
||||
.postprofile dt a { font-weight: bold; }
|
||||
.postprofile strong { font-weight: normal; color: #000; }
|
||||
.postprofile .avatar { margin-bottom: 4px; }
|
||||
a.admin:link, a.admin:visited, .admin { color: #aa0000 !important; }
|
||||
.back2top { flex: 0 0 100%; text-align: right; height: 14px; }
|
||||
a.top { display: inline-block; width: 11px; height: 11px; line-height: 11px; border-radius: 2px; background: #8f9db0; color: #fff; font-size: 7px; text-align: center; text-decoration: none !important; }
|
||||
|
||||
/* quotes: a beige box, the writer above */
|
||||
.citation { margin: 0.5em 1px 0 25px; padding: 5px 5px 0; background: #ebeadd; border: 1px solid #dbdbce; border-bottom: 0; font-size: 0.9em; font-weight: bold; }
|
||||
.citation::after { content: ""; }
|
||||
blockquote.quote { margin: 0.5em 1px 0.5em 25px; padding: 5px; background: #ebeadd; border: 1px solid #dbdbce; font-size: 0.95em; overflow: hidden; }
|
||||
.citation + blockquote.quote { margin-top: 0; border-top: 0; }
|
||||
blockquote.quote:not(.citation + blockquote.quote)::before { content: "Quote:"; display: block; font-weight: bold; font-size: 0.9em; margin-bottom: 2px; }
|
||||
.bbc_url:link, .bbc_url:visited { color: #368ad2; border-bottom: 1px solid #368ad2; text-decoration: none; }
|
||||
.bbc_url:hover { background: #d0e4f6; color: #0d4473; }
|
||||
|
||||
/* polls: coloured bars */
|
||||
.poll h2 { font-size: 1.4em; }
|
||||
dl.polls { display: flex; align-items: center; margin: 0; padding: 4px 0; border-top: 1px solid #fff; font-size: 1.1em; }
|
||||
dl.polls dt { width: 30%; text-align: right; padding-right: 10px; color: #28313f; }
|
||||
dl.polls dd { margin: 0; padding: 0 5px; }
|
||||
dl.polls dd.resultbar { width: 50%; }
|
||||
dl.polls.total { border-top-color: transparent; font-weight: bold; }
|
||||
.pollbar meter { width: 100%; height: 12px; display: block; }
|
||||
.pollbar meter::-webkit-meter-bar { background: transparent; border: 0; border-radius: 0; }
|
||||
.pollbar1 meter::-webkit-meter-optimum-value { background: #aa2346; }
|
||||
.pollbar2 meter::-webkit-meter-optimum-value { background: #be1e4a; }
|
||||
.pollbar3 meter::-webkit-meter-optimum-value { background: #d11a4e; }
|
||||
.pollbar4 meter::-webkit-meter-optimum-value { background: #e41653; }
|
||||
.pollbar5 meter::-webkit-meter-optimum-value { background: #f81157; }
|
||||
.pollbar1 meter::-moz-meter-bar { background: #aa2346; }
|
||||
.pollbar2 meter::-moz-meter-bar { background: #be1e4a; }
|
||||
.pollbar3 meter::-moz-meter-bar { background: #d11a4e; }
|
||||
.pollbar4 meter::-moz-meter-bar { background: #e41653; }
|
||||
.pollbar5 meter::-moz-meter-bar { background: #f81157; }
|
||||
.poll .pct { color: #536482; }
|
||||
.poll-form { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin: 8px 0 4px 30%; font-size: 1.1em; }
|
||||
.poll-form .button1 { margin-top: 4px; }
|
||||
|
||||
/* quick reply */
|
||||
fieldset { border: 0; margin: 0; padding: 0; }
|
||||
.fields1 dl { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 1.1em; }
|
||||
.fields1 dt { width: 90px; font-weight: bold; color: #28313f; }
|
||||
.fields1 dd { margin: 0; flex: 1; }
|
||||
.fields1 dd .inputbox { width: 100%; max-width: 400px; }
|
||||
.fields1 label { font-size: 1.1em; }
|
||||
.submit-buttons { margin: 8px 0 4px; text-align: center; }
|
||||
|
||||
/* --- profile */
|
||||
.profilepanel { display: flex; flex-wrap: wrap; gap: 10px 30px; font-size: 1.1em; }
|
||||
.profilepanel h3 { flex-basis: 100%; margin-top: 4px; }
|
||||
dl.details { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; }
|
||||
dl.details dt { color: #000; text-align: right; }
|
||||
dl.details dd { margin: 0; color: #536482; }
|
||||
.profilepanel .rank { display: block; margin-top: 6px; text-align: center; font-weight: bold; color: #28313f; }
|
||||
.online { color: #2e8b2e; font-weight: bold; }
|
||||
|
||||
/* --- the default theme's pages that this one shows as they are */
|
||||
.box { margin: 10px 0 4px; padding: 0 5px 5px; border-radius: var(--radius); background: linear-gradient(to bottom, var(--hdr-top) 0, var(--list-a) 2px, var(--list-b) 92px, var(--list-b)); }
|
||||
.box > h2.maintitle { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 5px 6px; color: #fff; font: bold 1.1em Arial, Helvetica, sans-serif; text-transform: uppercase; border: 0; }
|
||||
.box .count { margin-left: auto; font-weight: normal; text-transform: none; }
|
||||
.box-body { padding: 8px 10px; background: var(--bg2); border-radius: 0 0 4px 4px; font-size: 1.1em; }
|
||||
.box.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
|
||||
.field { display: grid; grid-template-columns: 35% 1fr; align-items: center; gap: 8px; padding: 4px 0; font-weight: bold; color: #28313f; }
|
||||
.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: 8px; }
|
||||
.signin .desc { margin-bottom: 6px; }
|
||||
.poll-maker { margin: 8px 0; }
|
||||
.poll-maker summary { cursor: pointer; color: var(--link); font-weight: bold; }
|
||||
.searchform { display: flex; gap: 6px; }
|
||||
.searchform input { flex: 1; }
|
||||
.message { margin: 0 0 8px; padding: 6px 10px; border-radius: var(--radius); background: var(--panel); color: #28313f; font-size: 1.2em; }
|
||||
.message.error { background: #ecd5d8; color: #bc2a4d; font-weight: bold; }
|
||||
table.board { width: 100%; border-collapse: collapse; background: var(--bg1); }
|
||||
table.board th { padding: 4px; background: transparent; color: #fff; font: 1em Arial, sans-serif; text-transform: uppercase; text-align: left; }
|
||||
table.board thead tr { background: var(--list-b); }
|
||||
table.board td { padding: 5px; border-top: 1px solid #fff; border-bottom: 1px solid var(--rowline); vertical-align: top; font-size: 1.1em; }
|
||||
table.board tr:nth-child(even) td { background: var(--bg2); }
|
||||
table.board h3 { margin: 0; border: 0; text-transform: none; font: bold 1.1em "Trebuchet MS", sans-serif; }
|
||||
table.board h3 a { color: var(--link); }
|
||||
.snippet { color: #536482; }
|
||||
td.none { text-align: center; }
|
||||
|
||||
/* letter pictures for those without one */
|
||||
.avatar {
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
color: #fff; font: bold 14px "Trebuchet MS", Verdana, sans-serif;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.avatar.tiny { width: 16px; height: 16px; font-size: 10px; }
|
||||
.avatar.mini { width: 24px; height: 24px; font-size: 12px; }
|
||||
.avatar.large { width: 70px; height: 70px; font-size: 34px; }
|
||||
.avatar.huge { width: 90px; height: 90px; font-size: 44px; }
|
||||
.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 */
|
||||
#page-footer { clear: both; margin-top: 10px; }
|
||||
#page-footer .navbar { padding: 4px 10px; }
|
||||
.themepicker { display: flex; align-items: center; gap: 4px; font-size: 1em; }
|
||||
.themepicker select { font-size: 1em; }
|
||||
.copyright { padding: 5px; text-align: center; color: #555; font-size: 1em; line-height: 1.5; }
|
||||
|
||||
/* --- narrow screens */
|
||||
@media (max-width: 760px) {
|
||||
#wrap { padding: 0 6px; }
|
||||
.headerbar { flex-direction: column; }
|
||||
#site-description { grid-template-columns: 1fr; }
|
||||
#logo { grid-row: auto; }
|
||||
#site-description h1 { margin-top: 2px; font-size: 1.6em; }
|
||||
#search-box { margin-top: 4px; align-self: stretch; text-align: left; }
|
||||
dd.posts, dd.topics, dd.views { display: none; }
|
||||
dd.lastpost { width: 120px; }
|
||||
.postbody, .postprofile { flex-basis: 100%; }
|
||||
.postprofile { order: -1; margin: 0 0 6px; padding: 0; border: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-height: 0; }
|
||||
.postprofile br { display: none; }
|
||||
.postprofile .avatar.large { width: 32px; height: 32px; font-size: 16px; margin: 0 6px 0 0; }
|
||||
p.author { margin-right: 0; }
|
||||
dl.polls dt { width: 40%; }
|
||||
.poll-form { margin-left: 0; }
|
||||
.field { grid-template-columns: 1fr; }
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{{define "area.html"}}{{template "head" .}}
|
||||
{{$b := .Body}}
|
||||
<h2><a href="/forum/area/{{$b.Area.ID}}">{{$b.Area.Name}}</a></h2>
|
||||
{{if $b.Area.Description}}<p class="forumdesc">{{$b.Area.Description}}</p>{{end}}
|
||||
<div class="topic-actions">
|
||||
<div class="buttons">{{if $b.CanPost}}<a href="/forum/area/{{$b.Area.ID}}/new" class="pbutton" title="Post a new topic">New Topic <span class="star">✱</span></a>{{end}}</div>
|
||||
<div class="pagination">{{plural $b.Count "topic" "topics"}} • {{template "pages" $b.Pages}} {{template "pagecount" $b.Pages}}</div>
|
||||
</div>
|
||||
<div class="forumbg rounded">
|
||||
<ul class="topiclist">
|
||||
<li class="header"><dl class="icon"><dt>Topics</dt><dd class="posts">Replies</dd><dd class="lastpost"><span>Last post</span></dd></dl></li>
|
||||
</ul>
|
||||
<ul class="topiclist topics">
|
||||
{{range $i, $t := $b.Topics}}
|
||||
<li class="row {{if odd $i}}bg2{{else}}bg1{{end}}">
|
||||
<dl class="icon">
|
||||
<dt><span class="ticon{{if $t.Unread}} unread{{end}}{{if ge $t.Replies 15}} hot{{end}}" title="{{if $t.Unread}}Unread posts{{else}}No unread posts{{end}}"></span>
|
||||
{{if $t.Unread}}<a href="/forum/post/{{$t.Last.ID}}" class="newest" title="View the first unread post"></a> {{end}}<a href="/forum/topic/{{$t.Root.ID}}" class="topictitle">{{$t.Root.Subject}}</a>
|
||||
{{if gt $t.Pages 1}}<strong class="pagination"><span>{{$root := $t.Root.ID}}{{range (seq $t.Pages)}}<a href="/forum/topic/{{$root}}{{if gt . 1}}?page={{.}}{{end}}">{{.}}</a>{{end}}</span></strong>{{end}}
|
||||
<br>by <strong>{{$t.Root.From}}</strong> » {{subtime $t.Root.Created}}</dt>
|
||||
<dd class="posts">{{num $t.Replies}} <dfn>Replies</dfn></dd>
|
||||
<dd class="lastpost"><span><dfn>Last post </dfn>by <strong>{{$t.Last.From}}</strong> <a href="/forum/post/{{$t.Last.ID}}" class="latest" title="View the latest post"></a><br>{{subtime $t.Last.Created}}</span></dd>
|
||||
</dl>
|
||||
</li>
|
||||
{{else}}
|
||||
<li class="row bg1"><div class="none"><strong>There are no topics or posts in this forum.</strong></div></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="topic-actions">
|
||||
<div class="buttons">{{if $b.CanPost}}<a href="/forum/area/{{$b.Area.ID}}/new" class="pbutton" title="Post a new topic">New Topic <span class="star">✱</span></a>{{end}}</div>
|
||||
<div class="pagination">{{if .User}}<form method="post" action="/forum/area/{{$b.Area.ID}}/read" class="inline-form"><input type="hidden" name="csrf" value="{{.CSRF}}"><button class="linkish">Mark topics read</button></form> • {{end}}{{plural $b.Count "topic" "topics"}} • {{template "pages" $b.Pages}} {{template "pagecount" $b.Pages}}</div>
|
||||
</div>
|
||||
<p class="jumpbox-return"><a href="/forum/" class="left-box">Return to Board index</a></p>
|
||||
<h3>Forum permissions</h3>
|
||||
<p>You <strong>{{if $b.CanPost}}can{{else}}cannot{{end}}</strong> post new topics in this forum<br>
|
||||
You <strong>{{if $b.CanPost}}can{{else}}cannot{{end}}</strong> reply to topics in this forum</p>
|
||||
{{template "foot" .}}{{end}}
|
||||
@@ -0,0 +1,46 @@
|
||||
{{define "index.html"}}{{template "head" .}}
|
||||
{{$st := .Body.Stats}}
|
||||
<p class="right">{{if .User}}Last visit was: {{subtime .User.LastLogin}}<br>{{end}}It is currently {{subtime .Now}}</p>
|
||||
<ul class="linklist"><li><a href="/forum/search">Search the posts</a>{{if .User}} • <a href="/forum/user/{{path .User.Name}}">View your posts</a>{{end}}</li></ul>
|
||||
{{range .Body.Categories}}
|
||||
<div class="forabg rounded">
|
||||
<ul class="topiclist">
|
||||
<li class="header"><dl class="icon"><dt>{{.Name}}</dt><dd class="topics">Topics</dd><dd class="posts">Posts</dd><dd class="lastpost"><span>Last post</span></dd></dl></li>
|
||||
</ul>
|
||||
<ul class="topiclist forums">
|
||||
{{range $f := .Forums}}
|
||||
<li class="row">
|
||||
<dl class="icon">
|
||||
<dt><span class="ficon{{if $f.Unread}} unread{{end}}" title="{{if $f.Unread}}Unread posts{{else}}No unread posts{{end}}"></span>
|
||||
<a href="/forum/area/{{$f.Area.ID}}" class="forumtitle">{{$f.Area.Name}}</a><br>{{$f.Area.Description}}</dt>
|
||||
<dd class="topics">{{num $f.Topics}} <dfn>Topics</dfn></dd>
|
||||
<dd class="posts">{{num $f.Area.Messages}} <dfn>Posts</dfn></dd>
|
||||
<dd class="lastpost"><span>{{with $f.Last}}<dfn>Last post</dfn> by <strong>{{.From}}</strong> <a href="/forum/post/{{.ID}}" class="latest" title="View the latest post"></a><br>{{subtime .Created}}{{else}}No posts<br> {{end}}</span></dd>
|
||||
</dl>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="panel rounded"><strong>There are no forums open to you yet.</strong></div>
|
||||
{{end}}
|
||||
|
||||
{{if not .User}}
|
||||
<form method="post" action="/forum/login" class="headerspace">
|
||||
<input type="hidden" name="back" value="/forum/">
|
||||
<h3><a href="/forum/login">Login</a>{{if .Register}} • <a href="/forum/register">Register</a>{{end}}</h3>
|
||||
<fieldset class="quick-login">
|
||||
<label>Username: <input type="text" name="name" size="10" class="inputbox" autocomplete="username"></label>
|
||||
<label>Password: <input type="password" name="password" size="10" class="inputbox" autocomplete="current-password"></label>
|
||||
<button class="button2">Login</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
{{end}}
|
||||
|
||||
<h3><a href="/forum/online">Who is online</a></h3>
|
||||
<p>In total there {{if eq (len .Body.Online) 1}}is <strong>1</strong> user{{else}}are <strong>{{len .Body.Online}}</strong> users{{end}} online on the BBS, by any line.<br>
|
||||
Registered users: {{range $i, $n := .Body.Online}}{{if $i}}, {{end}}<a href="/forum/user/{{path $n.User}}">{{$n.User}}</a>{{else}}No registered users{{end}}</p>
|
||||
|
||||
<h3>Statistics</h3>
|
||||
<p>Total posts <strong>{{num $st.Posts}}</strong> • Total topics <strong>{{num $st.Topics}}</strong> • Total members <strong>{{num $st.Members}}</strong>{{with $st.Newest}} • Our newest member <strong><a href="/forum/user/{{path .Name}}">{{.Name}}</a></strong>{{end}}</p>
|
||||
{{template "foot" .}}{{end}}
|
||||
@@ -0,0 +1,62 @@
|
||||
{{define "head"}}<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{.BBS}} • {{if eq .Title .BBS}}Index page{{else}}{{.Title}}{{end}}</title>
|
||||
<link rel="stylesheet" href="/forum/static/phpbb30.css">
|
||||
</head>
|
||||
<body id="phpbb">
|
||||
<div id="wrap">
|
||||
<a id="top"></a>
|
||||
<div id="page-header">
|
||||
<div class="headerbar rounded">
|
||||
<div id="site-description">
|
||||
<a href="/forum/" id="logo" title="Board index"><span class="logo-name">{{.BBS}}</span><span class="logo-sub">bulletin board</span></a>
|
||||
<h1>{{.BBS}}</h1>
|
||||
<p>The forums of a bulletin board system</p>
|
||||
</div>
|
||||
<form action="/forum/search" method="get" id="search-box">
|
||||
<input name="q" type="search" class="inputbox search" placeholder="Search…" aria-label="Search for keywords">
|
||||
<button class="button2">Search</button><br>
|
||||
<a href="/forum/search">Advanced search</a>
|
||||
</form>
|
||||
</div>
|
||||
<div class="navbar rounded">
|
||||
<ul class="linklist navlinks">
|
||||
<li class="icon-home"><a href="/forum/">Board index</a>{{range .Crumbs}}{{if .URL}} <strong>‹</strong> <a href="{{.URL}}">{{.Name}}</a>{{end}}{{end}}</li>
|
||||
{{if .Terminal}}<li class="rightside"><a href="/terminal" class="icon-terminal">Terminal</a></li>{{end}}
|
||||
</ul>
|
||||
<ul class="linklist bottomrow">
|
||||
{{if .User}}<li class="icon-ucp"><a href="/forum/user/{{path .User.Name}}">Profile</a> • <a href="/forum/search">Search posts</a></li>{{end}}
|
||||
<li class="rightside">
|
||||
<a href="/forum/online" class="icon-members">Who is online ({{.Online}})</a>
|
||||
{{if and (not .User) .Register}}<a href="/forum/register" class="icon-register">Register</a>{{end}}
|
||||
{{if .User}}<form method="post" action="/forum/logout" class="inline-form"><input type="hidden" name="csrf" value="{{.CSRF}}"><button class="linkish icon-logout">Logout [ {{.User.Name}} ]</button></form>{{else}}<a href="/forum/login" class="icon-logout">Login</a>{{end}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="page-body">
|
||||
{{if eq .Notice "welcome"}}<div class="panel rounded notice"><strong>Thank you for registering.</strong> Your account is made, and you are logged in.</div>{{end}}
|
||||
{{end}}
|
||||
|
||||
{{define "foot"}}
|
||||
</div>
|
||||
<div id="page-footer">
|
||||
<div class="navbar rounded">
|
||||
<ul class="linklist">
|
||||
<li class="icon-home"><a href="/forum/">Board index</a></li>
|
||||
<li class="rightside">{{template "themepicker" .}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="copyright">Powered by bbs-sec · {{.BBS}}<br>All times are server time</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
|
||||
{{define "pages"}}{{if gt .Total 1}}<span class="pagelinks">{{if gt .Cur 1}}<a href="{{.URL .Prev}}" rel="prev">Previous</a> {{end}}{{$cur := .Cur}}{{$p := .}}{{range .Shown}}{{if eq . 0}}<span class="page-sep">…</span>{{else if eq . $cur}}<strong>{{.}}</strong>{{else}}<a href="{{$p.URL .}}">{{.}}</a>{{end}}{{end}}{{if .Next}} <a href="{{.URL .Next}}" rel="next">Next</a>{{end}}</span>{{end}}{{end}}
|
||||
|
||||
{{define "pagecount"}}Page <strong>{{.Cur}}</strong> of <strong>{{.Total}}</strong>{{end}}
|
||||
@@ -0,0 +1,33 @@
|
||||
{{define "profile.html"}}{{template "head" .}}
|
||||
{{$u := .Body.U}}
|
||||
<h2>Viewing profile - {{$u.Name}}</h2>
|
||||
<div class="panel rounded bg1 profilepanel">
|
||||
<dl class="left-box">
|
||||
<dt>{{template "avatar" (av $u.Name "huge")}}</dt>
|
||||
<dd><span class="rank">{{if $u.Sysop}}Site Admin{{else}}{{group $u}}{{end}}</span></dd>
|
||||
</dl>
|
||||
<dl class="left-box details">
|
||||
<dt>Username:</dt><dd><span{{if $u.Sysop}} class="admin"{{end}}>{{$u.Name}}</span>{{if .Body.On}} <span class="online">[ Online ]</span>{{end}}</dd>
|
||||
{{if $u.Location}}<dt>Location:</dt><dd>{{$u.Location}}</dd>{{end}}
|
||||
{{if $u.About}}<dt>Interests:</dt><dd>{{$u.About}}</dd>{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
<div class="panel rounded bg2 profilepanel">
|
||||
<h3>User statistics</h3>
|
||||
<dl class="details">
|
||||
<dt>Joined:</dt><dd>{{subtime $u.Created}}</dd>
|
||||
<dt>Last visited:</dt><dd>{{subtime $u.LastLogin}}</dd>
|
||||
<dt>Total posts:</dt><dd>{{num $u.Posts}}</dd>
|
||||
<dt>Calls:</dt><dd>{{num $u.Logins}}</dd>
|
||||
{{range .Body.On}}<dt>Now:</dt><dd>node {{.Num}} by {{.Via}}: {{.Activity}}</dd>{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
<div class="forumbg rounded">
|
||||
<ul class="topiclist"><li class="header"><dl><dt>Recent posts</dt><dd class="lastpost"><span>Posted</span></dd></dl></li></ul>
|
||||
<ul class="topiclist topics">
|
||||
{{range $i, $m := .Body.Recent}}
|
||||
<li class="row {{if odd $i}}bg2{{else}}bg1{{end}}"><dl><dt><a href="/forum/post/{{$m.ID}}" class="topictitle">{{$m.Subject}}</a><br>{{snippet $m.Body 140}}</dt><dd class="lastpost"><span>{{subtime $m.Created}}</span></dd></dl></li>
|
||||
{{else}}<li class="row bg1"><div class="none">No posts to show.</div></li>{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
{{template "foot" .}}{{end}}
|
||||
@@ -0,0 +1,81 @@
|
||||
{{define "topic.html"}}{{template "head" .}}
|
||||
{{$b := .Body}}{{$csrf := .CSRF}}{{$me := .User}}
|
||||
<h2><a href="/forum/topic/{{$b.Root.ID}}">{{$b.Root.Subject}}</a></h2>
|
||||
<div class="topic-actions">
|
||||
<div class="buttons">{{if $b.CanPost}}<a href="#qr" class="pbutton" title="Post a reply">Post Reply <span class="arrow">↙</span></a>{{end}}</div>
|
||||
<div class="pagination">{{plural $b.Count "post" "posts"}} • {{template "pages" $b.Pages}} {{template "pagecount" $b.Pages}}</div>
|
||||
</div>
|
||||
|
||||
{{with $b.Poll}}
|
||||
<div class="panel rounded poll">
|
||||
<h2>{{$b.Root.Subject}}</h2>
|
||||
{{if or .Voted (not $me)}}
|
||||
{{range $i, $a := .Answers}}
|
||||
<dl class="polls">
|
||||
<dt>{{$a.Text}}{{if $a.Mine}} <strong>✓</strong>{{end}}</dt>
|
||||
<dd class="resultbar"><span class="pollbar pollbar{{add (mod5 $i) 1}}" data-pct="{{$a.Pct}}"><meter min="0" max="100" value="{{$a.Pct}}"></meter></span></dd>
|
||||
<dd>{{$a.Count}} <span class="pct">[{{$a.Pct}}%]</span></dd>
|
||||
</dl>
|
||||
{{end}}
|
||||
<dl class="polls total"><dt> </dt><dd class="resultbar">Total votes : {{.Total}}</dd></dl>
|
||||
{{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}}
|
||||
<button class="button1">{{if .Voted}}Change vote{{else}}Submit vote{{end}}</button>
|
||||
</form>
|
||||
{{else}}<p class="center">You must <a href="/forum/login">login</a> to vote in this poll.</p>{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{range $b.Posts}}
|
||||
<div id="entry{{.M.ID}}" class="post rounded {{if odd .Num}}bg2{{else}}bg1{{end}}">
|
||||
<div class="postbody">
|
||||
<ul class="profile-icons">
|
||||
{{if .CanDelete}}<li><form method="post" action="/forum/post/{{.M.ID}}/delete" class="inline-form"><input type="hidden" name="csrf" value="{{$csrf}}"><button class="picon delete" title="Delete post">✖</button></form></li>{{end}}
|
||||
{{if .CanLike}}<li><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="picon">{{if .Liked}}Unlike{{else}}Like{{end}}</button></form></li>{{end}}
|
||||
{{if $b.CanPost}}<li><a href="/forum/topic/{{$b.Root.ID}}?quote={{.M.ID}}{{if gt $b.Pages.Cur 1}}&page={{$b.Pages.Cur}}{{end}}#qr" class="picon" title="Reply with quote"><span class="q">“</span>Quote</a></li>{{end}}
|
||||
</ul>
|
||||
<h3{{if eq .Num 1}} class="first"{{end}}><a href="/forum/post/{{.M.ID}}">{{.M.Subject}}</a></h3>
|
||||
<p class="author"><a href="/forum/post/{{.M.ID}}" class="target" title="Post"></a>by <strong>{{if .Author}}<a href="/forum/user/{{path .Author.Name}}"{{if .Author.Sysop}} class="admin"{{end}}>{{.M.From}}</a>{{else}}{{.M.From}}{{end}}</strong> » {{subtime .M.Created}}{{if and .M.To (ne .M.To "All")}} • to {{.M.To}}{{end}}</p>
|
||||
<div class="content">{{body .M.Body}}</div>
|
||||
{{if .Likes}}<div class="signature">{{plural .Likes "member likes" "members like"}} this post</div>{{end}}
|
||||
</div>
|
||||
<dl class="postprofile">
|
||||
<dt>{{template "avatar" (av .M.From "large")}}<br>{{if .Author}}<a href="/forum/user/{{path .Author.Name}}"{{if .Author.Sysop}} class="admin"{{end}}>{{.M.From}}</a>{{else}}<strong>{{.M.From}}</strong>{{end}}</dt>
|
||||
{{if .Author}}<dd>{{if .Author.Sysop}}Site Admin{{else}}{{group .Author}}{{end}}</dd>
|
||||
<dd> </dd>
|
||||
<dd><strong>Posts:</strong> {{num .Author.Posts}}</dd>
|
||||
<dd><strong>Joined:</strong> {{subtime .Author.Created}}</dd>
|
||||
{{if .Author.Location}}<dd><strong>Location:</strong> {{.Author.Location}}</dd>{{end}}
|
||||
{{else if .Where}}<dd> </dd><dd><strong>Location:</strong> {{.Where}}</dd>{{end}}
|
||||
</dl>
|
||||
<div class="back2top"><a href="#top" class="top" title="Top">▲</a></div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div class="topic-actions">
|
||||
<div class="buttons">{{if $b.CanPost}}<a href="#qr" class="pbutton" title="Post a reply">Post Reply <span class="arrow">↙</span></a>{{end}}</div>
|
||||
<div class="pagination">{{plural $b.Count "post" "posts"}} • {{template "pages" $b.Pages}} {{template "pagecount" $b.Pages}}</div>
|
||||
</div>
|
||||
|
||||
{{if $b.CanPost}}
|
||||
<form method="post" action="/forum/topic/{{$b.Root.ID}}/reply" id="qr">
|
||||
<input type="hidden" name="csrf" value="{{.CSRF}}">
|
||||
{{if $b.QuoteID}}<input type="hidden" name="reply_to" value="{{$b.QuoteID}}">{{end}}
|
||||
<div class="panel rounded bg2" id="qr_postform">
|
||||
<h2>Quick Reply</h2>
|
||||
<fieldset class="fields1">
|
||||
<dl><dt><label>Subject:</label></dt><dd><input type="text" class="inputbox" value="Re: {{$b.Root.Subject}}" disabled aria-label="Subject"></dd></dl>
|
||||
<div><textarea name="body" rows="7" class="inputbox" required aria-label="Message body">{{$b.Quote}}</textarea></div>
|
||||
{{if $b.Aliases}}<label><input type="checkbox" name="alias"> Post as {{$me.Alias}}</label>{{end}}
|
||||
</fieldset>
|
||||
<fieldset class="submit-buttons"><button class="button1">Submit</button></fieldset>
|
||||
</div>
|
||||
</form>
|
||||
{{else if not .User}}
|
||||
<div class="panel rounded"><p>You must <a href="/forum/login?back={{urlq (printf "/forum/topic/%d" $b.Root.ID)}}">login</a>{{if .Register}} or <a href="/forum/register">register</a>{{end}} to reply to this topic.</p></div>
|
||||
{{end}}
|
||||
<p class="jumpbox-return"><a href="/forum/area/{{$b.Area.ID}}" class="left-box">Return to {{$b.Area.Name}}</a></p>
|
||||
{{template "foot" .}}{{end}}
|
||||
Reference in new issue
Block a user