Fossil SCM

In the forum thread list Use a CSS class, instead of nth-child(), to locate forum post titles for pin decoration to simplify addition of an optional new column in the forum-statuses branch.

stephan 2026-05-25 20:08 UTC pinned-forum-posts
Commit 72ac51e06990a0a8a8226bdc79fcd991f523417e4b4381cafd4c0bee47725779
2 files changed +2 -2 +5 -5
+2 -2
--- src/default.css
+++ src/default.css
@@ -1114,12 +1114,12 @@
11141114
div.setup_forum-column {
11151115
display: flex;
11161116
flex-direction: column;
11171117
}
11181118
1119
-body.forum div.forumPosts table tr.pinned > td:nth-child(2):before {
1120
- content: "📌 ";
1119
+body.forum div.forumPosts table tr.pinned > td.subject:before {
1120
+ content: "📌 "/*this space works around an unsightly FF quirk*/;
11211121
font-size: 120%;
11221122
}
11231123
11241124
body.cpage-setup_forum > .content table {
11251125
margin-bottom: 1em;
11261126
--- src/default.css
+++ src/default.css
@@ -1114,12 +1114,12 @@
1114 div.setup_forum-column {
1115 display: flex;
1116 flex-direction: column;
1117 }
1118
1119 body.forum div.forumPosts table tr.pinned > td:nth-child(2):before {
1120 content: "📌 ";
1121 font-size: 120%;
1122 }
1123
1124 body.cpage-setup_forum > .content table {
1125 margin-bottom: 1em;
1126
--- src/default.css
+++ src/default.css
@@ -1114,12 +1114,12 @@
1114 div.setup_forum-column {
1115 display: flex;
1116 flex-direction: column;
1117 }
1118
1119 body.forum div.forumPosts table tr.pinned > td.subject:before {
1120 content: "📌 "/*this space works around an unsightly FF quirk*/;
1121 font-size: 120%;
1122 }
1123
1124 body.cpage-setup_forum > .content table {
1125 margin-bottom: 1em;
1126
+5 -5
--- src/forum.c
+++ src/forum.c
@@ -2295,24 +2295,24 @@
22952295
@ &darr; Older...</a></td></tr>
22962296
fossil_free(zAge);
22972297
break;
22982298
}
22992299
@ <tr%s(bPinned ? " class='pinned'" : "")><td>%h(zAge) ago</td>
2300
- @ <td>%z(href("%R/forumpost/%S",zUuid))%h(zTitle)</a></td>
2301
- @ <td>\
2300
+ @ <td class='subject'>%z(href("%R/forumpost/%S",zUuid))%h(zTitle)</a>\
2301
+ @ </td><td>\
23022302
if( g.perm.ModForum && moderation_pending(db_column_int(&q,5)) ){
23032303
@ <span class="modpending">\
23042304
@ Awaiting Moderator Approval</span><br>
23052305
}
23062306
if( nMsg<2 ){
2307
- @ no replies</td>
2307
+ @ no replies\
23082308
}else{
23092309
char *zDuration = human_readable_age(db_column_double(&q,1));
2310
- @ %d(nMsg) posts spanning %h(zDuration)</td>
2310
+ @ %d(nMsg) posts spanning %h(zDuration)\
23112311
fossil_free(zDuration);
23122312
}
2313
- @ </tr>
2313
+ @ </td></tr>
23142314
fossil_free(zAge);
23152315
}
23162316
db_finalize(&q);
23172317
}
23182318
if( iCnt>0 ){
23192319
--- src/forum.c
+++ src/forum.c
@@ -2295,24 +2295,24 @@
2295 @ &darr; Older...</a></td></tr>
2296 fossil_free(zAge);
2297 break;
2298 }
2299 @ <tr%s(bPinned ? " class='pinned'" : "")><td>%h(zAge) ago</td>
2300 @ <td>%z(href("%R/forumpost/%S",zUuid))%h(zTitle)</a></td>
2301 @ <td>\
2302 if( g.perm.ModForum && moderation_pending(db_column_int(&q,5)) ){
2303 @ <span class="modpending">\
2304 @ Awaiting Moderator Approval</span><br>
2305 }
2306 if( nMsg<2 ){
2307 @ no replies</td>
2308 }else{
2309 char *zDuration = human_readable_age(db_column_double(&q,1));
2310 @ %d(nMsg) posts spanning %h(zDuration)</td>
2311 fossil_free(zDuration);
2312 }
2313 @ </tr>
2314 fossil_free(zAge);
2315 }
2316 db_finalize(&q);
2317 }
2318 if( iCnt>0 ){
2319
--- src/forum.c
+++ src/forum.c
@@ -2295,24 +2295,24 @@
2295 @ &darr; Older...</a></td></tr>
2296 fossil_free(zAge);
2297 break;
2298 }
2299 @ <tr%s(bPinned ? " class='pinned'" : "")><td>%h(zAge) ago</td>
2300 @ <td class='subject'>%z(href("%R/forumpost/%S",zUuid))%h(zTitle)</a>\
2301 @ </td><td>\
2302 if( g.perm.ModForum && moderation_pending(db_column_int(&q,5)) ){
2303 @ <span class="modpending">\
2304 @ Awaiting Moderator Approval</span><br>
2305 }
2306 if( nMsg<2 ){
2307 @ no replies\
2308 }else{
2309 char *zDuration = human_readable_age(db_column_double(&q,1));
2310 @ %d(nMsg) posts spanning %h(zDuration)\
2311 fossil_free(zDuration);
2312 }
2313 @ </td></tr>
2314 fossil_free(zAge);
2315 }
2316 db_finalize(&q);
2317 }
2318 if( iCnt>0 ){
2319

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button