Fossil SCM

Use CSS flex layout around the /forum editor textarea so that it will shrink and grow to fit the screen. The intent is making it easier to use on a mobile device.

stephan 2024-09-07 11:06 trunk
Commit 268bb7394713e22ee4ab5cf9c1073be6b9d83eaa7f261c612d8c459ac2a32bac
2 files changed +12 -1 +3 -2
+12 -1
--- src/default.css
+++ src/default.css
@@ -905,10 +905,17 @@
905905
padding: 1px;
906906
}
907907
div.forum_body p {
908908
margin-top: 0;
909909
}
910
+div.forum-editor-widget{
911
+ display: flex;
912
+ flex-direction: column;
913
+}
914
+div.forum-editor-widget > textarea {
915
+ max-width: initial;
916
+}
910917
td.form_label {
911918
vertical-align: top;
912919
text-align: right;
913920
}
914921
.debug {
@@ -966,12 +973,16 @@
966973
div.forumpost-single-controls {
967974
/* UI controls along the bottom of a single post
968975
** in the thread view. */
969976
}
970977
.forum div > form {
978
+ width: 100%;
971979
margin: 0.5em 0;
972
- display: inline-block;
980
+ display: block;
981
+}
982
+.forum div > form > * {
983
+ margin-bottom: 0.35em;
973984
}
974985
.forum-post-collapser {
975986
/* Common style for the bottom-of-post and right-of-post
976987
expand/collapse widgets. */
977988
font-size: 0.8em;
978989
--- src/default.css
+++ src/default.css
@@ -905,10 +905,17 @@
905 padding: 1px;
906 }
907 div.forum_body p {
908 margin-top: 0;
909 }
 
 
 
 
 
 
 
910 td.form_label {
911 vertical-align: top;
912 text-align: right;
913 }
914 .debug {
@@ -966,12 +973,16 @@
966 div.forumpost-single-controls {
967 /* UI controls along the bottom of a single post
968 ** in the thread view. */
969 }
970 .forum div > form {
 
971 margin: 0.5em 0;
972 display: inline-block;
 
 
 
973 }
974 .forum-post-collapser {
975 /* Common style for the bottom-of-post and right-of-post
976 expand/collapse widgets. */
977 font-size: 0.8em;
978
--- src/default.css
+++ src/default.css
@@ -905,10 +905,17 @@
905 padding: 1px;
906 }
907 div.forum_body p {
908 margin-top: 0;
909 }
910 div.forum-editor-widget{
911 display: flex;
912 flex-direction: column;
913 }
914 div.forum-editor-widget > textarea {
915 max-width: initial;
916 }
917 td.form_label {
918 vertical-align: top;
919 text-align: right;
920 }
921 .debug {
@@ -966,12 +973,16 @@
973 div.forumpost-single-controls {
974 /* UI controls along the bottom of a single post
975 ** in the thread view. */
976 }
977 .forum div > form {
978 width: 100%;
979 margin: 0.5em 0;
980 display: block;
981 }
982 .forum div > form > * {
983 margin-bottom: 0.35em;
984 }
985 .forum-post-collapser {
986 /* Common style for the bottom-of-post and right-of-post
987 expand/collapse widgets. */
988 font-size: 0.8em;
989
+3 -2
--- src/forum.c
+++ src/forum.c
@@ -1397,12 +1397,13 @@
13971397
@ Title: <input type="input" name="title" value="%h(zTitle)" size="50"
13981398
@ maxlength="125"><br>
13991399
}
14001400
@ %z(href("%R/markup_help"))Markup style</a>:
14011401
mimetype_option_menu(zMimetype, "mimetype");
1402
- @ <br><textarea aria-label="Content:" name="content" class="wikiedit" \
1403
- @ cols="80" rows="25" wrap="virtual">%h(zContent)</textarea><br>
1402
+ @ <div class="forum-editor-widget">
1403
+ @ <textarea aria-label="Content:" name="content" class="wikiedit" \
1404
+ @ cols="80" rows="25" wrap="virtual">%h(zContent)</textarea></div>
14041405
}
14051406
14061407
/*
14071408
** WEBPAGE: forumpost_close hidden
14081409
** WEBPAGE: forumpost_reopen hidden
14091410
--- src/forum.c
+++ src/forum.c
@@ -1397,12 +1397,13 @@
1397 @ Title: <input type="input" name="title" value="%h(zTitle)" size="50"
1398 @ maxlength="125"><br>
1399 }
1400 @ %z(href("%R/markup_help"))Markup style</a>:
1401 mimetype_option_menu(zMimetype, "mimetype");
1402 @ <br><textarea aria-label="Content:" name="content" class="wikiedit" \
1403 @ cols="80" rows="25" wrap="virtual">%h(zContent)</textarea><br>
 
1404 }
1405
1406 /*
1407 ** WEBPAGE: forumpost_close hidden
1408 ** WEBPAGE: forumpost_reopen hidden
1409
--- src/forum.c
+++ src/forum.c
@@ -1397,12 +1397,13 @@
1397 @ Title: <input type="input" name="title" value="%h(zTitle)" size="50"
1398 @ maxlength="125"><br>
1399 }
1400 @ %z(href("%R/markup_help"))Markup style</a>:
1401 mimetype_option_menu(zMimetype, "mimetype");
1402 @ <div class="forum-editor-widget">
1403 @ <textarea aria-label="Content:" name="content" class="wikiedit" \
1404 @ cols="80" rows="25" wrap="virtual">%h(zContent)</textarea></div>
1405 }
1406
1407 /*
1408 ** WEBPAGE: forumpost_close hidden
1409 ** WEBPAGE: forumpost_reopen hidden
1410

Keyboard Shortcuts

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