Fossil SCM

Add CSS classes for the forum post labels.

drh 2020-03-14 14:07 forum-post-headers
Commit ff3365e83e508587d7c1673b81f7d693e94536c4bbd7ebe0495c71369f888211
1 file changed +11 -10
+11 -10
--- src/forum.c
+++ src/forum.c
@@ -362,11 +362,11 @@
362362
}
363363
if( pPost->zThreadTitle ){
364364
@ <h1>%h(pPost->zThreadTitle)</h1>
365365
}
366366
zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
367
- @ <h3>(%d(p->sid)) By %h(pPost->zUser) on %h(zDate)
367
+ @ <h3 class='forumPostHdr'>(%d(p->sid)) By %h(pPost->zUser) on %h(zDate)
368368
fossil_free(zDate);
369369
if( p->pEdit ){
370370
@ edit of %z(href("%R/forumpost/%S?t=c",p->pEdit->zUuid))\
371371
@ %d(p->pEdit->sid)</a>
372372
}
@@ -481,11 +481,12 @@
481481
if( pPost==0 ) continue;
482482
if( pPost->zThreadTitle ){
483483
@ <h1>%h(pPost->zThreadTitle)</h1>
484484
}
485485
zDate = db_text(0, "SELECT datetime(%.17g)", pOPost->rDate);
486
- @ <h3>(%d(p->pLeaf?p->pLeaf->sid:p->sid)) By %h(pOPost->zUser) on %h(zDate)
486
+ @ <h3 class='forumPostHdr'>\
487
+ @ (%d(p->pLeaf?p->pLeaf->sid:p->sid)) By %h(pOPost->zUser) on %h(zDate)
487488
fossil_free(zDate);
488489
if( g.perm.Debug ){
489490
@ <span class="debug">\
490491
@ <a href="%R/artifact/%h(p->zUuid)">(artifact)</a></span>
491492
}
@@ -1016,18 +1017,18 @@
10161017
if( zMimetype==0 ) zMimetype = fossil_strdup(pPost->zMimetype);
10171018
if( zTitle==0 && pPost->zThreadTitle!=0 ){
10181019
zTitle = fossil_strdup(pPost->zThreadTitle);
10191020
}
10201021
style_header("Edit %s", zTitle ? "Post" : "Reply");
1021
- @ <h1>Original Post:</h1>
1022
+ @ <h2>Original Post:</h2>
10221023
forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
10231024
"forumEdit");
10241025
if( P("preview") ){
1025
- @ <h1>Preview of Edited Post:</h1>
1026
+ @ <h2>Preview of Edited Post:</h2>
10261027
forum_render(zTitle, zMimetype, zContent,"forumEdit");
10271028
}
1028
- @ <h1>Revised Message:</h1>
1029
+ @ <h2>Revised Message:</h2>
10291030
@ <form action="%R/forume2" method="POST">
10301031
@ <input type="hidden" name="fpid" value="%h(P("fpid"))">
10311032
@ <input type="hidden" name="edit" value="1">
10321033
forum_from_line();
10331034
forum_entry_widget(zTitle, zMimetype, zContent);
@@ -1034,23 +1035,23 @@
10341035
}else{
10351036
/* Reply */
10361037
zMimetype = PD("mimetype",DEFAULT_FORUM_MIMETYPE);
10371038
zContent = PDT("content","");
10381039
style_header("Reply");
1039
- @ <h1>Replying To:</h1>
10401040
if( pRootPost->zThreadTitle ){
1041
- @ <h3>%h(pRootPost->zThreadTitle)</h3>
1041
+ @ <h1>Thread: %h(pRootPost->zThreadTitle)</h1>
10421042
}
1043
+ @ <h2>Replying To:</h2>
10431044
zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
1044
- @ <p>%h(pPost->zThreadTitle ? "Post" : "Reply") by %h(pPost->zUser) on %h(zDate)
1045
+ @ <h3 class='forumPostHdr'>By %h(pPost->zUser) on %h(zDate)</h3>
10451046
fossil_free(zDate);
10461047
forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit");
10471048
if( P("preview") ){
1048
- @ <h1>Preview:</h1>
1049
+ @ <h2>Preview:</h2>
10491050
forum_render(0, zMimetype,zContent, "forumEdit");
10501051
}
1051
- @ <h1>Enter Reply:</h1>
1052
+ @ <h2>Enter Reply:</h2>
10521053
@ <form action="%R/forume2" method="POST">
10531054
@ <input type="hidden" name="fpid" value="%h(P("fpid"))">
10541055
@ <input type="hidden" name="reply" value="1">
10551056
forum_from_line();
10561057
forum_entry_widget(0, zMimetype, zContent);
10571058
--- src/forum.c
+++ src/forum.c
@@ -362,11 +362,11 @@
362 }
363 if( pPost->zThreadTitle ){
364 @ <h1>%h(pPost->zThreadTitle)</h1>
365 }
366 zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
367 @ <h3>(%d(p->sid)) By %h(pPost->zUser) on %h(zDate)
368 fossil_free(zDate);
369 if( p->pEdit ){
370 @ edit of %z(href("%R/forumpost/%S?t=c",p->pEdit->zUuid))\
371 @ %d(p->pEdit->sid)</a>
372 }
@@ -481,11 +481,12 @@
481 if( pPost==0 ) continue;
482 if( pPost->zThreadTitle ){
483 @ <h1>%h(pPost->zThreadTitle)</h1>
484 }
485 zDate = db_text(0, "SELECT datetime(%.17g)", pOPost->rDate);
486 @ <h3>(%d(p->pLeaf?p->pLeaf->sid:p->sid)) By %h(pOPost->zUser) on %h(zDate)
 
