Fossil SCM

Simplify and improve the skin-editing capability. Add the new "details.txt" skin file that contains skin settings used on the server-side. Add detail values for selecting white-background, rounded nodes, color graph lines, and for omitting arrowheads on verticle graph lines.

drh 2015-03-30 17:51 trunk merge
Commit 106c0909e45e798ec04f87fb02204d1ccbfd5381
+10 -8
--- skins/README.md
+++ skins/README.md
@@ -1,11 +1,11 @@
11
Built-in Skins
22
==============
33
44
Each subdirectory under this folder describes a built-in "skin".
5
-There are three files in each subdirectory for the CSS, the header,
6
-and the footer for that skin.
5
+There are four files in each subdirectory for the CSS, the "details"
6
+file, the footer, and the header for that skin.
77
88
To improve an existing built-in skin, simply edit the appropriate
99
files and recompile.
1010
1111
To add a new skin:
@@ -12,12 +12,13 @@
1212
1313
1. Create a new subdirectory under skins/. (The new directory is
1414
called "skins/newskin" below but you should use a new original
1515
name, of course.)
1616
17
- 2. Add files skins/newskin/css.txt, skins/newskin/header.txt,
18
- and skins/newskin/footer.txt. Be sure to "fossil add" these files.
17
+ 2. Add files skins/newskin/css.txt, skins/newskin/details.txt,
18
+ skins/newskin/footer.txt and skins/newskin/header.txt.
19
+ Be sure to "fossil add" these files.
1920
2021
3. Go to the src/ directory and rerun "tclsh makemake.tcl". This
2122
step rebuilds the various makefiles so that they have dependencies
2223
on the skin files you just installed.
2324
@@ -28,16 +29,17 @@
2829
2930
Development Hints
3031
-----------------
3132
3233
One way to develop a new skin is to copy the baseline files (css.txt,
33
-footer.txt, and header.txt) into a working directory $WORKDIR then
34
-launch Fossil with a command-line option "--skin $WORKDIR". Example:
34
+details.txt, footer.txt, and header.txt) into a working directory $WORKDIR
35
+then launch Fossil with a command-line option "--skin $WORKDIR". Example:
3536
3637
cp -r skins/default newskin
3738
fossil ui --skin ./newskin
3839
3940
When the argument to --skin contains one or more '/' characters, the
4041
appropriate skin files are read from disk from the directory specified.
4142
So after launching fossil as shown above, you can edit the newskin/css.txt,
42
-newskin/header.txt, and newskin/footer.txt files using your favorite
43
-text editor, then press Reload on your browser to see immediate results.
43
+newskin/details.txt, newskin/footer.txt, and newskin/header.txt files using
44
+your favorite text editor, then press Reload on your browser to see
45
+immediate results.
4446
4547
ADDED skins/aht/details.txt
4648
ADDED skins/black_and_white/details.txt
4749
ADDED skins/blitz/details.txt
4850
ADDED skins/blitz_no_logo/details.txt
4951
ADDED skins/default/details.txt
5052
ADDED skins/eagle/details.txt
5153
ADDED skins/enhanced1/details.txt
5254
ADDED skins/khaki/details.txt
5355
ADDED skins/original/details.txt
5456
ADDED skins/plain_gray/details.txt
5557
ADDED skins/rounded1/details.txt
5658
ADDED skins/xekri/details.txt
--- skins/README.md
+++ skins/README.md
@@ -1,11 +1,11 @@
1 Built-in Skins
2 ==============
3
4 Each subdirectory under this folder describes a built-in "skin".
5 There are three files in each subdirectory for the CSS, the header,
6 and the footer for that skin.
7
8 To improve an existing built-in skin, simply edit the appropriate
9 files and recompile.
10
11 To add a new skin:
@@ -12,12 +12,13 @@
12
13 1. Create a new subdirectory under skins/. (The new directory is
14 called "skins/newskin" below but you should use a new original
15 name, of course.)
16
17 2. Add files skins/newskin/css.txt, skins/newskin/header.txt,
18 and skins/newskin/footer.txt. Be sure to "fossil add" these files.
 
19
20 3. Go to the src/ directory and rerun "tclsh makemake.tcl". This
21 step rebuilds the various makefiles so that they have dependencies
22 on the skin files you just installed.
23
@@ -28,16 +29,17 @@
28
29 Development Hints
30 -----------------
31
32 One way to develop a new skin is to copy the baseline files (css.txt,
33 footer.txt, and header.txt) into a working directory $WORKDIR then
34 launch Fossil with a command-line option "--skin $WORKDIR". Example:
35
36 cp -r skins/default newskin
37 fossil ui --skin ./newskin
38
39 When the argument to --skin contains one or more '/' characters, the
40 appropriate skin files are read from disk from the directory specified.
41 So after launching fossil as shown above, you can edit the newskin/css.txt,
42 newskin/header.txt, and newskin/footer.txt files using your favorite
43 text editor, then press Reload on your browser to see immediate results.
 
