Fossil SCM

layout sideboxes using css, css is only added to the user defined css, if the corresponding class is missing

wolfgang 2010-09-08 18:16 wolfgangFormat2CSS
Commit b34a583f32dd24c601396c73d453c029e0f3f48a
2 files changed +2 -1 +14 -9
+2 -1
--- src/setup.c
+++ src/setup.c
@@ -910,11 +910,12 @@
910910
@ See also the <a href="setup_header">header</a> and
911911
@ <a href="setup_footer">footer</a> editing screens.
912912
@ <blockquote><pre>
913913
@ %h(zDefaultCSS)
914914
@ %h(zTableLabelValueCSS)
915
- @ %h(zDivNomenclatureSidebox)
915
+ @ %h(zDivSidebox)
916
+ @ %h(zDivSideboxTitle)
916917
@ </pre></blockquote>
917918
style_footer();
918919
db_end_transaction(0);
919920
}
920921
921922
--- src/setup.c
+++ src/setup.c
@@ -910,11 +910,12 @@
910 @ See also the <a href="setup_header">header</a> and
911 @ <a href="setup_footer">footer</a> editing screens.
912 @ <blockquote><pre>
913 @ %h(zDefaultCSS)
914 @ %h(zTableLabelValueCSS)
915 @ %h(zDivNomenclatureSidebox)
 
916 @ </pre></blockquote>
917 style_footer();
918 db_end_transaction(0);
919 }
920
921
--- src/setup.c
+++ src/setup.c
@@ -910,11 +910,12 @@
910 @ See also the <a href="setup_header">header</a> and
911 @ <a href="setup_footer">footer</a> editing screens.
912 @ <blockquote><pre>
913 @ %h(zDefaultCSS)
914 @ %h(zTableLabelValueCSS)
915 @ %h(zDivSidebox)
916 @ %h(zDivSideboxTitle)
917 @ </pre></blockquote>
918 style_footer();
919 db_end_transaction(0);
920 }
921
922
+14 -9
--- src/style.c
+++ src/style.c
@@ -160,20 +160,18 @@
160160
** Begin a side-box on the right-hand side of a page. The title and
161161
** the width of the box are given as arguments. The width is usually
162162
** a percentage of total screen width.
163163
*/
164164
void style_sidebox_begin(const char *zTitle, const char *zWidth){
165
- @ <table width="%s(zWidth)" align="right" border="1" cellpadding=5
166
- @ vspace=5 hspace=5>
167
- @ <tr><td>
168
- @ <b>%h(zTitle)</b>
165
+ @ <div class="sidebox" style="width:%s(zWidth)">
166
+ @ <div class="sideboxTitle">%h(zTitle)</div>
169167
}
170168
171169
/* End the side-box
172170
*/
173171
void style_sidebox_end(void){
174
- @ </td></tr></table>
172
+ @ </div>
175173
}
176174
177175
/* @-comment: // */
178176
/*
179177
** The default page header.
@@ -385,19 +383,25 @@
385383
@ vertical-align: top;
386384
@ text-align: right;
387385
@ padding: 0.2ex 2ex;
388386
@ }
389387
;
390
-const char zDivNomenclatureSidebox[] =
388
+const char zDivSidebox[] =
391389
@ /* The nomenclature sidebox for branches,.. */
392
-@ div.nomenclatureSidebox {
390
+@ div.sidebox {
393391
@ float: right;
394
-@ width: 33%;
395392
@ border-width: medium;
396393
@ border-style: double;
397394
@ margin: 10;
398395
@ }
396
+;
397
+const char zDivSideboxTitle[] =
398
+@ /* The nomenclature title in sideboxes for branches,.. */
399
+@ div.sideboxTitle {
400
+@ display: inline;
401
+@ font-weight: bold;
402
+@ }
399403
;
400404
401405
/*
402406
** WEBPAGE: style.css
403407
*/
@@ -409,11 +413,12 @@
409413
zCSS = db_get("css",(char*)zDefaultCSS);
410414
/* append user defined css */
411415
cgi_append_content(zCSS, -1);
412416
/* add special missing definitions */
413417
if (!strstr("table.label-value",zCSS)) cgi_append_content(zTableLabelValueCSS, -1);
414
- if (!strstr("div.nomenclatureSidebox",zCSS)) cgi_append_content(zDivNomenclatureSidebox, -1);
418
+ if (!strstr("div.sidebox",zCSS)) cgi_append_content(zDivSidebox, -1);
419
+ if (!strstr("div.sideboxTitle",zCSS)) cgi_append_content(zDivSideboxTitle, -1);
415420
g.isConst = 1;
416421
}
417422
418423
/*
419424
** WEBPAGE: test_env
420425
--- src/style.c
+++ src/style.c
@@ -160,20 +160,18 @@
160 ** Begin a side-box on the right-hand side of a page. The title and
161 ** the width of the box are given as arguments. The width is usually
162 ** a percentage of total screen width.
163 */
164 void style_sidebox_begin(const char *zTitle, const char *zWidth){
165 @ <table width="%s(zWidth)" align="right" border="1" cellpadding=5
166 @ vspace=5 hspace=5>
167 @ <tr><td>
168 @ <b>%h(zTitle)</b>
169 }
170
171 /* End the side-box
172 */
173 void style_sidebox_end(void){
174 @ </td></tr></table>
175 }
176
177 /* @-comment: // */
178 /*
179 ** The default page header.
@@ -385,19 +383,25 @@
385 @ vertical-align: top;
386 @ text-align: right;
387 @ padding: 0.2ex 2ex;
388 @ }
389 ;
390 const char zDivNomenclatureSidebox[] =
391 @ /* The nomenclature sidebox for branches,.. */
392 @ div.nomenclatureSidebox {
393 @ float: right;
394 @ width: 33%;
395 @ border-width: medium;
396 @ border-style: double;
397 @ margin: 10;
398 @ }
 
 
 
 
 
 
 