487 fossil_free(zDate);
488 if( g.perm.Debug ){
489 @ <span class="debug">\
490 @ <a href="%R/artifact/%h(p->zUuid)">(artifact)</a></span>
491 }
@@ -1016,18 +1017,18 @@
1016 if( zMimetype==0 ) zMimetype = fossil_strdup(pPost->zMimetype);
1017 if( zTitle==0 && pPost->zThreadTitle!=0 ){
1018 zTitle = fossil_strdup(pPost->zThreadTitle);
1019 }
1020 style_header("Edit %s", zTitle ? "Post" : "Reply");
1021 @ <h1>Original Post:</h1>
1022 forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1023 "forumEdit");
1024 if( P("preview") ){
1025 @ <h1>Preview of Edited Post:</h1>
1026 forum_render(zTitle, zMimetype, zContent,"forumEdit");
1027 }
1028 @ <h1>Revised Message:</h1>
1029 @ <form action="%R/forume2" method="POST">
1030 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1031 @ <input type="hidden" name="edit" value="1">
1032 forum_from_line();
1033 forum_entry_widget(zTitle, zMimetype, zContent);
@@ -1034,23 +1035,23 @@
1034 }else{
1035 /* Reply */
1036 zMimetype = PD("mimetype",DEFAULT_FORUM_MIMETYPE);
1037 zContent = PDT("content","");
1038 style_header("Reply");
1039 @ <h1>Replying To:</h1>
1040 if( pRootPost->zThreadTitle ){
1041 @ <h3>%h(pRootPost->zThreadTitle)</h3>
1042 }
 
1043 zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
1044 @ <p>%h(pPost->zThreadTitle ? "Post" : "Reply") by %h(pPost->zUser) on %h(zDate)
1045 fossil_free(zDate);
1046 forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit");
1047 if( P("preview") ){
1048 @ <h1>Preview:</h1>
1049 forum_render(0, zMimetype,zContent, "forumEdit");
1050 }
1051 @ <h1>Enter Reply:</h1>
1052 @ <form action="%R/forume2" method="POST">
1053 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1054 @ <input type="hidden" name="reply" value="1">
1055 forum_from_line();
1056 forum_entry_widget(0, zMimetype, zContent);
1057
--- src/forum.c
+++ src/forum.c
@@ -362,11 +362,11 @@
362 }
363 if( pPost->zThreadTitle ){
364 @ <h1>%h(pPost->zThreadTitle)</h1>
365 }
366 zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
367 @ <h3 class='forumPostHdr'>(%d(p->sid)) By %h(pPost->zUser) on %h(zDate)
368 fossil_free(zDate);
369 if( p->pEdit ){
370 @ edit of %z(href("%R/forumpost/%S?t=c",p->pEdit->zUuid))\
371 @ %d(p->pEdit->sid)</a>
372 }
@@ -481,11 +481,12 @@
481 if( pPost==0 ) continue;
482 if( pPost->zThreadTitle ){
483 @ <h1>%h(pPost->zThreadTitle)</h1>
484 }
485 zDate = db_text(0, "SELECT datetime(%.17g)", pOPost->rDate);
486 @ <h3 class='forumPostHdr'>\
487 @ (%d(p->pLeaf?p->pLeaf->sid:p->sid)) By %h(pOPost->zUser) on %h(zDate)
488 fossil_free(zDate);
489 if( g.perm.Debug ){
490 @ <span class="debug">\
491 @ <a href="%R/artifact/%h(p->zUuid)">(artifact)</a></span>
492 }
@@ -1016,18 +1017,18 @@
1017 if( zMimetype==0 ) zMimetype = fossil_strdup(pPost->zMimetype);
1018 if( zTitle==0 && pPost->zThreadTitle!=0 ){
1019 zTitle = fossil_strdup(pPost->zThreadTitle);
1020 }
1021 style_header("Edit %s", zTitle ? "Post" : "Reply");
1022 @ <h2>Original Post:</h2>
1023 forum_render(pPost->zThreadTitle, pPost->zMimetype, pPost->zWiki,
1024 "forumEdit");
1025 if( P("preview") ){
1026 @ <h2>Preview of Edited Post:</h2>
1027 forum_render(zTitle, zMimetype, zContent,"forumEdit");
1028 }
1029 @ <h2>Revised Message:</h2>
1030 @ <form action="%R/forume2" method="POST">
1031 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1032 @ <input type="hidden" name="edit" value="1">
1033 forum_from_line();
1034 forum_entry_widget(zTitle, zMimetype, zContent);
@@ -1034,23 +1035,23 @@
1035 }else{
1036 /* Reply */
1037 zMimetype = PD("mimetype",DEFAULT_FORUM_MIMETYPE);
1038 zContent = PDT("content","");
1039 style_header("Reply");
 
1040 if( pRootPost->zThreadTitle ){
1041 @ <h1>Thread: %h(pRootPost->zThreadTitle)</h1>
1042 }
1043 @ <h2>Replying To:</h2>
1044 zDate = db_text(0, "SELECT datetime(%.17g)", pPost->rDate);
1045 @ <h3 class='forumPostHdr'>By %h(pPost->zUser) on %h(zDate)</h3>
1046 fossil_free(zDate);
1047 forum_render(0, pPost->zMimetype, pPost->zWiki, "forumEdit");
1048 if( P("preview") ){
1049 @ <h2>Preview:</h2>
1050 forum_render(0, zMimetype,zContent, "forumEdit");
1051 }
1052 @ <h2>Enter Reply:</h2>
1053 @ <form action="%R/forume2" method="POST">
1054 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1055 @ <input type="hidden" name="reply" value="1">
1056 forum_from_line();
1057 forum_entry_widget(0, zMimetype, zContent);
1058

Keyboard Shortcuts

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