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.
Commit
72ac51e06990a0a8a8226bdc79fcd991f523417e4b4381cafd4c0bee47725779
Parent
6c9900dad57a1f0…
2 files changed
+2
-2
+5
-5
+2
-2
| --- src/default.css | ||
| +++ src/default.css | ||
| @@ -1114,12 +1114,12 @@ | ||
| 1114 | 1114 | div.setup_forum-column { |
| 1115 | 1115 | display: flex; |
| 1116 | 1116 | flex-direction: column; |
| 1117 | 1117 | } |
| 1118 | 1118 | |
| 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*/; | |
| 1121 | 1121 | font-size: 120%; |
| 1122 | 1122 | } |
| 1123 | 1123 | |
| 1124 | 1124 | body.cpage-setup_forum > .content table { |
| 1125 | 1125 | margin-bottom: 1em; |
| 1126 | 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: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 @@ | ||
| 2295 | 2295 | @ ↓ Older...</a></td></tr> |
| 2296 | 2296 | fossil_free(zAge); |
| 2297 | 2297 | break; |
| 2298 | 2298 | } |
| 2299 | 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>\ | |
| 2300 | + @ <td class='subject'>%z(href("%R/forumpost/%S",zUuid))%h(zTitle)</a>\ | |
| 2301 | + @ </td><td>\ | |
| 2302 | 2302 | if( g.perm.ModForum && moderation_pending(db_column_int(&q,5)) ){ |
| 2303 | 2303 | @ <span class="modpending">\ |
| 2304 | 2304 | @ Awaiting Moderator Approval</span><br> |
| 2305 | 2305 | } |
| 2306 | 2306 | if( nMsg<2 ){ |
| 2307 | - @ no replies</td> | |
| 2307 | + @ no replies\ | |
| 2308 | 2308 | }else{ |
| 2309 | 2309 | 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)\ | |
| 2311 | 2311 | fossil_free(zDuration); |
| 2312 | 2312 | } |
| 2313 | - @ </tr> | |
| 2313 | + @ </td></tr> | |
| 2314 | 2314 | fossil_free(zAge); |
| 2315 | 2315 | } |
| 2316 | 2316 | db_finalize(&q); |
| 2317 | 2317 | } |
| 2318 | 2318 | if( iCnt>0 ){ |
| 2319 | 2319 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -2295,24 +2295,24 @@ | |
| 2295 | @ ↓ 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 | @ ↓ 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 |