399 ;
400
401 /*
402 ** WEBPAGE: style.css
403 */
@@ -409,11 +413,12 @@
409 zCSS = db_get("css",(char*)zDefaultCSS);
410 /* append user defined css */
411 cgi_append_content(zCSS, -1);
412 /* add special missing definitions */
413 if (!strstr("table.label-value",zCSS)) cgi_append_content(zTableLabelValueCSS, -1);
414 if (!strstr("div.nomenclatureSidebox",zCSS)) cgi_append_content(zDivNomenclatureSidebox, -1);
 
415 g.isConst = 1;
416 }
417
418 /*
419 ** WEBPAGE: test_env
420
--- src/style.c
+++ src/style.c
@@ -160,20 +160,18 @@
160 ** Begin a side-box on the right-hand side of a page. The title and
161 ** the width of the box are given as arguments. The width is usually
162 ** a percentage of total screen width.
163 */
164 void style_sidebox_begin(const char *zTitle, const char *zWidth){
165 @ <div class="sidebox" style="width:%s(zWidth)">
166 @ <div class="sideboxTitle">%h(zTitle)</div>
 
 
167 }
168
169 /* End the side-box
170 */
171 void style_sidebox_end(void){
172 @ </div>
173 }
174
175 /* @-comment: // */
176 /*
177 ** The default page header.
@@ -385,19 +383,25 @@
383 @ vertical-align: top;
384 @ text-align: right;
385 @ padding: 0.2ex 2ex;
386 @ }
387 ;
388 const char zDivSidebox[] =
389 @ /* The nomenclature sidebox for branches,.. */
390 @ div.sidebox {
391 @ float: right;
 
392 @ border-width: medium;
393 @ border-style: double;
394 @ margin: 10;
395 @ }
396 ;
397 const char zDivSideboxTitle[] =
398 @ /* The nomenclature title in sideboxes for branches,.. */
399 @ div.sideboxTitle {
400 @ display: inline;
401 @ font-weight: bold;
402 @ }
403 ;
404
405 /*
406 ** WEBPAGE: style.css
407 */
@@ -409,11 +413,12 @@
413 zCSS = db_get("css",(char*)zDefaultCSS);
414 /* append user defined css */
415 cgi_append_content(zCSS, -1);
416 /* add special missing definitions */
417 if (!strstr("table.label-value",zCSS)) cgi_append_content(zTableLabelValueCSS, -1);
418 if (!strstr("div.sidebox",zCSS)) cgi_append_content(zDivSidebox, -1);
419 if (!strstr("div.sideboxTitle",zCSS)) cgi_append_content(zDivSideboxTitle, -1);
420 g.isConst = 1;
421 }
422
423 /*
424 ** WEBPAGE: test_env
425

Keyboard Shortcuts

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