44
45 DDED skins/aht/details.txt
46 DDED skins/black_and_white/details.txt
47 DDED skins/blitz/details.txt
48 DDED skins/blitz_no_logo/details.txt
49 DDED skins/default/details.txt
50 DDED skins/eagle/details.txt
51 DDED skins/enhanced1/details.txt
52 DDED skins/khaki/details.txt
53 DDED skins/original/details.txt
54 DDED skins/plain_gray/details.txt
55 DDED skins/rounded1/details.txt
56 DDED skins/xekri/details.txt
--- skins/README.md
+++ skins/README.md
@@ -1,11 +1,11 @@
1 Built-in Skins
2 ==============
3
4 Each subdirectory under this folder describes a built-in "skin".
5 There are four files in each subdirectory for the CSS, the "details"
6 file, the footer, and the header for that skin.
7
8 To improve an existing built-in skin, simply edit the appropriate
9 files and recompile.
10
11 To add a new skin:
@@ -12,12 +12,13 @@
12
13 1. Create a new subdirectory under skins/. (The new directory is
14 called "skins/newskin" below but you should use a new original
15 name, of course.)
16
17 2. Add files skins/newskin/css.txt, skins/newskin/details.txt,
18 skins/newskin/footer.txt and skins/newskin/header.txt.
19 Be sure to "fossil add" these files.
20
21 3. Go to the src/ directory and rerun "tclsh makemake.tcl". This
22 step rebuilds the various makefiles so that they have dependencies
23 on the skin files you just installed.
24
@@ -28,16 +29,17 @@
29
30 Development Hints
31 -----------------
32
33 One way to develop a new skin is to copy the baseline files (css.txt,
34 details.txt, footer.txt, and header.txt) into a working directory $WORKDIR
35 then launch Fossil with a command-line option "--skin $WORKDIR". Example:
36
37 cp -r skins/default newskin
38 fossil ui --skin ./newskin
39
40 When the argument to --skin contains one or more '/' characters, the
41 appropriate skin files are read from disk from the directory specified.
42 So after launching fossil as shown above, you can edit the newskin/css.txt,
43 newskin/details.txt, newskin/footer.txt, and newskin/header.txt files using
44 your favorite text editor, then press Reload on your browser to see
45 immediate results.
46
47 DDED skins/aht/details.txt
48 DDED skins/black_and_white/details.txt
49 DDED skins/blitz/details.txt
50 DDED skins/blitz_no_logo/details.txt
51 DDED skins/default/details.txt
52 DDED skins/eagle/details.txt
53 DDED skins/enhanced1/details.txt
54 DDED skins/khaki/details.txt
55 DDED skins/original/details.txt
56 DDED skins/plain_gray/details.txt
57 DDED skins/rounded1/details.txt
58 DDED skins/xekri/details.txt
--- a/skins/aht/details.txt
+++ b/skins/aht/details.txt
@@ -0,0 +1,3 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 0
3
+timeline-color-graph-lines: 0
--- a/skins/aht/details.txt
+++ b/skins/aht/details.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/aht/details.txt
+++ b/skins/aht/details.txt
@@ -0,0 +1,3 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 0
3 timeline-color-graph-lines: 0
--- a/skins/black_and_white/details.txt
+++ b/skins/black_and_white/details.txt
@@ -0,0 +1,3 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 0
3
+timeline-color-graph-lines: 0
--- a/skins/black_and_white/details.txt
+++ b/skins/black_and_white/details.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/black_and_white/details.txt
+++ b/skins/black_and_white/details.txt
@@ -0,0 +1,3 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 0
3 timeline-color-graph-lines: 0
--- a/skins/blitz/details.txt
+++ b/skins/blitz/details.txt
@@ -0,0 +1,3 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 0
3
+timeline-color-graph-lines: 0
--- a/skins/blitz/details.txt
+++ b/skins/blitz/details.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/blitz/details.txt
+++ b/skins/blitz/details.txt
@@ -0,0 +1,3 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 0
3 timeline-color-graph-lines: 0
--- a/skins/blitz_no_logo/details.txt
+++ b/skins/blitz_no_logo/details.txt
@@ -0,0 +1,3 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 0
3
+timeline-color-graph-lines: 0
--- a/skins/blitz_no_logo/details.txt
+++ b/skins/blitz_no_logo/details.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/blitz_no_logo/details.txt
+++ b/skins/blitz_no_logo/details.txt
@@ -0,0 +1,3 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 0
3 timeline-color-graph-lines: 0
--- a/skins/default/details.txt
+++ b/skins/default/details.txt
@@ -0,0 +1,3 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 0
3
+timeline-color-graph-lines: 0
--- a/skins/default/details.txt
+++ b/skins/default/details.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/default/details.txt
+++ b/skins/default/details.txt
@@ -0,0 +1,3 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 0
3 timeline-color-graph-lines: 0
--- a/skins/eagle/details.txt
+++ b/skins/eagle/details.txt
@@ -0,0 +1,4 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 0
3
+timeline-color-graph-lines: 0
4
+whi
--- a/skins/eagle/details.txt
+++ b/skins/eagle/details.txt
@@ -0,0 +1,4 @@
 
 
 
 
--- a/skins/eagle/details.txt
+++ b/skins/eagle/details.txt
@@ -0,0 +1,4 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 0
3 timeline-color-graph-lines: 0
4 whi
--- a/skins/enhanced1/details.txt
+++ b/skins/enhanced1/details.txt
@@ -0,0 +1,3 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 0
3
+timeline-color-graph-lines: 0
--- a/skins/enhanced1/details.txt
+++ b/skins/enhanced1/details.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/enhanced1/details.txt
+++ b/skins/enhanced1/details.txt
@@ -0,0 +1,3 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 0
3 timeline-color-graph-lines: 0
--- a/skins/khaki/details.txt
+++ b/skins/khaki/details.txt
@@ -0,0 +1,3 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 0
3
+timeline-color-graph-lines: 0
--- a/skins/khaki/details.txt
+++ b/skins/khaki/details.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/khaki/details.txt
+++ b/skins/khaki/details.txt
@@ -0,0 +1,3 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 0
3 timeline-color-graph-lines: 0
--- a/skins/original/details.txt
+++ b/skins/original/details.txt
@@ -0,0 +1,3 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 0
3
+timeline-color-graph-lines: 0
--- a/skins/original/details.txt
+++ b/skins/original/details.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/original/details.txt
+++ b/skins/original/details.txt
@@ -0,0 +1,3 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 0
3 timeline-color-graph-lines: 0
--- a/skins/plain_gray/details.txt
+++ b/skins/plain_gray/details.txt
@@ -0,0 +1,3 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 0
3
+timeline-color-graph-lines: 0
--- a/skins/plain_gray/details.txt
+++ b/skins/plain_gray/details.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/plain_gray/details.txt
+++ b/skins/plain_gray/details.txt
@@ -0,0 +1,3 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 0
3 timeline-color-graph-lines: 0
--- a/skins/rounded1/details.txt
+++ b/skins/rounded1/details.txt
@@ -0,0 +1,3 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 0
3
+timeline-color-graph-lines: 0
--- a/skins/rounded1/details.txt
+++ b/skins/rounded1/details.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/rounded1/details.txt
+++ b/skins/rounded1/details.txt
@@ -0,0 +1,3 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 0
3 timeline-color-graph-lines: 0
--- a/skins/xekri/details.txt
+++ b/skins/xekri/details.txt
@@ -0,0 +1,3 @@
1
+timeline-arrowheads: 1
2
+timeline-circle-nodes: 0
3
+timeline-color-graph-lines: 0
--- a/skins/xekri/details.txt
+++ b/skins/xekri/details.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/xekri/details.txt
+++ b/skins/xekri/details.txt
@@ -0,0 +1,3 @@
1 timeline-arrowheads: 1
2 timeline-circle-nodes: 0
3 timeline-color-graph-lines: 0
+4 -4
--- src/captcha.c
+++ src/captcha.c
@@ -28,11 +28,11 @@
2828
#endif
2929
3030
/*
3131
** Convert a hex digit into a value between 0 and 15
3232
*/
33
-static int hexValue(char c){
33
+int hex_digit_value(char c){
3434
if( c>='0' && c<='9' ){
3535
return c - '0';
3636
}else if( c>='a' && c<='f' ){
3737
return c - 'a' + 10;
3838
}else if( c>='A' && c<='F' ){
@@ -75,11 +75,11 @@
7575
int i, j, k, m;
7676
7777
k = 0;
7878
for(i=0; i<6; i++){
7979
for(j=0; zPw[j]; j++){
80
- unsigned char v = hexValue(zPw[j]);
80
+ unsigned char v = hex_digit_value(zPw[j]);
8181
v = (aFont1[v] >> ((5-i)*4)) & 0xf;
8282
for(m=8; m>=1; m = m>>1){
8383
if( v & m ){
8484
z[k++] = 'X';
8585
z[k++] = 'X';
@@ -209,11 +209,11 @@
209209
const char *zChar;
210210
211211
k = 0;
212212
for(i=0; i<4; i++){
213213
for(j=0; zPw[j]; j++){
214
- unsigned char v = hexValue(zPw[j]);
214
+ unsigned char v = hex_digit_value(zPw[j]);
215215
zChar = azFont2[4*v + i];
216216
for(m=0; zChar[m]; m++){
217217
z[k++] = zChar[m];
218218
}
219219
}
@@ -369,11 +369,11 @@
369369
370370
k = 0;
371371
for(i=0; i<6; i++){
372372
x = 0;
373373
for(j=0; zPw[j]; j++){
374
- unsigned char v = hexValue(zPw[j]);
374
+ unsigned char v = hex_digit_value(zPw[j]);
375375
x = (x<<4) + v;
376376
switch( x ){
377377
case 0x7a:
378378
case 0xfa:
379379
y = 3;
380380
--- src/captcha.c
+++ src/captcha.c
@@ -28,11 +28,11 @@
28 #endif
29
30 /*
31 ** Convert a hex digit into a value between 0 and 15
32 */
33 static int hexValue(char c){
34 if( c>='0' && c<='9' ){
35 return c - '0';
36 }else if( c>='a' && c<='f' ){
37 return c - 'a' + 10;
38 }else if( c>='A' && c<='F' ){
@@ -75,11 +75,11 @@
75 int i, j, k, m;
76
77 k = 0;
78 for(i=0; i<6; i++){
79 for(j=0; zPw[j]; j++){
80 unsigned char v = hexValue(zPw[j]);
81 v = (aFont1[v] >> ((5-i)*4)) & 0xf;
82 for(m=8; m>=1; m = m>>1){
83 if( v & m ){
84 z[k++] = 'X';
85 z[k++] = 'X';
@@ -209,11 +209,11 @@
209 const char *zChar;
210
211 k = 0;
212 for(i=0; i<4; i++){
213 for(j=0; zPw[j]; j++){
214 unsigned char v = hexValue(zPw[j]);
215 zChar = azFont2[4*v + i];
216 for(m=0; zChar[m]; m++){
217 z[k++] = zChar[m];
218 }
219 }
@@ -369,11 +369,11 @@
369
370 k = 0;
371 for(i=0; i<6; i++){
372 x = 0;
373 for(j=0; zPw[j]; j++){
374 unsigned char v = hexValue(zPw[j]);
375 x = (x<<4) + v;
376 switch( x ){
377 case 0x7a:
378 case 0xfa:
379 y = 3;
380
--- src/captcha.c
+++ src/captcha.c
@@ -28,11 +28,11 @@
28 #endif
29
30 /*
31 ** Convert a hex digit into a value between 0 and 15
32 */
33 int hex_digit_value(char c){
34 if( c>='0' && c<='9' ){
35 return c - '0';
36 }else if( c>='a' && c<='f' ){
37 return c - 'a' + 10;
38 }else if( c>='A' && c<='F' ){
@@ -75,11 +75,11 @@
75 int i, j, k, m;
76
77 k = 0;
78 for(i=0; i<6; i++){
79 for(j=0; zPw[j]; j++){
80 unsigned char v = hex_digit_value(zPw[j]);
81 v = (aFont1[v] >> ((5-i)*4)) & 0xf;
82 for(m=8; m>=1; m = m>>1){
83 if( v & m ){
84 z[k++] = 'X';
85 z[k++] = 'X';
@@ -209,11 +209,11 @@
209 const char *zChar;
210
211 k = 0;
212 for(i=0; i<4; i++){
213 for(j=0; zPw[j]; j++){
214 unsigned char v = hex_digit_value(zPw[j]);
215 zChar = azFont2[4*v + i];
216 for(m=0; zChar[m]; m++){
217 z[k++] = zChar[m];
218 }
219 }
@@ -369,11 +369,11 @@
369
370 k = 0;
371 for(i=0; i<6; i++){
372 x = 0;
373 for(j=0; zPw[j]; j++){
374 unsigned char v = hex_digit_value(zPw[j]);
375 x = (x<<4) + v;
376 switch( x ){
377 case 0x7a:
378 case 0xfa:
379 y = 3;
380
+1 -1
--- src/configure.c
+++ src/configure.c
@@ -86,10 +86,11 @@
8686
int groupMask; /* Which config groups is it part of */
8787
} aConfig[] = {
8888
{ "css", CONFIGSET_CSS },
8989
{ "header", CONFIGSET_SKIN },
9090
{ "footer", CONFIGSET_SKIN },
91
+ { "details", CONFIGSET_SKIN },
9192
{ "logo-mimetype", CONFIGSET_SKIN },
9293
{ "logo-image", CONFIGSET_SKIN },
9394
{ "background-mimetype", CONFIGSET_SKIN },
9495
{ "background-image", CONFIGSET_SKIN },
9596
{ "timeline-block-markup", CONFIGSET_SKIN },
@@ -96,11 +97,10 @@
9697
{ "timeline-max-comment", CONFIGSET_SKIN },
9798
{ "timeline-plaintext", CONFIGSET_SKIN },
9899
{ "adunit", CONFIGSET_SKIN },
99100
{ "adunit-omit-if-admin", CONFIGSET_SKIN },
100101
{ "adunit-omit-if-user", CONFIGSET_SKIN },
101
- { "white-foreground", CONFIGSET_SKIN },
102102
103103
#ifdef FOSSIL_ENABLE_TH1_DOCS
104104
{ "th1-docs", CONFIGSET_TH1 },
105105
#endif
106106
#ifdef FOSSIL_ENABLE_TH1_HOOKS
107107
--- src/configure.c
+++ src/configure.c
@@ -86,10 +86,11 @@
86 int groupMask; /* Which config groups is it part of */
87 } aConfig[] = {
88 { "css", CONFIGSET_CSS },
89 { "header", CONFIGSET_SKIN },
90 { "footer", CONFIGSET_SKIN },
 
91 { "logo-mimetype", CONFIGSET_SKIN },
92 { "logo-image", CONFIGSET_SKIN },
93 { "background-mimetype", CONFIGSET_SKIN },
94 { "background-image", CONFIGSET_SKIN },
95 { "timeline-block-markup", CONFIGSET_SKIN },
@@ -96,11 +97,10 @@
96 { "timeline-max-comment", CONFIGSET_SKIN },
97 { "timeline-plaintext", CONFIGSET_SKIN },
98 { "adunit", CONFIGSET_SKIN },
99 { "adunit-omit-if-admin", CONFIGSET_SKIN },
100 { "adunit-omit-if-user", CONFIGSET_SKIN },
101 { "white-foreground", CONFIGSET_SKIN },
102
103 #ifdef FOSSIL_ENABLE_TH1_DOCS
104 { "th1-docs", CONFIGSET_TH1 },
105 #endif
106 #ifdef FOSSIL_ENABLE_TH1_HOOKS
107
--- src/configure.c
+++ src/configure.c
@@ -86,10 +86,11 @@
86 int groupMask; /* Which config groups is it part of */
87 } aConfig[] = {
88 { "css", CONFIGSET_CSS },
89 { "header", CONFIGSET_SKIN },
90 { "footer", CONFIGSET_SKIN },
91 { "details", CONFIGSET_SKIN },
92 { "logo-mimetype", CONFIGSET_SKIN },
93 { "logo-image", CONFIGSET_SKIN },
94 { "background-mimetype", CONFIGSET_SKIN },
95 { "background-image", CONFIGSET_SKIN },
96 { "timeline-block-markup", CONFIGSET_SKIN },
@@ -96,11 +97,10 @@
97 { "timeline-max-comment", CONFIGSET_SKIN },
98 { "timeline-plaintext", CONFIGSET_SKIN },
99 { "adunit", CONFIGSET_SKIN },
100 { "adunit-omit-if-admin", CONFIGSET_SKIN },
101 { "adunit-omit-if-user", CONFIGSET_SKIN },
 
102
103 #ifdef FOSSIL_ENABLE_TH1_DOCS
104 { "th1-docs", CONFIGSET_TH1 },
105 #endif
106 #ifdef FOSSIL_ENABLE_TH1_HOOKS
107
-1
--- src/db.c
+++ src/db.c
@@ -2383,11 +2383,10 @@
23832383
{ "th1-hooks", 0, 0, 0, 0, "off" },
23842384
#endif
23852385
{ "th1-setup", 0, 40, 1, 1, "" },
23862386
{ "th1-uri-regexp", 0, 40, 1, 0, "" },
23872387
{ "web-browser", 0, 32, 0, 0, "" },
2388
- { "white-foreground", 0, 0, 0, 0, "off" },
23892388
{ 0,0,0,0,0,0 }
23902389
};
23912390
23922391
/*
23932392
** Look up a control setting by its name. Return a pointer to the Setting
23942393
--- src/db.c
+++ src/db.c
@@ -2383,11 +2383,10 @@
2383 { "th1-hooks", 0, 0, 0, 0, "off" },
2384 #endif
2385 { "th1-setup", 0, 40, 1, 1, "" },
2386 { "th1-uri-regexp", 0, 40, 1, 0, "" },
2387 { "web-browser", 0, 32, 0, 0, "" },
2388 { "white-foreground", 0, 0, 0, 0, "off" },
2389 { 0,0,0,0,0,0 }
2390 };
2391
2392 /*
2393 ** Look up a control setting by its name. Return a pointer to the Setting
2394
--- src/db.c
+++ src/db.c
@@ -2383,11 +2383,10 @@
2383 { "th1-hooks", 0, 0, 0, 0, "off" },
2384 #endif
2385 { "th1-setup", 0, 40, 1, 1, "" },
2386 { "th1-uri-regexp", 0, 40, 1, 0, "" },
2387 { "web-browser", 0, 32, 0, 0, "" },
 
2388 { 0,0,0,0,0,0 }
2389 };
2390
2391 /*
2392 ** Look up a control setting by its name. Return a pointer to the Setting
2393
+1 -1
--- src/diff.c
+++ src/diff.c
@@ -2294,11 +2294,11 @@
22942294
}
22952295
if( iLimit>20 ){
22962296
style_submenu_element("20 Ancestors", "20 Ancestors",
22972297
"%s", url_render(&url, "limit", "20", 0, 0));
22982298
}
2299
- if( skin_white_foreground() ){
2299
+ if( skin_detail_boolean("white-foreground") ){
23002300
clr1 = 0xa04040;
23012301
clr2 = 0x4059a0;
23022302
}else{
23032303
clr1 = 0xffb5b5; /* Recent changes: red (hot) */
23042304
clr2 = 0xb5e0ff; /* Older changes: blue (cold) */
23052305
--- src/diff.c
+++ src/diff.c
@@ -2294,11 +2294,11 @@
2294 }
2295 if( iLimit>20 ){
2296 style_submenu_element("20 Ancestors", "20 Ancestors",
2297 "%s", url_render(&url, "limit", "20", 0, 0));
2298 }
2299 if( skin_white_foreground() ){
2300 clr1 = 0xa04040;
2301 clr2 = 0x4059a0;
2302 }else{
2303 clr1 = 0xffb5b5; /* Recent changes: red (hot) */
2304 clr2 = 0xb5e0ff; /* Older changes: blue (cold) */
2305
--- src/diff.c
+++ src/diff.c
@@ -2294,11 +2294,11 @@
2294 }
2295 if( iLimit>20 ){
2296 style_submenu_element("20 Ancestors", "20 Ancestors",
2297 "%s", url_render(&url, "limit", "20", 0, 0));
2298 }
2299 if( skin_detail_boolean("white-foreground") ){
2300 clr1 = 0xa04040;
2301 clr2 = 0x4059a0;
2302 }else{
2303 clr1 = 0xffb5b5; /* Recent changes: red (hot) */
2304 clr2 = 0xb5e0ff; /* Older changes: blue (cold) */
2305
--- src/json_config.c
+++ src/json_config.c
@@ -56,10 +56,11 @@
5656
int groupMask;
5757
} JsonConfigProperties[] = {
5858
{ "css", CONFIGSET_CSS },
5959
{ "header", CONFIGSET_SKIN },
6060
{ "footer", CONFIGSET_SKIN },
61
+{ "details", CONFIGSET_SKIN },
6162
{ "logo-mimetype", CONFIGSET_SKIN },
6263
{ "logo-image", CONFIGSET_SKIN },
6364
{ "background-mimetype", CONFIGSET_SKIN },
6465
{ "background-image", CONFIGSET_SKIN },
6566
{ "timeline-block-markup", CONFIGSET_SKIN },
@@ -66,11 +67,10 @@
6667
{ "timeline-max-comment", CONFIGSET_SKIN },
6768
{ "timeline-plaintext", CONFIGSET_SKIN },
6869
{ "adunit", CONFIGSET_SKIN },
6970
{ "adunit-omit-if-admin", CONFIGSET_SKIN },
7071
{ "adunit-omit-if-user", CONFIGSET_SKIN },
71
-{ "white-foreground", CONFIGSET_SKIN },
7272
7373
{ "project-name", CONFIGSET_PROJ },
7474
{ "short-project-name", CONFIGSET_PROJ },
7575
{ "project-description", CONFIGSET_PROJ },
7676
{ "index-page", CONFIGSET_PROJ },
7777
--- src/json_config.c
+++ src/json_config.c
@@ -56,10 +56,11 @@
56 int groupMask;
57 } JsonConfigProperties[] = {
58 { "css", CONFIGSET_CSS },
59 { "header", CONFIGSET_SKIN },
60 { "footer", CONFIGSET_SKIN },
 
61 { "logo-mimetype", CONFIGSET_SKIN },
62 { "logo-image", CONFIGSET_SKIN },
63 { "background-mimetype", CONFIGSET_SKIN },
64 { "background-image", CONFIGSET_SKIN },
65 { "timeline-block-markup", CONFIGSET_SKIN },
@@ -66,11 +67,10 @@
66 { "timeline-max-comment", CONFIGSET_SKIN },
67 { "timeline-plaintext", CONFIGSET_SKIN },
68 { "adunit", CONFIGSET_SKIN },
69 { "adunit-omit-if-admin", CONFIGSET_SKIN },
70 { "adunit-omit-if-user", CONFIGSET_SKIN },
71 { "white-foreground", CONFIGSET_SKIN },
72
73 { "project-name", CONFIGSET_PROJ },
74 { "short-project-name", CONFIGSET_PROJ },
75 { "project-description", CONFIGSET_PROJ },
76 { "index-page", CONFIGSET_PROJ },
77
--- src/json_config.c
+++ src/json_config.c
@@ -56,10 +56,11 @@
56 int groupMask;
57 } JsonConfigProperties[] = {
58 { "css", CONFIGSET_CSS },
59 { "header", CONFIGSET_SKIN },
60 { "footer", CONFIGSET_SKIN },
61 { "details", CONFIGSET_SKIN },
62 { "logo-mimetype", CONFIGSET_SKIN },
63 { "logo-image", CONFIGSET_SKIN },
64 { "background-mimetype", CONFIGSET_SKIN },
65 { "background-image", CONFIGSET_SKIN },
66 { "timeline-block-markup", CONFIGSET_SKIN },
@@ -66,11 +67,10 @@
67 { "timeline-max-comment", CONFIGSET_SKIN },
68 { "timeline-plaintext", CONFIGSET_SKIN },
69 { "adunit", CONFIGSET_SKIN },
70 { "adunit-omit-if-admin", CONFIGSET_SKIN },
71 { "adunit-omit-if-user", CONFIGSET_SKIN },
 
72
73 { "project-name", CONFIGSET_PROJ },
74 { "short-project-name", CONFIGSET_PROJ },
75 { "project-description", CONFIGSET_PROJ },
76 { "index-page", CONFIGSET_PROJ },
77
+12
--- src/main.mk
+++ src/main.mk
@@ -132,43 +132,55 @@
132132
$(SRCDIR)/xfer.c \
133133
$(SRCDIR)/xfersetup.c \
134134
$(SRCDIR)/zip.c
135135
136136
EXTRA_FILES = \
137
+ $(SRCDIR)/../skins/aht/details.txt \
137138
$(SRCDIR)/../skins/black_and_white/css.txt \
139
+ $(SRCDIR)/../skins/black_and_white/details.txt \
138140
$(SRCDIR)/../skins/black_and_white/footer.txt \
139141
$(SRCDIR)/../skins/black_and_white/header.txt \
140142
$(SRCDIR)/../skins/blitz/css.txt \
143
+ $(SRCDIR)/../skins/blitz/details.txt \
141144
$(SRCDIR)/../skins/blitz/footer.txt \
142145
$(SRCDIR)/../skins/blitz/header.txt \
143146
$(SRCDIR)/../skins/blitz/ticket.txt \
144147
$(SRCDIR)/../skins/blitz_no_logo/css.txt \
148
+ $(SRCDIR)/../skins/blitz_no_logo/details.txt \
145149
$(SRCDIR)/../skins/blitz_no_logo/footer.txt \
146150
$(SRCDIR)/../skins/blitz_no_logo/header.txt \
147151
$(SRCDIR)/../skins/blitz_no_logo/ticket.txt \
148152
$(SRCDIR)/../skins/default/css.txt \
153
+ $(SRCDIR)/../skins/default/details.txt \
149154
$(SRCDIR)/../skins/default/footer.txt \
150155
$(SRCDIR)/../skins/default/header.txt \
151156
$(SRCDIR)/../skins/eagle/css.txt \
157
+ $(SRCDIR)/../skins/eagle/details.txt \
152158
$(SRCDIR)/../skins/eagle/footer.txt \
153159
$(SRCDIR)/../skins/eagle/header.txt \
154160
$(SRCDIR)/../skins/enhanced1/css.txt \
161
+ $(SRCDIR)/../skins/enhanced1/details.txt \
155162
$(SRCDIR)/../skins/enhanced1/footer.txt \
156163
$(SRCDIR)/../skins/enhanced1/header.txt \
157164
$(SRCDIR)/../skins/khaki/css.txt \
165
+ $(SRCDIR)/../skins/khaki/details.txt \
158166
$(SRCDIR)/../skins/khaki/footer.txt \
159167
$(SRCDIR)/../skins/khaki/header.txt \
160168
$(SRCDIR)/../skins/original/css.txt \
169
+ $(SRCDIR)/../skins/original/details.txt \
161170
$(SRCDIR)/../skins/original/footer.txt \
162171
$(SRCDIR)/../skins/original/header.txt \
163172
$(SRCDIR)/../skins/plain_gray/css.txt \
173
+ $(SRCDIR)/../skins/plain_gray/details.txt \
164174
$(SRCDIR)/../skins/plain_gray/footer.txt \
165175
$(SRCDIR)/../skins/plain_gray/header.txt \
166176
$(SRCDIR)/../skins/rounded1/css.txt \
177
+ $(SRCDIR)/../skins/rounded1/details.txt \
167178
$(SRCDIR)/../skins/rounded1/footer.txt \
168179
$(SRCDIR)/../skins/rounded1/header.txt \
169180
$(SRCDIR)/../skins/xekri/css.txt \
181
+ $(SRCDIR)/../skins/xekri/details.txt \
170182
$(SRCDIR)/../skins/xekri/footer.txt \
171183
$(SRCDIR)/../skins/xekri/header.txt \
172184
$(SRCDIR)/diff.tcl \
173185
$(SRCDIR)/markdown.md
174186
175187
--- src/main.mk
+++ src/main.mk
@@ -132,43 +132,55 @@
132 $(SRCDIR)/xfer.c \
133 $(SRCDIR)/xfersetup.c \
134 $(SRCDIR)/zip.c
135
136 EXTRA_FILES = \
 
137 $(SRCDIR)/../skins/black_and_white/css.txt \
 
138 $(SRCDIR)/../skins/black_and_white/footer.txt \
139 $(SRCDIR)/../skins/black_and_white/header.txt \
140 $(SRCDIR)/../skins/blitz/css.txt \
 
141 $(SRCDIR)/../skins/blitz/footer.txt \
142 $(SRCDIR)/../skins/blitz/header.txt \
143 $(SRCDIR)/../skins/blitz/ticket.txt \
144 $(SRCDIR)/../skins/blitz_no_logo/css.txt \
 
145 $(SRCDIR)/../skins/blitz_no_logo/footer.txt \
146 $(SRCDIR)/../skins/blitz_no_logo/header.txt \
147 $(SRCDIR)/../skins/blitz_no_logo/ticket.txt \
148 $(SRCDIR)/../skins/default/css.txt \
 
149 $(SRCDIR)/../skins/default/footer.txt \
150 $(SRCDIR)/../skins/default/header.txt \
151 $(SRCDIR)/../skins/eagle/css.txt \
 
152 $(SRCDIR)/../skins/eagle/footer.txt \
153 $(SRCDIR)/../skins/eagle/header.txt \
154 $(SRCDIR)/../skins/enhanced1/css.txt \
 
155 $(SRCDIR)/../skins/enhanced1/footer.txt \
156 $(SRCDIR)/../skins/enhanced1/header.txt \
157 $(SRCDIR)/../skins/khaki/css.txt \
 
158 $(SRCDIR)/../skins/khaki/footer.txt \
159 $(SRCDIR)/../skins/khaki/header.txt \
160 $(SRCDIR)/../skins/original/css.txt \
 
161 $(SRCDIR)/../skins/original/footer.txt \
162 $(SRCDIR)/../skins/original/header.txt \
163 $(SRCDIR)/../skins/plain_gray/css.txt \
 
164 $(SRCDIR)/../skins/plain_gray/footer.txt \
165 $(SRCDIR)/../skins/plain_gray/header.txt \
166 $(SRCDIR)/../skins/rounded1/css.txt \
 
167 $(SRCDIR)/../skins/rounded1/footer.txt \
168 $(SRCDIR)/../skins/rounded1/header.txt \
169 $(SRCDIR)/../skins/xekri/css.txt \
 
170 $(SRCDIR)/../skins/xekri/footer.txt \
171 $(SRCDIR)/../skins/xekri/header.txt \
172 $(SRCDIR)/diff.tcl \
173 $(SRCDIR)/markdown.md
174
175
--- src/main.mk
+++ src/main.mk
@@ -132,43 +132,55 @@
132 $(SRCDIR)/xfer.c \
133 $(SRCDIR)/xfersetup.c \
134 $(SRCDIR)/zip.c
135
136 EXTRA_FILES = \
137 $(SRCDIR)/../skins/aht/details.txt \
138 $(SRCDIR)/../skins/black_and_white/css.txt \
139 $(SRCDIR)/../skins/black_and_white/details.txt \
140 $(SRCDIR)/../skins/black_and_white/footer.txt \
141 $(SRCDIR)/../skins/black_and_white/header.txt \
142 $(SRCDIR)/../skins/blitz/css.txt \
143 $(SRCDIR)/../skins/blitz/details.txt \
144 $(SRCDIR)/../skins/blitz/footer.txt \
145 $(SRCDIR)/../skins/blitz/header.txt \
146 $(SRCDIR)/../skins/blitz/ticket.txt \
147 $(SRCDIR)/../skins/blitz_no_logo/css.txt \
148 $(SRCDIR)/../skins/blitz_no_logo/details.txt \
149 $(SRCDIR)/../skins/blitz_no_logo/footer.txt \
150 $(SRCDIR)/../skins/blitz_no_logo/header.txt \
151 $(SRCDIR)/../skins/blitz_no_logo/ticket.txt \
152 $(SRCDIR)/../skins/default/css.txt \
153 $(SRCDIR)/../skins/default/details.txt \
154 $(SRCDIR)/../skins/default/footer.txt \
155 $(SRCDIR)/../skins/default/header.txt \
156 $(SRCDIR)/../skins/eagle/css.txt \
157 $(SRCDIR)/../skins/eagle/details.txt \
158 $(SRCDIR)/../skins/eagle/footer.txt \
159 $(SRCDIR)/../skins/eagle/header.txt \
160 $(SRCDIR)/../skins/enhanced1/css.txt \
161 $(SRCDIR)/../skins/enhanced1/details.txt \
162 $(SRCDIR)/../skins/enhanced1/footer.txt \
163 $(SRCDIR)/../skins/enhanced1/header.txt \
164 $(SRCDIR)/../skins/khaki/css.txt \
165 $(SRCDIR)/../skins/khaki/details.txt \
166 $(SRCDIR)/../skins/khaki/footer.txt \
167 $(SRCDIR)/../skins/khaki/header.txt \
168 $(SRCDIR)/../skins/original/css.txt \
169 $(SRCDIR)/../skins/original/details.txt \
170 $(SRCDIR)/../skins/original/footer.txt \
171 $(SRCDIR)/../skins/original/header.txt \
172 $(SRCDIR)/../skins/plain_gray/css.txt \
173 $(SRCDIR)/../skins/plain_gray/details.txt \
174 $(SRCDIR)/../skins/plain_gray/footer.txt \
175 $(SRCDIR)/../skins/plain_gray/header.txt \
176 $(SRCDIR)/../skins/rounded1/css.txt \
177 $(SRCDIR)/../skins/rounded1/details.txt \
178 $(SRCDIR)/../skins/rounded1/footer.txt \
179 $(SRCDIR)/../skins/rounded1/header.txt \
180 $(SRCDIR)/../skins/xekri/css.txt \
181 $(SRCDIR)/../skins/xekri/details.txt \
182 $(SRCDIR)/../skins/xekri/footer.txt \
183 $(SRCDIR)/../skins/xekri/header.txt \
184 $(SRCDIR)/diff.tcl \
185 $(SRCDIR)/markdown.md
186
187
+9 -163
--- src/setup.c
+++ src/setup.c
@@ -69,11 +69,11 @@
6969
/* Make sure the header contains <base href="...">. Issue a warning
7070
** if it does not. */
7171
if( !cgi_header_contains("<base href=") ){
7272
@ <p class="generalError"><b>Configuration Error:</b> Please add
7373
@ <tt>&lt;base href="$secureurl/$current_page"&gt;</tt> after
74
- @ <tt>&lt;head&gt;</tt> in the <a href="setup_header">HTML header</a>!</p>
74
+ @ <tt>&lt;head&gt;</tt> in the <a href="setup_skinedit?w=2">HTML header</a>!</p>
7575
}
7676
7777
#if !defined(_WIN32)
7878
/* Check for /dev/null and /dev/urandom. We want both devices to be present,
7979
** but they are sometimes omitted (by mistake) from chroot jails. */
@@ -107,17 +107,11 @@
107107
setup_menu_entry("Search","srchsetup",
108108
"Configure the built-in search engine");
109109
setup_menu_entry("Transfers", "xfersetup",
110110
"Configure the transfer system for this repository");
111111
setup_menu_entry("Skins", "setup_skin",
112
- "Select from a menu of prepackaged \"skins\" for the web interface");
113
- setup_menu_entry("CSS", "setup_editcss",
114
- "Edit the Cascading Style Sheet used by all pages of this repository");
115
- setup_menu_entry("Header", "setup_header",
116
- "Edit HTML text inserted at the top of every page");
117
- setup_menu_entry("Footer", "setup_footer",
118
- "Edit HTML text inserted at the bottom of every page");
112
+ "Select and/or modify the web interface \"skins\"");
119113
setup_menu_entry("Moderation", "setup_modreq",
120114
"Enable/Disable requiring moderator approval of Wiki and/or Ticket"
121115
" changes and attachments.");
122116
setup_menu_entry("Ad-Unit", "setup_adunit",
123117
"Edit HTML text for an ad unit inserted after the menu bar");
@@ -930,11 +924,11 @@
930924
}
931925
932926
/*
933927
** Generate a text box for an attribute.
934928
*/
935
-static void textarea_attribute(
929
+const char *textarea_attribute(
936930
const char *zLabel, /* The text label on the textarea */
937931
int rows, /* Rows in the textarea */
938932
int cols, /* Columns in the textarea */
939933
const char *zVar, /* The corresponding row in the VAR table */
940934
const char *zQP, /* The query parameter */
@@ -959,10 +953,11 @@
959953
@ cols="%d(cols)">%h(z)</textarea>
960954
if( zLabel && *zLabel ){
961955
@ <span class="textareaLabel">%s(zLabel)</span>
962956
}
963957
}
958
+ return z;
964959
}
965960
966961
/*
967962
** Generate a text box for an attribute.
968963
*/
@@ -1550,159 +1545,10 @@
15501545
@ </div></form>
15511546
db_end_transaction(0);
15521547
style_footer();
15531548
}
15541549
1555
-/*
1556
-** WEBPAGE: setup_editcss
1557
-*/
1558
-void setup_editcss(void){
1559
- login_check_credentials();
1560
- if( !g.perm.Setup ){
1561
- login_needed(0);
1562
- return;
1563
- }
1564
- db_begin_transaction();
1565
- if( P("clear")!=0 ){
1566
- db_multi_exec("DELETE FROM config WHERE name='css'");
1567
- cgi_replace_parameter("css", builtin_text("skins/default/css.txt"));
1568
- db_end_transaction(0);
1569
- cgi_redirect("setup_editcss");
1570
- }
1571
- if( P("submit")!=0 ){
1572
- textarea_attribute(0, 0, 0, "css", "css",
1573
- builtin_text("skins/default/css.txt"), 0);
1574
- db_end_transaction(0);
1575
- cgi_redirect("setup_editcss");
1576
- }
1577
- style_header("Edit CSS");
1578
- @ <form action="%s(g.zTop)/setup_editcss" method="post"><div>
1579
- login_insert_csrf_secret();
1580
- @ Edit the CSS below:<br />
1581
- textarea_attribute("", 35, 80, "css", "css",
1582
- builtin_text("skins/default/css.txt"), 0);
1583
- @ <br />
1584
- @ <input type="submit" name="submit" value="Apply Changes" />
1585
- @ <input type="submit" name="clear" value="Revert To Default" />
1586
- @ </div></form>
1587
- @ <p><span class="note">Note:</span> Press your browser Reload button after
1588
- @ modifying the CSS in order to pull in the modified CSS file.</p>
1589
- @ <hr />
1590
- @ The default CSS is shown below for reference. Other examples
1591
- @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
1592
- @ See also the <a href="setup_header">header</a> and
1593
- @ <a href="setup_footer">footer</a> editing screens.
1594
- @ <blockquote><pre>
1595
- cgi_append_default_css();
1596
- @ </pre></blockquote>
1597
- style_footer();
1598
- db_end_transaction(0);
1599
-}
1600
-
1601
-/*
1602
-** WEBPAGE: setup_header
1603
-*/
1604
-void setup_header(void){
1605
- login_check_credentials();
1606
- if( !g.perm.Setup ){
1607
- login_needed(0);
1608
- return;
1609
- }
1610
- db_begin_transaction();
1611
- if( P("clear")!=0 ){
1612
- db_multi_exec("DELETE FROM config WHERE name='header'");
1613
- cgi_replace_parameter("header", builtin_text("skins/default/header.txt"));
1614
- }else if( P("submit")!=0 ){
1615
- textarea_attribute(0, 0, 0, "header", "header",
1616
- builtin_text("skins/default/header.txt"), 0);
1617
- }else if( P("fixbase")!=0 ){
1618
- const char *z = db_get("header",
1619
- (char*)builtin_text("skins/default/header.txt"));
1620
- char *zHead = strstr(z, "<head>");
1621
- if( strstr(z, "<base href=")==0 && zHead!=0 ){
1622
- char *zNew;
1623
- char *zTail = &zHead[6];
1624
- while( fossil_isspace(zTail[0]) ) zTail++;
1625
- zNew = mprintf("%.*s\n<base href=\"$secureurl/$current_page\" />\n%s",
1626
- zHead+6-z, z, zTail);
1627
- cgi_replace_parameter("header", zNew);
1628
- db_set("header", zNew, 0);
1629
- }
1630
- }
1631
-
1632
- style_header("Edit Page Header");
1633
- @ <form action="%R/setup_header" method="post"><div>
1634
-
1635
- /* Make sure the header contains <base href="...">. Issue a warning
1636
- ** if it does not. */
1637
- if( !cgi_header_contains("<base href=") ){
1638
- @ <p class="generalError">Please add
1639
- @ <tt>&lt;base href="$secureurl/$current_page"&gt;</tt> after
1640
- @ <tt>&lt;head&gt;</tt> in the header!
1641
- @ <input type="submit" name="fixbase" value="Add &lt;base&gt; Now"></p>
1642
- }
1643
-
1644
- login_insert_csrf_secret();
1645
- @ <p>Edit HTML text with embedded TH1 (a Tcl dialect) that will be used to
1646
- @ generate the beginning of every page through start of the main
1647
- @ menu.</p>
1648
- textarea_attribute("", 35, 80, "header", "header",
1649
- builtin_text("skins/default/header.txt"), 0);
1650
- @ <br />
1651
- @ <input type="submit" name="submit" value="Apply Changes" />
1652
- @ <input type="submit" name="clear" value="Revert To Default" />
1653
- @ </div></form>
1654
- @ <hr />
1655
- @ The default header is shown below for reference. Other examples
1656
- @ of headers can be seen on the <a href="setup_skin">skins page</a>.
1657
- @ See also the <a href="setup_editcss">CSS</a> and
1658
- @ <a href="setup_footer">footer</a> editing screens.
1659
- @ <blockquote><pre>
1660
- @ %h(builtin_text("skins/default/header.txt"))
1661
- @ </pre></blockquote>
1662
- style_footer();
1663
- db_end_transaction(0);
1664
-}
1665
-
1666
-/*
1667
-** WEBPAGE: setup_footer
1668
-*/
1669
-void setup_footer(void){
1670
- login_check_credentials();
1671
- if( !g.perm.Setup ){
1672
- login_needed(0);
1673
- return;
1674
- }
1675
- db_begin_transaction();
1676
- if( P("clear")!=0 ){
1677
- db_multi_exec("DELETE FROM config WHERE name='footer'");
1678
- cgi_replace_parameter("footer", builtin_text("skins/default/footer.txt"));
1679
- }
1680
-
1681
- style_header("Edit Page Footer");
1682
- @ <form action="%s(g.zTop)/setup_footer" method="post"><div>
1683
- login_insert_csrf_secret();
1684
- @ <p>Edit HTML text with embedded TH1 (a Tcl dialect) that will be used to
1685
- @ generate the end of every page.</p>
1686
- textarea_attribute("", 20, 80, "footer", "footer",
1687
- builtin_text("skins/default/footer.txt"), 0);
1688
- @ <br />
1689
- @ <input type="submit" name="submit" value="Apply Changes" />
1690
- @ <input type="submit" name="clear" value="Revert To Default" />
1691
- @ </div></form>
1692
- @ <hr />
1693
- @ The default footer is shown below for reference. Other examples
1694
- @ of footers can be seen on the <a href="setup_skin">skins page</a>.
1695
- @ See also the <a href="setup_editcss">CSS</a> and
1696
- @ <a href="setup_header">header</a> editing screens.
1697
- @ <blockquote><pre>
1698
- @ %h(builtin_text("skins/default/footer.txt"))
1699
- @ </pre></blockquote>
1700
- style_footer();
1701
- db_end_transaction(0);
1702
-}
1703
-
17041550
/*
17051551
** WEBPAGE: setup_modreq
17061552
*/
17071553
void setup_modreq(void){
17081554
login_check_credentials();
@@ -1783,11 +1629,11 @@
17831629
@ <b>Ad-Unit Notes:</b><ul>
17841630
@ <li>Leave both Ad-Units blank to disable all advertising.
17851631
@ <li>The "Banner Ad-Unit" is used for wide pages.
17861632
@ <li>The "Right-Column Ad-Unit" is used on pages with tall, narrow content.
17871633
@ <li>If the "Right-Column Ad-Unit" is blank, the "Banner Ad-Unit" is used on all pages.
1788
- @ <li>Suggested <a href="setup_editcss">CSS</a> changes:
1634
+ @ <li>Suggested <a href="setup_skinedit?w=0">CSS</a> changes:
17891635
@ <blockquote><pre>
17901636
@ div.adunit_banner {
17911637
@ margin: auto;
17921638
@ width: 100%;
17931639
@ }
@@ -1897,12 +1743,12 @@
18971743
@ <form action="%s(g.zTop)/setup_logo" method="post"
18981744
@ enctype="multipart/form-data"><div>
18991745
@ <p>The logo is accessible to all users at this URL:
19001746
@ <a href="%s(g.zBaseURL)/logo">%s(g.zBaseURL)/logo</a>.
19011747
@ The logo may or may not appear on each
1902
- @ page depending on the <a href="setup_editcss">CSS</a> and
1903
- @ <a href="setup_header">header setup</a>.
1748
+ @ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
1749
+ @ <a href="setup_skinedit?w=2">header setup</a>.
19041750
@ To change the logo image, use the following form:</p>
19051751
login_insert_csrf_secret();
19061752
@ Logo Image file:
19071753
@ <input type="file" name="logoim" size="60" accept="image/*" />
19081754
@ <p align="center">
@@ -1919,12 +1765,12 @@
19191765
@ <form action="%s(g.zTop)/setup_logo" method="post"
19201766
@ enctype="multipart/form-data"><div>
19211767
@ <p>The background image is accessible to all users at this URL:
19221768
@ <a href="%s(g.zBaseURL)/background">%s(g.zBaseURL)/background</a>.
19231769
@ The background image may or may not appear on each
1924
- @ page depending on the <a href="setup_editcss">CSS</a> and
1925
- @ <a href="setup_header">header setup</a>.
1770
+ @ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
1771
+ @ <a href="setup_skinedit?w=2">header setup</a>.
19261772
@ To change the background image, use the following form:</p>
19271773
login_insert_csrf_secret();
19281774
@ Background image file:
19291775
@ <input type="file" name="bgim" size="60" accept="image/*" />
19301776
@ <p align="center">
19311777
--- src/setup.c
+++ src/setup.c
@@ -69,11 +69,11 @@
69 /* Make sure the header contains <base href="...">. Issue a warning
70 ** if it does not. */
71 if( !cgi_header_contains("<base href=") ){
72 @ <p class="generalError"><b>Configuration Error:</b> Please add
73 @ <tt>&lt;base href="$secureurl/$current_page"&gt;</tt> after
74 @ <tt>&lt;head&gt;</tt> in the <a href="setup_header">HTML header</a>!</p>
75 }
76
77 #if !defined(_WIN32)
78 /* Check for /dev/null and /dev/urandom. We want both devices to be present,
79 ** but they are sometimes omitted (by mistake) from chroot jails. */
@@ -107,17 +107,11 @@
107 setup_menu_entry("Search","srchsetup",
108 "Configure the built-in search engine");
109 setup_menu_entry("Transfers", "xfersetup",
110 "Configure the transfer system for this repository");
111 setup_menu_entry("Skins", "setup_skin",
112 "Select from a menu of prepackaged \"skins\" for the web interface");
113 setup_menu_entry("CSS", "setup_editcss",
114 "Edit the Cascading Style Sheet used by all pages of this repository");
115 setup_menu_entry("Header", "setup_header",
116 "Edit HTML text inserted at the top of every page");
117 setup_menu_entry("Footer", "setup_footer",
118 "Edit HTML text inserted at the bottom of every page");
119 setup_menu_entry("Moderation", "setup_modreq",
120 "Enable/Disable requiring moderator approval of Wiki and/or Ticket"
121 " changes and attachments.");
122 setup_menu_entry("Ad-Unit", "setup_adunit",
123 "Edit HTML text for an ad unit inserted after the menu bar");
@@ -930,11 +924,11 @@
930 }
931
932 /*
933 ** Generate a text box for an attribute.
934 */
935 static void textarea_attribute(
936 const char *zLabel, /* The text label on the textarea */
937 int rows, /* Rows in the textarea */
938 int cols, /* Columns in the textarea */
939 const char *zVar, /* The corresponding row in the VAR table */
940 const char *zQP, /* The query parameter */
@@ -959,10 +953,11 @@
959 @ cols="%d(cols)">%h(z)</textarea>
960 if( zLabel && *zLabel ){
961 @ <span class="textareaLabel">%s(zLabel)</span>
962 }
963 }
 
964 }
965
966 /*
967 ** Generate a text box for an attribute.
968 */
@@ -1550,159 +1545,10 @@
1550 @ </div></form>
1551 db_end_transaction(0);
1552 style_footer();
1553 }
1554
1555 /*
1556 ** WEBPAGE: setup_editcss
1557 */
1558 void setup_editcss(void){
1559 login_check_credentials();
1560 if( !g.perm.Setup ){
1561 login_needed(0);
1562 return;
1563 }
1564 db_begin_transaction();
1565 if( P("clear")!=0 ){
1566 db_multi_exec("DELETE FROM config WHERE name='css'");
1567 cgi_replace_parameter("css", builtin_text("skins/default/css.txt"));
1568 db_end_transaction(0);
1569 cgi_redirect("setup_editcss");
1570 }
1571 if( P("submit")!=0 ){
1572 textarea_attribute(0, 0, 0, "css", "css",
1573 builtin_text("skins/default/css.txt"), 0);
1574 db_end_transaction(0);
1575 cgi_redirect("setup_editcss");
1576 }
1577 style_header("Edit CSS");
1578 @ <form action="%s(g.zTop)/setup_editcss" method="post"><div>
1579 login_insert_csrf_secret();
1580 @ Edit the CSS below:<br />
1581 textarea_attribute("", 35, 80, "css", "css",
1582 builtin_text("skins/default/css.txt"), 0);
1583 @ <br />
1584 @ <input type="submit" name="submit" value="Apply Changes" />
1585 @ <input type="submit" name="clear" value="Revert To Default" />
1586 @ </div></form>
1587 @ <p><span class="note">Note:</span> Press your browser Reload button after
1588 @ modifying the CSS in order to pull in the modified CSS file.</p>
1589 @ <hr />
1590 @ The default CSS is shown below for reference. Other examples
1591 @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
1592 @ See also the <a href="setup_header">header</a> and
1593 @ <a href="setup_footer">footer</a> editing screens.
1594 @ <blockquote><pre>
1595 cgi_append_default_css();
1596 @ </pre></blockquote>
1597 style_footer();
1598 db_end_transaction(0);
1599 }
1600
1601 /*
1602 ** WEBPAGE: setup_header
1603 */
1604 void setup_header(void){
1605 login_check_credentials();
1606 if( !g.perm.Setup ){
1607 login_needed(0);
1608 return;
1609 }
1610 db_begin_transaction();
1611 if( P("clear")!=0 ){
1612 db_multi_exec("DELETE FROM config WHERE name='header'");
1613 cgi_replace_parameter("header", builtin_text("skins/default/header.txt"));
1614 }else if( P("submit")!=0 ){
1615 textarea_attribute(0, 0, 0, "header", "header",
1616 builtin_text("skins/default/header.txt"), 0);
1617 }else if( P("fixbase")!=0 ){
1618 const char *z = db_get("header",
1619 (char*)builtin_text("skins/default/header.txt"));
1620 char *zHead = strstr(z, "<head>");
1621 if( strstr(z, "<base href=")==0 && zHead!=0 ){
1622 char *zNew;
1623 char *zTail = &zHead[6];
1624 while( fossil_isspace(zTail[0]) ) zTail++;
1625 zNew = mprintf("%.*s\n<base href=\"$secureurl/$current_page\" />\n%s",
1626 zHead+6-z, z, zTail);
1627 cgi_replace_parameter("header", zNew);
1628 db_set("header", zNew, 0);
1629 }
1630 }
1631
1632 style_header("Edit Page Header");
1633 @ <form action="%R/setup_header" method="post"><div>
1634
1635 /* Make sure the header contains <base href="...">. Issue a warning
1636 ** if it does not. */
1637 if( !cgi_header_contains("<base href=") ){
1638 @ <p class="generalError">Please add
1639 @ <tt>&lt;base href="$secureurl/$current_page"&gt;</tt> after
1640 @ <tt>&lt;head&gt;</tt> in the header!
1641 @ <input type="submit" name="fixbase" value="Add &lt;base&gt; Now"></p>
1642 }
1643
1644 login_insert_csrf_secret();
1645 @ <p>Edit HTML text with embedded TH1 (a Tcl dialect) that will be used to
1646 @ generate the beginning of every page through start of the main
1647 @ menu.</p>
1648 textarea_attribute("", 35, 80, "header", "header",
1649 builtin_text("skins/default/header.txt"), 0);
1650 @ <br />
1651 @ <input type="submit" name="submit" value="Apply Changes" />
1652 @ <input type="submit" name="clear" value="Revert To Default" />
1653 @ </div></form>
1654 @ <hr />
1655 @ The default header is shown below for reference. Other examples
1656 @ of headers can be seen on the <a href="setup_skin">skins page</a>.
1657 @ See also the <a href="setup_editcss">CSS</a> and
1658 @ <a href="setup_footer">footer</a> editing screens.
1659 @ <blockquote><pre>
1660 @ %h(builtin_text("skins/default/header.txt"))
1661 @ </pre></blockquote>
1662 style_footer();
1663 db_end_transaction(0);
1664 }
1665
1666 /*
1667 ** WEBPAGE: setup_footer
1668 */
1669 void setup_footer(void){
1670 login_check_credentials();
1671 if( !g.perm.Setup ){
1672 login_needed(0);
1673 return;
1674 }
1675 db_begin_transaction();
1676 if( P("clear")!=0 ){
1677 db_multi_exec("DELETE FROM config WHERE name='footer'");
1678 cgi_replace_parameter("footer", builtin_text("skins/default/footer.txt"));
1679 }
1680
1681 style_header("Edit Page Footer");
1682 @ <form action="%s(g.zTop)/setup_footer" method="post"><div>
1683 login_insert_csrf_secret();
1684 @ <p>Edit HTML text with embedded TH1 (a Tcl dialect) that will be used to
1685 @ generate the end of every page.</p>
1686 textarea_attribute("", 20, 80, "footer", "footer",
1687 builtin_text("skins/default/footer.txt"), 0);
1688 @ <br />
1689 @ <input type="submit" name="submit" value="Apply Changes" />
1690 @ <input type="submit" name="clear" value="Revert To Default" />
1691 @ </div></form>
1692 @ <hr />
1693 @ The default footer is shown below for reference. Other examples
1694 @ of footers can be seen on the <a href="setup_skin">skins page</a>.
1695 @ See also the <a href="setup_editcss">CSS</a> and
1696 @ <a href="setup_header">header</a> editing screens.
1697 @ <blockquote><pre>
1698 @ %h(builtin_text("skins/default/footer.txt"))
1699 @ </pre></blockquote>
1700 style_footer();
1701 db_end_transaction(0);
1702 }
1703
1704 /*
1705 ** WEBPAGE: setup_modreq
1706 */
1707 void setup_modreq(void){
1708 login_check_credentials();
@@ -1783,11 +1629,11 @@
1783 @ <b>Ad-Unit Notes:</b><ul>
1784 @ <li>Leave both Ad-Units blank to disable all advertising.
1785 @ <li>The "Banner Ad-Unit" is used for wide pages.
1786 @ <li>The "Right-Column Ad-Unit" is used on pages with tall, narrow content.
1787 @ <li>If the "Right-Column Ad-Unit" is blank, the "Banner Ad-Unit" is used on all pages.
1788 @ <li>Suggested <a href="setup_editcss">CSS</a> changes:
1789 @ <blockquote><pre>
1790 @ div.adunit_banner {
1791 @ margin: auto;
1792 @ width: 100%;
1793 @ }
@@ -1897,12 +1743,12 @@
1897 @ <form action="%s(g.zTop)/setup_logo" method="post"
1898 @ enctype="multipart/form-data"><div>
1899 @ <p>The logo is accessible to all users at this URL:
1900 @ <a href="%s(g.zBaseURL)/logo">%s(g.zBaseURL)/logo</a>.
1901 @ The logo may or may not appear on each
1902 @ page depending on the <a href="setup_editcss">CSS</a> and
1903 @ <a href="setup_header">header setup</a>.
1904 @ To change the logo image, use the following form:</p>
1905 login_insert_csrf_secret();
1906 @ Logo Image file:
1907 @ <input type="file" name="logoim" size="60" accept="image/*" />
1908 @ <p align="center">
@@ -1919,12 +1765,12 @@
1919 @ <form action="%s(g.zTop)/setup_logo" method="post"
1920 @ enctype="multipart/form-data"><div>
1921 @ <p>The background image is accessible to all users at this URL:
1922 @ <a href="%s(g.zBaseURL)/background">%s(g.zBaseURL)/background</a>.
1923 @ The background image may or may not appear on each
1924 @ page depending on the <a href="setup_editcss">CSS</a> and
1925 @ <a href="setup_header">header setup</a>.
1926 @ To change the background image, use the following form:</p>
1927 login_insert_csrf_secret();
1928 @ Background image file:
1929 @ <input type="file" name="bgim" size="60" accept="image/*" />
1930 @ <p align="center">
1931
--- src/setup.c
+++ src/setup.c
@@ -69,11 +69,11 @@
69 /* Make sure the header contains <base href="...">. Issue a warning
70 ** if it does not. */
71 if( !cgi_header_contains("<base href=") ){
72 @ <p class="generalError"><b>Configuration Error:</b> Please add
73 @ <tt>&lt;base href="$secureurl/$current_page"&gt;</tt> after
74 @ <tt>&lt;head&gt;</tt> in the <a href="setup_skinedit?w=2">HTML header</a>!</p>
75 }
76
77 #if !defined(_WIN32)
78 /* Check for /dev/null and /dev/urandom. We want both devices to be present,
79 ** but they are sometimes omitted (by mistake) from chroot jails. */
@@ -107,17 +107,11 @@
107 setup_menu_entry("Search","srchsetup",
108 "Configure the built-in search engine");
109 setup_menu_entry("Transfers", "xfersetup",
110 "Configure the transfer system for this repository");
111 setup_menu_entry("Skins", "setup_skin",
112 "Select and/or modify the web interface \"skins\"");
 
 
 
 
 
 
113 setup_menu_entry("Moderation", "setup_modreq",
114 "Enable/Disable requiring moderator approval of Wiki and/or Ticket"
115 " changes and attachments.");
116 setup_menu_entry("Ad-Unit", "setup_adunit",
117 "Edit HTML text for an ad unit inserted after the menu bar");
@@ -930,11 +924,11 @@
924 }
925
926 /*
927 ** Generate a text box for an attribute.
928 */
929 const char *textarea_attribute(
930 const char *zLabel, /* The text label on the textarea */
931 int rows, /* Rows in the textarea */
932 int cols, /* Columns in the textarea */
933 const char *zVar, /* The corresponding row in the VAR table */
934 const char *zQP, /* The query parameter */
@@ -959,10 +953,11 @@
953 @ cols="%d(cols)">%h(z)</textarea>
954 if( zLabel && *zLabel ){
955 @ <span class="textareaLabel">%s(zLabel)</span>
956 }
957 }
958 return z;
959 }
960
961 /*
962 ** Generate a text box for an attribute.
963 */
@@ -1550,159 +1545,10 @@
1545 @ </div></form>
1546 db_end_transaction(0);
1547 style_footer();
1548 }
1549
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1550 /*
1551 ** WEBPAGE: setup_modreq
1552 */
1553 void setup_modreq(void){
1554 login_check_credentials();
@@ -1783,11 +1629,11 @@
1629 @ <b>Ad-Unit Notes:</b><ul>
1630 @ <li>Leave both Ad-Units blank to disable all advertising.
1631 @ <li>The "Banner Ad-Unit" is used for wide pages.
1632 @ <li>The "Right-Column Ad-Unit" is used on pages with tall, narrow content.
1633 @ <li>If the "Right-Column Ad-Unit" is blank, the "Banner Ad-Unit" is used on all pages.
1634 @ <li>Suggested <a href="setup_skinedit?w=0">CSS</a> changes:
1635 @ <blockquote><pre>
1636 @ div.adunit_banner {
1637 @ margin: auto;
1638 @ width: 100%;
1639 @ }
@@ -1897,12 +1743,12 @@
1743 @ <form action="%s(g.zTop)/setup_logo" method="post"
1744 @ enctype="multipart/form-data"><div>
1745 @ <p>The logo is accessible to all users at this URL:
1746 @ <a href="%s(g.zBaseURL)/logo">%s(g.zBaseURL)/logo</a>.
1747 @ The logo may or may not appear on each
1748 @ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
1749 @ <a href="setup_skinedit?w=2">header setup</a>.
1750 @ To change the logo image, use the following form:</p>
1751 login_insert_csrf_secret();
1752 @ Logo Image file:
1753 @ <input type="file" name="logoim" size="60" accept="image/*" />
1754 @ <p align="center">
@@ -1919,12 +1765,12 @@
1765 @ <form action="%s(g.zTop)/setup_logo" method="post"
1766 @ enctype="multipart/form-data"><div>
1767 @ <p>The background image is accessible to all users at this URL:
1768 @ <a href="%s(g.zBaseURL)/background">%s(g.zBaseURL)/background</a>.
1769 @ The background image may or may not appear on each
1770 @ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
1771 @ <a href="setup_skinedit?w=2">header setup</a>.
1772 @ To change the background image, use the following form:</p>
1773 login_insert_csrf_secret();
1774 @ Background image file:
1775 @ <input type="file" name="bgim" size="60" accept="image/*" />
1776 @ <p align="center">
1777
+9 -163
--- src/setup.c
+++ src/setup.c
@@ -69,11 +69,11 @@
6969
/* Make sure the header contains <base href="...">. Issue a warning
7070
** if it does not. */
7171
if( !cgi_header_contains("<base href=") ){
7272
@ <p class="generalError"><b>Configuration Error:</b> Please add
7373
@ <tt>&lt;base href="$secureurl/$current_page"&gt;</tt> after
74
- @ <tt>&lt;head&gt;</tt> in the <a href="setup_header">HTML header</a>!</p>
74
+ @ <tt>&lt;head&gt;</tt> in the <a href="setup_skinedit?w=2">HTML header</a>!</p>
7575
}
7676
7777
#if !defined(_WIN32)
7878
/* Check for /dev/null and /dev/urandom. We want both devices to be present,
7979
** but they are sometimes omitted (by mistake) from chroot jails. */
@@ -107,17 +107,11 @@
107107
setup_menu_entry("Search","srchsetup",
108108
"Configure the built-in search engine");
109109
setup_menu_entry("Transfers", "xfersetup",
110110
"Configure the transfer system for this repository");
111111
setup_menu_entry("Skins", "setup_skin",
112
- "Select from a menu of prepackaged \"skins\" for the web interface");
113
- setup_menu_entry("CSS", "setup_editcss",
114
- "Edit the Cascading Style Sheet used by all pages of this repository");
115
- setup_menu_entry("Header", "setup_header",
116
- "Edit HTML text inserted at the top of every page");
117
- setup_menu_entry("Footer", "setup_footer",
118
- "Edit HTML text inserted at the bottom of every page");
112
+ "Select and/or modify the web interface \"skins\"");
119113
setup_menu_entry("Moderation", "setup_modreq",
120114
"Enable/Disable requiring moderator approval of Wiki and/or Ticket"
121115
" changes and attachments.");
122116
setup_menu_entry("Ad-Unit", "setup_adunit",
123117
"Edit HTML text for an ad unit inserted after the menu bar");
@@ -930,11 +924,11 @@
930924
}
931925
932926
/*
933927
** Generate a text box for an attribute.
934928
*/
935
-static void textarea_attribute(
929
+const char *textarea_attribute(
936930
const char *zLabel, /* The text label on the textarea */
937931
int rows, /* Rows in the textarea */
938932
int cols, /* Columns in the textarea */
939933
const char *zVar, /* The corresponding row in the VAR table */
940934
const char *zQP, /* The query parameter */
@@ -959,10 +953,11 @@
959953
@ cols="%d(cols)">%h(z)</textarea>
960954
if( zLabel && *zLabel ){
961955
@ <span class="textareaLabel">%s(zLabel)</span>
962956
}
963957
}
958
+ return z;
964959
}
965960
966961
/*
967962
** Generate a text box for an attribute.
968963
*/
@@ -1550,159 +1545,10 @@
15501545
@ </div></form>
15511546
db_end_transaction(0);
15521547
style_footer();
15531548
}
15541549
1555
-/*
1556
-** WEBPAGE: setup_editcss
1557
-*/
1558
-void setup_editcss(void){
1559
- login_check_credentials();
1560
- if( !g.perm.Setup ){
1561
- login_needed(0);
1562
- return;
1563
- }
1564
- db_begin_transaction();
1565
- if( P("clear")!=0 ){
1566
- db_multi_exec("DELETE FROM config WHERE name='css'");
1567
- cgi_replace_parameter("css", builtin_text("skins/default/css.txt"));
1568
- db_end_transaction(0);
1569
- cgi_redirect("setup_editcss");
1570
- }
1571
- if( P("submit")!=0 ){
1572
- textarea_attribute(0, 0, 0, "css", "css",
1573
- builtin_text("skins/default/css.txt"), 0);
1574
- db_end_transaction(0);
1575
- cgi_redirect("setup_editcss");
1576
- }
1577
- style_header("Edit CSS");
1578
- @ <form action="%s(g.zTop)/setup_editcss" method="post"><div>
1579
- login_insert_csrf_secret();
1580
- @ Edit the CSS below:<br />
1581
- textarea_attribute("", 35, 80, "css", "css",
1582
- builtin_text("skins/default/css.txt"), 0);
1583
- @ <br />
1584
- @ <input type="submit" name="submit" value="Apply Changes" />
1585
- @ <input type="submit" name="clear" value="Revert To Default" />
1586
- @ </div></form>
1587
- @ <p><span class="note">Note:</span> Press your browser Reload button after
1588
- @ modifying the CSS in order to pull in the modified CSS file.</p>
1589
- @ <hr />
1590
- @ The default CSS is shown below for reference. Other examples
1591
- @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
1592
- @ See also the <a href="setup_header">header</a> and
1593
- @ <a href="setup_footer">footer</a> editing screens.
1594
- @ <blockquote><pre>
1595
- cgi_append_default_css();
1596
- @ </pre></blockquote>
1597
- style_footer();
1598
- db_end_transaction(0);
1599
-}
1600
-
1601
-/*
1602
-** WEBPAGE: setup_header
1603
-*/
1604
-void setup_header(void){
1605
- login_check_credentials();
1606
- if( !g.perm.Setup ){
1607
- login_needed(0);
1608
- return;
1609
- }
1610
- db_begin_transaction();
1611
- if( P("clear")!=0 ){
1612
- db_multi_exec("DELETE FROM config WHERE name='header'");
1613
- cgi_replace_parameter("header", builtin_text("skins/default/header.txt"));
1614
- }else if( P("submit")!=0 ){
1615
- textarea_attribute(0, 0, 0, "header", "header",
1616
- builtin_text("skins/default/header.txt"), 0);
1617
- }else if( P("fixbase")!=0 ){
1618
- const char *z = db_get("header",
1619
- (char*)builtin_text("skins/default/header.txt"));
1620
- char *zHead = strstr(z, "<head>");
1621
- if( strstr(z, "<base href=")==0 && zHead!=0 ){
1622
- char *zNew;
1623
- char *zTail = &zHead[6];
1624
- while( fossil_isspace(zTail[0]) ) zTail++;
1625
- zNew = mprintf("%.*s\n<base href=\"$secureurl/$current_page\" />\n%s",
1626
- zHead+6-z, z, zTail);
1627
- cgi_replace_parameter("header", zNew);
1628
- db_set("header", zNew, 0);
1629
- }
1630
- }
1631
-
1632
- style_header("Edit Page Header");
1633
- @ <form action="%R/setup_header" method="post"><div>
1634
-
1635
- /* Make sure the header contains <base href="...">. Issue a warning
1636
- ** if it does not. */
1637
- if( !cgi_header_contains("<base href=") ){
1638
- @ <p class="generalError">Please add
1639
- @ <tt>&lt;base href="$secureurl/$current_page"&gt;</tt> after
1640
- @ <tt>&lt;head&gt;</tt> in the header!
1641
- @ <input type="submit" name="fixbase" value="Add &lt;base&gt; Now"></p>
1642
- }
1643
-
1644
- login_insert_csrf_secret();
1645
- @ <p>Edit HTML text with embedded TH1 (a Tcl dialect) that will be used to
1646
- @ generate the beginning of every page through start of the main
1647
- @ menu.</p>
1648
- textarea_attribute("", 35, 80, "header", "header",
1649
- builtin_text("skins/default/header.txt"), 0);
1650
- @ <br />
1651
- @ <input type="submit" name="submit" value="Apply Changes" />
1652
- @ <input type="submit" name="clear" value="Revert To Default" />
1653
- @ </div></form>
1654
- @ <hr />
1655
- @ The default header is shown below for reference. Other examples
1656
- @ of headers can be seen on the <a href="setup_skin">skins page</a>.
1657
- @ See also the <a href="setup_editcss">CSS</a> and
1658
- @ <a href="setup_footer">footer</a> editing screens.
1659
- @ <blockquote><pre>
1660
- @ %h(builtin_text("skins/default/header.txt"))
1661
- @ </pre></blockquote>
1662
- style_footer();
1663
- db_end_transaction(0);
1664
-}
1665
-
1666
-/*
1667
-** WEBPAGE: setup_footer
1668
-*/
1669
-void setup_footer(void){
1670
- login_check_credentials();
1671
- if( !g.perm.Setup ){
1672
- login_needed(0);
1673
- return;
1674
- }
1675
- db_begin_transaction();
1676
- if( P("clear")!=0 ){
1677
- db_multi_exec("DELETE FROM config WHERE name='footer'");
1678
- cgi_replace_parameter("footer", builtin_text("skins/default/footer.txt"));
1679
- }
1680
-
1681
- style_header("Edit Page Footer");
1682
- @ <form action="%s(g.zTop)/setup_footer" method="post"><div>
1683
- login_insert_csrf_secret();
1684
- @ <p>Edit HTML text with embedded TH1 (a Tcl dialect) that will be used to
1685
- @ generate the end of every page.</p>
1686
- textarea_attribute("", 20, 80, "footer", "footer",
1687
- builtin_text("skins/default/footer.txt"), 0);
1688
- @ <br />
1689
- @ <input type="submit" name="submit" value="Apply Changes" />
1690
- @ <input type="submit" name="clear" value="Revert To Default" />
1691
- @ </div></form>
1692
- @ <hr />
1693
- @ The default footer is shown below for reference. Other examples
1694
- @ of footers can be seen on the <a href="setup_skin">skins page</a>.
1695
- @ See also the <a href="setup_editcss">CSS</a> and
1696
- @ <a href="setup_header">header</a> editing screens.
1697
- @ <blockquote><pre>
1698
- @ %h(builtin_text("skins/default/footer.txt"))
1699
- @ </pre></blockquote>
1700
- style_footer();
1701
- db_end_transaction(0);
1702
-}
1703
-
17041550
/*
17051551
** WEBPAGE: setup_modreq
17061552
*/
17071553
void setup_modreq(void){
17081554
login_check_credentials();
@@ -1783,11 +1629,11 @@
17831629
@ <b>Ad-Unit Notes:</b><ul>
17841630
@ <li>Leave both Ad-Units blank to disable all advertising.
17851631
@ <li>The "Banner Ad-Unit" is used for wide pages.
17861632
@ <li>The "Right-Column Ad-Unit" is used on pages with tall, narrow content.
17871633
@ <li>If the "Right-Column Ad-Unit" is blank, the "Banner Ad-Unit" is used on all pages.
1788
- @ <li>Suggested <a href="setup_editcss">CSS</a> changes:
1634
+ @ <li>Suggested <a href="setup_skinedit?w=0">CSS</a> changes:
17891635
@ <blockquote><pre>
17901636
@ div.adunit_banner {
17911637
@ margin: auto;
17921638
@ width: 100%;
17931639
@ }
@@ -1897,12 +1743,12 @@
18971743
@ <form action="%s(g.zTop)/setup_logo" method="post"
18981744
@ enctype="multipart/form-data"><div>
18991745
@ <p>The logo is accessible to all users at this URL:
19001746
@ <a href="%s(g.zBaseURL)/logo">%s(g.zBaseURL)/logo</a>.
19011747
@ The logo may or may not appear on each
1902
- @ page depending on the <a href="setup_editcss">CSS</a> and
1903
- @ <a href="setup_header">header setup</a>.
1748
+ @ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
1749
+ @ <a href="setup_skinedit?w=2">header setup</a>.
19041750
@ To change the logo image, use the following form:</p>
19051751
login_insert_csrf_secret();
19061752
@ Logo Image file:
19071753
@ <input type="file" name="logoim" size="60" accept="image/*" />
19081754
@ <p align="center">
@@ -1919,12 +1765,12 @@
19191765
@ <form action="%s(g.zTop)/setup_logo" method="post"
19201766
@ enctype="multipart/form-data"><div>
19211767
@ <p>The background image is accessible to all users at this URL:
19221768
@ <a href="%s(g.zBaseURL)/background">%s(g.zBaseURL)/background</a>.
19231769
@ The background image may or may not appear on each
1924
- @ page depending on the <a href="setup_editcss">CSS</a> and
1925
- @ <a href="setup_header">header setup</a>.
1770
+ @ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
1771
+ @ <a href="setup_skinedit?w=2">header setup</a>.
19261772
@ To change the background image, use the following form:</p>
19271773
login_insert_csrf_secret();
19281774
@ Background image file:
19291775
@ <input type="file" name="bgim" size="60" accept="image/*" />
19301776
@ <p align="center">
19311777
--- src/setup.c
+++ src/setup.c
@@ -69,11 +69,11 @@
69 /* Make sure the header contains <base href="...">. Issue a warning
70 ** if it does not. */
71 if( !cgi_header_contains("<base href=") ){
72 @ <p class="generalError"><b>Configuration Error:</b> Please add
73 @ <tt>&lt;base href="$secureurl/$current_page"&gt;</tt> after
74 @ <tt>&lt;head&gt;</tt> in the <a href="setup_header">HTML header</a>!</p>
75 }
76
77 #if !defined(_WIN32)
78 /* Check for /dev/null and /dev/urandom. We want both devices to be present,
79 ** but they are sometimes omitted (by mistake) from chroot jails. */
@@ -107,17 +107,11 @@
107 setup_menu_entry("Search","srchsetup",
108 "Configure the built-in search engine");
109 setup_menu_entry("Transfers", "xfersetup",
110 "Configure the transfer system for this repository");
111 setup_menu_entry("Skins", "setup_skin",
112 "Select from a menu of prepackaged \"skins\" for the web interface");
113 setup_menu_entry("CSS", "setup_editcss",
114 "Edit the Cascading Style Sheet used by all pages of this repository");
115 setup_menu_entry("Header", "setup_header",
116 "Edit HTML text inserted at the top of every page");
117 setup_menu_entry("Footer", "setup_footer",
118 "Edit HTML text inserted at the bottom of every page");
119 setup_menu_entry("Moderation", "setup_modreq",
120 "Enable/Disable requiring moderator approval of Wiki and/or Ticket"
121 " changes and attachments.");
122 setup_menu_entry("Ad-Unit", "setup_adunit",
123 "Edit HTML text for an ad unit inserted after the menu bar");
@@ -930,11 +924,11 @@
930 }
931
932 /*
933 ** Generate a text box for an attribute.
934 */
935 static void textarea_attribute(
936 const char *zLabel, /* The text label on the textarea */
937 int rows, /* Rows in the textarea */
938 int cols, /* Columns in the textarea */
939 const char *zVar, /* The corresponding row in the VAR table */
940 const char *zQP, /* The query parameter */
@@ -959,10 +953,11 @@
959 @ cols="%d(cols)">%h(z)</textarea>
960 if( zLabel && *zLabel ){
961 @ <span class="textareaLabel">%s(zLabel)</span>
962 }
963 }
 
964 }
965
966 /*
967 ** Generate a text box for an attribute.
968 */
@@ -1550,159 +1545,10 @@
1550 @ </div></form>
1551 db_end_transaction(0);
1552 style_footer();
1553 }
1554
1555 /*
1556 ** WEBPAGE: setup_editcss
1557 */
1558 void setup_editcss(void){
1559 login_check_credentials();
1560 if( !g.perm.Setup ){
1561 login_needed(0);
1562 return;
1563 }
1564 db_begin_transaction();
1565 if( P("clear")!=0 ){
1566 db_multi_exec("DELETE FROM config WHERE name='css'");
1567 cgi_replace_parameter("css", builtin_text("skins/default/css.txt"));
1568 db_end_transaction(0);
1569 cgi_redirect("setup_editcss");
1570 }
1571 if( P("submit")!=0 ){
1572 textarea_attribute(0, 0, 0, "css", "css",
1573 builtin_text("skins/default/css.txt"), 0);
1574 db_end_transaction(0);
1575 cgi_redirect("setup_editcss");
1576 }
1577 style_header("Edit CSS");
1578 @ <form action="%s(g.zTop)/setup_editcss" method="post"><div>
1579 login_insert_csrf_secret();
1580 @ Edit the CSS below:<br />
1581 textarea_attribute("", 35, 80, "css", "css",
1582 builtin_text("skins/default/css.txt"), 0);
1583 @ <br />
1584 @ <input type="submit" name="submit" value="Apply Changes" />
1585 @ <input type="submit" name="clear" value="Revert To Default" />
1586 @ </div></form>
1587 @ <p><span class="note">Note:</span> Press your browser Reload button after
1588 @ modifying the CSS in order to pull in the modified CSS file.</p>
1589 @ <hr />
1590 @ The default CSS is shown below for reference. Other examples
1591 @ of CSS files can be seen on the <a href="setup_skin">skins page</a>.
1592 @ See also the <a href="setup_header">header</a> and
1593 @ <a href="setup_footer">footer</a> editing screens.
1594 @ <blockquote><pre>
1595 cgi_append_default_css();
1596 @ </pre></blockquote>
1597 style_footer();
1598 db_end_transaction(0);
1599 }
1600
1601 /*
1602 ** WEBPAGE: setup_header
1603 */
1604 void setup_header(void){
1605 login_check_credentials();
1606 if( !g.perm.Setup ){
1607 login_needed(0);
1608 return;
1609 }
1610 db_begin_transaction();
1611 if( P("clear")!=0 ){
1612 db_multi_exec("DELETE FROM config WHERE name='header'");
1613 cgi_replace_parameter("header", builtin_text("skins/default/header.txt"));
1614 }else if( P("submit")!=0 ){
1615 textarea_attribute(0, 0, 0, "header", "header",
1616 builtin_text("skins/default/header.txt"), 0);
1617 }else if( P("fixbase")!=0 ){
1618 const char *z = db_get("header",
1619 (char*)builtin_text("skins/default/header.txt"));
1620 char *zHead = strstr(z, "<head>");
1621 if( strstr(z, "<base href=")==0 && zHead!=0 ){
1622 char *zNew;
1623 char *zTail = &zHead[6];
1624 while( fossil_isspace(zTail[0]) ) zTail++;
1625 zNew = mprintf("%.*s\n<base href=\"$secureurl/$current_page\" />\n%s",
1626 zHead+6-z, z, zTail);
1627 cgi_replace_parameter("header", zNew);
1628 db_set("header", zNew, 0);
1629 }
1630 }
1631
1632 style_header("Edit Page Header");
1633 @ <form action="%R/setup_header" method="post"><div>
1634
1635 /* Make sure the header contains <base href="...">. Issue a warning
1636 ** if it does not. */
1637 if( !cgi_header_contains("<base href=") ){
1638 @ <p class="generalError">Please add
1639 @ <tt>&lt;base href="$secureurl/$current_page"&gt;</tt> after
1640 @ <tt>&lt;head&gt;</tt> in the header!
1641 @ <input type="submit" name="fixbase" value="Add &lt;base&gt; Now"></p>
1642 }
1643
1644 login_insert_csrf_secret();
1645 @ <p>Edit HTML text with embedded TH1 (a Tcl dialect) that will be used to
1646 @ generate the beginning of every page through start of the main
1647 @ menu.</p>
1648 textarea_attribute("", 35, 80, "header", "header",
1649 builtin_text("skins/default/header.txt"), 0);
1650 @ <br />
1651 @ <input type="submit" name="submit" value="Apply Changes" />
1652 @ <input type="submit" name="clear" value="Revert To Default" />
1653 @ </div></form>
1654 @ <hr />
1655 @ The default header is shown below for reference. Other examples
1656 @ of headers can be seen on the <a href="setup_skin">skins page</a>.
1657 @ See also the <a href="setup_editcss">CSS</a> and
1658 @ <a href="setup_footer">footer</a> editing screens.
1659 @ <blockquote><pre>
1660 @ %h(builtin_text("skins/default/header.txt"))
1661 @ </pre></blockquote>
1662 style_footer();
1663 db_end_transaction(0);
1664 }
1665
1666 /*
1667 ** WEBPAGE: setup_footer
1668 */
1669 void setup_footer(void){
1670 login_check_credentials();
1671 if( !g.perm.Setup ){
1672 login_needed(0);
1673 return;
1674 }
1675 db_begin_transaction();
1676 if( P("clear")!=0 ){
1677 db_multi_exec("DELETE FROM config WHERE name='footer'");
1678 cgi_replace_parameter("footer", builtin_text("skins/default/footer.txt"));
1679 }
1680
1681 style_header("Edit Page Footer");
1682 @ <form action="%s(g.zTop)/setup_footer" method="post"><div>
1683 login_insert_csrf_secret();
1684 @ <p>Edit HTML text with embedded TH1 (a Tcl dialect) that will be used to
1685 @ generate the end of every page.</p>
1686 textarea_attribute("", 20, 80, "footer", "footer",
1687 builtin_text("skins/default/footer.txt"), 0);
1688 @ <br />
1689 @ <input type="submit" name="submit" value="Apply Changes" />
1690 @ <input type="submit" name="clear" value="Revert To Default" />
1691 @ </div></form>
1692 @ <hr />
1693 @ The default footer is shown below for reference. Other examples
1694 @ of footers can be seen on the <a href="setup_skin">skins page</a>.
1695 @ See also the <a href="setup_editcss">CSS</a> and
1696 @ <a href="setup_header">header</a> editing screens.
1697 @ <blockquote><pre>
1698 @ %h(builtin_text("skins/default/footer.txt"))
1699 @ </pre></blockquote>
1700 style_footer();
1701 db_end_transaction(0);
1702 }
1703
1704 /*
1705 ** WEBPAGE: setup_modreq
1706 */
1707 void setup_modreq(void){
1708 login_check_credentials();
@@ -1783,11 +1629,11 @@
1783 @ <b>Ad-Unit Notes:</b><ul>
1784 @ <li>Leave both Ad-Units blank to disable all advertising.
1785 @ <li>The "Banner Ad-Unit" is used for wide pages.
1786 @ <li>The "Right-Column Ad-Unit" is used on pages with tall, narrow content.
1787 @ <li>If the "Right-Column Ad-Unit" is blank, the "Banner Ad-Unit" is used on all pages.
1788 @ <li>Suggested <a href="setup_editcss">CSS</a> changes:
1789 @ <blockquote><pre>
1790 @ div.adunit_banner {
1791 @ margin: auto;
1792 @ width: 100%;
1793 @ }
@@ -1897,12 +1743,12 @@
1897 @ <form action="%s(g.zTop)/setup_logo" method="post"
1898 @ enctype="multipart/form-data"><div>
1899 @ <p>The logo is accessible to all users at this URL:
1900 @ <a href="%s(g.zBaseURL)/logo">%s(g.zBaseURL)/logo</a>.
1901 @ The logo may or may not appear on each
1902 @ page depending on the <a href="setup_editcss">CSS</a> and
1903 @ <a href="setup_header">header setup</a>.
1904 @ To change the logo image, use the following form:</p>
1905 login_insert_csrf_secret();
1906 @ Logo Image file:
1907 @ <input type="file" name="logoim" size="60" accept="image/*" />
1908 @ <p align="center">
@@ -1919,12 +1765,12 @@
1919 @ <form action="%s(g.zTop)/setup_logo" method="post"
1920 @ enctype="multipart/form-data"><div>
1921 @ <p>The background image is accessible to all users at this URL:
1922 @ <a href="%s(g.zBaseURL)/background">%s(g.zBaseURL)/background</a>.
1923 @ The background image may or may not appear on each
1924 @ page depending on the <a href="setup_editcss">CSS</a> and
1925 @ <a href="setup_header">header setup</a>.
1926 @ To change the background image, use the following form:</p>
1927 login_insert_csrf_secret();
1928 @ Background image file:
1929 @ <input type="file" name="bgim" size="60" accept="image/*" />
1930 @ <p align="center">
1931
--- src/setup.c
+++ src/setup.c
@@ -69,11 +69,11 @@
69 /* Make sure the header contains <base href="...">. Issue a warning
70 ** if it does not. */
71 if( !cgi_header_contains("<base href=") ){
72 @ <p class="generalError"><b>Configuration Error:</b> Please add
73 @ <tt>&lt;base href="$secureurl/$current_page"&gt;</tt> after
74 @ <tt>&lt;head&gt;</tt> in the <a href="setup_skinedit?w=2">HTML header</a>!</p>
75 }
76
77 #if !defined(_WIN32)
78 /* Check for /dev/null and /dev/urandom. We want both devices to be present,
79 ** but they are sometimes omitted (by mistake) from chroot jails. */
@@ -107,17 +107,11 @@
107 setup_menu_entry("Search","srchsetup",
108 "Configure the built-in search engine");
109 setup_menu_entry("Transfers", "xfersetup",
110 "Configure the transfer system for this repository");
111 setup_menu_entry("Skins", "setup_skin",
112 "Select and/or modify the web interface \"skins\"");
 
 
 
 
 
 
113 setup_menu_entry("Moderation", "setup_modreq",
114 "Enable/Disable requiring moderator approval of Wiki and/or Ticket"
115 " changes and attachments.");
116 setup_menu_entry("Ad-Unit", "setup_adunit",
117 "Edit HTML text for an ad unit inserted after the menu bar");
@@ -930,11 +924,11 @@
924 }
925
926 /*
927 ** Generate a text box for an attribute.
928 */
929 const char *textarea_attribute(
930 const char *zLabel, /* The text label on the textarea */
931 int rows, /* Rows in the textarea */
932 int cols, /* Columns in the textarea */
933 const char *zVar, /* The corresponding row in the VAR table */
934 const char *zQP, /* The query parameter */
@@ -959,10 +953,11 @@
953 @ cols="%d(cols)">%h(z)</textarea>
954 if( zLabel && *zLabel ){
955 @ <span class="textareaLabel">%s(zLabel)</span>
956 }
957 }
958 return z;
959 }
960
961 /*
962 ** Generate a text box for an attribute.
963 */
@@ -1550,159 +1545,10 @@
1545 @ </div></form>
1546 db_end_transaction(0);
1547 style_footer();
1548 }
1549
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1550 /*
1551 ** WEBPAGE: setup_modreq
1552 */
1553 void setup_modreq(void){
1554 login_check_credentials();
@@ -1783,11 +1629,11 @@
1629 @ <b>Ad-Unit Notes:</b><ul>
1630 @ <li>Leave both Ad-Units blank to disable all advertising.
1631 @ <li>The "Banner Ad-Unit" is used for wide pages.
1632 @ <li>The "Right-Column Ad-Unit" is used on pages with tall, narrow content.
1633 @ <li>If the "Right-Column Ad-Unit" is blank, the "Banner Ad-Unit" is used on all pages.
1634 @ <li>Suggested <a href="setup_skinedit?w=0">CSS</a> changes:
1635 @ <blockquote><pre>
1636 @ div.adunit_banner {
1637 @ margin: auto;
1638 @ width: 100%;
1639 @ }
@@ -1897,12 +1743,12 @@
1743 @ <form action="%s(g.zTop)/setup_logo" method="post"
1744 @ enctype="multipart/form-data"><div>
1745 @ <p>The logo is accessible to all users at this URL:
1746 @ <a href="%s(g.zBaseURL)/logo">%s(g.zBaseURL)/logo</a>.
1747 @ The logo may or may not appear on each
1748 @ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
1749 @ <a href="setup_skinedit?w=2">header setup</a>.
1750 @ To change the logo image, use the following form:</p>
1751 login_insert_csrf_secret();
1752 @ Logo Image file:
1753 @ <input type="file" name="logoim" size="60" accept="image/*" />
1754 @ <p align="center">
@@ -1919,12 +1765,12 @@
1765 @ <form action="%s(g.zTop)/setup_logo" method="post"
1766 @ enctype="multipart/form-data"><div>
1767 @ <p>The background image is accessible to all users at this URL:
1768 @ <a href="%s(g.zBaseURL)/background">%s(g.zBaseURL)/background</a>.
1769 @ The background image may or may not appear on each
1770 @ page depending on the <a href="setup_skinedit?w=0">CSS</a> and
1771 @ <a href="setup_skinedit?w=2">header setup</a>.
1772 @ To change the background image, use the following form:</p>
1773 login_insert_csrf_secret();
1774 @ Background image file:
1775 @ <input type="file" name="bgim" size="60" accept="image/*" />
1776 @ <p align="center">
1777
+189 -24
--- src/skins.c
+++ src/skins.c
@@ -37,24 +37,23 @@
3737
** 4. Make an entry in the following array for the new skin.
3838
*/
3939
static struct BuiltinSkin {
4040
const char *zDesc; /* Description of this skin */
4141
const char *zLabel; /* The directory under skins/ holding this skin */
42
- int whiteForeground; /* True if this skin uses a light-colored foreground */
4342
char *zSQL; /* Filled in at run-time with SQL to insert this skin */
4443
} aBuiltinSkin[] = {
45
- { "Default", "default", 0, 0 },
46
- { "Blitz", "blitz", 0, 0 },
47
- { "Blitz, No Logo", "blitz_no_logo", 0, 0 },
48
- { "Xekri", "xekri", 0, 0 },
49
- { "Original", "original", 0, 0 },
50
- { "Enhanced Original", "enhanced1", 0, 0 },
51
- { "Shadow boxes & Rounded Corners", "rounded1", 0, 0 },
52
- { "Eagle", "eagle", 1, 0 },
53
- { "Black & White, Menu on Left", "black_and_white", 0, 0 },
54
- { "Plain Gray, No Logo", "plain_gray", 0, 0 },
55
- { "Khaki, No Logo", "khaki", 0, 0 },
44
+ { "Default", "default", 0 },
45
+ { "Blitz", "blitz", 0 },
46
+ { "Blitz, No Logo", "blitz_no_logo", 0 },
47
+ { "Xekri", "xekri", 0 },
48
+ { "Original", "original", 0 },
49
+ { "Enhanced Original", "enhanced1", 0 },
50
+ { "Shadow boxes & Rounded Corners", "rounded1", 0 },
51
+ { "Eagle", "eagle", 0 },
52
+ { "Black & White, Menu on Left", "black_and_white", 0 },
53
+ { "Plain Gray, No Logo", "plain_gray", 0 },
54
+ { "Khaki, No Logo", "khaki", 0 },
5655
};
5756
5857
/*
5958
** Alternative skins can be specified in the CGI script or by options
6059
** on the "http", "ui", and "server" commands. The alternative skin
@@ -64,10 +63,27 @@
6463
** The following static variable holds the name of the alternative skin,
6564
** or NULL if the skin should be as configured.
6665
*/
6766
static struct BuiltinSkin *pAltSkin = 0;
6867
static char *zAltSkinDir = 0;
68
+
69
+/*
70
+** Skin details are a set of key/value pairs that define display
71
+** attributes of the skin that cannot be easily specified using CSS
72
+** or that need to be known on the server-side.
73
+**
74
+** The following array holds the value for all known skin details.
75
+*/
76
+static struct SkinDetail {
77
+ const char *zName; /* Name of the detail */
78
+ char *zValue; /* Value of the detail */
79
+} aSkinDetail[] = {
80
+ { "timeline-arrowheads", "1" },
81
+ { "timeline-circle-nodes", "0" },
82
+ { "timeline-color-graph-lines", "0" },
83
+ { "white-foreground", "0" },
84
+};
6985
7086
/*
7187
** Invoke this routine to set the alternative skin. Return NULL if the
7288
** alternative was successfully installed. Return a string listing all
7389
** available skins if zName does not match an available skin. Memory
@@ -141,18 +157,75 @@
141157
fossil_free(z);
142158
}
143159
}
144160
return zOut;
145161
}
146
-int skin_white_foreground(void){
147
- int rc;
148
- if( pAltSkin ){
149
- rc = pAltSkin->whiteForeground;
150
- }else{
151
- rc = db_get_boolean("white-foreground",0);
152
- }
153
- return rc;
162
+
163
+/*
164
+** Return a pointer to a SkinDetail element. Return 0 if not found.
165
+*/
166
+static struct SkinDetail *skin_detail_find(const char *zName){
167
+ int lwr = 0;
168
+ int upr = ArraySize(aSkinDetail);
169
+ while( upr>=lwr ){
170
+ int mid = (upr+lwr)/2;
171
+ int c = fossil_strcmp(aSkinDetail[mid].zName, zName);
172
+ if( c==0 ) return &aSkinDetail[mid];
173
+ if( c<0 ){
174
+ lwr = mid+1;
175
+ }else{
176
+ upr = mid-1;
177
+ }
178
+ }
179
+ return 0;
180
+}
181
+
182
+/* Initialize the aSkinDetail array using the text in the details.txt
183
+** file.
184
+*/
185
+static void skin_detail_initialize(void){
186
+ static int isInit = 0;
187
+ char *zDetail;
188
+ Blob detail, line, key, value;
189
+ if( isInit ) return;
190
+ isInit = 1;
191
+ zDetail = (char*)skin_get("details");
192
+ if( zDetail==0 ) return;
193
+ zDetail = fossil_strdup(zDetail);
194
+ blob_init(&detail, zDetail, -1);
195
+ while( blob_line(&detail, &line) ){
196
+ char *zKey;
197
+ int nKey;
198
+ struct SkinDetail *pDetail;
199
+ if( !blob_token(&line, &key) ) continue;
200
+ zKey = blob_buffer(&key);
201
+ if( zKey[0]=='#' ) continue;
202
+ nKey = blob_size(&key);
203
+ if( nKey<2 ) continue;
204
+ if( zKey[nKey-1]!=':' ) continue;
205
+ zKey[nKey-1] = 0;
206
+ pDetail = skin_detail_find(zKey);
207
+ if( pDetail==0 ) continue;
208
+ if( !blob_token(&line, &value) ) continue;
209
+ pDetail->zValue = fossil_strdup(blob_str(&value));
210
+ }
211
+ blob_reset(&detail);
212
+ fossil_free(zDetail);
213
+}
214
+
215
+/*
216
+** Return a skin detail setting
217
+*/
218
+const char *skin_detail(const char *zName){
219
+ struct SkinDetail *pDetail;
220
+ skin_detail_initialize();
221
+ pDetail = skin_detail_find(zName);
222
+ if( pDetail==0 ) fossil_fatal("no such skin detail: %s", zName);
223
+ return pDetail->zValue;
224
+}
225
+int skin_detail_boolean(const char *zName){
226
+ return !is_false(skin_detail(zName));
154227
}
155228
156229
/*
157230
** Hash function for computing a skin id.
158231
*/
@@ -227,11 +300,11 @@
227300
** Memory to hold the returned string is obtained from malloc.
228301
*/
229302
static char *getSkin(const char *zName){
230303
const char *z;
231304
char *zLabel;
232
- static const char *azType[] = { "css", "header", "footer" };
305
+ static const char *azType[] = { "css", "header", "footer", "details" };
233306
int i;
234307
Blob val;
235308
blob_zero(&val);
236309
for(i=0; i<sizeof(azType)/sizeof(azType[0]); i++){
237310
if( zName ){
@@ -420,13 +493,15 @@
420493
style_header("Skins");
421494
if( zErr ){
422495
@ <p><font color="red">%h(zErr)</font></p>
423496
}
424497
@ <p>A "skin" is a combination of
425
- @ <a href="setup_editcss">CSS</a>,
426
- @ <a href="setup_header">Header</a>, and
427
- @ <a href="setup_footer">Footer</a> that determines the look and feel
498
+ @ <a href="setup_skinedit?w=0">CSS</a>,
499
+ @ <a href="setup_skinedit?w=2">Header</a>,
500
+ @ <a href="setup_skinedit?w=1">Footer</a>, and
501
+ @ <a href="setup_skinedit?w=3">Details</a>
502
+ @ that determines the look and feel
428503
@ of the web interface.</p>
429504
@
430505
if( pAltSkin ){
431506
@ <p class="generalError">
432507
@ This page is generated using an skin override named
@@ -483,8 +558,98 @@
483558
@ <form action="%s(g.zTop)/setup_skin" method="post">
484559
@ <input type="submit" name="save" value="Save">
485560
@ </form>
486561
}
487562
@ </table>
563
+ style_footer();
564
+ db_end_transaction(0);
565
+}
566
+
567
+
568
+/*
569
+** WEBPAGE: setup_skinedit
570
+**
571
+** w=N -- 0=CSS, 1=footer, 2=header, 3=details
572
+*/
573
+void setup_skinedit(void){
574
+ static const struct sSkinAddr {
575
+ const char *zFile;
576
+ const char *zTitle;
577
+ const char *zSubmenu;
578
+ } aSkinAttr[] = {
579
+ /* 0 */ { "css", "CSS", "CSS", },
580
+ /* 1 */ { "footer", "Page Footer", "Footer", },
581
+ /* 2 */ { "header", "Page Header", "Header", },
582
+ /* 3 */ { "details", "Display Details", "Details", },
583
+ };
584
+ const char *zBasis;
585
+ const char *zContent;
586
+ char *zDflt;
587
+ int ii;
588
+ int j;
589
+
590
+ login_check_credentials();
591
+ if( !g.perm.Setup ){
592
+ login_needed(0);
593
+ return;
594
+ }
595
+ ii = atoi(PD("w","0"));
596
+ if( ii<0 || ii>ArraySize(aSkinAttr) ) ii = 0;
597
+ zBasis = PD("basis","default");
598
+ zDflt = mprintf("skins/%s/%s.txt", zBasis, aSkinAttr[ii].zFile);
599
+ db_begin_transaction();
600
+ if( P("revert")!=0 ){
601
+ db_multi_exec("DELETE FROM config WHERE name=%Q", aSkinAttr[ii].zFile);
602
+ cgi_replace_parameter(aSkinAttr[ii].zFile, builtin_text(zDflt));
603
+ }
604
+ style_header("%s", aSkinAttr[ii].zTitle);
605
+ for(j=0; j<ArraySize(aSkinAttr); j++){
606
+ if( j==ii ) continue;
607
+ style_submenu_element(aSkinAttr[j].zSubmenu, 0,
608
+ "%R/setup_skinedit?w=%d&basis=%h",j,zBasis);
609
+ }
610
+ style_submenu_element("Skins", 0, "%R/setup_skin");
611
+ @ <form action="%s(g.zTop)/setup_skinedit" method="post"><div>
612
+ login_insert_csrf_secret();
613
+ @ <input type='hidden' name='w' value='%d(ii)'>
614
+ @ <h2>Edit %s(aSkinAttr[ii].zTitle):</h2>
615
+ zContent = textarea_attribute("", 10, 80, aSkinAttr[ii].zFile,
616
+ aSkinAttr[ii].zFile, builtin_text(zDflt), 0);
617
+ @ <br />
618
+ @ <input type="submit" name="submit" value="Apply Changes" />
619
+ @ <hr />
620
+ @ Baseline: <select size='1' name='basis'>
621
+ for(j=0; j<ArraySize(aBuiltinSkin); j++){
622
+ cgi_printf("<option value='%h'%s>%h</option>\n",
623
+ aBuiltinSkin[j].zLabel,
624
+ fossil_strcmp(zBasis,aBuiltinSkin[j].zLabel)==0 ? " selected" : "",
625
+ aBuiltinSkin[j].zDesc
626
+ );
627
+ }
628
+ @ </select>
629
+ @ <input type="submit" name="diff" value="Diff" />
630
+ if( P("diff")!=0 ){
631
+ u64 diffFlags = construct_diff_flags(0,0) |
632
+ DIFF_STRIP_EOLCR;
633
+ Blob from, to, out;
634
+ blob_init(&to, zContent, -1);
635
+ blob_init(&from, builtin_text(zDflt), -1);
636
+ blob_zero(&out);
637
+ @ <input type="submit" name="revert" value="Revert" /><p>
638
+ if( diffFlags & DIFF_SIDEBYSIDE ){
639
+ text_diff(&from, &to, &out, 0, diffFlags | DIFF_HTML | DIFF_NOTTOOBIG);
640
+ @ %s(blob_str(&out))
641
+ }else{
642
+ text_diff(&from, &to, &out, 0,
643
+ diffFlags | DIFF_LINENO | DIFF_HTML | DIFF_NOTTOOBIG);
644
+ @ <pre class="udiff">
645
+ @ %s(blob_str(&out))
646
+ @ </pre>
647
+ }
648
+ blob_reset(&from);
649
+ blob_reset(&to);
650
+ blob_reset(&out);
651
+ }
652
+ @ </div></form>
488653
style_footer();
489654
db_end_transaction(0);
490655
}
491656
--- src/skins.c
+++ src/skins.c
@@ -37,24 +37,23 @@
37 ** 4. Make an entry in the following array for the new skin.
38 */
39 static struct BuiltinSkin {
40 const char *zDesc; /* Description of this skin */
41 const char *zLabel; /* The directory under skins/ holding this skin */
42 int whiteForeground; /* True if this skin uses a light-colored foreground */
43 char *zSQL; /* Filled in at run-time with SQL to insert this skin */
44 } aBuiltinSkin[] = {
45 { "Default", "default", 0, 0 },
46 { "Blitz", "blitz", 0, 0 },
47 { "Blitz, No Logo", "blitz_no_logo", 0, 0 },
48 { "Xekri", "xekri", 0, 0 },
49 { "Original", "original", 0, 0 },
50 { "Enhanced Original", "enhanced1", 0, 0 },
51 { "Shadow boxes & Rounded Corners", "rounded1", 0, 0 },
52 { "Eagle", "eagle", 1, 0 },
53 { "Black & White, Menu on Left", "black_and_white", 0, 0 },
54 { "Plain Gray, No Logo", "plain_gray", 0, 0 },
55 { "Khaki, No Logo", "khaki", 0, 0 },
56 };
57
58 /*
59 ** Alternative skins can be specified in the CGI script or by options
60 ** on the "http", "ui", and "server" commands. The alternative skin
@@ -64,10 +63,27 @@
64 ** The following static variable holds the name of the alternative skin,
65 ** or NULL if the skin should be as configured.
66 */
67 static struct BuiltinSkin *pAltSkin = 0;
68 static char *zAltSkinDir = 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
70 /*
71 ** Invoke this routine to set the alternative skin. Return NULL if the
72 ** alternative was successfully installed. Return a string listing all
73 ** available skins if zName does not match an available skin. Memory
@@ -141,18 +157,75 @@
141 fossil_free(z);
142 }
143 }
144 return zOut;
145 }
146 int skin_white_foreground(void){
147 int rc;
148 if( pAltSkin ){
149 rc = pAltSkin->whiteForeground;
150 }else{
151 rc = db_get_boolean("white-foreground",0);
152 }
153 return rc;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154 }
155
156 /*
157 ** Hash function for computing a skin id.
158 */
@@ -227,11 +300,11 @@
227 ** Memory to hold the returned string is obtained from malloc.
228 */
229 static char *getSkin(const char *zName){
230 const char *z;
231 char *zLabel;
232 static const char *azType[] = { "css", "header", "footer" };
233 int i;
234 Blob val;
235 blob_zero(&val);
236 for(i=0; i<sizeof(azType)/sizeof(azType[0]); i++){
237 if( zName ){
@@ -420,13 +493,15 @@
420 style_header("Skins");
421 if( zErr ){
422 @ <p><font color="red">%h(zErr)</font></p>
423 }
424 @ <p>A "skin" is a combination of
425 @ <a href="setup_editcss">CSS</a>,
426 @ <a href="setup_header">Header</a>, and
427 @ <a href="setup_footer">Footer</a> that determines the look and feel
 
 
428 @ of the web interface.</p>
429 @
430 if( pAltSkin ){
431 @ <p class="generalError">
432 @ This page is generated using an skin override named
@@ -483,8 +558,98 @@
483 @ <form action="%s(g.zTop)/setup_skin" method="post">
484 @ <input type="submit" name="save" value="Save">
485 @ </form>
486 }
487 @ </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
488 style_footer();
489 db_end_transaction(0);
490 }
491
--- src/skins.c
+++ src/skins.c
@@ -37,24 +37,23 @@
37 ** 4. Make an entry in the following array for the new skin.
38 */
39 static struct BuiltinSkin {
40 const char *zDesc; /* Description of this skin */
41 const char *zLabel; /* The directory under skins/ holding this skin */
 
42 char *zSQL; /* Filled in at run-time with SQL to insert this skin */
43 } aBuiltinSkin[] = {
44 { "Default", "default", 0 },
45 { "Blitz", "blitz", 0 },
46 { "Blitz, No Logo", "blitz_no_logo", 0 },
47 { "Xekri", "xekri", 0 },
48 { "Original", "original", 0 },
49 { "Enhanced Original", "enhanced1", 0 },
50 { "Shadow boxes & Rounded Corners", "rounded1", 0 },
51 { "Eagle", "eagle", 0 },
52 { "Black & White, Menu on Left", "black_and_white", 0 },
53 { "Plain Gray, No Logo", "plain_gray", 0 },
54 { "Khaki, No Logo", "khaki", 0 },
55 };
56
57 /*
58 ** Alternative skins can be specified in the CGI script or by options
59 ** on the "http", "ui", and "server" commands. The alternative skin
@@ -64,10 +63,27 @@
63 ** The following static variable holds the name of the alternative skin,
64 ** or NULL if the skin should be as configured.
65 */
66 static struct BuiltinSkin *pAltSkin = 0;
67 static char *zAltSkinDir = 0;
68
69 /*
70 ** Skin details are a set of key/value pairs that define display
71 ** attributes of the skin that cannot be easily specified using CSS
72 ** or that need to be known on the server-side.
73 **
74 ** The following array holds the value for all known skin details.
75 */
76 static struct SkinDetail {
77 const char *zName; /* Name of the detail */
78 char *zValue; /* Value of the detail */
79 } aSkinDetail[] = {
80 { "timeline-arrowheads", "1" },
81 { "timeline-circle-nodes", "0" },
82 { "timeline-color-graph-lines", "0" },
83 { "white-foreground", "0" },
84 };
85
86 /*
87 ** Invoke this routine to set the alternative skin. Return NULL if the
88 ** alternative was successfully installed. Return a string listing all
89 ** available skins if zName does not match an available skin. Memory
@@ -141,18 +157,75 @@
157 fossil_free(z);
158 }
159 }
160 return zOut;
161 }
162
163 /*
164 ** Return a pointer to a SkinDetail element. Return 0 if not found.
165 */
166 static struct SkinDetail *skin_detail_find(const char *zName){
167 int lwr = 0;
168 int upr = ArraySize(aSkinDetail);
169 while( upr>=lwr ){
170 int mid = (upr+lwr)/2;
171 int c = fossil_strcmp(aSkinDetail[mid].zName, zName);
172 if( c==0 ) return &aSkinDetail[mid];
173 if( c<0 ){
174 lwr = mid+1;
175 }else{
176 upr = mid-1;
177 }
178 }
179 return 0;
180 }
181
182 /* Initialize the aSkinDetail array using the text in the details.txt
183 ** file.
184 */
185 static void skin_detail_initialize(void){
186 static int isInit = 0;
187 char *zDetail;
188 Blob detail, line, key, value;
189 if( isInit ) return;
190 isInit = 1;
191 zDetail = (char*)skin_get("details");
192 if( zDetail==0 ) return;
193 zDetail = fossil_strdup(zDetail);
194 blob_init(&detail, zDetail, -1);
195 while( blob_line(&detail, &line) ){
196 char *zKey;
197 int nKey;
198 struct SkinDetail *pDetail;
199 if( !blob_token(&line, &key) ) continue;
200 zKey = blob_buffer(&key);
201 if( zKey[0]=='#' ) continue;
202 nKey = blob_size(&key);
203 if( nKey<2 ) continue;
204 if( zKey[nKey-1]!=':' ) continue;
205 zKey[nKey-1] = 0;
206 pDetail = skin_detail_find(zKey);
207 if( pDetail==0 ) continue;
208 if( !blob_token(&line, &value) ) continue;
209 pDetail->zValue = fossil_strdup(blob_str(&value));
210 }
211 blob_reset(&detail);
212 fossil_free(zDetail);
213 }
214
215 /*
216 ** Return a skin detail setting
217 */
218 const char *skin_detail(const char *zName){
219 struct SkinDetail *pDetail;
220 skin_detail_initialize();
221 pDetail = skin_detail_find(zName);
222 if( pDetail==0 ) fossil_fatal("no such skin detail: %s", zName);
223 return pDetail->zValue;
224 }
225 int skin_detail_boolean(const char *zName){
226 return !is_false(skin_detail(zName));
227 }
228
229 /*
230 ** Hash function for computing a skin id.
231 */
@@ -227,11 +300,11 @@
300 ** Memory to hold the returned string is obtained from malloc.
301 */
302 static char *getSkin(const char *zName){
303 const char *z;
304 char *zLabel;
305 static const char *azType[] = { "css", "header", "footer", "details" };
306 int i;
307 Blob val;
308 blob_zero(&val);
309 for(i=0; i<sizeof(azType)/sizeof(azType[0]); i++){
310 if( zName ){
@@ -420,13 +493,15 @@
493 style_header("Skins");
494 if( zErr ){
495 @ <p><font color="red">%h(zErr)</font></p>
496 }
497 @ <p>A "skin" is a combination of
498 @ <a href="setup_skinedit?w=0">CSS</a>,
499 @ <a href="setup_skinedit?w=2">Header</a>,
500 @ <a href="setup_skinedit?w=1">Footer</a>, and
501 @ <a href="setup_skinedit?w=3">Details</a>
502 @ that determines the look and feel
503 @ of the web interface.</p>
504 @
505 if( pAltSkin ){
506 @ <p class="generalError">
507 @ This page is generated using an skin override named
@@ -483,8 +558,98 @@
558 @ <form action="%s(g.zTop)/setup_skin" method="post">
559 @ <input type="submit" name="save" value="Save">
560 @ </form>
561 }
562 @ </table>
563 style_footer();
564 db_end_transaction(0);
565 }
566
567
568 /*
569 ** WEBPAGE: setup_skinedit
570 **
571 ** w=N -- 0=CSS, 1=footer, 2=header, 3=details
572 */
573 void setup_skinedit(void){
574 static const struct sSkinAddr {
575 const char *zFile;
576 const char *zTitle;
577 const char *zSubmenu;
578 } aSkinAttr[] = {
579 /* 0 */ { "css", "CSS", "CSS", },
580 /* 1 */ { "footer", "Page Footer", "Footer", },
581 /* 2 */ { "header", "Page Header", "Header", },
582 /* 3 */ { "details", "Display Details", "Details", },
583 };
584 const char *zBasis;
585 const char *zContent;
586 char *zDflt;
587 int ii;
588 int j;
589
590 login_check_credentials();
591 if( !g.perm.Setup ){
592 login_needed(0);
593 return;
594 }
595 ii = atoi(PD("w","0"));
596 if( ii<0 || ii>ArraySize(aSkinAttr) ) ii = 0;
597 zBasis = PD("basis","default");
598 zDflt = mprintf("skins/%s/%s.txt", zBasis, aSkinAttr[ii].zFile);
599 db_begin_transaction();
600 if( P("revert")!=0 ){
601 db_multi_exec("DELETE FROM config WHERE name=%Q", aSkinAttr[ii].zFile);
602 cgi_replace_parameter(aSkinAttr[ii].zFile, builtin_text(zDflt));
603 }
604 style_header("%s", aSkinAttr[ii].zTitle);
605 for(j=0; j<ArraySize(aSkinAttr); j++){
606 if( j==ii ) continue;
607 style_submenu_element(aSkinAttr[j].zSubmenu, 0,
608 "%R/setup_skinedit?w=%d&basis=%h",j,zBasis);
609 }
610 style_submenu_element("Skins", 0, "%R/setup_skin");
611 @ <form action="%s(g.zTop)/setup_skinedit" method="post"><div>
612 login_insert_csrf_secret();
613 @ <input type='hidden' name='w' value='%d(ii)'>
614 @ <h2>Edit %s(aSkinAttr[ii].zTitle):</h2>
615 zContent = textarea_attribute("", 10, 80, aSkinAttr[ii].zFile,
616 aSkinAttr[ii].zFile, builtin_text(zDflt), 0);
617 @ <br />
618 @ <input type="submit" name="submit" value="Apply Changes" />
619 @ <hr />
620 @ Baseline: <select size='1' name='basis'>
621 for(j=0; j<ArraySize(aBuiltinSkin); j++){
622 cgi_printf("<option value='%h'%s>%h</option>\n",
623 aBuiltinSkin[j].zLabel,
624 fossil_strcmp(zBasis,aBuiltinSkin[j].zLabel)==0 ? " selected" : "",
625 aBuiltinSkin[j].zDesc
626 );
627 }
628 @ </select>
629 @ <input type="submit" name="diff" value="Diff" />
630 if( P("diff")!=0 ){
631 u64 diffFlags = construct_diff_flags(0,0) |
632 DIFF_STRIP_EOLCR;
633 Blob from, to, out;
634 blob_init(&to, zContent, -1);
635 blob_init(&from, builtin_text(zDflt), -1);
636 blob_zero(&out);
637 @ <input type="submit" name="revert" value="Revert" /><p>
638 if( diffFlags & DIFF_SIDEBYSIDE ){
639 text_diff(&from, &to, &out, 0, diffFlags | DIFF_HTML | DIFF_NOTTOOBIG);
640 @ %s(blob_str(&out))
641 }else{
642 text_diff(&from, &to, &out, 0,
643 diffFlags | DIFF_LINENO | DIFF_HTML | DIFF_NOTTOOBIG);
644 @ <pre class="udiff">
645 @ %s(blob_str(&out))
646 @ </pre>
647 }
648 blob_reset(&from);
649 blob_reset(&to);
650 blob_reset(&out);
651 }
652 @ </div></form>
653 style_footer();
654 db_end_transaction(0);
655 }
656
+86 -31
--- src/timeline.c
+++ src/timeline.c
@@ -108,11 +108,11 @@
108108
int mx, mn; /* Components of HSV */
109109
static char zColor[10]; /* The resulting color */
110110
static int ix[2] = {0,0}; /* Color chooser parameters */
111111
112112
if( ix[0]==0 ){
113
- if( db_get_boolean("white-foreground", 0) ){
113
+ if( skin_detail_boolean("white-foreground") ){
114114
ix[0] = 140;
115115
ix[1] = 40;
116116
}else{
117117
ix[0] = 216;
118118
ix[1] = 16;
@@ -596,10 +596,41 @@
596596
}
597597
@ </table>
598598
if( fchngQueryInit ) db_finalize(&fchngQuery);
599599
timeline_output_graph_javascript(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0, 0);
600600
}
601
+
602
+/*
603
+** Change the RGB background color given in the argument in a foreground
604
+** color with the same hue.
605
+*/
606
+static const char *bg_to_fg(const char *zIn){
607
+ int i;
608
+ unsigned int x[3];
609
+ unsigned int mx = 0;
610
+ static int whiteFg = -1;
611
+ static char zRes[10];
612
+ if( strlen(zIn)!=7 || zIn[0]!='#' ) return zIn;
613
+ zIn++;
614
+ for(i=0; i<3; i++){
615
+ x[i] = hex_digit_value(zIn[0])*16 + hex_digit_value(zIn[1]);
616
+ zIn += 2;
617
+ if( x[i]>mx ) mx = x[i];
618
+ }
619
+ if( whiteFg<0 ) whiteFg = skin_detail_boolean("white-foreground");
620
+ if( whiteFg ){
621
+ /* Make the color lighter */
622
+ static const unsigned int t = 215;
623
+ if( mx<t ) for(i=0; i<3; i++) x[i] += t - mx;
624
+ }else{
625
+ /* Make the color darker */
626
+ static const unsigned int t = 128;
627
+ if( mx>t ) for(i=0; i<3; i++) x[i] -= mx - t;
628
+ }
629
+ sqlite3_snprintf(sizeof(zRes),zRes,"#%02x%02x%02x",x[0],x[1],x[2]);
630
+ return zRes;
631
+}
601632
602633
/*
603634
** Generate all of the necessary javascript to generate a timeline
604635
** graph.
605636
*/
@@ -612,11 +643,18 @@
612643
GraphRow *pRow;
613644
int i;
614645
char cSep;
615646
int mergeOffset; /* Pixel offset from rail to merge riser */
616647
int iRailPitch; /* Pixels between consecutive rails */
648
+ int showArrowheads; /* True to draw arrowheads. False to omit. */
649
+ int circleNodes; /* True for circle nodes. False for square nodes */
650
+ int colorGraph; /* Use colors for graph lines */
651
+
617652
iRailPitch = pGraph->iRailPitch;
653
+ showArrowheads = skin_detail_boolean("timeline-arrowheads");
654
+ circleNodes = skin_detail_boolean("timeline-circle-nodes");
655
+ colorGraph = skin_detail_boolean("timeline-color-graph-lines");
618656
619657
/* Number of pixels that the thin merge lines are offset from the
620658
** the center of the think rail lines. If zero, then the vertical
621659
** merge lines overlap with the thicker rail lines.
622660
*/
@@ -689,12 +727,16 @@
689727
cgi_printf("%c%d,%d", cSep, i, pRow->aiRiser[i]);
690728
cSep = ',';
691729
}
692730
}
693731
if( cSep=='[' ) cgi_printf("[");
694
- cgi_printf("],mi:");
732
+ cgi_printf("],");
733
+ if( colorGraph && pRow->zBgClr[0]=='#' ){
734
+ cgi_printf("fg:\"%s\",", bg_to_fg(pRow->zBgClr));
735
+ }
695736
/* mi */
737
+ cgi_printf("mi:");
696738
cSep = '[';
697739
for(i=0; i<GR_MAX_RAIL; i++){
698740
if( pRow->mergeIn[i] ){
699741
int mi = i*iRailPitch;
700742
if( pRow->mergeIn[i]==1 ) mi -= mergeOffset-1;
@@ -751,34 +793,40 @@
751793
@ left += obj.offsetLeft;
752794
@ }while( obj = obj.offsetParent );
753795
@ }
754796
@ return left;
755797
@ }
756
- @ function drawUpArrow(x,y0,y1){
757
- @ drawBox(lineClr,x,y0+4,x+1,y1);
758
- @ var n = document.createElement("div"),
759
- @ l = x-2,
760
- @ t = y0;
761
- @ n.style.position = "absolute";
762
- @ n.style.left = l+"px";
763
- @ n.style.top = t+"px";
764
- @ n.style.width = 0;
765
- @ n.style.height = 0;
766
- @ n.style.transform = "scale(.999)";
767
- @ n.style.borderWidth = 0;
768
- @ n.style.borderStyle = "solid";
769
- @ n.style.borderColor = "transparent";
770
- @ n.style.borderRightWidth = "3px";
771
- @ n.style.borderBottomColor = lineClr;
772
- @ n.style.borderLeftWidth = "3px";
773
- @ if( y0+10>=y1 ){
774
- @ n.style.borderBottomWidth = "5px";
775
- @ } else {
776
- @ n.style.borderBottomWidth = "7px";
777
- @ }
778
- @ cDiv.appendChild(n);
779
- @ }
798
+ if( showArrowheads ){
799
+ @ function drawUpArrow(x,y0,y1,clr){
800
+ @ drawBox(clr,x,y0+4,x+1,y1);
801
+ @ var n = document.createElement("div"),
802
+ @ l = x-2,
803
+ @ t = y0;
804
+ @ n.style.position = "absolute";
805
+ @ n.style.left = l+"px";
806
+ @ n.style.top = t+"px";
807
+ @ n.style.width = 0;
808
+ @ n.style.height = 0;
809
+ @ n.style.transform = "scale(.999)";
810
+ @ n.style.borderWidth = 0;
811
+ @ n.style.borderStyle = "solid";
812
+ @ n.style.borderColor = "transparent";
813
+ @ n.style.borderRightWidth = "3px";
814
+ @ n.style.borderBottomColor = clr;
815
+ @ n.style.borderLeftWidth = "3px";
816
+ @ if( y0+10>=y1 ){
817
+ @ n.style.borderBottomWidth = "5px";
818
+ @ } else {
819
+ @ n.style.borderBottomWidth = "7px";
820
+ @ }
821
+ @ cDiv.appendChild(n);
822
+ @ }
823
+ }else{
824
+ @ function drawUpArrow(x,y0,y1,clr){
825
+ @ drawBox(clr,x,y0+1,x+1,y1);
826
+ @ }
827
+ }
780828
@ function drawThinArrow(y,xFrom,xTo){
781829
@ var n = document.createElement("div"),
782830
@ t = y-2;
783831
@ n.style.position = "absolute";
784832
@ n.style.top = t+"px";
@@ -805,20 +853,24 @@
805853
@ }
806854
@ function drawThinLine(x0,y0,x1,y1){
807855
@ drawBox(lineClr,x0,y0,x1,y1);
808856
@ }
809857
@ function drawNodeBox(color,x0,y0,x1,y1){
810
- @ drawBox(color,x0,y0,x1,y1).style.cursor = "pointer";
858
+ @ var n = drawBox(color,x0,y0,x1,y1);
859
+ @ n.style.cursor = "pointer";
860
+ if( circleNodes ){
861
+ @ n.style.borderRadius = "6px";
862
+ }
811863
@ }
812864
@ function drawNode(p, left, btm){
813865
@ drawNodeBox(boxColor,p.x-5,p.y-5,p.x+6,p.y+6);
814866
@ drawNodeBox(p.bg||bgClr,p.x-4,p.y-4,p.x+5,p.y+5);
815
- @ if( p.u>0 ) drawUpArrow(p.x, rowinfo[p.u-1].y+6, p.y-5);
867
+ @ if( p.u>0 ) drawUpArrow(p.x,rowinfo[p.u-1].y+6,p.y-6,p.fg||lineClr);
816868
@ if( p.f&1 ) drawNodeBox(boxColor,p.x-1,p.y-1,p.x+2,p.y+2);
817869
if( !omitDescenders ){
818
- @ if( p.u==0 ) drawUpArrow(p.x, 0, p.y-5);
819
- @ if( p.d ) drawUpArrow(p.x, p.y+6, btm);
870
+ @ if( p.u==0 ) drawUpArrow(p.x,0,p.y-6,p.fg||lineClr);
871
+ @ if( p.d ) drawUpArrow(p.x,p.y+6,btm,p.fg||lineClr);
820872
}
821873
@ if( p.mo>0 ){
822874
@ var x1 = p.mo + left - 1;
823875
@ var y1 = p.y-3;
824876
@ var x0 = x1>p.x ? p.x+7 : p.x-6;
@@ -837,11 +889,11 @@
837889
@ var x1 = p.au[i]*railPitch + left;
838890
@ var x0 = x1>p.x ? p.x+7 : p.x-6;
839891
@ var u = rowinfo[p.au[i+1]-1];
840892
@ if(u.id<p.id){
841893
@ drawBox(lineClr,x0,p.y,x1+1,p.y+1);
842
- @ drawUpArrow(x1, u.y+6, p.y);
894
+ @ drawUpArrow(x1,u.y+6,p.y,p.fg||lineClr);
843895
@ }else{
844896
@ drawBox("#600000",x0,p.y,x1,p.y+1);
845897
@ drawBox("#600000",x1-1,p.y,x1,u.y+1);
846898
@ drawBox("#600000",x1,u.y,u.x-10,u.y+1);
847899
@ var n = document.createElement("div"),
@@ -924,10 +976,13 @@
924976
@ }
925977
@ }
926978
@ function clickOnRow(p){
927979
@ if( selRow==null ){
928980
@ selBox = drawBox("red",p.x-2,p.y-2,p.x+3,p.y+3);
981
+ if( circleNodes ){
982
+ @ selBox.style.borderRadius="6px";
983
+ }
929984
@ selRow = p;
930985
@ }else if( selRow==p ){
931986
@ var canvasDiv = gebi("canvas");
932987
@ canvasDiv.removeChild(selBox);
933988
@ selBox = null;
934989
--- src/timeline.c
+++ src/timeline.c
@@ -108,11 +108,11 @@
108 int mx, mn; /* Components of HSV */
109 static char zColor[10]; /* The resulting color */
110 static int ix[2] = {0,0}; /* Color chooser parameters */
111
112 if( ix[0]==0 ){
113 if( db_get_boolean("white-foreground", 0) ){
114 ix[0] = 140;
115 ix[1] = 40;
116 }else{
117 ix[0] = 216;
118 ix[1] = 16;
@@ -596,10 +596,41 @@
596 }
597 @ </table>
598 if( fchngQueryInit ) db_finalize(&fchngQuery);
599 timeline_output_graph_javascript(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0, 0);
600 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
601
602 /*
603 ** Generate all of the necessary javascript to generate a timeline
604 ** graph.
605 */
@@ -612,11 +643,18 @@
612 GraphRow *pRow;
613 int i;
614 char cSep;
615 int mergeOffset; /* Pixel offset from rail to merge riser */
616 int iRailPitch; /* Pixels between consecutive rails */
 
 
 
 
617 iRailPitch = pGraph->iRailPitch;
 
 
 
618
619 /* Number of pixels that the thin merge lines are offset from the
620 ** the center of the think rail lines. If zero, then the vertical
621 ** merge lines overlap with the thicker rail lines.
622 */
@@ -689,12 +727,16 @@
689 cgi_printf("%c%d,%d", cSep, i, pRow->aiRiser[i]);
690 cSep = ',';
691 }
692 }
693 if( cSep=='[' ) cgi_printf("[");
694 cgi_printf("],mi:");
 
 
 
695 /* mi */
 
696 cSep = '[';
697 for(i=0; i<GR_MAX_RAIL; i++){
698 if( pRow->mergeIn[i] ){
699 int mi = i*iRailPitch;
700 if( pRow->mergeIn[i]==1 ) mi -= mergeOffset-1;
@@ -751,34 +793,40 @@
751 @ left += obj.offsetLeft;
752 @ }while( obj = obj.offsetParent );
753 @ }
754 @ return left;
755 @ }
756 @ function drawUpArrow(x,y0,y1){
757 @ drawBox(lineClr,x,y0+4,x+1,y1);
758 @ var n = document.createElement("div"),
759 @ l = x-2,
760 @ t = y0;
761 @ n.style.position = "absolute";
762 @ n.style.left = l+"px";
763 @ n.style.top = t+"px";
764 @ n.style.width = 0;
765 @ n.style.height = 0;
766 @ n.style.transform = "scale(.999)";
767 @ n.style.borderWidth = 0;
768 @ n.style.borderStyle = "solid";
769 @ n.style.borderColor = "transparent";
770 @ n.style.borderRightWidth = "3px";
771 @ n.style.borderBottomColor = lineClr;
772 @ n.style.borderLeftWidth = "3px";
773 @ if( y0+10>=y1 ){
774 @ n.style.borderBottomWidth = "5px";
775 @ } else {
776 @ n.style.borderBottomWidth = "7px";
777 @ }
778 @ cDiv.appendChild(n);
779 @ }
 
 
 
 
 
 
780 @ function drawThinArrow(y,xFrom,xTo){
781 @ var n = document.createElement("div"),
782 @ t = y-2;
783 @ n.style.position = "absolute";
784 @ n.style.top = t+"px";
@@ -805,20 +853,24 @@
805 @ }
806 @ function drawThinLine(x0,y0,x1,y1){
807 @ drawBox(lineClr,x0,y0,x1,y1);
808 @ }
809 @ function drawNodeBox(color,x0,y0,x1,y1){
810 @ drawBox(color,x0,y0,x1,y1).style.cursor = "pointer";
 
 
 
 
811 @ }
812 @ function drawNode(p, left, btm){
813 @ drawNodeBox(boxColor,p.x-5,p.y-5,p.x+6,p.y+6);
814 @ drawNodeBox(p.bg||bgClr,p.x-4,p.y-4,p.x+5,p.y+5);
815 @ if( p.u>0 ) drawUpArrow(p.x, rowinfo[p.u-1].y+6, p.y-5);
816 @ if( p.f&1 ) drawNodeBox(boxColor,p.x-1,p.y-1,p.x+2,p.y+2);
817 if( !omitDescenders ){
818 @ if( p.u==0 ) drawUpArrow(p.x, 0, p.y-5);
819 @ if( p.d ) drawUpArrow(p.x, p.y+6, btm);
820 }
821 @ if( p.mo>0 ){
822 @ var x1 = p.mo + left - 1;
823 @ var y1 = p.y-3;
824 @ var x0 = x1>p.x ? p.x+7 : p.x-6;
@@ -837,11 +889,11 @@
837 @ var x1 = p.au[i]*railPitch + left;
838 @ var x0 = x1>p.x ? p.x+7 : p.x-6;
839 @ var u = rowinfo[p.au[i+1]-1];
840 @ if(u.id<p.id){
841 @ drawBox(lineClr,x0,p.y,x1+1,p.y+1);
842 @ drawUpArrow(x1, u.y+6, p.y);
843 @ }else{
844 @ drawBox("#600000",x0,p.y,x1,p.y+1);
845 @ drawBox("#600000",x1-1,p.y,x1,u.y+1);
846 @ drawBox("#600000",x1,u.y,u.x-10,u.y+1);
847 @ var n = document.createElement("div"),
@@ -924,10 +976,13 @@
924 @ }
925 @ }
926 @ function clickOnRow(p){
927 @ if( selRow==null ){
928 @ selBox = drawBox("red",p.x-2,p.y-2,p.x+3,p.y+3);
 
 
 
929 @ selRow = p;
930 @ }else if( selRow==p ){
931 @ var canvasDiv = gebi("canvas");
932 @ canvasDiv.removeChild(selBox);
933 @ selBox = null;
934
--- src/timeline.c
+++ src/timeline.c
@@ -108,11 +108,11 @@
108 int mx, mn; /* Components of HSV */
109 static char zColor[10]; /* The resulting color */
110 static int ix[2] = {0,0}; /* Color chooser parameters */
111
112 if( ix[0]==0 ){
113 if( skin_detail_boolean("white-foreground") ){
114 ix[0] = 140;
115 ix[1] = 40;
116 }else{
117 ix[0] = 216;
118 ix[1] = 16;
@@ -596,10 +596,41 @@
596 }
597 @ </table>
598 if( fchngQueryInit ) db_finalize(&fchngQuery);
599 timeline_output_graph_javascript(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0, 0);
600 }
601
602 /*
603 ** Change the RGB background color given in the argument in a foreground
604 ** color with the same hue.
605 */
606 static const char *bg_to_fg(const char *zIn){
607 int i;
608 unsigned int x[3];
609 unsigned int mx = 0;
610 static int whiteFg = -1;
611 static char zRes[10];
612 if( strlen(zIn)!=7 || zIn[0]!='#' ) return zIn;
613 zIn++;
614 for(i=0; i<3; i++){
615 x[i] = hex_digit_value(zIn[0])*16 + hex_digit_value(zIn[1]);
616 zIn += 2;
617 if( x[i]>mx ) mx = x[i];
618 }
619 if( whiteFg<0 ) whiteFg = skin_detail_boolean("white-foreground");
620 if( whiteFg ){
621 /* Make the color lighter */
622 static const unsigned int t = 215;
623 if( mx<t ) for(i=0; i<3; i++) x[i] += t - mx;
624 }else{
625 /* Make the color darker */
626 static const unsigned int t = 128;
627 if( mx>t ) for(i=0; i<3; i++) x[i] -= mx - t;
628 }
629 sqlite3_snprintf(sizeof(zRes),zRes,"#%02x%02x%02x",x[0],x[1],x[2]);
630 return zRes;
631 }
632
633 /*
634 ** Generate all of the necessary javascript to generate a timeline
635 ** graph.
636 */
@@ -612,11 +643,18 @@
643 GraphRow *pRow;
644 int i;
645 char cSep;
646 int mergeOffset; /* Pixel offset from rail to merge riser */
647 int iRailPitch; /* Pixels between consecutive rails */
648 int showArrowheads; /* True to draw arrowheads. False to omit. */
649 int circleNodes; /* True for circle nodes. False for square nodes */
650 int colorGraph; /* Use colors for graph lines */
651
652 iRailPitch = pGraph->iRailPitch;
653 showArrowheads = skin_detail_boolean("timeline-arrowheads");
654 circleNodes = skin_detail_boolean("timeline-circle-nodes");
655 colorGraph = skin_detail_boolean("timeline-color-graph-lines");
656
657 /* Number of pixels that the thin merge lines are offset from the
658 ** the center of the think rail lines. If zero, then the vertical
659 ** merge lines overlap with the thicker rail lines.
660 */
@@ -689,12 +727,16 @@
727 cgi_printf("%c%d,%d", cSep, i, pRow->aiRiser[i]);
728 cSep = ',';
729 }
730 }
731 if( cSep=='[' ) cgi_printf("[");
732 cgi_printf("],");
733 if( colorGraph && pRow->zBgClr[0]=='#' ){
734 cgi_printf("fg:\"%s\",", bg_to_fg(pRow->zBgClr));
735 }
736 /* mi */
737 cgi_printf("mi:");
738 cSep = '[';
739 for(i=0; i<GR_MAX_RAIL; i++){
740 if( pRow->mergeIn[i] ){
741 int mi = i*iRailPitch;
742 if( pRow->mergeIn[i]==1 ) mi -= mergeOffset-1;
@@ -751,34 +793,40 @@
793 @ left += obj.offsetLeft;
794 @ }while( obj = obj.offsetParent );
795 @ }
796 @ return left;
797 @ }
798 if( showArrowheads ){
799 @ function drawUpArrow(x,y0,y1,clr){
800 @ drawBox(clr,x,y0+4,x+1,y1);
801 @ var n = document.createElement("div"),
802 @ l = x-2,
803 @ t = y0;
804 @ n.style.position = "absolute";
805 @ n.style.left = l+"px";
806 @ n.style.top = t+"px";
807 @ n.style.width = 0;
808 @ n.style.height = 0;
809 @ n.style.transform = "scale(.999)";
810 @ n.style.borderWidth = 0;
811 @ n.style.borderStyle = "solid";
812 @ n.style.borderColor = "transparent";
813 @ n.style.borderRightWidth = "3px";
814 @ n.style.borderBottomColor = clr;
815 @ n.style.borderLeftWidth = "3px";
816 @ if( y0+10>=y1 ){
817 @ n.style.borderBottomWidth = "5px";
818 @ } else {
819 @ n.style.borderBottomWidth = "7px";
820 @ }
821 @ cDiv.appendChild(n);
822 @ }
823 }else{
824 @ function drawUpArrow(x,y0,y1,clr){
825 @ drawBox(clr,x,y0+1,x+1,y1);
826 @ }
827 }
828 @ function drawThinArrow(y,xFrom,xTo){
829 @ var n = document.createElement("div"),
830 @ t = y-2;
831 @ n.style.position = "absolute";
832 @ n.style.top = t+"px";
@@ -805,20 +853,24 @@
853 @ }
854 @ function drawThinLine(x0,y0,x1,y1){
855 @ drawBox(lineClr,x0,y0,x1,y1);
856 @ }
857 @ function drawNodeBox(color,x0,y0,x1,y1){
858 @ var n = drawBox(color,x0,y0,x1,y1);
859 @ n.style.cursor = "pointer";
860 if( circleNodes ){
861 @ n.style.borderRadius = "6px";
862 }
863 @ }
864 @ function drawNode(p, left, btm){
865 @ drawNodeBox(boxColor,p.x-5,p.y-5,p.x+6,p.y+6);
866 @ drawNodeBox(p.bg||bgClr,p.x-4,p.y-4,p.x+5,p.y+5);
867 @ if( p.u>0 ) drawUpArrow(p.x,rowinfo[p.u-1].y+6,p.y-6,p.fg||lineClr);
868 @ if( p.f&1 ) drawNodeBox(boxColor,p.x-1,p.y-1,p.x+2,p.y+2);
869 if( !omitDescenders ){
870 @ if( p.u==0 ) drawUpArrow(p.x,0,p.y-6,p.fg||lineClr);
871 @ if( p.d ) drawUpArrow(p.x,p.y+6,btm,p.fg||lineClr);
872 }
873 @ if( p.mo>0 ){
874 @ var x1 = p.mo + left - 1;
875 @ var y1 = p.y-3;
876 @ var x0 = x1>p.x ? p.x+7 : p.x-6;
@@ -837,11 +889,11 @@
889 @ var x1 = p.au[i]*railPitch + left;
890 @ var x0 = x1>p.x ? p.x+7 : p.x-6;
891 @ var u = rowinfo[p.au[i+1]-1];
892 @ if(u.id<p.id){
893 @ drawBox(lineClr,x0,p.y,x1+1,p.y+1);
894 @ drawUpArrow(x1,u.y+6,p.y,p.fg||lineClr);
895 @ }else{
896 @ drawBox("#600000",x0,p.y,x1,p.y+1);
897 @ drawBox("#600000",x1-1,p.y,x1,u.y+1);
898 @ drawBox("#600000",x1,u.y,u.x-10,u.y+1);
899 @ var n = document.createElement("div"),
@@ -924,10 +976,13 @@
976 @ }
977 @ }
978 @ function clickOnRow(p){
979 @ if( selRow==null ){
980 @ selBox = drawBox("red",p.x-2,p.y-2,p.x+3,p.y+3);
981 if( circleNodes ){
982 @ selBox.style.borderRadius="6px";
983 }
984 @ selRow = p;
985 @ }else if( selRow==p ){
986 @ var canvasDiv = gebi("canvas");
987 @ canvasDiv.removeChild(selBox);
988 @ selBox = null;
989
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -485,43 +485,55 @@
485485
$(SRCDIR)/xfer.c \
486486
$(SRCDIR)/xfersetup.c \
487487
$(SRCDIR)/zip.c
488488
489489
EXTRA_FILES = \
490
+ $(SRCDIR)/../skins/aht/details.txt \
490491
$(SRCDIR)/../skins/black_and_white/css.txt \
492
+ $(SRCDIR)/../skins/black_and_white/details.txt \
491493
$(SRCDIR)/../skins/black_and_white/footer.txt \
492494
$(SRCDIR)/../skins/black_and_white/header.txt \
493495
$(SRCDIR)/../skins/blitz/css.txt \
496
+ $(SRCDIR)/../skins/blitz/details.txt \
494497
$(SRCDIR)/../skins/blitz/footer.txt \
495498
$(SRCDIR)/../skins/blitz/header.txt \
496499
$(SRCDIR)/../skins/blitz/ticket.txt \
497500
$(SRCDIR)/../skins/blitz_no_logo/css.txt \
501
+ $(SRCDIR)/../skins/blitz_no_logo/details.txt \
498502
$(SRCDIR)/../skins/blitz_no_logo/footer.txt \
499503
$(SRCDIR)/../skins/blitz_no_logo/header.txt \
500504
$(SRCDIR)/../skins/blitz_no_logo/ticket.txt \
501505
$(SRCDIR)/../skins/default/css.txt \
506
+ $(SRCDIR)/../skins/default/details.txt \
502507
$(SRCDIR)/../skins/default/footer.txt \
503508
$(SRCDIR)/../skins/default/header.txt \
504509
$(SRCDIR)/../skins/eagle/css.txt \
510
+ $(SRCDIR)/../skins/eagle/details.txt \
505511
$(SRCDIR)/../skins/eagle/footer.txt \
506512
$(SRCDIR)/../skins/eagle/header.txt \
507513
$(SRCDIR)/../skins/enhanced1/css.txt \
514
+ $(SRCDIR)/../skins/enhanced1/details.txt \
508515
$(SRCDIR)/../skins/enhanced1/footer.txt \
509516
$(SRCDIR)/../skins/enhanced1/header.txt \
510517
$(SRCDIR)/../skins/khaki/css.txt \
518
+ $(SRCDIR)/../skins/khaki/details.txt \
511519
$(SRCDIR)/../skins/khaki/footer.txt \
512520
$(SRCDIR)/../skins/khaki/header.txt \
513521
$(SRCDIR)/../skins/original/css.txt \
522
+ $(SRCDIR)/../skins/original/details.txt \
514523
$(SRCDIR)/../skins/original/footer.txt \
515524
$(SRCDIR)/../skins/original/header.txt \
516525
$(SRCDIR)/../skins/plain_gray/css.txt \
526
+ $(SRCDIR)/../skins/plain_gray/details.txt \
517527
$(SRCDIR)/../skins/plain_gray/footer.txt \
518528
$(SRCDIR)/../skins/plain_gray/header.txt \
519529
$(SRCDIR)/../skins/rounded1/css.txt \
530
+ $(SRCDIR)/../skins/rounded1/details.txt \
520531
$(SRCDIR)/../skins/rounded1/footer.txt \
521532
$(SRCDIR)/../skins/rounded1/header.txt \
522533
$(SRCDIR)/../skins/xekri/css.txt \
534
+ $(SRCDIR)/../skins/xekri/details.txt \
523535
$(SRCDIR)/../skins/xekri/footer.txt \
524536
$(SRCDIR)/../skins/xekri/header.txt \
525537
$(SRCDIR)/diff.tcl \
526538
$(SRCDIR)/markdown.md
527539
528540
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -485,43 +485,55 @@
485 $(SRCDIR)/xfer.c \
486 $(SRCDIR)/xfersetup.c \
487 $(SRCDIR)/zip.c
488
489 EXTRA_FILES = \
 
490 $(SRCDIR)/../skins/black_and_white/css.txt \
 
491 $(SRCDIR)/../skins/black_and_white/footer.txt \
492 $(SRCDIR)/../skins/black_and_white/header.txt \
493 $(SRCDIR)/../skins/blitz/css.txt \
 
494 $(SRCDIR)/../skins/blitz/footer.txt \
495 $(SRCDIR)/../skins/blitz/header.txt \
496 $(SRCDIR)/../skins/blitz/ticket.txt \
497 $(SRCDIR)/../skins/blitz_no_logo/css.txt \
 
498 $(SRCDIR)/../skins/blitz_no_logo/footer.txt \
499 $(SRCDIR)/../skins/blitz_no_logo/header.txt \
500 $(SRCDIR)/../skins/blitz_no_logo/ticket.txt \
501 $(SRCDIR)/../skins/default/css.txt \
 
502 $(SRCDIR)/../skins/default/footer.txt \
503 $(SRCDIR)/../skins/default/header.txt \
504 $(SRCDIR)/../skins/eagle/css.txt \
 
505 $(SRCDIR)/../skins/eagle/footer.txt \
506 $(SRCDIR)/../skins/eagle/header.txt \
507 $(SRCDIR)/../skins/enhanced1/css.txt \
 
508 $(SRCDIR)/../skins/enhanced1/footer.txt \
509 $(SRCDIR)/../skins/enhanced1/header.txt \
510 $(SRCDIR)/../skins/khaki/css.txt \
 
511 $(SRCDIR)/../skins/khaki/footer.txt \
512 $(SRCDIR)/../skins/khaki/header.txt \
513 $(SRCDIR)/../skins/original/css.txt \
 
514 $(SRCDIR)/../skins/original/footer.txt \
515 $(SRCDIR)/../skins/original/header.txt \
516 $(SRCDIR)/../skins/plain_gray/css.txt \
 
517 $(SRCDIR)/../skins/plain_gray/footer.txt \
518 $(SRCDIR)/../skins/plain_gray/header.txt \
519 $(SRCDIR)/../skins/rounded1/css.txt \
 
520 $(SRCDIR)/../skins/rounded1/footer.txt \
521 $(SRCDIR)/../skins/rounded1/header.txt \
522 $(SRCDIR)/../skins/xekri/css.txt \
 
523 $(SRCDIR)/../skins/xekri/footer.txt \
524 $(SRCDIR)/../skins/xekri/header.txt \
525 $(SRCDIR)/diff.tcl \
526 $(SRCDIR)/markdown.md
527
528
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -485,43 +485,55 @@
485 $(SRCDIR)/xfer.c \
486 $(SRCDIR)/xfersetup.c \
487 $(SRCDIR)/zip.c
488
489 EXTRA_FILES = \
490 $(SRCDIR)/../skins/aht/details.txt \
491 $(SRCDIR)/../skins/black_and_white/css.txt \
492 $(SRCDIR)/../skins/black_and_white/details.txt \
493 $(SRCDIR)/../skins/black_and_white/footer.txt \
494 $(SRCDIR)/../skins/black_and_white/header.txt \
495 $(SRCDIR)/../skins/blitz/css.txt \
496 $(SRCDIR)/../skins/blitz/details.txt \
497 $(SRCDIR)/../skins/blitz/footer.txt \
498 $(SRCDIR)/../skins/blitz/header.txt \
499 $(SRCDIR)/../skins/blitz/ticket.txt \
500 $(SRCDIR)/../skins/blitz_no_logo/css.txt \
501 $(SRCDIR)/../skins/blitz_no_logo/details.txt \
502 $(SRCDIR)/../skins/blitz_no_logo/footer.txt \
503 $(SRCDIR)/../skins/blitz_no_logo/header.txt \
504 $(SRCDIR)/../skins/blitz_no_logo/ticket.txt \
505 $(SRCDIR)/../skins/default/css.txt \
506 $(SRCDIR)/../skins/default/details.txt \
507 $(SRCDIR)/../skins/default/footer.txt \
508 $(SRCDIR)/../skins/default/header.txt \
509 $(SRCDIR)/../skins/eagle/css.txt \
510 $(SRCDIR)/../skins/eagle/details.txt \
511 $(SRCDIR)/../skins/eagle/footer.txt \
512 $(SRCDIR)/../skins/eagle/header.txt \
513 $(SRCDIR)/../skins/enhanced1/css.txt \
514 $(SRCDIR)/../skins/enhanced1/details.txt \
515 $(SRCDIR)/../skins/enhanced1/footer.txt \
516 $(SRCDIR)/../skins/enhanced1/header.txt \
517 $(SRCDIR)/../skins/khaki/css.txt \
518 $(SRCDIR)/../skins/khaki/details.txt \
519 $(SRCDIR)/../skins/khaki/footer.txt \
520 $(SRCDIR)/../skins/khaki/header.txt \
521 $(SRCDIR)/../skins/original/css.txt \
522 $(SRCDIR)/../skins/original/details.txt \
523 $(SRCDIR)/../skins/original/footer.txt \
524 $(SRCDIR)/../skins/original/header.txt \
525 $(SRCDIR)/../skins/plain_gray/css.txt \
526 $(SRCDIR)/../skins/plain_gray/details.txt \
527 $(SRCDIR)/../skins/plain_gray/footer.txt \
528 $(SRCDIR)/../skins/plain_gray/header.txt \
529 $(SRCDIR)/../skins/rounded1/css.txt \
530 $(SRCDIR)/../skins/rounded1/details.txt \
531 $(SRCDIR)/../skins/rounded1/footer.txt \
532 $(SRCDIR)/../skins/rounded1/header.txt \
533 $(SRCDIR)/../skins/xekri/css.txt \
534 $(SRCDIR)/../skins/xekri/details.txt \
535 $(SRCDIR)/../skins/xekri/footer.txt \
536 $(SRCDIR)/../skins/xekri/header.txt \
537 $(SRCDIR)/diff.tcl \
538 $(SRCDIR)/markdown.md
539
540
+13 -1
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -325,43 +325,55 @@
325325
wysiwyg_.c \
326326
xfer_.c \
327327
xfersetup_.c \
328328
zip_.c
329329
330
-EXTRA_FILES = $(SRCDIR)\../skins/black_and_white/css.txt \
330
+EXTRA_FILES = $(SRCDIR)\../skins/aht/details.txt \
331
+ $(SRCDIR)\../skins/black_and_white/css.txt \
332
+ $(SRCDIR)\../skins/black_and_white/details.txt \
331333
$(SRCDIR)\../skins/black_and_white/footer.txt \
332334
$(SRCDIR)\../skins/black_and_white/header.txt \
333335
$(SRCDIR)\../skins/blitz/css.txt \
336
+ $(SRCDIR)\../skins/blitz/details.txt \
334337
$(SRCDIR)\../skins/blitz/footer.txt \
335338
$(SRCDIR)\../skins/blitz/header.txt \
336339
$(SRCDIR)\../skins/blitz/ticket.txt \
337340
$(SRCDIR)\../skins/blitz_no_logo/css.txt \
341
+ $(SRCDIR)\../skins/blitz_no_logo/details.txt \
338342
$(SRCDIR)\../skins/blitz_no_logo/footer.txt \
339343
$(SRCDIR)\../skins/blitz_no_logo/header.txt \
340344
$(SRCDIR)\../skins/blitz_no_logo/ticket.txt \
341345
$(SRCDIR)\../skins/default/css.txt \
346
+ $(SRCDIR)\../skins/default/details.txt \
342347
$(SRCDIR)\../skins/default/footer.txt \
343348
$(SRCDIR)\../skins/default/header.txt \
344349
$(SRCDIR)\../skins/eagle/css.txt \
350
+ $(SRCDIR)\../skins/eagle/details.txt \
345351
$(SRCDIR)\../skins/eagle/footer.txt \
346352
$(SRCDIR)\../skins/eagle/header.txt \
347353
$(SRCDIR)\../skins/enhanced1/css.txt \
354
+ $(SRCDIR)\../skins/enhanced1/details.txt \
348355
$(SRCDIR)\../skins/enhanced1/footer.txt \
349356
$(SRCDIR)\../skins/enhanced1/header.txt \
350357
$(SRCDIR)\../skins/khaki/css.txt \
358
+ $(SRCDIR)\../skins/khaki/details.txt \
351359
$(SRCDIR)\../skins/khaki/footer.txt \
352360
$(SRCDIR)\../skins/khaki/header.txt \
353361
$(SRCDIR)\../skins/original/css.txt \
362
+ $(SRCDIR)\../skins/original/details.txt \
354363
$(SRCDIR)\../skins/original/footer.txt \
355364
$(SRCDIR)\../skins/original/header.txt \
356365
$(SRCDIR)\../skins/plain_gray/css.txt \
366
+ $(SRCDIR)\../skins/plain_gray/details.txt \
357367
$(SRCDIR)\../skins/plain_gray/footer.txt \
358368
$(SRCDIR)\../skins/plain_gray/header.txt \
359369
$(SRCDIR)\../skins/rounded1/css.txt \
370
+ $(SRCDIR)\../skins/rounded1/details.txt \
360371
$(SRCDIR)\../skins/rounded1/footer.txt \
361372
$(SRCDIR)\../skins/rounded1/header.txt \
362373
$(SRCDIR)\../skins/xekri/css.txt \
374
+ $(SRCDIR)\../skins/xekri/details.txt \
363375
$(SRCDIR)\../skins/xekri/footer.txt \
364376
$(SRCDIR)\../skins/xekri/header.txt \
365377
$(SRCDIR)\diff.tcl \
366378
$(SRCDIR)\markdown.md
367379
368380
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -325,43 +325,55 @@
325 wysiwyg_.c \
326 xfer_.c \
327 xfersetup_.c \
328 zip_.c
329
330 EXTRA_FILES = $(SRCDIR)\../skins/black_and_white/css.txt \
 
 
331 $(SRCDIR)\../skins/black_and_white/footer.txt \
332 $(SRCDIR)\../skins/black_and_white/header.txt \
333 $(SRCDIR)\../skins/blitz/css.txt \
 
334 $(SRCDIR)\../skins/blitz/footer.txt \
335 $(SRCDIR)\../skins/blitz/header.txt \
336 $(SRCDIR)\../skins/blitz/ticket.txt \
337 $(SRCDIR)\../skins/blitz_no_logo/css.txt \
 
338 $(SRCDIR)\../skins/blitz_no_logo/footer.txt \
339 $(SRCDIR)\../skins/blitz_no_logo/header.txt \
340 $(SRCDIR)\../skins/blitz_no_logo/ticket.txt \
341 $(SRCDIR)\../skins/default/css.txt \
 
342 $(SRCDIR)\../skins/default/footer.txt \
343 $(SRCDIR)\../skins/default/header.txt \
344 $(SRCDIR)\../skins/eagle/css.txt \
 
345 $(SRCDIR)\../skins/eagle/footer.txt \
346 $(SRCDIR)\../skins/eagle/header.txt \
347 $(SRCDIR)\../skins/enhanced1/css.txt \
 
348 $(SRCDIR)\../skins/enhanced1/footer.txt \
349 $(SRCDIR)\../skins/enhanced1/header.txt \
350 $(SRCDIR)\../skins/khaki/css.txt \
 
351 $(SRCDIR)\../skins/khaki/footer.txt \
352 $(SRCDIR)\../skins/khaki/header.txt \
353 $(SRCDIR)\../skins/original/css.txt \
 
354 $(SRCDIR)\../skins/original/footer.txt \
355 $(SRCDIR)\../skins/original/header.txt \
356 $(SRCDIR)\../skins/plain_gray/css.txt \
 
357 $(SRCDIR)\../skins/plain_gray/footer.txt \
358 $(SRCDIR)\../skins/plain_gray/header.txt \
359 $(SRCDIR)\../skins/rounded1/css.txt \
 
360 $(SRCDIR)\../skins/rounded1/footer.txt \
361 $(SRCDIR)\../skins/rounded1/header.txt \
362 $(SRCDIR)\../skins/xekri/css.txt \
 
363 $(SRCDIR)\../skins/xekri/footer.txt \
364 $(SRCDIR)\../skins/xekri/header.txt \
365 $(SRCDIR)\diff.tcl \
366 $(SRCDIR)\markdown.md
367
368
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -325,43 +325,55 @@
325 wysiwyg_.c \
326 xfer_.c \
327 xfersetup_.c \
328 zip_.c
329
330 EXTRA_FILES = $(SRCDIR)\../skins/aht/details.txt \
331 $(SRCDIR)\../skins/black_and_white/css.txt \
332 $(SRCDIR)\../skins/black_and_white/details.txt \
333 $(SRCDIR)\../skins/black_and_white/footer.txt \
334 $(SRCDIR)\../skins/black_and_white/header.txt \
335 $(SRCDIR)\../skins/blitz/css.txt \
336 $(SRCDIR)\../skins/blitz/details.txt \
337 $(SRCDIR)\../skins/blitz/footer.txt \
338 $(SRCDIR)\../skins/blitz/header.txt \
339 $(SRCDIR)\../skins/blitz/ticket.txt \
340 $(SRCDIR)\../skins/blitz_no_logo/css.txt \
341 $(SRCDIR)\../skins/blitz_no_logo/details.txt \
342 $(SRCDIR)\../skins/blitz_no_logo/footer.txt \
343 $(SRCDIR)\../skins/blitz_no_logo/header.txt \
344 $(SRCDIR)\../skins/blitz_no_logo/ticket.txt \
345 $(SRCDIR)\../skins/default/css.txt \
346 $(SRCDIR)\../skins/default/details.txt \
347 $(SRCDIR)\../skins/default/footer.txt \
348 $(SRCDIR)\../skins/default/header.txt \
349 $(SRCDIR)\../skins/eagle/css.txt \
350 $(SRCDIR)\../skins/eagle/details.txt \
351 $(SRCDIR)\../skins/eagle/footer.txt \
352 $(SRCDIR)\../skins/eagle/header.txt \
353 $(SRCDIR)\../skins/enhanced1/css.txt \
354 $(SRCDIR)\../skins/enhanced1/details.txt \
355 $(SRCDIR)\../skins/enhanced1/footer.txt \
356 $(SRCDIR)\../skins/enhanced1/header.txt \
357 $(SRCDIR)\../skins/khaki/css.txt \
358 $(SRCDIR)\../skins/khaki/details.txt \
359 $(SRCDIR)\../skins/khaki/footer.txt \
360 $(SRCDIR)\../skins/khaki/header.txt \
361 $(SRCDIR)\../skins/original/css.txt \
362 $(SRCDIR)\../skins/original/details.txt \
363 $(SRCDIR)\../skins/original/footer.txt \
364 $(SRCDIR)\../skins/original/header.txt \
365 $(SRCDIR)\../skins/plain_gray/css.txt \
366 $(SRCDIR)\../skins/plain_gray/details.txt \
367 $(SRCDIR)\../skins/plain_gray/footer.txt \
368 $(SRCDIR)\../skins/plain_gray/header.txt \
369 $(SRCDIR)\../skins/rounded1/css.txt \
370 $(SRCDIR)\../skins/rounded1/details.txt \
371 $(SRCDIR)\../skins/rounded1/footer.txt \
372 $(SRCDIR)\../skins/rounded1/header.txt \
373 $(SRCDIR)\../skins/xekri/css.txt \
374 $(SRCDIR)\../skins/xekri/details.txt \
375 $(SRCDIR)\../skins/xekri/footer.txt \
376 $(SRCDIR)\../skins/xekri/header.txt \
377 $(SRCDIR)\diff.tcl \
378 $(SRCDIR)\markdown.md
379
380
--- www/customskin.md
+++ www/customskin.md
@@ -46,12 +46,14 @@
4646
--------------
4747
4848
Fossil comes with several built-in skins. The sources to these built-ins can
4949
be found in the Fossil source tree under the skins/ folder. The skins/
5050
folder contains a separate subfolder for each built-in skin, with each
51
-subfolders holding three files, "css.txt", "footer.txt", and "header.txt",
52
-that describe the CSS, footer, and header for that skin, respectively.
51
+subfolders holding four files, "css.txt", "details.txt",
52
+"footer.txt", and "header.txt",
53
+that describe the CSS, rendering options,
54
+footer, and header for that skin, respectively.
5355
5456
The skin of a repository can be changed to any of the built-in skins using
5557
the web interface by going to the /setup_skin web page (requires Admin
5658
privileges) and clicking the appropriate button. Or, the --skin command
5759
line option can be used for the
@@ -206,10 +208,11 @@
206208
want, but the following is a technique that has worked well in the past and
207209
can serve as a starting point for future work:
208210
209211
1. Select a built-in skin that is closest to the desired look. Make
210212
copies of the css, footer, and header into files name "css.txt",
213
+ "details.txt",
211214
"footer.txt", and "header.txt" in some temporary directory.
212215
213216
If the Fossil source code is available, then these three files can
214217
be copied directly out of one of the subdirectories under skins. If
215218
sources are not easily at hand, then a copy/paste out of the
@@ -221,12 +224,13 @@
221224
2. Run the [fossil ui](../../../help?cmd=ui) command with an extra
222225
option "--skin SKINDIR" where SKINDIR is the name of the directory
223226
in which the three txt files were stored in step 1. This will bring
224227
up the Fossil website using the tree files in SKINDIR.
225228
226
- 3. Edit the three txt files in SKINDIR. After making each small change,
229
+ 3. Edit the four txt files in SKINDIR. After making each small change,
227230
press Reload on the web browser to see the effect of that change.
228231
Iterate until the desired look is achieved.
229232
230
- 4. Copy/paste the resulting css.txt, header.txt, and footer.txt files
231
- into the CSS, header, and footer configuration screens under the
232
- Admin menu.
233
+ 4. Copy/paste the resulting css.txt, details.txt,
234
+ header.txt, and footer.txt files
235
+ into the CSS, details, header, and footer configuration screens
236
+ under the Admin/Skins menu.
233237
--- www/customskin.md
+++ www/customskin.md
@@ -46,12 +46,14 @@
46 --------------
47
48 Fossil comes with several built-in skins. The sources to these built-ins can
49 be found in the Fossil source tree under the skins/ folder. The skins/
50 folder contains a separate subfolder for each built-in skin, with each
51 subfolders holding three files, "css.txt", "footer.txt", and "header.txt",
52 that describe the CSS, footer, and header for that skin, respectively.
 
 
53
54 The skin of a repository can be changed to any of the built-in skins using
55 the web interface by going to the /setup_skin web page (requires Admin
56 privileges) and clicking the appropriate button. Or, the --skin command
57 line option can be used for the
@@ -206,10 +208,11 @@
206 want, but the following is a technique that has worked well in the past and
207 can serve as a starting point for future work:
208
209 1. Select a built-in skin that is closest to the desired look. Make
210 copies of the css, footer, and header into files name "css.txt",
 
211 "footer.txt", and "header.txt" in some temporary directory.
212
213 If the Fossil source code is available, then these three files can
214 be copied directly out of one of the subdirectories under skins. If
215 sources are not easily at hand, then a copy/paste out of the
@@ -221,12 +224,13 @@
221 2. Run the [fossil ui](../../../help?cmd=ui) command with an extra
222 option "--skin SKINDIR" where SKINDIR is the name of the directory
223 in which the three txt files were stored in step 1. This will bring
224 up the Fossil website using the tree files in SKINDIR.
225
226 3. Edit the three txt files in SKINDIR. After making each small change,
227 press Reload on the web browser to see the effect of that change.
228 Iterate until the desired look is achieved.
229
230 4. Copy/paste the resulting css.txt, header.txt, and footer.txt files
231 into the CSS, header, and footer configuration screens under the
232 Admin menu.
 
233
--- www/customskin.md
+++ www/customskin.md
@@ -46,12 +46,14 @@
46 --------------
47
48 Fossil comes with several built-in skins. The sources to these built-ins can
49 be found in the Fossil source tree under the skins/ folder. The skins/
50 folder contains a separate subfolder for each built-in skin, with each
51 subfolders holding four files, "css.txt", "details.txt",
52 "footer.txt", and "header.txt",
53 that describe the CSS, rendering options,
54 footer, and header for that skin, respectively.
55
56 The skin of a repository can be changed to any of the built-in skins using
57 the web interface by going to the /setup_skin web page (requires Admin
58 privileges) and clicking the appropriate button. Or, the --skin command
59 line option can be used for the
@@ -206,10 +208,11 @@
208 want, but the following is a technique that has worked well in the past and
209 can serve as a starting point for future work:
210
211 1. Select a built-in skin that is closest to the desired look. Make
212 copies of the css, footer, and header into files name "css.txt",
213 "details.txt",
214 "footer.txt", and "header.txt" in some temporary directory.
215
216 If the Fossil source code is available, then these three files can
217 be copied directly out of one of the subdirectories under skins. If
218 sources are not easily at hand, then a copy/paste out of the
@@ -221,12 +224,13 @@
224 2. Run the [fossil ui](../../../help?cmd=ui) command with an extra
225 option "--skin SKINDIR" where SKINDIR is the name of the directory
226 in which the three txt files were stored in step 1. This will bring
227 up the Fossil website using the tree files in SKINDIR.
228
229 3. Edit the four txt files in SKINDIR. After making each small change,
230 press Reload on the web browser to see the effect of that change.
231 Iterate until the desired look is achieved.
232
233 4. Copy/paste the resulting css.txt, details.txt,
234 header.txt, and footer.txt files
235 into the CSS, details, header, and footer configuration screens
236 under the Admin/Skins menu.
237
--- www/customskin.md
+++ www/customskin.md
@@ -46,12 +46,14 @@
4646
--------------
4747
4848
Fossil comes with several built-in skins. The sources to these built-ins can
4949
be found in the Fossil source tree under the skins/ folder. The skins/
5050
folder contains a separate subfolder for each built-in skin, with each
51
-subfolders holding three files, "css.txt", "footer.txt", and "header.txt",
52
-that describe the CSS, footer, and header for that skin, respectively.
51
+subfolders holding four files, "css.txt", "details.txt",
52
+"footer.txt", and "header.txt",
53
+that describe the CSS, rendering options,
54
+footer, and header for that skin, respectively.
5355
5456
The skin of a repository can be changed to any of the built-in skins using
5557
the web interface by going to the /setup_skin web page (requires Admin
5658
privileges) and clicking the appropriate button. Or, the --skin command
5759
line option can be used for the
@@ -206,10 +208,11 @@
206208
want, but the following is a technique that has worked well in the past and
207209
can serve as a starting point for future work:
208210
209211
1. Select a built-in skin that is closest to the desired look. Make
210212
copies of the css, footer, and header into files name "css.txt",
213
+ "details.txt",
211214
"footer.txt", and "header.txt" in some temporary directory.
212215
213216
If the Fossil source code is available, then these three files can
214217
be copied directly out of one of the subdirectories under skins. If
215218
sources are not easily at hand, then a copy/paste out of the
@@ -221,12 +224,13 @@
221224
2. Run the [fossil ui](../../../help?cmd=ui) command with an extra
222225
option "--skin SKINDIR" where SKINDIR is the name of the directory
223226
in which the three txt files were stored in step 1. This will bring
224227
up the Fossil website using the tree files in SKINDIR.
225228
226
- 3. Edit the three txt files in SKINDIR. After making each small change,
229
+ 3. Edit the four txt files in SKINDIR. After making each small change,
227230
press Reload on the web browser to see the effect of that change.
228231
Iterate until the desired look is achieved.
229232
230
- 4. Copy/paste the resulting css.txt, header.txt, and footer.txt files
231
- into the CSS, header, and footer configuration screens under the
232
- Admin menu.
233
+ 4. Copy/paste the resulting css.txt, details.txt,
234
+ header.txt, and footer.txt files
235
+ into the CSS, details, header, and footer configuration screens
236
+ under the Admin/Skins menu.
233237
--- www/customskin.md
+++ www/customskin.md
@@ -46,12 +46,14 @@
46 --------------
47
48 Fossil comes with several built-in skins. The sources to these built-ins can
49 be found in the Fossil source tree under the skins/ folder. The skins/
50 folder contains a separate subfolder for each built-in skin, with each
51 subfolders holding three files, "css.txt", "footer.txt", and "header.txt",
52 that describe the CSS, footer, and header for that skin, respectively.
 
 
53
54 The skin of a repository can be changed to any of the built-in skins using
55 the web interface by going to the /setup_skin web page (requires Admin
56 privileges) and clicking the appropriate button. Or, the --skin command
57 line option can be used for the
@@ -206,10 +208,11 @@
206 want, but the following is a technique that has worked well in the past and
207 can serve as a starting point for future work:
208
209 1. Select a built-in skin that is closest to the desired look. Make
210 copies of the css, footer, and header into files name "css.txt",
 
211 "footer.txt", and "header.txt" in some temporary directory.
212
213 If the Fossil source code is available, then these three files can
214 be copied directly out of one of the subdirectories under skins. If
215 sources are not easily at hand, then a copy/paste out of the
@@ -221,12 +224,13 @@
221 2. Run the [fossil ui](../../../help?cmd=ui) command with an extra
222 option "--skin SKINDIR" where SKINDIR is the name of the directory
223 in which the three txt files were stored in step 1. This will bring
224 up the Fossil website using the tree files in SKINDIR.
225
226 3. Edit the three txt files in SKINDIR. After making each small change,
227 press Reload on the web browser to see the effect of that change.
228 Iterate until the desired look is achieved.
229
230 4. Copy/paste the resulting css.txt, header.txt, and footer.txt files
231 into the CSS, header, and footer configuration screens under the
232 Admin menu.
 
233
--- www/customskin.md
+++ www/customskin.md
@@ -46,12 +46,14 @@
46 --------------
47
48 Fossil comes with several built-in skins. The sources to these built-ins can
49 be found in the Fossil source tree under the skins/ folder. The skins/
50 folder contains a separate subfolder for each built-in skin, with each
51 subfolders holding four files, "css.txt", "details.txt",
52 "footer.txt", and "header.txt",
53 that describe the CSS, rendering options,
54 footer, and header for that skin, respectively.
55
56 The skin of a repository can be changed to any of the built-in skins using
57 the web interface by going to the /setup_skin web page (requires Admin
58 privileges) and clicking the appropriate button. Or, the --skin command
59 line option can be used for the
@@ -206,10 +208,11 @@
208 want, but the following is a technique that has worked well in the past and
209 can serve as a starting point for future work:
210
211 1. Select a built-in skin that is closest to the desired look. Make
212 copies of the css, footer, and header into files name "css.txt",
213 "details.txt",
214 "footer.txt", and "header.txt" in some temporary directory.
215
216 If the Fossil source code is available, then these three files can
217 be copied directly out of one of the subdirectories under skins. If
218 sources are not easily at hand, then a copy/paste out of the
@@ -221,12 +224,13 @@
224 2. Run the [fossil ui](../../../help?cmd=ui) command with an extra
225 option "--skin SKINDIR" where SKINDIR is the name of the directory
226 in which the three txt files were stored in step 1. This will bring
227 up the Fossil website using the tree files in SKINDIR.
228
229 3. Edit the four txt files in SKINDIR. After making each small change,
230 press Reload on the web browser to see the effect of that change.
231 Iterate until the desired look is achieved.
232
233 4. Copy/paste the resulting css.txt, details.txt,
234 header.txt, and footer.txt files
235 into the CSS, details, header, and footer configuration screens
236 under the Admin/Skins menu.
237

Keyboard Shortcuts

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