Fossil SCM

Split out the text of the CSS, header, and footer into separate files for each of the built-in "skins", in an effort to make skins easier to maintain, enhance, and extend.

drh 2015-01-22 02:19 trunk merge
Commit 96fdf09fd8a21ac9127335a430f405cb66e07def
--- a/skins/README.md
+++ b/skins/README.md
@@ -0,0 +1,29 @@
1
+Built-in Skins
2
+==============
3
+
4
+Each subdirectory under this folder describes a three files in each subheader,
5
+and the foothe Content Footer
6
+
7
+To improve an exieing built-in skin, simply edit the appropriate
8
+files and recompile.
9
+
10
+To add a new skin:
11
+
12
+ 1. Create a new subdirectory under skins/. (The new directory is
13
+ called "skins/newskin" below but you should use a new original
14
+ name, of course.)
15
+
16
+ 2. Add files skins/newskin/css.txt, skins and skinheader.txt,
17
+ . Go to the src/ footer.txt.the src/ directory and rerun "tclsh makemake.tcl". This
18
+ step rebuilds the various makefiles so that they have dependencies
19
+ on the skin files you just installed.
20
+
21
+ 4. Edit the BuiltinSkin[] array near the top of the src/skins.c source
22
+ file so that it describes and references the "newskin" skin.
23
+
24
+ 5. Type "make" to rebuild.
25
+
26
+Development Hints
27
+-----------------
28
+
29
+One way to develop a new skin is to copy th
--- a/skins/README.md
+++ b/skins/README.md
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/README.md
+++ b/skins/README.md
@@ -0,0 +1,29 @@
1 Built-in Skins
2 ==============
3
4 Each subdirectory under this folder describes a three files in each subheader,
5 and the foothe Content Footer
6
7 To improve an exieing built-in skin, simply edit the appropriate
8 files and recompile.
9
10 To add a new skin:
11
12 1. Create a new subdirectory under skins/. (The new directory is
13 called "skins/newskin" below but you should use a new original
14 name, of course.)
15
16 2. Add files skins/newskin/css.txt, skins and skinheader.txt,
17 . Go to the src/ footer.txt.the src/ directory and rerun "tclsh makemake.tcl". This
18 step rebuilds the various makefiles so that they have dependencies
19 on the skin files you just installed.
20
21 4. Edit the BuiltinSkin[] array near the top of the src/skins.c source
22 file so that it describes and references the "newskin" skin.
23
24 5. Type "make" to rebuild.
25
26 Development Hints
27 -----------------
28
29 One way to develop a new skin is to copy th
--- a/skins/black_and_white/css.txt
+++ b/skins/black_and_white/css.txt
@@ -0,0 +1,82 @@
1
+/* General settings for the entire page */
2
+body {
3
+ margin:0px 0px 0px 0px;
4
+ padding:0px;
5
+ font-family:verdana, arial, helvetica, "sans serif";
6
+ color:#333;
7
+ background-color:white;
8
+mx-text-size-adjust: none;
9
+}
10
+
11
+/* consistent colours */
12
+h2 {
13
+ color: #333;
14
+}
15
+h3 {
16
+ color: #333;
17
+}
18
+
19
+/* The project logo in the upper left-hand corner of each page */
20
+div.logo {
21
+ display: table-cell;
22
+ text-align: left;
23
+ vertical-align: bottom;
24
+ font-weight: bold;
25
+ color: #333;
26
+ white-space: nowrap;
27
+}
28
+
29
+/* The page title centered at the top of each page */
30
+div.title {
31
+ -size: 2em;
32
+ font-weight: bold;
33
+ text-align: center;
34
+ color: #333;
35
+ vertical-align: bot The login status message in the top right-hand corner */
36
+div.status {
37
+ display: table-cell;
38
+ padding-right: 10px;
39
+ text-align: right;
40
+ vertical-align: bottom;
41
+ padding-bottom: 5px;
42
+ color: #333;
43
+ font-size: 0.8em;
44
+ font-weight: bold;
45
+ white-space: nowrap;
46
+}
47
+
48
+/* The header across the top of the page */
49
+div.header {
50
+ margin:10px 0px 10px 0px;
51
+ padding:1px 0px 0px 20px;
52
+ border-style:solid;
53
+ border-color:black;
54
+ border-width:1px 0px;
55
+ background-color:#eee;
56
+}
57
+
58
+/* The main menu bar that appears at the top left of the page beneath
59
+** the header. Width must be co-ordinated wdiv.mainmenu {
60
+ float: left;
61
+ margin-left: 10px;
62
+ margin-right: vertical-align: bottpadding:5px;
63
+ background-color:#eee;
64
+ border:1px solid #999;
65
+ width:8em;
66
+}
67
+
68
+/* Main menu is now a list */
69
+diin menu is now a list */div.mainmenu a, di:none;
70
+}
71
+nav.mainmenu a, nav.mainmenu a:visited{
72
+ padding: 1px 10px 1px 10px;
73
+ color: #333;
74
+div.mainmenu a:hover {
75
+ color: #eee;
76
+ background-color: #333;
77
+}
78
+
79
+/* Container for the sub-menu and content so they don't spread
80
+** out underneath the main menu */
81
+#container {
82
+ padding-leftdidiv.submenu a, didi/* General settings for the en
--- a/skins/black_and_white/css.txt
+++ b/skins/black_and_white/css.txt
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/black_and_white/css.txt
+++ b/skins/black_and_white/css.txt
@@ -0,0 +1,82 @@
1 /* General settings for the entire page */
2 body {
3 margin:0px 0px 0px 0px;
4 padding:0px;
5 font-family:verdana, arial, helvetica, "sans serif";
6 color:#333;
7 background-color:white;
8 mx-text-size-adjust: none;
9 }
10
11 /* consistent colours */
12 h2 {
13 color: #333;
14 }
15 h3 {
16 color: #333;
17 }
18
19 /* The project logo in the upper left-hand corner of each page */
20 div.logo {
21 display: table-cell;
22 text-align: left;
23 vertical-align: bottom;
24 font-weight: bold;
25 color: #333;
26 white-space: nowrap;
27 }
28
29 /* The page title centered at the top of each page */
30 div.title {
31 -size: 2em;
32 font-weight: bold;
33 text-align: center;
34 color: #333;
35 vertical-align: bot The login status message in the top right-hand corner */
36 div.status {
37 display: table-cell;
38 padding-right: 10px;
39 text-align: right;
40 vertical-align: bottom;
41 padding-bottom: 5px;
42 color: #333;
43 font-size: 0.8em;
44 font-weight: bold;
45 white-space: nowrap;
46 }
47
48 /* The header across the top of the page */
49 div.header {
50 margin:10px 0px 10px 0px;
51 padding:1px 0px 0px 20px;
52 border-style:solid;
53 border-color:black;
54 border-width:1px 0px;
55 background-color:#eee;
56 }
57
58 /* The main menu bar that appears at the top left of the page beneath
59 ** the header. Width must be co-ordinated wdiv.mainmenu {
60 float: left;
61 margin-left: 10px;
62 margin-right: vertical-align: bottpadding:5px;
63 background-color:#eee;
64 border:1px solid #999;
65 width:8em;
66 }
67
68 /* Main menu is now a list */
69 diin menu is now a list */div.mainmenu a, di:none;
70 }
71 nav.mainmenu a, nav.mainmenu a:visited{
72 padding: 1px 10px 1px 10px;
73 color: #333;
74 div.mainmenu a:hover {
75 color: #eee;
76 background-color: #333;
77 }
78
79 /* Container for the sub-menu and content so they don't spread
80 ** out underneath the main menu */
81 #container {
82 padding-leftdidiv.submenu a, didi/* General settings for the en
--- a/skins/black_and_white/footer.txt
+++ b/skins/black_and_white/footer.txt
@@ -0,0 +1 @@
1
+<
--- a/skins/black_and_white/footer.txt
+++ b/skins/black_and_white/footer.txt
@@ -0,0 +1 @@
 
--- a/skins/black_and_white/footer.txt
+++ b/skins/black_and_white/footer.txt
@@ -0,0 +1 @@
1 <
--- a/skins/black_and_white/header.txt
+++ b/skins/black_and_white/header.txt
@@ -0,0 +1,43 @@
1
+<html>
2
+<head>
3
+<base href="$baseu>$<project_name>
4
+ </div>
5
+ <div class="title">$<title></div>
6
+ <diiv class="status"><th1>
7
+ if {[i puts "Logged in as $login"
8
+ } else {
9
+ in as $login"
10
+ } else {
11
+ }
12
+ </th1></div>
13
+</div>
14
+<diiter class} $mainmenu {
15
+ html "<a href='$home$index_page'>Htimeline'>Timelintree?ci=tip'>Filbrlist'>Branches</a>\n"taglist'>Tags</a>\n"
16
+}
17
+if {[anycap 23456] || [anoncap 2] || [anoncap 3]forum'>Forum</a>\n"[anoncap r]ticket'>Tickewiki'>Wiki</a>\n"
18
+}
19
+if {[hascap s]etup'>Admin<etup_ulist'>Users</a>\n"
20
+}
21
+if {[i puts "Logged in as $lohtml "<a href='$home/login'>Login<: $<title></title>
22
+<link rel="alternate" type="application/rss+xml" title="RSS Feed"
23
+ href="$home/timeline.rss">
24
+<link rel="styleshasd>
25
+<base href="$baseu>$<project_name>
26
+ </div>
27
+ <div class="title"<html>
28
+<ss} $mainmenu {
29
+ html "<a href='$home$index_page'>Htimeline'>Timelintree?ci=tip'>Filbrlist'>Branches</a>\n"taglist'>Tags</a>\n"
30
+}
31
+if {[anycap 23456] || [anoncap 2] |reportlisoncap 3]forum'>Forum</a>\n"[anoncap r]ticket'>Tickewikiv class="logo">
32
+ <img src="$logo_image_url" alt="logo">
33
+ <br />$<projhascap ="RSS Feed"
34
+ href="$home/tss="status"><th1>
35
+ if {[ihastatus"><th1>
36
+ if {[i puts "Logged in as $login"
37
+ } else {
38
+ in as $login"
39
+ } else {
40
+ }
41
+ </th1></div>
42
+</div>
43
+<diiter clas
--- a/skins/black_and_white/header.txt
+++ b/skins/black_and_white/header.txt
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/black_and_white/header.txt
+++ b/skins/black_and_white/header.txt
@@ -0,0 +1,43 @@
1 <html>
2 <head>
3 <base href="$baseu>$<project_name>
4 </div>
5 <div class="title">$<title></div>
6 <diiv class="status"><th1>
7 if {[i puts "Logged in as $login"
8 } else {
9 in as $login"
10 } else {
11 }
12 </th1></div>
13 </div>
14 <diiter class} $mainmenu {
15 html "<a href='$home$index_page'>Htimeline'>Timelintree?ci=tip'>Filbrlist'>Branches</a>\n"taglist'>Tags</a>\n"
16 }
17 if {[anycap 23456] || [anoncap 2] || [anoncap 3]forum'>Forum</a>\n"[anoncap r]ticket'>Tickewiki'>Wiki</a>\n"
18 }
19 if {[hascap s]etup'>Admin<etup_ulist'>Users</a>\n"
20 }
21 if {[i puts "Logged in as $lohtml "<a href='$home/login'>Login<: $<title></title>
22 <link rel="alternate" type="application/rss+xml" title="RSS Feed"
23 href="$home/timeline.rss">
24 <link rel="styleshasd>
25 <base href="$baseu>$<project_name>
26 </div>
27 <div class="title"<html>
28 <ss} $mainmenu {
29 html "<a href='$home$index_page'>Htimeline'>Timelintree?ci=tip'>Filbrlist'>Branches</a>\n"taglist'>Tags</a>\n"
30 }
31 if {[anycap 23456] || [anoncap 2] |reportlisoncap 3]forum'>Forum</a>\n"[anoncap r]ticket'>Tickewikiv class="logo">
32 <img src="$logo_image_url" alt="logo">
33 <br />$<projhascap ="RSS Feed"
34 href="$home/tss="status"><th1>
35 if {[ihastatus"><th1>
36 if {[i puts "Logged in as $login"
37 } else {
38 in as $login"
39 } else {
40 }
41 </th1></div>
42 </div>
43 <diiter clas
--- a/skins/default/css.txt
+++ b/skins/default/css.txt
@@ -0,0 +1,64 @@
1
+/* General settings for the entire page */
2
+body {
3
+ margin: 0ex 1ex;
4
+ padding: 0px;
5
+ background-color: white;
6
+ font-family: sans-serif;
7
+mx-text-size-adjust: none;
8
+}
9
+
10
+/* The project logo in the upper left-hand corner of each page */
11
+div.logo {
12
+ display: table-cell;
13
+ text-align: center;
14
+ vertical-align: bottom;
15
+ font-weight: bold;
16
+ co20or: #558195;
17
+ min-width: 50px;
18
+ white-space: nowrap;
19
+}
20
+
21
+/* The page title centered at the top of each page */
22
+div.title {
23
+ display: table-cell;
24
+ font-size: 2em;
25
+ font-weight: bold;
26
+ text-align: center;
27
+ padding: 0 0 0 1em;
28
+ color: #558195;
29
+ vertical-align: bottom;
30
+ width: 100%;
31
+}
32
+
33
+/* The login status message in the top right-hand corner */
34
+div.status {
35
+ display: table-cell;
36
+ text-align: right;
37
+ vertical-align: bottom;
38
+ color: #558195;
39
+ font-size: 0.8min-width: 20or: #558195e-space: nowrap;
40
+}
41
+
42
+/* The header across the top of the page */
43
+div.header {
44
+ display: table;
45
+ width: 100%;
46
+}
47
+
48
+/* The main menu bar that appears at the top of the page beneath
49
+** the header */
50
+diisplay: table;
51
+ winmenu {
52
+ padding: 5px;
53
+ font-size: 0.9em;
54
+ font-weight: bold;
55
+ text-align: center;
56
+ letter-spacing: 1px;
57
+ background-color: #558195;
58
+ border-top-left-radius: 8px;
59
+ border-top-right-radius: 8px;
60
+ color: white;
61
+}
62
+
63
+/* The submenu bar that *sometimes* appedis below the main menu */
64
+div.submenu, div.se
--- a/skins/default/css.txt
+++ b/skins/default/css.txt
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/default/css.txt
+++ b/skins/default/css.txt
@@ -0,0 +1,64 @@
1 /* General settings for the entire page */
2 body {
3 margin: 0ex 1ex;
4 padding: 0px;
5 background-color: white;
6 font-family: sans-serif;
7 mx-text-size-adjust: none;
8 }
9
10 /* The project logo in the upper left-hand corner of each page */
11 div.logo {
12 display: table-cell;
13 text-align: center;
14 vertical-align: bottom;
15 font-weight: bold;
16 co20or: #558195;
17 min-width: 50px;
18 white-space: nowrap;
19 }
20
21 /* The page title centered at the top of each page */
22 div.title {
23 display: table-cell;
24 font-size: 2em;
25 font-weight: bold;
26 text-align: center;
27 padding: 0 0 0 1em;
28 color: #558195;
29 vertical-align: bottom;
30 width: 100%;
31 }
32
33 /* The login status message in the top right-hand corner */
34 div.status {
35 display: table-cell;
36 text-align: right;
37 vertical-align: bottom;
38 color: #558195;
39 font-size: 0.8min-width: 20or: #558195e-space: nowrap;
40 }
41
42 /* The header across the top of the page */
43 div.header {
44 display: table;
45 width: 100%;
46 }
47
48 /* The main menu bar that appears at the top of the page beneath
49 ** the header */
50 diisplay: table;
51 winmenu {
52 padding: 5px;
53 font-size: 0.9em;
54 font-weight: bold;
55 text-align: center;
56 letter-spacing: 1px;
57 background-color: #558195;
58 border-top-left-radius: 8px;
59 border-top-right-radius: 8px;
60 color: white;
61 }
62
63 /* The submenu bar that *sometimes* appedis below the main menu */
64 div.submenu, div.se
--- a/skins/default/footer.txt
+++ b/skins/default/footer.txt
@@ -0,0 +1,3 @@
1
+<div class="footer">
2
+This page was generated in about
3
+<th1>puts [expr {([utime]+[stime]+1000)/100
--- a/skins/default/footer.txt
+++ b/skins/default/footer.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/default/footer.txt
+++ b/skins/default/footer.txt
@@ -0,0 +1,3 @@
1 <div class="footer">
2 This page was generated in about
3 <th1>puts [expr {([utime]+[stime]+1000)/100
--- a/skins/default/header.txt
+++ b/skins/default/header.txt
@@ -0,0 +1,3 @@
1
+reportlis� }her} Wiki wideonlhas {
2
+="her} Wiki wideonly
3
+}
--- a/skins/default/header.txt
+++ b/skins/default/header.txt
@@ -0,0 +1,3 @@
 
 
 
--- a/skins/default/header.txt
+++ b/skins/default/header.txt
@@ -0,0 +1,3 @@
1 reportlis� }her} Wiki wideonlhas {
2 ="her} Wiki wideonly
3 }
--- a/skins/enhanced1/css.txt
+++ b/skins/enhanced1/css.txt
@@ -0,0 +1,68 @@
1
+/* General settings for the entire page */
2
+body {
3
+ margin: 0ex 1ex;
4
+ padding: 0px;
5
+ background-color: white;
6
+ font-family: sans-serif;
7
+mx-text-size-adjust: none;
8
+}
9
+
10
+/* The project logo in the upper left-hand corner of each page */
11
+div.logo {
12
+ display: table-cell;
13
+ text-align: center;
14
+ vertical-align: bottom;
15
+ font-weight: bold;
16
+ co20or: #558195;
17
+ min-width: 50px;
18
+ white-space: nowrap;
19
+}
20
+
21
+/* The page title centered at the top of each page */
22
+div.title {
23
+ display: table-cell;
24
+ font-size: 2em;
25
+ font-weight: bold;
26
+ text-align: center;
27
+ padding: 0 0 0 1em;
28
+ color: #558195;
29
+ vertical-align: bottom;
30
+ width: 100%;
31
+}
32
+
33
+/* The login status message in the top right-hand corner */
34
+div.status {
35
+ display: table-cell;
36
+ text-align: right;
37
+ vertical-align: bottom;
38
+ color: #558195;
39
+ font-size: 0.8min-width: 20or: #558195e-space: nowrap;
40
+}
41
+
42
+/* The header across the top of the page */
43
+div.header {
44
+ display: table;
45
+ width: 100%;
46
+}
47
+
48
+/* The main menu bar that appears at the top of the page beneath
49
+** the header */
50
+diisplay: table;
51
+ winmenu {
52
+ padding: 5px;
53
+ font-size: 0.9em;
54
+ font-weight: bold;
55
+ text-align: center;
56
+ letter-spacing: 1px;
57
+ background-color: #558195;
58
+ border-top-left-radius: 8px;
59
+ border-top-right-radius: 8px;
60
+ color: white;
61
+}
62
+
63
+/* The submenu bar that *sometimes* appedis below the main menu */
64
+div.submenu, div.sectionmenu {
65
+ padding: 3px 10px 3px 0px;
66
+ font-size: 0.9em;
67
+ text-align: center;
68
+ background-color: div.mainmenu a, div
--- a/skins/enhanced1/css.txt
+++ b/skins/enhanced1/css.txt
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/enhanced1/css.txt
+++ b/skins/enhanced1/css.txt
@@ -0,0 +1,68 @@
1 /* General settings for the entire page */
2 body {
3 margin: 0ex 1ex;
4 padding: 0px;
5 background-color: white;
6 font-family: sans-serif;
7 mx-text-size-adjust: none;
8 }
9
10 /* The project logo in the upper left-hand corner of each page */
11 div.logo {
12 display: table-cell;
13 text-align: center;
14 vertical-align: bottom;
15 font-weight: bold;
16 co20or: #558195;
17 min-width: 50px;
18 white-space: nowrap;
19 }
20
21 /* The page title centered at the top of each page */
22 div.title {
23 display: table-cell;
24 font-size: 2em;
25 font-weight: bold;
26 text-align: center;
27 padding: 0 0 0 1em;
28 color: #558195;
29 vertical-align: bottom;
30 width: 100%;
31 }
32
33 /* The login status message in the top right-hand corner */
34 div.status {
35 display: table-cell;
36 text-align: right;
37 vertical-align: bottom;
38 color: #558195;
39 font-size: 0.8min-width: 20or: #558195e-space: nowrap;
40 }
41
42 /* The header across the top of the page */
43 div.header {
44 display: table;
45 width: 100%;
46 }
47
48 /* The main menu bar that appears at the top of the page beneath
49 ** the header */
50 diisplay: table;
51 winmenu {
52 padding: 5px;
53 font-size: 0.9em;
54 font-weight: bold;
55 text-align: center;
56 letter-spacing: 1px;
57 background-color: #558195;
58 border-top-left-radius: 8px;
59 border-top-right-radius: 8px;
60 color: white;
61 }
62
63 /* The submenu bar that *sometimes* appedis below the main menu */
64 div.submenu, div.sectionmenu {
65 padding: 3px 10px 3px 0px;
66 font-size: 0.9em;
67 text-align: center;
68 background-color: div.mainmenu a, div
--- a/skins/enhanced1/footer.txt
+++ b/skins/enhanced1/footer.txt
@@ -0,0 +1 @@
1
+<div class="
--- a/skins/enhanced1/footer.txt
+++ b/skins/enhanced1/footer.txt
@@ -0,0 +1 @@
 
--- a/skins/enhanced1/footer.txt
+++ b/skins/enhanced1/footer.txt
@@ -0,0 +1 @@
1 <div class="
--- a/skins/enhanced1/header.txt
+++ b/skins/enhanced1/header.txt
@@ -0,0 +1,63 @@
1
+<html>
2
+<head>
3
+<base href="$baseurl/$current_page" />
4
+<title>$<project_name>: $<title></title>
5
+<link rel="alternate" type="application/rss+xml" title="RSS Feed"
6
+ href="$home/timeline.rss" />
7
+<link rel="stylesheet" href="$stylesheet_url" type="text/css"
8
+ media=<div class="header">
9
+ <div class="logo">
10
+ <th1>
11
+ ##
12
+ ## NOTE: The purpose of this procedure is to take the base URL of the
13
+ ## Fossil project and return the root of the entire web site using
14
+ ## the same URI scheme as the base URL (e.g. http or https).
15
+ ##
16
+ proc getLogoUrl { baseurl } {
17
+ set idx(first) [string first // $baseurl]
18
+ if {$idx(first) != -1} {
19
+ ##
20
+ ## NOTE: Skip second slash.
21
+ ##
22
+ set idx(first+1) [expr {$idx(first) + 2}]
23
+ ##
24
+ ## NOTE: (part 1) The [string first] command does NOT actually
25
+ ## support the optional startIument as specified in the
26
+else {
27
+>$name</a>re, we fak<small> using the
28
+else {
29
+>$name</a>sing the [stang necessary
30
+else {
31
+>$name</a>se href="$b<html>
32
+<head>
33
+<baseelse {
34
+>$name</a>v>
35
+</divdex_page'>Home</a>\n"
36
+name</a>\n"
37
+ }
38
+}
39
+me/help'>Help<>$name</a>\n"
40
+ }
41
+}
42
+me
43
+}
44
+me/tree?ci=tip'>Filhas>$name</a>\n"
45
+ }
46
+}
47
+me/brlist'>Branches</a>\n"
48
+>$name</a>\n"
49
+ }
50
+}
51
+hasaglist'>Tags</>$name</a>\n"
52
+ }
53
+}
54
+me/ticket'>Tickets</>$name</a>\n"
55
+ }
56
+}
57
+me/wikihashas name</a>\n"
58
+ }
59
+}
60
+me/setup_ulist'>Users</a>\n"<html>reportlisd>
61
+<base the set i ## >\n"
62
+} else {
63
+>$nam the initial set i ##
--- a/skins/enhanced1/header.txt
+++ b/skins/enhanced1/header.txt
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/enhanced1/header.txt
+++ b/skins/enhanced1/header.txt
@@ -0,0 +1,63 @@
1 <html>
2 <head>
3 <base href="$baseurl/$current_page" />
4 <title>$<project_name>: $<title></title>
5 <link rel="alternate" type="application/rss+xml" title="RSS Feed"
6 href="$home/timeline.rss" />
7 <link rel="stylesheet" href="$stylesheet_url" type="text/css"
8 media=<div class="header">
9 <div class="logo">
10 <th1>
11 ##
12 ## NOTE: The purpose of this procedure is to take the base URL of the
13 ## Fossil project and return the root of the entire web site using
14 ## the same URI scheme as the base URL (e.g. http or https).
15 ##
16 proc getLogoUrl { baseurl } {
17 set idx(first) [string first // $baseurl]
18 if {$idx(first) != -1} {
19 ##
20 ## NOTE: Skip second slash.
21 ##
22 set idx(first+1) [expr {$idx(first) + 2}]
23 ##
24 ## NOTE: (part 1) The [string first] command does NOT actually
25 ## support the optional startIument as specified in the
26 else {
27 >$name</a>re, we fak<small> using the
28 else {
29 >$name</a>sing the [stang necessary
30 else {
31 >$name</a>se href="$b<html>
32 <head>
33 <baseelse {
34 >$name</a>v>
35 </divdex_page'>Home</a>\n"
36 name</a>\n"
37 }
38 }
39 me/help'>Help<>$name</a>\n"
40 }
41 }
42 me
43 }
44 me/tree?ci=tip'>Filhas>$name</a>\n"
45 }
46 }
47 me/brlist'>Branches</a>\n"
48 >$name</a>\n"
49 }
50 }
51 hasaglist'>Tags</>$name</a>\n"
52 }
53 }
54 me/ticket'>Tickets</>$name</a>\n"
55 }
56 }
57 me/wikihashas name</a>\n"
58 }
59 }
60 me/setup_ulist'>Users</a>\n"<html>reportlisd>
61 <base the set i ## >\n"
62 } else {
63 >$nam the initial set i ##
--- a/skins/khaki/css.txt
+++ b/skins/khaki/css.txt
@@ -0,0 +1 @@
1
+/* General settings for t
--- a/skins/khaki/css.txt
+++ b/skins/khaki/css.txt
@@ -0,0 +1 @@
 
--- a/skins/khaki/css.txt
+++ b/skins/khaki/css.txt
@@ -0,0 +1 @@
1 /* General settings for t
--- a/skins/khaki/footer.txt
+++ b/skins/khaki/footer.txt
@@ -0,0 +1 @@
1
+<
--- a/skins/khaki/footer.txt
+++ b/skins/khaki/footer.txt
@@ -0,0 +1 @@
 
--- a/skins/khaki/footer.txt
+++ b/skins/khaki/footer.txt
@@ -0,0 +1 @@
1 <
--- a/skins/khaki/header.txt
+++ b/skins/khaki/header.txt
@@ -0,0 +1,18 @@
1
+<div class="header">
2
+ <div class="title">$<title></div>
3
+ <div class="status">
4
+ <div class="logo">$<project_name>if {[info exists login]} {
5
+ o exists login]} {
6
+ puts } else {
7
+ puts "Not logged in"
8
+ }
9
+ </th1></div>
10
+</he><th1>
11
+html "<a id='hbbtndiv>
12
+<dime/sitemap' aria-la
13
+<th1>
14
+home$index_page'>Homehome/timeline'>Timeline</home/tree?ci=tip'>Files<home/brlist'>Branches</a>\n"home/taglist'>Tags</a>\n"
15
+}
16
+if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {home/forum'>Forum<home/ticket'>Tickets<home/wiki'>Wikihome/setup'>Admin</a>home/setup_ulist'>Users</a>\n"
17
+}
18
+ o exists loginoncap rhascap ohhascap ohascap hasreportlis
--- a/skins/khaki/header.txt
+++ b/skins/khaki/header.txt
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/khaki/header.txt
+++ b/skins/khaki/header.txt
@@ -0,0 +1,18 @@
1 <div class="header">
2 <div class="title">$<title></div>
3 <div class="status">
4 <div class="logo">$<project_name>if {[info exists login]} {
5 o exists login]} {
6 puts } else {
7 puts "Not logged in"
8 }
9 </th1></div>
10 </he><th1>
11 html "<a id='hbbtndiv>
12 <dime/sitemap' aria-la
13 <th1>
14 home$index_page'>Homehome/timeline'>Timeline</home/tree?ci=tip'>Files<home/brlist'>Branches</a>\n"home/taglist'>Tags</a>\n"
15 }
16 if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {home/forum'>Forum<home/ticket'>Tickets<home/wiki'>Wikihome/setup'>Admin</a>home/setup_ulist'>Users</a>\n"
17 }
18 o exists loginoncap rhascap ohhascap ohascap hasreportlis
--- a/skins/plain_gray/css.txt
+++ b/skins/plain_gray/css.txt
@@ -0,0 +1,6 @@
1
+/* General settings for the entire page */
2
+body {
3
+ margin: 0ex 1ex;
4
+ padding: 0px;
5
+ background-color: white;
6
+ font-family: sans-serif;
--- a/skins/plain_gray/css.txt
+++ b/skins/plain_gray/css.txt
@@ -0,0 +1,6 @@
 
 
 
 
 
 
--- a/skins/plain_gray/css.txt
+++ b/skins/plain_gray/css.txt
@@ -0,0 +1,6 @@
1 /* General settings for the entire page */
2 body {
3 margin: 0ex 1ex;
4 padding: 0px;
5 background-color: white;
6 font-family: sans-serif;
--- a/skins/plain_gray/footer.txt
+++ b/skins/plain_gray/footer.txt
@@ -0,0 +1 @@
1
+<
--- a/skins/plain_gray/footer.txt
+++ b/skins/plain_gray/footer.txt
@@ -0,0 +1 @@
 
--- a/skins/plain_gray/footer.txt
+++ b/skins/plain_gray/footer.txt
@@ -0,0 +1 @@
1 <
--- a/skins/plain_gray/header.txt
+++ b/skins/plain_gray/header.txt
@@ -0,0 +1,13 @@
1
+<html>
2
+<head>
3
+<base href="$baseucap r: $<title></title>
4
+<link rel="alternate" type="application/rss+xml" title="RSS Feed"
5
+ href="$home/timeline.rss">
6
+<link rel="stylesheet" href="$stylesheet_url" type="text/css"
7
+ media="screen">
8
+</head>
9
+<body>
10
+<div class="headjoroncap rhashascap oase href="$baseucap r: $<tit<html>
11
+<head>
12
+<base href="$baseucap r: $<title></title>
13
+<link rel="alternathascap hasreportlis
--- a/skins/plain_gray/header.txt
+++ b/skins/plain_gray/header.txt
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/plain_gray/header.txt
+++ b/skins/plain_gray/header.txt
@@ -0,0 +1,13 @@
1 <html>
2 <head>
3 <base href="$baseucap r: $<title></title>
4 <link rel="alternate" type="application/rss+xml" title="RSS Feed"
5 href="$home/timeline.rss">
6 <link rel="stylesheet" href="$stylesheet_url" type="text/css"
7 media="screen">
8 </head>
9 <body>
10 <div class="headjoroncap rhashascap oase href="$baseucap r: $<tit<html>
11 <head>
12 <base href="$baseucap r: $<title></title>
13 <link rel="alternathascap hasreportlis
--- a/skins/rounded1/css.txt
+++ b/skins/rounded1/css.txt
@@ -0,0 +1,105 @@
1
+/* General settings for the entire page */
2
+html {
3
+ min-height: 100%;
4
+}
5
+body {
6
+ margin: 0ex 1ex;
7
+ padding: 0px;
8
+ background-color: white;
9
+ color: #333;
10
+ font-family: Verdana, sans-serif;
11
+ font-size: 0.8em;
12
+mx-text-size-adjust: none;
13
+}
14
+
15
+/* The project logo in the upper left-hand corner of each page */
16
+div.logo {
17
+ display: table-cell;
18
+ text-align: right;
19
+ vertical-align: bottom;
20
+ font-weight: normal;
21
+ white-space: nowrap;
22
+}
23
+
24
+/* Widths */
25
+div.header, div.mainmenu, div.submenu, div.content, div.footer {
26
+ max-width: 900px;
27
+ margin: auto;
28
+ padding: 3px 20px 3px 20px;
29
+ clear: both;
30
+}
31
+
32
+/* The page title at the top of each page */
33
+div.title {
34
+ display: table-cell;
35
+ padding-left: 10px;
36
+ font-size: 2em;
37
+ margin: 10px 0 10px -20px;
38
+ vertical-align: bottom;
39
+ text-align: left;
40
+ width: 80%;
41
+ font-family: Verdana, sans-serif;
42
+ font-weight: bold;
43
+ color: #558195;
44
+ text-shadow: 0px 2px 2px #999999;
45
+}
46
+
47
+/* The login status message in the top right-hand corner */
48
+div.status {
49
+ display: table-cell;
50
+ text-align: right;
51
+ vertical-align: bottom;
52
+ color: #333;
53
+ margin-right: -20px;
54
+ white-space: nowrap;
55
+}
56
+
57
+/* The main menu bar that appears at the top of the page beneath
58
+ ** the header */
59
+div.mainmenu {
60
+ text-align: center;
61
+ color: white;
62
+ border-top-left-radius: 5px;
63
+ border-top-right-radius: 5px;
64
+ vertical-align: middle;
65
+ padding-top: 8px;
66
+ padding-bottom: 8px;
67
+ background-color: #446979;
68
+ box-shadow: 0px 3px 4px #333333;
69
+}
70
+
71
+/* The submenu bar that *sometimes* appears below the main menu */
72
+div.submenu {
73
+ padding-top:10px;
74
+ padding-bottom:0;
75
+ text-align: right;
76
+ color: #000;
77
+ background-color: #fff;
78
+ height: 1.5em;
79
+ vertical-align:middle;
80
+ box-shadow: 0px 3px 4px #999;
81
+}
82
+div.mainmenu a, div.mainmenu a:visited {
83
+ padding: 3px 10px 3px 10px;
84
+ color: white;
85
+ text-decoration: none;
86
+}
87
+div.submenu a, div.submenu a:visited, .button, .button, div.submenu label,
88
+div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
89
+ padding: 2px 8px;
90
+ color: #000;
91
+ font-family: Arial;
92
+ text-decoration: none;
93
+ margin:auto;
94
+ border-radius: 5px;
95
+ background-color: #e0e0e0;
96
+ text-shadow: 0px -1px 0px #eee;
97
+ border: 1px solid #000;
98
+}
99
+
100
+div.mainmenu a:hover {
101
+ color: #000;
102
+ background-co cursor: pointercolor: white;
103
+}
104
+
105
+div.submenu a:hover, div: 10px 0
--- a/skins/rounded1/css.txt
+++ b/skins/rounded1/css.txt
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/rounded1/css.txt
+++ b/skins/rounded1/css.txt
@@ -0,0 +1,105 @@
1 /* General settings for the entire page */
2 html {
3 min-height: 100%;
4 }
5 body {
6 margin: 0ex 1ex;
7 padding: 0px;
8 background-color: white;
9 color: #333;
10 font-family: Verdana, sans-serif;
11 font-size: 0.8em;
12 mx-text-size-adjust: none;
13 }
14
15 /* The project logo in the upper left-hand corner of each page */
16 div.logo {
17 display: table-cell;
18 text-align: right;
19 vertical-align: bottom;
20 font-weight: normal;
21 white-space: nowrap;
22 }
23
24 /* Widths */
25 div.header, div.mainmenu, div.submenu, div.content, div.footer {
26 max-width: 900px;
27 margin: auto;
28 padding: 3px 20px 3px 20px;
29 clear: both;
30 }
31
32 /* The page title at the top of each page */
33 div.title {
34 display: table-cell;
35 padding-left: 10px;
36 font-size: 2em;
37 margin: 10px 0 10px -20px;
38 vertical-align: bottom;
39 text-align: left;
40 width: 80%;
41 font-family: Verdana, sans-serif;
42 font-weight: bold;
43 color: #558195;
44 text-shadow: 0px 2px 2px #999999;
45 }
46
47 /* The login status message in the top right-hand corner */
48 div.status {
49 display: table-cell;
50 text-align: right;
51 vertical-align: bottom;
52 color: #333;
53 margin-right: -20px;
54 white-space: nowrap;
55 }
56
57 /* The main menu bar that appears at the top of the page beneath
58 ** the header */
59 div.mainmenu {
60 text-align: center;
61 color: white;
62 border-top-left-radius: 5px;
63 border-top-right-radius: 5px;
64 vertical-align: middle;
65 padding-top: 8px;
66 padding-bottom: 8px;
67 background-color: #446979;
68 box-shadow: 0px 3px 4px #333333;
69 }
70
71 /* The submenu bar that *sometimes* appears below the main menu */
72 div.submenu {
73 padding-top:10px;
74 padding-bottom:0;
75 text-align: right;
76 color: #000;
77 background-color: #fff;
78 height: 1.5em;
79 vertical-align:middle;
80 box-shadow: 0px 3px 4px #999;
81 }
82 div.mainmenu a, div.mainmenu a:visited {
83 padding: 3px 10px 3px 10px;
84 color: white;
85 text-decoration: none;
86 }
87 div.submenu a, div.submenu a:visited, .button, .button, div.submenu label,
88 div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
89 padding: 2px 8px;
90 color: #000;
91 font-family: Arial;
92 text-decoration: none;
93 margin:auto;
94 border-radius: 5px;
95 background-color: #e0e0e0;
96 text-shadow: 0px -1px 0px #eee;
97 border: 1px solid #000;
98 }
99
100 div.mainmenu a:hover {
101 color: #000;
102 background-co cursor: pointercolor: white;
103 }
104
105 div.submenu a:hover, div: 10px 0
--- a/skins/rounded1/footer.txt
+++ b/skins/rounded1/footer.txt
@@ -0,0 +1 @@
1
+<
--- a/skins/rounded1/footer.txt
+++ b/skins/rounded1/footer.txt
@@ -0,0 +1 @@
 
--- a/skins/rounded1/footer.txt
+++ b/skins/rounded1/footer.txt
@@ -0,0 +1 @@
1 <
--- a/skins/rounded1/header.txt
+++ b/skins/rounded1/header.txt
@@ -0,0 +1,38 @@
1
+<div class="header">
2
+ <div class="logo">
3
+ <img src="$logo_image_url" alt="logo">
4
+ <br />$<project_name>
5
+ </div>
6
+ <div class="title">$<title></div>
7
+ <div class="status"><th1>
8
+ if {[info exists login]} {
9
+ puts "Logged in as $login"
10
+ } else {
11
+ puts "Not logged in"
12
+ }
13
+ </th1></div>
14
+</div>
15
+<div class="mainmenu">
16
+<th1>
17
+html "<a href='$home$index_page'>Home</a>\n"
18
+if {[anycap jor]} {
19
+ html "<a href='$home/} {
20
+ html "<a href='$home/timeline'>Timeline</a>\n"
21
+}
22
+if {[anoncap oh]} {
23
+ html "<a href='$home/tree?ci=tip'>Files</a>\n"
24
+}
25
+if {[anoncap o]} {
26
+ html "<a href='$home/brlist'>Branches</a>\n"
27
+ html "<a href='$home/tagoncap r]} {
28
+ html "<a href='$home/ticket'>Tickets</a>\n"
29
+}
30
+if {[anoncap j]} {
31
+ has"header">
32
+ <div class="logo">
33
+ <img src="$logo_image_url" alt="<div claeif {[hascap a]} {
34
+ html "<a href='$home/setup_ulist'>Users</a>\n"
35
+}
36
+ clashascap "<a href='$home/ticket'>Ticket} else {
37
+ html "<a href='$hhase {
38
+ html "<a href='$reportlislogin'>L
--- a/skins/rounded1/header.txt
+++ b/skins/rounded1/header.txt
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
--- a/skins/rounded1/header.txt
+++ b/skins/rounded1/header.txt
@@ -0,0 +1,38 @@
1 <div class="header">
2 <div class="logo">
3 <img src="$logo_image_url" alt="logo">
4 <br />$<project_name>
5 </div>
6 <div class="title">$<title></div>
7 <div class="status"><th1>
8 if {[info exists login]} {
9 puts "Logged in as $login"
10 } else {
11 puts "Not logged in"
12 }
13 </th1></div>
14 </div>
15 <div class="mainmenu">
16 <th1>
17 html "<a href='$home$index_page'>Home</a>\n"
18 if {[anycap jor]} {
19 html "<a href='$home/} {
20 html "<a href='$home/timeline'>Timeline</a>\n"
21 }
22 if {[anoncap oh]} {
23 html "<a href='$home/tree?ci=tip'>Files</a>\n"
24 }
25 if {[anoncap o]} {
26 html "<a href='$home/brlist'>Branches</a>\n"
27 html "<a href='$home/tagoncap r]} {
28 html "<a href='$home/ticket'>Tickets</a>\n"
29 }
30 if {[anoncap j]} {
31 has"header">
32 <div class="logo">
33 <img src="$logo_image_url" alt="<div claeif {[hascap a]} {
34 html "<a href='$home/setup_ulist'>Users</a>\n"
35 }
36 clashascap "<a href='$home/ticket'>Ticket} else {
37 html "<a href='$hhase {
38 html "<a href='$reportlislogin'>L
+10 -2
--- src/builtin.c
+++ src/builtin.c
@@ -31,22 +31,30 @@
3131
3232
/*
3333
** Return a pointer to built-in content
3434
*/
3535
const unsigned char *builtin_file(const char *zFilename, int *piSize){
36
- int lwr, upr, i;
36
+ int lwr, upr, i, c;
3737
lwr = 0;
3838
upr = sizeof(aBuiltinFiles)/sizeof(aBuiltinFiles[0]) - 1;
3939
while( upr>=lwr ){
4040
i = (upr+lwr)/2;
41
- if( strcmp(aBuiltinFiles[i].zName,zFilename)==0 ){
41
+ c = strcmp(aBuiltinFiles[i].zName,zFilename);
42
+ if( c<0 ){
43
+ lwr = i+1;
44
+ }else if( c>0 ){
45
+ upr = i-1;
46
+ }else{
4247
if( piSize ) *piSize = aBuiltinFiles[i].nByte;
4348
return aBuiltinFiles[i].pData;
4449
}
4550
}
4651
if( piSize ) *piSize = 0;
4752
return 0;
53
+}
54
+const char *builtin_text(const char *zFilename){
55
+ return (char*)builtin_file(zFilename, 0);
4856
}
4957
5058
/*
5159
** COMMAND: test-builtin-list
5260
**
5361
--- src/builtin.c
+++ src/builtin.c
@@ -31,22 +31,30 @@
31
32 /*
33 ** Return a pointer to built-in content
34 */
35 const unsigned char *builtin_file(const char *zFilename, int *piSize){
36 int lwr, upr, i;
37 lwr = 0;
38 upr = sizeof(aBuiltinFiles)/sizeof(aBuiltinFiles[0]) - 1;
39 while( upr>=lwr ){
40 i = (upr+lwr)/2;
41 if( strcmp(aBuiltinFiles[i].zName,zFilename)==0 ){
 
 
 
 
 
42 if( piSize ) *piSize = aBuiltinFiles[i].nByte;
43 return aBuiltinFiles[i].pData;
44 }
45 }
46 if( piSize ) *piSize = 0;
47 return 0;
 
 
 
48 }
49
50 /*
51 ** COMMAND: test-builtin-list
52 **
53
--- src/builtin.c
+++ src/builtin.c
@@ -31,22 +31,30 @@
31
32 /*
33 ** Return a pointer to built-in content
34 */
35 const unsigned char *builtin_file(const char *zFilename, int *piSize){
36 int lwr, upr, i, c;
37 lwr = 0;
38 upr = sizeof(aBuiltinFiles)/sizeof(aBuiltinFiles[0]) - 1;
39 while( upr>=lwr ){
40 i = (upr+lwr)/2;
41 c = strcmp(aBuiltinFiles[i].zName,zFilename);
42 if( c<0 ){
43 lwr = i+1;
44 }else if( c>0 ){
45 upr = i-1;
46 }else{
47 if( piSize ) *piSize = aBuiltinFiles[i].nByte;
48 return aBuiltinFiles[i].pData;
49 }
50 }
51 if( piSize ) *piSize = 0;
52 return 0;
53 }
54 const char *builtin_text(const char *zFilename){
55 return (char*)builtin_file(zFilename, 0);
56 }
57
58 /*
59 ** COMMAND: test-builtin-list
60 **
61
--- src/diff.tcl
+++ src/diff.tcl
@@ -1,5 +1,14 @@
1
+# The "diff --tk" command outputs prepends a "set fossilcmd {...}" line
2
+# to this file, then runs this file using "tclsh" in order to display the
3
+# graphical diff in a separate window. A typical "set fossilcmd" line
4
+# looks like this:
5
+#
6
+# set fossilcmd {| "./fossil" diff --html -y -i -v}
7
+#
8
+# This header comment is stripped off by the "mkbuiltin.c" program.
9
+#
110
set prog {
211
package require Tk
312
413
array set CFG {
514
TITLE {Fossil Diff}
615
--- src/diff.tcl
+++ src/diff.tcl
@@ -1,5 +1,14 @@
 
 
 
 
 
 
 
 
 
1 set prog {
2 package require Tk
3
4 array set CFG {
5 TITLE {Fossil Diff}
6
--- src/diff.tcl
+++ src/diff.tcl
@@ -1,5 +1,14 @@
1 # The "diff --tk" command outputs prepends a "set fossilcmd {...}" line
2 # to this file, then runs this file using "tclsh" in order to display the
3 # graphical diff in a separate window. A typical "set fossilcmd" line
4 # looks like this:
5 #
6 # set fossilcmd {| "./fossil" diff --html -y -i -v}
7 #
8 # This header comment is stripped off by the "mkbuiltin.c" program.
9 #
10 set prog {
11 package require Tk
12
13 array set CFG {
14 TITLE {Fossil Diff}
15
+18
--- src/main.mk
+++ src/main.mk
@@ -131,10 +131,28 @@
131131
$(SRCDIR)/xfer.c \
132132
$(SRCDIR)/xfersetup.c \
133133
$(SRCDIR)/zip.c
134134
135135
EXTRA_FILES = \
136
+ $(SRCDIR)/../skins/black_and_white/css.txt \
137
+ $(SRCDIR)/../skins/black_and_white/footer.txt \
138
+ $(SRCDIR)/../skins/black_and_white/header.txt \
139
+ $(SRCDIR)/../skins/default/css.txt \
140
+ $(SRCDIR)/../skins/default/footer.txt \
141
+ $(SRCDIR)/../skins/default/header.txt \
142
+ $(SRCDIR)/../skins/enhanced1/css.txt \
143
+ $(SRCDIR)/../skins/enhanced1/footer.txt \
144
+ $(SRCDIR)/../skins/enhanced1/header.txt \
145
+ $(SRCDIR)/../skins/khaki/css.txt \
146
+ $(SRCDIR)/../skins/khaki/footer.txt \
147
+ $(SRCDIR)/../skins/khaki/header.txt \
148
+ $(SRCDIR)/../skins/plain_gray/css.txt \
149
+ $(SRCDIR)/../skins/plain_gray/footer.txt \
150
+ $(SRCDIR)/../skins/plain_gray/header.txt \
151
+ $(SRCDIR)/../skins/rounded1/css.txt \
152
+ $(SRCDIR)/../skins/rounded1/footer.txt \
153
+ $(SRCDIR)/../skins/rounded1/header.txt \
136154
$(SRCDIR)/diff.tcl
137155
138156
TRANS_SRC = \
139157
$(OBJDIR)/add_.c \
140158
$(OBJDIR)/allrepo_.c \
141159
--- src/main.mk
+++ src/main.mk
@@ -131,10 +131,28 @@
131 $(SRCDIR)/xfer.c \
132 $(SRCDIR)/xfersetup.c \
133 $(SRCDIR)/zip.c
134
135 EXTRA_FILES = \
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136 $(SRCDIR)/diff.tcl
137
138 TRANS_SRC = \
139 $(OBJDIR)/add_.c \
140 $(OBJDIR)/allrepo_.c \
141
--- src/main.mk
+++ src/main.mk
@@ -131,10 +131,28 @@
131 $(SRCDIR)/xfer.c \
132 $(SRCDIR)/xfersetup.c \
133 $(SRCDIR)/zip.c
134
135 EXTRA_FILES = \
136 $(SRCDIR)/../skins/black_and_white/css.txt \
137 $(SRCDIR)/../skins/black_and_white/footer.txt \
138 $(SRCDIR)/../skins/black_and_white/header.txt \
139 $(SRCDIR)/../skins/default/css.txt \
140 $(SRCDIR)/../skins/default/footer.txt \
141 $(SRCDIR)/../skins/default/header.txt \
142 $(SRCDIR)/../skins/enhanced1/css.txt \
143 $(SRCDIR)/../skins/enhanced1/footer.txt \
144 $(SRCDIR)/../skins/enhanced1/header.txt \
145 $(SRCDIR)/../skins/khaki/css.txt \
146 $(SRCDIR)/../skins/khaki/footer.txt \
147 $(SRCDIR)/../skins/khaki/header.txt \
148 $(SRCDIR)/../skins/plain_gray/css.txt \
149 $(SRCDIR)/../skins/plain_gray/footer.txt \
150 $(SRCDIR)/../skins/plain_gray/header.txt \
151 $(SRCDIR)/../skins/rounded1/css.txt \
152 $(SRCDIR)/../skins/rounded1/footer.txt \
153 $(SRCDIR)/../skins/rounded1/header.txt \
154 $(SRCDIR)/diff.tcl
155
156 TRANS_SRC = \
157 $(OBJDIR)/add_.c \
158 $(OBJDIR)/allrepo_.c \
159
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -142,10 +142,11 @@
142142
143143
# Additional resource files that get built into the executable.
144144
#
145145
set extra_files {
146146
diff.tcl
147
+ ../skins/*/*.txt
147148
}
148149
149150
# Options used to compile the included SQLite library.
150151
#
151152
set SQLITE_OPTIONS {
@@ -203,10 +204,19 @@
203204
}
204205
205206
# STOP HERE.
206207
# Unless the build procedures changes, you should not have to edit anything
207208
# below this line.
209
+
210
+# Expand any wildcards in "extra_files"
211
+set new_extra_files {}
212
+foreach file $extra_files {
213
+ foreach x [glob -nocomplain $file] {
214
+ lappend new_extra_files $x
215
+ }
216
+}
217
+set extra_files $new_extra_files
208218
209219
##############################################################################
210220
##############################################################################
211221
##############################################################################
212222
# Start by generating the "main.mk" makefile used for all unix systems.
213223
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -142,10 +142,11 @@
142
143 # Additional resource files that get built into the executable.
144 #
145 set extra_files {
146 diff.tcl
 
147 }
148
149 # Options used to compile the included SQLite library.
150 #
151 set SQLITE_OPTIONS {
@@ -203,10 +204,19 @@
203 }
204
205 # STOP HERE.
206 # Unless the build procedures changes, you should not have to edit anything
207 # below this line.
 
 
 
 
 
 
 
 
 
208
209 ##############################################################################
210 ##############################################################################
211 ##############################################################################
212 # Start by generating the "main.mk" makefile used for all unix systems.
213
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -142,10 +142,11 @@
142
143 # Additional resource files that get built into the executable.
144 #
145 set extra_files {
146 diff.tcl
147 ../skins/*/*.txt
148 }
149
150 # Options used to compile the included SQLite library.
151 #
152 set SQLITE_OPTIONS {
@@ -203,10 +204,19 @@
204 }
205
206 # STOP HERE.
207 # Unless the build procedures changes, you should not have to edit anything
208 # below this line.
209
210 # Expand any wildcards in "extra_files"
211 set new_extra_files {}
212 foreach file $extra_files {
213 foreach x [glob -nocomplain $file] {
214 lappend new_extra_files $x
215 }
216 }
217 set extra_files $new_extra_files
218
219 ##############################################################################
220 ##############################################################################
221 ##############################################################################
222 # Start by generating the "main.mk" makefile used for all unix systems.
223
+27 -7
--- src/mkbuiltin.c
+++ src/mkbuiltin.c
@@ -29,11 +29,11 @@
2929
#include <string.h>
3030
3131
3232
/*
3333
** Read the entire content of the file named zFilename into memory obtained
34
-** from malloc() and retur a pointer to that memory. Write the size of the
34
+** from malloc() and return a pointer to that memory. Write the size of the
3535
** file into *pnByte.
3636
*/
3737
static unsigned char *read_file(const char *zFilename, int *pnByte){
3838
FILE *in;
3939
unsigned char *z;
@@ -62,10 +62,11 @@
6262
*/
6363
typedef struct Resource Resource;
6464
struct Resource {
6565
const char *zName;
6666
int nByte;
67
+ int idx;
6768
};
6869
6970
/*
7071
** Compare two Resource objects for sorting purposes. They sort
7172
** in zName order so that Fossil can search for resources using
@@ -82,10 +83,11 @@
8283
int j, n;
8384
Resource *aRes;
8485
int nRes = argc-1;
8586
unsigned char *pData;
8687
int nErr = 0;
88
+ int nSkip;
8789
8890
aRes = malloc( nRes*sizeof(aRes[0]) );
8991
if( aRes==0 ){
9092
fprintf(stderr, "malloc failed\n");
9193
return 1;
@@ -103,15 +105,24 @@
103105
if( pData==0 ){
104106
fprintf(stderr, "Cannot open file [%s]\n", aRes[i].zName);
105107
nErr++;
106108
continue;
107109
}
108
- aRes[i].nByte = sz;
110
+
111
+ /* Skip initial lines beginning with # */
112
+ nSkip = 0;
113
+ while( pData[nSkip]=='#' ){
114
+ while( pData[nSkip]!=0 && pData[nSkip]!='\n' ){ nSkip++; }
115
+ if( pData[nSkip]=='\n' ) nSkip++;
116
+ }
117
+
118
+ aRes[i].nByte = sz - nSkip;
119
+ aRes[i].idx = i;
109120
printf("/* Content of file %s */\n", aRes[i].zName);
110121
printf("static const unsigned char bidata%d[%d] = {\n ",
111
- i, sz+1);
112
- for(j=n=0; j<=sz; j++){
122
+ i, sz+1-nSkip);
123
+ for(j=nSkip, n=0; j<=sz; j++){
113124
printf("%3d", pData[j]);
114125
if( j==sz ){
115126
printf(" };\n");
116127
}else if( n==14 ){
117128
printf(",\n ");
@@ -129,17 +140,26 @@
129140
printf(" const unsigned char *pData;\n");
130141
printf(" int nByte;\n");
131142
printf("};\n");
132143
printf("static const BuiltinFileTable aBuiltinFiles[] = {\n");
133144
for(i=0; i<nRes; i++){
134
- const char *zTail;
135145
const char *z = aRes[i].zName;
146
+ const char *zTail;
147
+ int nSlash = 0;
136148
zTail = z;
137149
while( z && z[0] ){
138
- if( z[0]=='/' || z[0]=='\\' ) zTail = &z[1];
150
+ if( z[0]=='/' || z[0]=='\\' ){
151
+ nSlash++;
152
+ if( nSlash<=2 || z[-1]=='.' ) zTail = &z[1];
153
+ }
139154
z++;
140155
}
141
- printf(" { \"%s\", bidata%d, %d },\n", zTail, i, aRes[i].nByte);
156
+ aRes[i].zName = zTail;
157
+ }
158
+ qsort(aRes, nRes, sizeof(aRes[0]), compareResource);
159
+ for(i=0; i<nRes; i++){
160
+ printf(" { \"%s\", bidata%d, %d },\n",
161
+ aRes[i].zName, aRes[i].idx, aRes[i].nByte);
142162
}
143163
printf("};\n");
144164
return nErr;
145165
}
146166
--- src/mkbuiltin.c
+++ src/mkbuiltin.c
@@ -29,11 +29,11 @@
29 #include <string.h>
30
31
32 /*
33 ** Read the entire content of the file named zFilename into memory obtained
34 ** from malloc() and retur a pointer to that memory. Write the size of the
35 ** file into *pnByte.
36 */
37 static unsigned char *read_file(const char *zFilename, int *pnByte){
38 FILE *in;
39 unsigned char *z;
@@ -62,10 +62,11 @@
62 */
63 typedef struct Resource Resource;
64 struct Resource {
65 const char *zName;
66 int nByte;
 
67 };
68
69 /*
70 ** Compare two Resource objects for sorting purposes. They sort
71 ** in zName order so that Fossil can search for resources using
@@ -82,10 +83,11 @@
82 int j, n;
83 Resource *aRes;
84 int nRes = argc-1;
85 unsigned char *pData;
86 int nErr = 0;
 
87
88 aRes = malloc( nRes*sizeof(aRes[0]) );
89 if( aRes==0 ){
90 fprintf(stderr, "malloc failed\n");
91 return 1;
@@ -103,15 +105,24 @@
103 if( pData==0 ){
104 fprintf(stderr, "Cannot open file [%s]\n", aRes[i].zName);
105 nErr++;
106 continue;
107 }
108 aRes[i].nByte = sz;
 
 
 
 
 
 
 
 
 
109 printf("/* Content of file %s */\n", aRes[i].zName);
110 printf("static const unsigned char bidata%d[%d] = {\n ",
111 i, sz+1);
112 for(j=n=0; j<=sz; j++){
113 printf("%3d", pData[j]);
114 if( j==sz ){
115 printf(" };\n");
116 }else if( n==14 ){
117 printf(",\n ");
@@ -129,17 +140,26 @@
129 printf(" const unsigned char *pData;\n");
130 printf(" int nByte;\n");
131 printf("};\n");
132 printf("static const BuiltinFileTable aBuiltinFiles[] = {\n");
133 for(i=0; i<nRes; i++){
134 const char *zTail;
135 const char *z = aRes[i].zName;
 
 
136 zTail = z;
137 while( z && z[0] ){
138 if( z[0]=='/' || z[0]=='\\' ) zTail = &z[1];
 
 
 
139 z++;
140 }
141 printf(" { \"%s\", bidata%d, %d },\n", zTail, i, aRes[i].nByte);
 
 
 
 
 
142 }
143 printf("};\n");
144 return nErr;
145 }
146
--- src/mkbuiltin.c
+++ src/mkbuiltin.c
@@ -29,11 +29,11 @@
29 #include <string.h>
30
31
32 /*
33 ** Read the entire content of the file named zFilename into memory obtained
34 ** from malloc() and return a pointer to that memory. Write the size of the
35 ** file into *pnByte.
36 */
37 static unsigned char *read_file(const char *zFilename, int *pnByte){
38 FILE *in;
39 unsigned char *z;
@@ -62,10 +62,11 @@
62 */
63 typedef struct Resource Resource;
64 struct Resource {
65 const char *zName;
66 int nByte;
67 int idx;
68 };
69
70 /*
71 ** Compare two Resource objects for sorting purposes. They sort
72 ** in zName order so that Fossil can search for resources using
@@ -82,10 +83,11 @@
83 int j, n;
84 Resource *aRes;
85 int nRes = argc-1;
86 unsigned char *pData;
87 int nErr = 0;
88 int nSkip;
89
90 aRes = malloc( nRes*sizeof(aRes[0]) );
91 if( aRes==0 ){
92 fprintf(stderr, "malloc failed\n");
93 return 1;
@@ -103,15 +105,24 @@
105 if( pData==0 ){
106 fprintf(stderr, "Cannot open file [%s]\n", aRes[i].zName);
107 nErr++;
108 continue;
109 }
110
111 /* Skip initial lines beginning with # */
112 nSkip = 0;
113 while( pData[nSkip]=='#' ){
114 while( pData[nSkip]!=0 && pData[nSkip]!='\n' ){ nSkip++; }
115 if( pData[nSkip]=='\n' ) nSkip++;
116 }
117
118 aRes[i].nByte = sz - nSkip;
119 aRes[i].idx = i;
120 printf("/* Content of file %s */\n", aRes[i].zName);
121 printf("static const unsigned char bidata%d[%d] = {\n ",
122 i, sz+1-nSkip);
123 for(j=nSkip, n=0; j<=sz; j++){
124 printf("%3d", pData[j]);
125 if( j==sz ){
126 printf(" };\n");
127 }else if( n==14 ){
128 printf(",\n ");
@@ -129,17 +140,26 @@
140 printf(" const unsigned char *pData;\n");
141 printf(" int nByte;\n");
142 printf("};\n");
143 printf("static const BuiltinFileTable aBuiltinFiles[] = {\n");
144 for(i=0; i<nRes; i++){
 
145 const char *z = aRes[i].zName;
146 const char *zTail;
147 int nSlash = 0;
148 zTail = z;
149 while( z && z[0] ){
150 if( z[0]=='/' || z[0]=='\\' ){
151 nSlash++;
152 if( nSlash<=2 || z[-1]=='.' ) zTail = &z[1];
153 }
154 z++;
155 }
156 aRes[i].zName = zTail;
157 }
158 qsort(aRes, nRes, sizeof(aRes[0]), compareResource);
159 for(i=0; i<nRes; i++){
160 printf(" { \"%s\", bidata%d, %d },\n",
161 aRes[i].zName, aRes[i].idx, aRes[i].nByte);
162 }
163 printf("};\n");
164 return nErr;
165 }
166
+17 -11
--- src/setup.c
+++ src/setup.c
@@ -1525,24 +1525,26 @@
15251525
login_needed();
15261526
}
15271527
db_begin_transaction();
15281528
if( P("clear")!=0 ){
15291529
db_multi_exec("DELETE FROM config WHERE name='css'");
1530
- cgi_replace_parameter("css", zDefaultCSS);
1530
+ cgi_replace_parameter("css", builtin_text("skins/default.css"));
15311531
db_end_transaction(0);
15321532
cgi_redirect("setup_editcss");
15331533
}
15341534
if( P("submit")!=0 ){
1535
- textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS, 0);
1535
+ textarea_attribute(0, 0, 0, "css", "css",
1536
+ builtin_text("skins/default.css"), 0);
15361537
db_end_transaction(0);
15371538
cgi_redirect("setup_editcss");
15381539
}
15391540
style_header("Edit CSS");
15401541
@ <form action="%s(g.zTop)/setup_editcss" method="post"><div>
15411542
login_insert_csrf_secret();
15421543
@ Edit the CSS below:<br />
1543
- textarea_attribute("", 35, 80, "css", "css", zDefaultCSS, 0);
1544
+ textarea_attribute("", 35, 80, "css", "css",
1545
+ builtin_text("skins/default.css"), 0);
15441546
@ <br />
15451547
@ <input type="submit" name="submit" value="Apply Changes" />
15461548
@ <input type="submit" name="clear" value="Revert To Default" />
15471549
@ </div></form>
15481550
@ <p><span class="note">Note:</span> Press your browser Reload button after
@@ -1568,15 +1570,17 @@
15681570
login_needed();
15691571
}
15701572
db_begin_transaction();
15711573
if( P("clear")!=0 ){
15721574
db_multi_exec("DELETE FROM config WHERE name='header'");
1573
- cgi_replace_parameter("header", zDefaultHeader);
1575
+ cgi_replace_parameter("header", builtin_text("skins/default.header"));
15741576
}else if( P("submit")!=0 ){
1575
- textarea_attribute(0, 0, 0, "header", "header", zDefaultHeader, 0);
1577
+ textarea_attribute(0, 0, 0, "header", "header",
1578
+ builtin_text("skins/default.header"), 0);
15761579
}else if( P("fixbase")!=0 ){
1577
- const char *z = db_get("header", (char*)zDefaultHeader);
1580
+ const char *z = db_get("header",
1581
+ (char*)builtin_text("skins/default.header"));
15781582
char *zHead = strstr(z, "<head>");
15791583
if( strstr(z, "<base href=")==0 && zHead!=0 ){
15801584
char *zNew;
15811585
char *zTail = &zHead[6];
15821586
while( fossil_isspace(zTail[0]) ) zTail++;
@@ -1601,11 +1605,12 @@
16011605
16021606
login_insert_csrf_secret();
16031607
@ <p>Edit HTML text with embedded TH1 (a TCL dialect) that will be used to
16041608
@ generate the beginning of every page through start of the main
16051609
@ menu.</p>
1606
- textarea_attribute("", 35, 80, "header", "header", zDefaultHeader, 0);
1610
+ textarea_attribute("", 35, 80, "header", "header",
1611
+ builtin_text("skins/default.header"), 0);
16071612
@ <br />
16081613
@ <input type="submit" name="submit" value="Apply Changes" />
16091614
@ <input type="submit" name="clear" value="Revert To Default" />
16101615
@ </div></form>
16111616
@ <hr />
@@ -1612,11 +1617,11 @@
16121617
@ The default header is shown below for reference. Other examples
16131618
@ of headers can be seen on the <a href="setup_skin">skins page</a>.
16141619
@ See also the <a href="setup_editcss">CSS</a> and
16151620
@ <a href="setup_footer">footer</a> editing screens.
16161621
@ <blockquote><pre>
1617
- @ %h(zDefaultHeader)
1622
+ @ %h(builtin_text("skins/default.header"))
16181623
@ </pre></blockquote>
16191624
style_footer();
16201625
db_end_transaction(0);
16211626
}
16221627
@@ -1629,19 +1634,20 @@
16291634
login_needed();
16301635
}
16311636
db_begin_transaction();
16321637
if( P("clear")!=0 ){
16331638
db_multi_exec("DELETE FROM config WHERE name='footer'");
1634
- cgi_replace_parameter("footer", zDefaultFooter);
1639
+ cgi_replace_parameter("footer", builtin_text("skins/default.footer"));
16351640
}
16361641
16371642
style_header("Edit Page Footer");
16381643
@ <form action="%s(g.zTop)/setup_footer" method="post"><div>
16391644
login_insert_csrf_secret();
16401645
@ <p>Edit HTML text with embedded TH1 (a TCL dialect) that will be used to
16411646
@ generate the end of every page.</p>
1642
- textarea_attribute("", 20, 80, "footer", "footer", zDefaultFooter, 0);
1647
+ textarea_attribute("", 20, 80, "footer", "footer",
1648
+ builtin_text("skins/default.footer"), 0);
16431649
@ <br />
16441650
@ <input type="submit" name="submit" value="Apply Changes" />
16451651
@ <input type="submit" name="clear" value="Revert To Default" />
16461652
@ </div></form>
16471653
@ <hr />
@@ -1648,11 +1654,11 @@
16481654
@ The default footer is shown below for reference. Other examples
16491655
@ of footers can be seen on the <a href="setup_skin">skins page</a>.
16501656
@ See also the <a href="setup_editcss">CSS</a> and
16511657
@ <a href="setup_header">header</a> editing screens.
16521658
@ <blockquote><pre>
1653
- @ %h(zDefaultFooter)
1659
+ @ %h(builtin_text("skins/default.footer"))
16541660
@ </pre></blockquote>
16551661
style_footer();
16561662
db_end_transaction(0);
16571663
}
16581664
16591665
--- src/setup.c
+++ src/setup.c
@@ -1525,24 +1525,26 @@
1525 login_needed();
1526 }
1527 db_begin_transaction();
1528 if( P("clear")!=0 ){
1529 db_multi_exec("DELETE FROM config WHERE name='css'");
1530 cgi_replace_parameter("css", zDefaultCSS);
1531 db_end_transaction(0);
1532 cgi_redirect("setup_editcss");
1533 }
1534 if( P("submit")!=0 ){
1535 textarea_attribute(0, 0, 0, "css", "css", zDefaultCSS, 0);
 
1536 db_end_transaction(0);
1537 cgi_redirect("setup_editcss");
1538 }
1539 style_header("Edit CSS");
1540 @ <form action="%s(g.zTop)/setup_editcss" method="post"><div>
1541 login_insert_csrf_secret();
1542 @ Edit the CSS below:<br />
1543 textarea_attribute("", 35, 80, "css", "css", zDefaultCSS, 0);
 
1544 @ <br />
1545 @ <input type="submit" name="submit" value="Apply Changes" />
1546 @ <input type="submit" name="clear" value="Revert To Default" />
1547 @ </div></form>
1548 @ <p><span class="note">Note:</span> Press your browser Reload button after
@@ -1568,15 +1570,17 @@
1568 login_needed();
1569 }
1570 db_begin_transaction();
1571 if( P("clear")!=0 ){
1572 db_multi_exec("DELETE FROM config WHERE name='header'");
1573 cgi_replace_parameter("header", zDefaultHeader);
1574 }else if( P("submit")!=0 ){
1575 textarea_attribute(0, 0, 0, "header", "header", zDefaultHeader, 0);
 
1576 }else if( P("fixbase")!=0 ){
1577 const char *z = db_get("header", (char*)zDefaultHeader);
 
1578 char *zHead = strstr(z, "<head>");
1579 if( strstr(z, "<base href=")==0 && zHead!=0 ){
1580 char *zNew;
1581 char *zTail = &zHead[6];
1582 while( fossil_isspace(zTail[0]) ) zTail++;
@@ -1601,11 +1605,12 @@
1601
1602 login_insert_csrf_secret();
1603 @ <p>Edit HTML text with embedded TH1 (a TCL dialect) that will be used to
1604 @ generate the beginning of every page through start of the main
1605 @ menu.</p>
1606 textarea_attribute("", 35, 80, "header", "header", zDefaultHeader, 0);
 
1607 @ <br />
1608 @ <input type="submit" name="submit" value="Apply Changes" />
1609 @ <input type="submit" name="clear" value="Revert To Default" />
1610 @ </div></form>
1611 @ <hr />
@@ -1612,11 +1617,11 @@
1612 @ The default header is shown below for reference. Other examples
1613 @ of headers can be seen on the <a href="setup_skin">skins page</a>.
1614 @ See also the <a href="setup_editcss">CSS</a> and
1615 @ <a href="setup_footer">footer</a> editing screens.
1616 @ <blockquote><pre>
1617 @ %h(zDefaultHeader)
1618 @ </pre></blockquote>
1619 style_footer();
1620 db_end_transaction(0);
1621 }
1622
@@ -1629,19 +1634,20 @@
1629 login_needed();
1630 }
1631 db_begin_transaction();
1632 if( P("clear")!=0 ){
1633 db_multi_exec("DELETE FROM config WHERE name='footer'");
1634 cgi_replace_parameter("footer", zDefaultFooter);
1635 }
1636
1637 style_header("Edit Page Footer");
1638 @ <form action="%s(g.zTop)/setup_footer" method="post"><div>
1639 login_insert_csrf_secret();
1640 @ <p>Edit HTML text with embedded TH1 (a TCL dialect) that will be used to
1641 @ generate the end of every page.</p>
1642 textarea_attribute("", 20, 80, "footer", "footer", zDefaultFooter, 0);
 
1643 @ <br />
1644 @ <input type="submit" name="submit" value="Apply Changes" />
1645 @ <input type="submit" name="clear" value="Revert To Default" />
1646 @ </div></form>
1647 @ <hr />
@@ -1648,11 +1654,11 @@
1648 @ The default footer is shown below for reference. Other examples
1649 @ of footers can be seen on the <a href="setup_skin">skins page</a>.
1650 @ See also the <a href="setup_editcss">CSS</a> and
1651 @ <a href="setup_header">header</a> editing screens.
1652 @ <blockquote><pre>
1653 @ %h(zDefaultFooter)
1654 @ </pre></blockquote>
1655 style_footer();
1656 db_end_transaction(0);
1657 }
1658
1659
--- src/setup.c
+++ src/setup.c
@@ -1525,24 +1525,26 @@
1525 login_needed();
1526 }
1527 db_begin_transaction();
1528 if( P("clear")!=0 ){
1529 db_multi_exec("DELETE FROM config WHERE name='css'");
1530 cgi_replace_parameter("css", builtin_text("skins/default.css"));
1531 db_end_transaction(0);
1532 cgi_redirect("setup_editcss");
1533 }
1534 if( P("submit")!=0 ){
1535 textarea_attribute(0, 0, 0, "css", "css",
1536 builtin_text("skins/default.css"), 0);
1537 db_end_transaction(0);
1538 cgi_redirect("setup_editcss");
1539 }
1540 style_header("Edit CSS");
1541 @ <form action="%s(g.zTop)/setup_editcss" method="post"><div>
1542 login_insert_csrf_secret();
1543 @ Edit the CSS below:<br />
1544 textarea_attribute("", 35, 80, "css", "css",
1545 builtin_text("skins/default.css"), 0);
1546 @ <br />
1547 @ <input type="submit" name="submit" value="Apply Changes" />
1548 @ <input type="submit" name="clear" value="Revert To Default" />
1549 @ </div></form>
1550 @ <p><span class="note">Note:</span> Press your browser Reload button after
@@ -1568,15 +1570,17 @@
1570 login_needed();
1571 }
1572 db_begin_transaction();
1573 if( P("clear")!=0 ){
1574 db_multi_exec("DELETE FROM config WHERE name='header'");
1575 cgi_replace_parameter("header", builtin_text("skins/default.header"));
1576 }else if( P("submit")!=0 ){
1577 textarea_attribute(0, 0, 0, "header", "header",
1578 builtin_text("skins/default.header"), 0);
1579 }else if( P("fixbase")!=0 ){
1580 const char *z = db_get("header",
1581 (char*)builtin_text("skins/default.header"));
1582 char *zHead = strstr(z, "<head>");
1583 if( strstr(z, "<base href=")==0 && zHead!=0 ){
1584 char *zNew;
1585 char *zTail = &zHead[6];
1586 while( fossil_isspace(zTail[0]) ) zTail++;
@@ -1601,11 +1605,12 @@
1605
1606 login_insert_csrf_secret();
1607 @ <p>Edit HTML text with embedded TH1 (a TCL dialect) that will be used to
1608 @ generate the beginning of every page through start of the main
1609 @ menu.</p>
1610 textarea_attribute("", 35, 80, "header", "header",
1611 builtin_text("skins/default.header"), 0);
1612 @ <br />
1613 @ <input type="submit" name="submit" value="Apply Changes" />
1614 @ <input type="submit" name="clear" value="Revert To Default" />
1615 @ </div></form>
1616 @ <hr />
@@ -1612,11 +1617,11 @@
1617 @ The default header is shown below for reference. Other examples
1618 @ of headers can be seen on the <a href="setup_skin">skins page</a>.
1619 @ See also the <a href="setup_editcss">CSS</a> and
1620 @ <a href="setup_footer">footer</a> editing screens.
1621 @ <blockquote><pre>
1622 @ %h(builtin_text("skins/default.header"))
1623 @ </pre></blockquote>
1624 style_footer();
1625 db_end_transaction(0);
1626 }
1627
@@ -1629,19 +1634,20 @@
1634 login_needed();
1635 }
1636 db_begin_transaction();
1637 if( P("clear")!=0 ){
1638 db_multi_exec("DELETE FROM config WHERE name='footer'");
1639 cgi_replace_parameter("footer", builtin_text("skins/default.footer"));
1640 }
1641
1642 style_header("Edit Page Footer");
1643 @ <form action="%s(g.zTop)/setup_footer" method="post"><div>
1644 login_insert_csrf_secret();
1645 @ <p>Edit HTML text with embedded TH1 (a TCL dialect) that will be used to
1646 @ generate the end of every page.</p>
1647 textarea_attribute("", 20, 80, "footer", "footer",
1648 builtin_text("skins/default.footer"), 0);
1649 @ <br />
1650 @ <input type="submit" name="submit" value="Apply Changes" />
1651 @ <input type="submit" name="clear" value="Revert To Default" />
1652 @ </div></form>
1653 @ <hr />
@@ -1648,11 +1654,11 @@
1654 @ The default footer is shown below for reference. Other examples
1655 @ of footers can be seen on the <a href="setup_skin">skins page</a>.
1656 @ See also the <a href="setup_editcss">CSS</a> and
1657 @ <a href="setup_header">header</a> editing screens.
1658 @ <blockquote><pre>
1659 @ %h(builtin_text("skins/default.footer"))
1660 @ </pre></blockquote>
1661 style_footer();
1662 db_end_transaction(0);
1663 }
1664
1665
+89 -1298
--- src/skins.c
+++ src/skins.c
@@ -19,1255 +19,36 @@
1919
*/
2020
#include "config.h"
2121
#include <assert.h>
2222
#include "skins.h"
2323
24
-/* @-comment: ## */
25
-/*
26
-** A black-and-white theme with the project title in a bar across the top
27
-** and no logo image.
28
-*/
29
-static const char zBuiltinSkin1[] =
30
-@ REPLACE INTO config(name,mtime,value)
31
-@ VALUES('css',now(),'/* General settings for the entire page */
32
-@ body {
33
-@ margin: 0ex 1ex;
34
-@ padding: 0px;
35
-@ background-color: white;
36
-@ font-family: sans-serif;
37
-@ }
38
-@
39
-@ /* The project logo in the upper left-hand corner of each page */
40
-@ div.logo {
41
-@ display: table-row;
42
-@ text-align: center;
43
-@ /* vertical-align: bottom;*/
44
-@ font-size: 2em;
45
-@ font-weight: bold;
46
-@ background-color: #707070;
47
-@ color: #ffffff;
48
-@ min-width: 200px;
49
-@ white-space: nowrap;
50
-@ }
51
-@
52
-@ /* The page title centered at the top of each page */
53
-@ div.title {
54
-@ display: table-cell;
55
-@ font-size: 1.5em;
56
-@ font-weight: bold;
57
-@ text-align: center;
58
-@ padding: 0 0 0 10px;
59
-@ color: #404040;
60
-@ vertical-align: bottom;
61
-@ width: 100%;
62
-@ }
63
-@
64
-@ /* The login status message in the top right-hand corner */
65
-@ div.status {
66
-@ display: table-cell;
67
-@ text-align: right;
68
-@ vertical-align: bottom;
69
-@ color: #404040;
70
-@ font-size: 0.8em;
71
-@ font-weight: bold;
72
-@ min-width: 200px;
73
-@ white-space: nowrap;
74
-@ }
75
-@
76
-@ /* The header across the top of the page */
77
-@ div.header {
78
-@ display: table;
79
-@ width: 100%;
80
-@ }
81
-@
82
-@ /* The main menu bar that appears at the top of the page beneath
83
-@ ** the header */
84
-@ div.mainmenu {
85
-@ padding: 5px 10px 5px 10px;
86
-@ font-size: 0.9em;
87
-@ font-weight: bold;
88
-@ text-align: center;
89
-@ letter-spacing: 1px;
90
-@ background-color: #404040;
91
-@ color: white;
92
-@ }
93
-@
94
-@ /* The submenu bar that *sometimes* appears below the main menu */
95
-@ div.submenu, div.sectionmenu {
96
-@ padding: 3px 10px 3px 0px;
97
-@ font-size: 0.9em;
98
-@ text-align: center;
99
-@ background-color: #606060;
100
-@ color: white;
101
-@ }
102
-@ div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
103
-@ div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
104
-@ padding: 3px 10px 3px 10px;
105
-@ color: white;
106
-@ text-decoration: none;
107
-@ }
108
-@ div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
109
-@ color: #404040;
110
-@ background-color: white;
111
-@ }
112
-@
113
-@ /* All page content from the bottom of the menu or submenu down to
114
-@ ** the footer */
115
-@ div.content {
116
-@ padding: 0ex 0ex 0ex 0ex;
117
-@ }
118
-@ /* Hyperlink colors */
119
-@ div.content a { color: #604000; }
120
-@ div.content a:link { color: #604000;}
121
-@ div.content a:visited { color: #600000; }
122
-@
123
-@ /* <verbatim> blocks */
124
-@ pre.verbatim {
125
-@ background-color: #ffffff;
126
-@ padding: 0.5em;
127
-@ white-space: pre-wrap;
128
-@ }
129
-@
130
-@ /* Some pages have section dividers */
131
-@ div.section {
132
-@ margin-bottom: 0px;
133
-@ margin-top: 1em;
134
-@ padding: 1px 1px 1px 1px;
135
-@ font-size: 1.2em;
136
-@ font-weight: bold;
137
-@ background-color: #404040;
138
-@ color: white;
139
-@ white-space: nowrap;
140
-@ }
141
-@
142
-@ /* The "Date" that occurs on the left hand side of timelines */
143
-@ div.divider {
144
-@ background: #a0a0a0;
145
-@ border: 2px #505050 solid;
146
-@ font-size: 1em; font-weight: normal;
147
-@ padding: .25em;
148
-@ margin: .2em 0 .2em 0;
149
-@ float: left;
150
-@ clear: left;
151
-@ white-space: nowrap;
152
-@ }
153
-@
154
-@ /* The footer at the very bottom of the page */
155
-@ div.footer {
156
-@ font-size: 0.8em;
157
-@ margin-top: 12px;
158
-@ padding: 5px 10px 5px 10px;
159
-@ text-align: right;
160
-@ background-color: #404040;
161
-@ color: white;
162
-@ }
163
-@
164
-@ /* The label/value pairs on (for example) the vinfo page */
165
-@ table.label-value th {
166
-@ vertical-align: top;
167
-@ text-align: right;
168
-@ padding: 0.2ex 2ex;
169
-@ }');
170
-@ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html>
171
-@ <head>
172
-@ <base href="$baseurl/$current_page" />
173
-@ <title>$<project_name>: $<title></title>
174
-@ <link rel="alternate" type="application/rss+xml" title="RSS Feed"
175
-@ href="$home/timeline.rss">
176
-@ <link rel="stylesheet" href="$stylesheet_url" type="text/css"
177
-@ media="screen">
178
-@ </head>
179
-@ <body>
180
-@ <div class="header">
181
-@ <div class="title"><small>$<project_name></small><br />$<title></div>
182
-@ <div class="status"><th1>
183
-@ if {[info exists login]} {
184
-@ puts "Logged in as $login"
185
-@ } else {
186
-@ puts "Not logged in"
187
-@ }
188
-@ </th1></div>
189
-@ </div>
190
-@ <div class="mainmenu">
191
-@ <th1>
192
-@ html "<a href=''$home$index_page''>Home</a>\n"
193
-@ if {[anycap jor]} {
194
-@ html "<a href=''$home/timeline''>Timeline</a>\n"
195
-@ }
196
-@ if {[hascap oh]} {
197
-@ html "<a href=''$home/tree?ci=tip''>Files</a>\n"
198
-@ }
199
-@ if {[hascap o]} {
200
-@ html "<a href=''$home/brlist''>Branches</a>\n"
201
-@ html "<a href=''$home/taglist''>Tags</a>\n"
202
-@ }
203
-@ if {[hascap r]} {
204
-@ html "<a href=''$home/reportlist''>Tickets</a>\n"
205
-@ }
206
-@ if {[hascap j]} {
207
-@ html "<a href=''$home/wiki''>Wiki</a>\n"
208
-@ }
209
-@ if {[hascap s]} {
210
-@ html "<a href=''$home/setup''>Admin</a>\n"
211
-@ } elseif {[hascap a]} {
212
-@ html "<a href=''$home/setup_ulist''>Users</a>\n"
213
-@ }
214
-@ if {[info exists login]} {
215
-@ html "<a href=''$home/login''>Logout</a>\n"
216
-@ } else {
217
-@ html "<a href=''$home/login''>Login</a>\n"
218
-@ }
219
-@ </th1></div>
220
-@ ');
221
-@ REPLACE INTO config(name,mtime,value)
222
-@ VALUES('footer',now(),'<div class="footer">
223
-@ Fossil version $manifest_version $manifest_date
224
-@ </div>
225
-@ </body></html>
226
-@ ');
227
-;
228
-
229
-/*
230
-** A tan theme with the project title above the user identification
231
-** and no logo image.
232
-*/
233
-static const char zBuiltinSkin2[] =
234
-@ REPLACE INTO config(name,mtime,value)
235
-@ VALUES('css',now(),'/* General settings for the entire page */
236
-@ body {
237
-@ margin: 0ex 0ex;
238
-@ padding: 0px;
239
-@ background-color: #fef3bc;
240
-@ font-family: sans-serif;
241
-@ }
242
-@
243
-@ /* The project logo in the upper left-hand corner of each page */
244
-@ div.logo {
245
-@ display: inline;
246
-@ text-align: center;
247
-@ vertical-align: bottom;
248
-@ font-weight: bold;
249
-@ font-size: 2.5em;
250
-@ color: #a09048;
251
-@ white-space: nowrap;
252
-@ }
253
-@
254
-@ /* The page title centered at the top of each page */
255
-@ div.title {
256
-@ display: table-cell;
257
-@ font-size: 2em;
258
-@ font-weight: bold;
259
-@ text-align: left;
260
-@ padding: 0 0 0 5px;
261
-@ color: #a09048;
262
-@ vertical-align: bottom;
263
-@ width: 100%;
264
-@ }
265
-@
266
-@ /* The login status message in the top right-hand corner */
267
-@ div.status {
268
-@ display: table-cell;
269
-@ text-align: right;
270
-@ vertical-align: bottom;
271
-@ color: #a09048;
272
-@ padding: 5px 5px 0 0;
273
-@ font-size: 0.8em;
274
-@ font-weight: bold;
275
-@ white-space: nowrap;
276
-@ }
277
-@
278
-@ /* The header across the top of the page */
279
-@ div.header {
280
-@ display: table;
281
-@ width: 100%;
282
-@ }
283
-@
284
-@ /* The main menu bar that appears at the top of the page beneath
285
-@ ** the header */
286
-@ div.mainmenu {
287
-@ padding: 5px 10px 5px 10px;
288
-@ font-size: 0.9em;
289
-@ font-weight: bold;
290
-@ text-align: center;
291
-@ letter-spacing: 1px;
292
-@ background-color: #a09048;
293
-@ color: black;
294
-@ }
295
-@
296
-@ /* The submenu bar that *sometimes* appears below the main menu */
297
-@ div.submenu, div.sectionmenu {
298
-@ padding: 3px 10px 3px 0px;
299
-@ font-size: 0.9em;
300
-@ text-align: center;
301
-@ background-color: #c0af58;
302
-@ color: white;
303
-@ }
304
-@ div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
305
-@ div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
306
-@ padding: 3px 10px 3px 10px;
307
-@ color: white;
308
-@ text-decoration: none;
309
-@ }
310
-@ div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
311
-@ color: #a09048;
312
-@ background-color: white;
313
-@ }
314
-@
315
-@ /* All page content from the bottom of the menu or submenu down to
316
-@ ** the footer */
317
-@ div.content {
318
-@ padding: 1ex 5px;
319
-@ }
320
-@ div.content a { color: #706532; }
321
-@ div.content a:link { color: #706532; }
322
-@ div.content a:visited { color: #704032; }
323
-@ div.content a:hover { background-color: white; color: #706532; }
324
-@
325
-@ /* Some pages have section dividers */
326
-@ div.section {
327
-@ margin-bottom: 0px;
328
-@ margin-top: 1em;
329
-@ padding: 3px 3px 0 3px;
330
-@ font-size: 1.2em;
331
-@ font-weight: bold;
332
-@ background-color: #a09048;
333
-@ color: white;
334
-@ white-space: nowrap;
335
-@ }
336
-@
337
-@ /* The "Date" that occurs on the left hand side of timelines */
338
-@ div.divider {
339
-@ background: #e1d498;
340
-@ border: 2px #a09048 solid;
341
-@ font-size: 1em; font-weight: normal;
342
-@ padding: .25em;
343
-@ margin: .2em 0 .2em 0;
344
-@ float: left;
345
-@ clear: left;
346
-@ white-space: nowrap;
347
-@ }
348
-@
349
-@ /* The footer at the very bottom of the page */
350
-@ div.footer {
351
-@ font-size: 0.8em;
352
-@ margin-top: 12px;
353
-@ padding: 5px 10px 5px 10px;
354
-@ text-align: right;
355
-@ background-color: #a09048;
356
-@ color: white;
357
-@ }
358
-@
359
-@ /* Hyperlink colors */
360
-@ div.footer a { color: white; }
361
-@ div.footer a:link { color: white; }
362
-@ div.footer a:visited { color: white; }
363
-@ div.footer a:hover { background-color: white; color: #558195; }
364
-@
365
-@ /* <verbatim> blocks */
366
-@ pre.verbatim {
367
-@ background-color: #f5f5f5;
368
-@ padding: 0.5em;
369
-@ white-space: pre-wrap;
370
-@ }
371
-@
372
-@ /* The label/value pairs on (for example) the ci page */
373
-@ table.label-value th {
374
-@ vertical-align: top;
375
-@ text-align: right;
376
-@ padding: 0.2ex 2ex;
377
-@ }');
378
-@ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html>
379
-@ <head>
380
-@ <base href="$baseurl/$current_page" />
381
-@ <title>$<project_name>: $<title></title>
382
-@ <link rel="alternate" type="application/rss+xml" title="RSS Feed"
383
-@ href="$home/timeline.rss">
384
-@ <link rel="stylesheet" href="$stylesheet_url" type="text/css"
385
-@ media="screen">
386
-@ </head>
387
-@ <body>
388
-@ <div class="header">
389
-@ <div class="title">$<title></div>
390
-@ <div class="status">
391
-@ <div class="logo">$<project_name></div><br/>
392
-@ <th1>
393
-@ if {[info exists login]} {
394
-@ puts "Logged in as $login"
395
-@ } else {
396
-@ puts "Not logged in"
397
-@ }
398
-@ </th1></div>
399
-@ </div>
400
-@ <div class="mainmenu">
401
-@ <th1>
402
-@ html "<a href=''$home$index_page''>Home</a>\n"
403
-@ if {[anycap jor]} {
404
-@ html "<a href=''$home/timeline''>Timeline</a>\n"
405
-@ }
406
-@ if {[hascap oh]} {
407
-@ html "<a href=''$home/tree?ci=tip''>Files</a>\n"
408
-@ }
409
-@ if {[hascap o]} {
410
-@ html "<a href=''$home/brlist''>Branches</a>\n"
411
-@ html "<a href=''$home/taglist''>Tags</a>\n"
412
-@ }
413
-@ if {[hascap r]} {
414
-@ html "<a href=''$home/reportlist''>Tickets</a>\n"
415
-@ }
416
-@ if {[hascap j]} {
417
-@ html "<a href=''$home/wiki''>Wiki</a>\n"
418
-@ }
419
-@ if {[hascap s]} {
420
-@ html "<a href=''$home/setup''>Admin</a>\n"
421
-@ } elseif {[hascap a]} {
422
-@ html "<a href=''$home/setup_ulist''>Users</a>\n"
423
-@ }
424
-@ if {[info exists login]} {
425
-@ html "<a href=''$home/login''>Logout</a>\n"
426
-@ } else {
427
-@ html "<a href=''$home/login''>Login</a>\n"
428
-@ }
429
-@ </th1></div>
430
-@ ');
431
-@ REPLACE INTO config(name,mtime,value)
432
-@ VALUES('footer',now(),'<div class="footer">
433
-@ Fossil version $manifest_version $manifest_date
434
-@ </div>
435
-@ </body></html>
436
-@ ');
437
-;
438
-
439
-/*
440
-** Black letters on a white or cream background with the main menu
441
-** stuck on the left-hand side.
442
-*/
443
-static const char zBuiltinSkin3[] =
444
-@ REPLACE INTO config(name,mtime,value)
445
-@ VALUES('css',now(),'/* General settings for the entire page */
446
-@ body {
447
-@ margin:0px 0px 0px 0px;
448
-@ padding:0px;
449
-@ font-family:verdana, arial, helvetica, "sans serif";
450
-@ color:#333;
451
-@ background-color:white;
452
-@ }
453
-@
454
-@ /* consistent colours */
455
-@ h2 {
456
-@ color: #333;
457
-@ }
458
-@ h3 {
459
-@ color: #333;
460
-@ }
461
-@
462
-@ /* The project logo in the upper left-hand corner of each page */
463
-@ div.logo {
464
-@ display: table-cell;
465
-@ text-align: left;
466
-@ vertical-align: bottom;
467
-@ font-weight: bold;
468
-@ color: #333;
469
-@ white-space: nowrap;
470
-@ }
471
-@
472
-@ /* The page title centered at the top of each page */
473
-@ div.title {
474
-@ display: table-cell;
475
-@ font-size: 2em;
476
-@ font-weight: bold;
477
-@ text-align: center;
478
-@ color: #333;
479
-@ vertical-align: bottom;
480
-@ width: 100%;
481
-@ }
482
-@
483
-@ /* The login status message in the top right-hand corner */
484
-@ div.status {
485
-@ display: table-cell;
486
-@ padding-right: 10px;
487
-@ text-align: right;
488
-@ vertical-align: bottom;
489
-@ padding-bottom: 5px;
490
-@ color: #333;
491
-@ font-size: 0.8em;
492
-@ font-weight: bold;
493
-@ white-space: nowrap;
494
-@ }
495
-@
496
-@ /* The header across the top of the page */
497
-@ div.header {
498
-@ margin:10px 0px 10px 0px;
499
-@ padding:1px 0px 0px 20px;
500
-@ border-style:solid;
501
-@ border-color:black;
502
-@ border-width:1px 0px;
503
-@ background-color:#eee;
504
-@ }
505
-@
506
-@ /* The main menu bar that appears at the top left of the page beneath
507
-@ ** the header. Width must be co-ordinated with the container below */
508
-@ div.mainmenu {
509
-@ float: left;
510
-@ margin-left: 10px;
511
-@ margin-right: 10px;
512
-@ font-size: 0.9em;
513
-@ font-weight: bold;
514
-@ padding:5px;
515
-@ background-color:#eee;
516
-@ border:1px solid #999;
517
-@ width:8em;
518
-@ }
519
-@
520
-@ /* Main menu is now a list */
521
-@ div.mainmenu ul {
522
-@ padding: 0;
523
-@ list-style:none;
524
-@ }
525
-@ div.mainmenu a, div.mainmenu a:visited{
526
-@ padding: 1px 10px 1px 10px;
527
-@ color: #333;
528
-@ text-decoration: none;
529
-@ }
530
-@ div.mainmenu a:hover {
531
-@ color: #eee;
532
-@ background-color: #333;
533
-@ }
534
-@
535
-@ /* Container for the sub-menu and content so they don''t spread
536
-@ ** out underneath the main menu */
537
-@ #container {
538
-@ padding-left: 9em;
539
-@ }
540
-@
541
-@ /* The submenu bar that *sometimes* appears below the main menu */
542
-@ div.submenu, div.sectionmenu {
543
-@ padding: 3px 10px 3px 10px;
544
-@ font-size: 0.9em;
545
-@ text-align: center;
546
-@ border:1px solid #999;
547
-@ border-width:1px 0px;
548
-@ background-color: #eee;
549
-@ color: #333;
550
-@ }
551
-@ div.submenu a, div.submenu a:visited, div.sectionmenu>a.button:link,
552
-@ div.sectionmenu>a.button:visited {
553
-@ padding: 3px 10px 3px 10px;
554
-@ color: #333;
555
-@ text-decoration: none;
556
-@ }
557
-@ div.submenu a:hover, div.sectionmenu>a.button:hover {
558
-@ color: #eee;
559
-@ background-color: #333;
560
-@ }
561
-@
562
-@ /* All page content from the bottom of the menu or submenu down to
563
-@ ** the footer */
564
-@ div.content {
565
-@ padding: 2ex 1ex 0ex 2ex;
566
-@ }
567
-@
568
-@ /* Some pages have section dividers */
569
-@ div.section {
570
-@ margin-bottom: 0px;
571
-@ margin-top: 1em;
572
-@ padding: 1px 1px 1px 1px;
573
-@ font-size: 1.2em;
574
-@ font-weight: bold;
575
-@ border-style:solid;
576
-@ border-color:#999;
577
-@ border-width:1px 0px;
578
-@ background-color: #eee;
579
-@ color: #333;
580
-@ white-space: nowrap;
581
-@ }
582
-@
583
-@ /* The "Date" that occurs on the left hand side of timelines */
584
-@ div.divider {
585
-@ background: #eee;
586
-@ border: 2px #999 solid;
587
-@ font-size: 1em; font-weight: normal;
588
-@ padding: .25em;
589
-@ margin: .2em 0 .2em 0;
590
-@ float: left;
591
-@ clear: left;
592
-@ color: #333;
593
-@ white-space: nowrap;
594
-@ }
595
-@
596
-@ /* The footer at the very bottom of the page */
597
-@ div.footer {
598
-@ font-size: 0.8em;
599
-@ margin-top: 12px;
600
-@ padding: 5px 10px 5px 10px;
601
-@ text-align: right;
602
-@ background-color: #eee;
603
-@ color: #555;
604
-@ }
605
-@
606
-@ /* <verbatim> blocks */
607
-@ pre.verbatim {
608
-@ background-color: #f5f5f5;
609
-@ padding: 0.5em;
610
-@ white-space: pre-wrap;
611
-@ }
612
-@
613
-@ /* The label/value pairs on (for example) the ci page */
614
-@ table.label-value th {
615
-@ vertical-align: top;
616
-@ text-align: right;
617
-@ padding: 0.2ex 2ex;
618
-@ }');
619
-@ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html>
620
-@ <head>
621
-@ <base href="$baseurl/$current_page" />
622
-@ <title>$<project_name>: $<title></title>
623
-@ <link rel="alternate" type="application/rss+xml" title="RSS Feed"
624
-@ href="$home/timeline.rss">
625
-@ <link rel="stylesheet" href="$stylesheet_url" type="text/css"
626
-@ media="screen">
627
-@ </head>
628
-@ <body>
629
-@ <div class="header">
630
-@ <div class="logo">
631
-@ <img src="$logo_image_url" alt="logo">
632
-@ <br />$<project_name>
633
-@ </div>
634
-@ <div class="title">$<title></div>
635
-@ <div class="status"><th1>
636
-@ if {[info exists login]} {
637
-@ puts "Logged in as $login"
638
-@ } else {
639
-@ puts "Not logged in"
640
-@ }
641
-@ </th1></div>
642
-@ </div>
643
-@ <div class="mainmenu">
644
-@ <th1>
645
-@ html "<a href=''$home$index_page''>Home</a>\n"
646
-@ if {[anycap jor]} {
647
-@ html "<a href=''$home/timeline''>Timeline</a>\n"
648
-@ }
649
-@ if {[hascap oh]} {
650
-@ html "<a href=''$home/tree?ci=tip''>Files</a>\n"
651
-@ }
652
-@ if {[hascap o]} {
653
-@ html "<a href=''$home/brlist''>Branches</a>\n"
654
-@ html "<a href=''$home/taglist''>Tags</a>\n"
655
-@ }
656
-@ if {[hascap r]} {
657
-@ html "<a href=''$home/reportlist''>Tickets</a>\n"
658
-@ }
659
-@ if {[hascap j]} {
660
-@ html "<a href=''$home/wiki''>Wiki</a>\n"
661
-@ }
662
-@ if {[hascap s]} {
663
-@ html "<a href=''$home/setup''>Admin</a>\n"
664
-@ } elseif {[hascap a]} {
665
-@ html "<a href=''$home/setup_ulist''>Users</a>\n"
666
-@ }
667
-@ if {[info exists login]} {
668
-@ html "<a href=''$home/login''>Logout</a>\n"
669
-@ } else {
670
-@ html "<a href=''$home/login''>Login</a>\n"
671
-@ }
672
-@ </th1></ul></div>
673
-@ <div id="container">
674
-@ ');
675
-@ REPLACE INTO config(name,mtime,value) VALUES('footer',now(),'</div>
676
-@ <div class="footer">
677
-@ Fossil version $manifest_version $manifest_date
678
-@ </div>
679
-@ </body></html>
680
-@ ');
681
-;
682
-
683
-
684
-/*
685
-** Shadow boxes and rounded corners.
686
-*/
687
-static const char zBuiltinSkin4[] =
688
-@ REPLACE INTO config(name,mtime,value)
689
-@ VALUES('css',now(),'/* General settings for the entire page */
690
-@ html {
691
-@ min-height: 100%;
692
-@ }
693
-@ body {
694
-@ margin: 0ex 1ex;
695
-@ padding: 0px;
696
-@ background-color: white;
697
-@ color: #333;
698
-@ font-family: Verdana, sans-serif;
699
-@ font-size: 0.8em;
700
-@ }
701
-@
702
-@ /* The project logo in the upper left-hand corner of each page */
703
-@ div.logo {
704
-@ display: table-cell;
705
-@ text-align: right;
706
-@ vertical-align: bottom;
707
-@ font-weight: normal;
708
-@ white-space: nowrap;
709
-@ }
710
-@
711
-@ /* Widths */
712
-@ div.header, div.mainmenu, div.submenu, div.content, div.footer {
713
-@ max-width: 900px;
714
-@ margin: auto;
715
-@ padding: 3px 20px 3px 20px;
716
-@ clear: both;
717
-@ }
718
-@
719
-@ /* The page title at the top of each page */
720
-@ div.title {
721
-@ display: table-cell;
722
-@ padding-left: 10px;
723
-@ font-size: 2em;
724
-@ margin: 10px 0 10px -20px;
725
-@ vertical-align: bottom;
726
-@ text-align: left;
727
-@ width: 80%;
728
-@ font-family: Verdana, sans-serif;
729
-@ font-weight: bold;
730
-@ color: #558195;
731
-@ text-shadow: 0px 2px 2px #999999;
732
-@ }
733
-@
734
-@ /* The login status message in the top right-hand corner */
735
-@ div.status {
736
-@ display: table-cell;
737
-@ text-align: right;
738
-@ vertical-align: bottom;
739
-@ color: #333;
740
-@ margin-right: -20px;
741
-@ white-space: nowrap;
742
-@ }
743
-@
744
-@ /* The main menu bar that appears at the top of the page beneath
745
-@ ** the header */
746
-@ div.mainmenu {
747
-@ text-align: center;
748
-@ color: white;
749
-@ border-top-left-radius: 5px;
750
-@ border-top-right-radius: 5px;
751
-@ vertical-align: middle;
752
-@ padding-top: 8px;
753
-@ padding-bottom: 8px;
754
-@ background-color: #446979;
755
-@ box-shadow: 0px 3px 4px #333333;
756
-@ }
757
-@
758
-@ /* The submenu bar that *sometimes* appears below the main menu */
759
-@ div.submenu {
760
-@ padding-top:10px;
761
-@ padding-bottom:0;
762
-@ text-align: right;
763
-@ color: #000;
764
-@ background-color: #fff;
765
-@ height: 1.5em;
766
-@ vertical-align:middle;
767
-@ box-shadow: 0px 3px 4px #999;
768
-@ }
769
-@ div.mainmenu a, div.mainmenu a:visited {
770
-@ padding: 3px 10px 3px 10px;
771
-@ color: white;
772
-@ text-decoration: none;
773
-@ }
774
-@ div.submenu a, div.submenu a:visited, a.button,
775
-@ div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
776
-@ padding: 2px 8px;
777
-@ color: #000;
778
-@ font-family: Arial;
779
-@ text-decoration: none;
780
-@ margin:auto;
781
-@ border-radius: 5px;
782
-@ background-color: #e0e0e0;
783
-@ text-shadow: 0px -1px 0px #eee;
784
-@ border: 1px solid #000;
785
-@ }
786
-@
787
-@ div.mainmenu a:hover {
788
-@ color: #000;
789
-@ background-color: white;
790
-@ }
791
-@
792
-@ div.submenu a:hover, div.sectionmenu>a.button:hover {
793
-@ background-color: #c0c0c0;
794
-@ }
795
-@
796
-@ /* All page content from the bottom of the menu or submenu down to
797
-@ ** the footer */
798
-@ div.content {
799
-@ background-color: #fff;
800
-@ box-shadow: 0px 3px 4px #999;
801
-@ border-bottom-right-radius: 5px;
802
-@ border-bottom-left-radius: 5px;
803
-@ padding-bottom: 1em;
804
-@ min-height:40%;
805
-@ }
806
-@
807
-@
808
-@ /* Some pages have section dividers */
809
-@ div.section {
810
-@ margin-bottom: 0.5em;
811
-@ margin-top: 1em;
812
-@ margin-right: auto;
813
-@ padding: 1px 1px 1px 1px;
814
-@ font-size: 1.2em;
815
-@ font-weight: bold;
816
-@ text-align: center;
817
-@ color: white;
818
-@ border-radius: 5px;
819
-@ background-color: #446979;
820
-@ box-shadow: 0px 3px 4px #333333;
821
-@ white-space: nowrap;
822
-@ }
823
-@
824
-@ /* The "Date" that occurs on the left hand side of timelines */
825
-@ div.divider {
826
-@ font-size: 1.2em;
827
-@ font-family: Georgia, serif;
828
-@ font-weight: bold;
829
-@ margin-top: 1em;
830
-@ white-space: nowrap;
831
-@ }
832
-@
833
-@ /* The footer at the very bottom of the page */
834
-@ div.footer {
835
-@ font-size: 0.9em;
836
-@ text-align: right;
837
-@ margin-bottom: 1em;
838
-@ color: #666;
839
-@ }
840
-@
841
-@ /* Hyperlink colors in the footer */
842
-@ div.footer a { color: white; }
843
-@ div.footer a:link { color: white; }
844
-@ div.footer a:visited { color: white; }
845
-@ div.footer a:hover { background-color: white; color: #558195; }
846
-@
847
-@ /* <verbatim> blocks */
848
-@ pre.verbatim, blockquote pre {
849
-@ font-family: Dejavu Sans Mono, Monaco, Lucida Console, monospace;
850
-@ background-color: #f3f3f3;
851
-@ padding: 0.5em;
852
-@ white-space: pre-wrap;
853
-@ }
854
-@
855
-@ blockquote pre {
856
-@ border: 1px #000 dashed;
857
-@ }
858
-@
859
-@ /* The label/value pairs on (for example) the ci page */
860
-@ table.label-value th {
861
-@ vertical-align: top;
862
-@ text-align: right;
863
-@ padding: 0.2ex 2ex;
864
-@ }
865
-@
866
-@ table.report tr th {
867
-@ padding: 3px 5px;
868
-@ text-transform: capitalize;
869
-@ cursor: pointer;
870
-@ }
871
-@
872
-@ table.report tr td {
873
-@ padding: 3px 5px;
874
-@ cursor: pointer;
875
-@ }
876
-@
877
-@ textarea {
878
-@ font-size: 1em;
879
-@ }
880
-@
881
-@ .fullsize-text {
882
-@ font-size: 1.25em;
883
-@ }');
884
-@ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html>
885
-@ <head>
886
-@ <base href="$baseurl/$current_page" />
887
-@ <title>$<project_name>: $<title></title>
888
-@ <link rel="alternate" type="application/rss+xml" title="RSS Feed"
889
-@ href="$home/timeline.rss">
890
-@ <link rel="stylesheet" href="$stylesheet_url" type="text/css"
891
-@ media="screen">
892
-@ </head>
893
-@ <body>
894
-@ <div class="header">
895
-@ <div class="logo">
896
-@ <img src="$logo_image_url" alt="logo">
897
-@ <br />$<project_name>
898
-@ </div>
899
-@ <div class="title">$<title></div>
900
-@ <div class="status"><th1>
901
-@ if {[info exists login]} {
902
-@ puts "Logged in as $login"
903
-@ } else {
904
-@ puts "Not logged in"
905
-@ }
906
-@ </th1></div>
907
-@ </div>
908
-@ <div class="mainmenu">
909
-@ <th1>
910
-@ html "<a href=''$home$index_page''>Home</a>\n"
911
-@ if {[anycap jor]} {
912
-@ html "<a href=''$home/timeline''>Timeline</a>\n"
913
-@ }
914
-@ if {[hascap oh]} {
915
-@ html "<a href=''$home/tree?ci=tip''>Files</a>\n"
916
-@ }
917
-@ if {[hascap o]} {
918
-@ html "<a href=''$home/brlist''>Branches</a>\n"
919
-@ html "<a href=''$home/taglist''>Tags</a>\n"
920
-@ }
921
-@ if {[hascap r]} {
922
-@ html "<a href=''$home/reportlist''>Tickets</a>\n"
923
-@ }
924
-@ if {[hascap j]} {
925
-@ html "<a href=''$home/wiki''>Wiki</a>\n"
926
-@ }
927
-@ if {[hascap s]} {
928
-@ html "<a href=''$home/setup''>Admin</a>\n"
929
-@ } elseif {[hascap a]} {
930
-@ html "<a href=''$home/setup_ulist''>Users</a>\n"
931
-@ }
932
-@ if {[info exists login]} {
933
-@ html "<a href=''$home/login''>Logout</a>\n"
934
-@ } else {
935
-@ html "<a href=''$home/login''>Login</a>\n"
936
-@ }
937
-@ </th1></div>
938
-@ <div id="container">
939
-@ ');
940
-@ REPLACE INTO config(name,mtime,value) VALUES('footer',now(),'</div>
941
-@ <div class="footer">
942
-@ Fossil version $manifest_version $manifest_date
943
-@ </div>
944
-@ </body></html>
945
-@ ');
946
-;
947
-
948
-
949
-/*
950
-** This skin is intended to be almost identical to the default one, with the
951
-** following changes to the header and footer:
952
-**
953
-** 1. The logo image in the header has been modified to be a hyperlink to the
954
-** root of the web site containing the repository using the same scheme
955
-** (i.e. HTTP or HTTPS) as the base URL for the repository. The header
956
-** contains a TH1 script block to help accomplish these tasks.
957
-**
958
-** 2. The Fossil version information in the footer has been augmented with
959
-** hyperlinks to the corresponding points on the timeline in the official
960
-** Fossil repository. Additionally, if the Tcl integration feature is
961
-** enabled, the loaded version of Tcl is included, with a hyperlink to the
962
-** official Tcl/Tk web site. The footer also contains a TH1 script block
963
-** to help accomplish these tasks.
964
-*/
965
-static const char zBuiltinSkin5[] =
966
-@ REPLACE INTO config(name,mtime,value)
967
-@ VALUES('css',now(),'/* General settings for the entire page */
968
-@ body {
969
-@ margin: 0ex 1ex;
970
-@ padding: 0px;
971
-@ background-color: white;
972
-@ font-family: sans-serif;
973
-@ }
974
-@
975
-@ /* The project logo in the upper left-hand corner of each page */
976
-@ div.logo {
977
-@ display: table-cell;
978
-@ text-align: center;
979
-@ vertical-align: bottom;
980
-@ font-weight: bold;
981
-@ color: #558195;
982
-@ min-width: 200px;
983
-@ white-space: nowrap;
984
-@ }
985
-@
986
-@ /* The page title centered at the top of each page */
987
-@ div.title {
988
-@ display: table-cell;
989
-@ font-size: 2em;
990
-@ font-weight: bold;
991
-@ text-align: center;
992
-@ padding: 0 0 0 1em;
993
-@ color: #558195;
994
-@ vertical-align: bottom;
995
-@ width: 100%;
996
-@ }
997
-@
998
-@ /* The login status message in the top right-hand corner */
999
-@ div.status {
1000
-@ display: table-cell;
1001
-@ text-align: right;
1002
-@ vertical-align: bottom;
1003
-@ color: #558195;
1004
-@ font-size: 0.8em;
1005
-@ font-weight: bold;
1006
-@ min-width: 200px;
1007
-@ white-space: nowrap;
1008
-@ }
1009
-@
1010
-@ /* The header across the top of the page */
1011
-@ div.header {
1012
-@ display: table;
1013
-@ width: 100%;
1014
-@ }
1015
-@
1016
-@ /* The main menu bar that appears at the top of the page beneath
1017
-@ ** the header */
1018
-@ div.mainmenu {
1019
-@ padding: 5px 10px 5px 10px;
1020
-@ font-size: 0.9em;
1021
-@ font-weight: bold;
1022
-@ text-align: center;
1023
-@ letter-spacing: 1px;
1024
-@ background-color: #558195;
1025
-@ border-top-left-radius: 8px;
1026
-@ border-top-right-radius: 8px;
1027
-@ color: white;
1028
-@ }
1029
-@
1030
-@ /* The submenu bar that *sometimes* appears below the main menu */
1031
-@ div.submenu, div.sectionmenu {
1032
-@ padding: 3px 10px 3px 0px;
1033
-@ font-size: 0.9em;
1034
-@ text-align: center;
1035
-@ background-color: #456878;
1036
-@ color: white;
1037
-@ }
1038
-@ div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
1039
-@ div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
1040
-@ padding: 3px 10px 3px 10px;
1041
-@ color: white;
1042
-@ text-decoration: none;
1043
-@ }
1044
-@ div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
1045
-@ color: #558195;
1046
-@ background-color: white;
1047
-@ }
1048
-@
1049
-@ /* All page content from the bottom of the menu or submenu down to
1050
-@ ** the footer */
1051
-@ div.content {
1052
-@ padding: 0ex 1ex 1ex 1ex;
1053
-@ border: solid #aaa;
1054
-@ border-width: 1px;
1055
-@ }
1056
-@
1057
-@ /* Some pages have section dividers */
1058
-@ div.section {
1059
-@ margin-bottom: 0px;
1060
-@ margin-top: 1em;
1061
-@ padding: 1px 1px 1px 1px;
1062
-@ font-size: 1.2em;
1063
-@ font-weight: bold;
1064
-@ background-color: #558195;
1065
-@ color: white;
1066
-@ white-space: nowrap;
1067
-@ }
1068
-@
1069
-@ /* The "Date" that occurs on the left hand side of timelines */
1070
-@ div.divider {
1071
-@ background: #a1c4d4;
1072
-@ border: 2px #558195 solid;
1073
-@ font-size: 1em; font-weight: normal;
1074
-@ padding: .25em;
1075
-@ margin: .2em 0 .2em 0;
1076
-@ float: left;
1077
-@ clear: left;
1078
-@ white-space: nowrap;
1079
-@ }
1080
-@
1081
-@ /* The footer at the very bottom of the page */
1082
-@ div.footer {
1083
-@ clear: both;
1084
-@ font-size: 0.8em;
1085
-@ padding: 5px 10px 5px 10px;
1086
-@ text-align: right;
1087
-@ background-color: #558195;
1088
-@ border-bottom-left-radius: 8px;
1089
-@ border-bottom-right-radius: 8px;
1090
-@ color: white;
1091
-@ }
1092
-@
1093
-@ /* Hyperlink colors in the footer */
1094
-@ div.footer a { color: white; }
1095
-@ div.footer a:link { color: white; }
1096
-@ div.footer a:visited { color: white; }
1097
-@ div.footer a:hover { background-color: white; color: #558195; }
1098
-@
1099
-@ /* verbatim blocks */
1100
-@ pre.verbatim {
1101
-@ background-color: #f5f5f5;
1102
-@ padding: 0.5em;
1103
-@ white-space: pre-wrap;
1104
-@ }
1105
-@
1106
-@ /* The label/value pairs on (for example) the ci page */
1107
-@ table.label-value th {
1108
-@ vertical-align: top;
1109
-@ text-align: right;
1110
-@ padding: 0.2ex 2ex;
1111
-@ }');
1112
-@ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html>
1113
-@ <head>
1114
-@ <base href="$baseurl/$current_page" />
1115
-@ <title>$<project_name>: $<title></title>
1116
-@ <link rel="alternate" type="application/rss+xml" title="RSS Feed"
1117
-@ href="$home/timeline.rss" />
1118
-@ <link rel="stylesheet" href="$stylesheet_url" type="text/css"
1119
-@ media="screen" />
1120
-@ </head>
1121
-@ <body>
1122
-@ <div class="header">
1123
-@ <div class="logo">
1124
-@ <th1>
1125
-@ ##
1126
-@ ## NOTE: The purpose of this procedure is to take the base URL of the
1127
-@ ## Fossil project and return the root of the entire web site using
1128
-@ ## the same URI scheme as the base URL (e.g. http or https).
1129
-@ ##
1130
-@ proc getLogoUrl { baseurl } {
1131
-@ set idx(first) [string first // $baseurl]
1132
-@ if {$idx(first) != -1} {
1133
-@ ##
1134
-@ ## NOTE: Skip second slash.
1135
-@ ##
1136
-@ set idx(first+1) [expr {$idx(first) + 2}]
1137
-@ ##
1138
-@ ## NOTE: (part 1) The [string first] command does NOT actually
1139
-@ ## the optional startIndex argument as specified in the
1140
-@ ## TH1 support manual; therefore, we fake it by using the
1141
-@ ## [string range] command and then adding the necessary
1142
-@ ## offset to the resulting index manually (below). In Tcl,
1143
-@ ## we could use the following instead:
1144
-@ ##
1145
-@ ## set idx(next) [string first / $baseurl $idx(first+1)]
1146
-@ ##
1147
-@ set idx(nextRange) [string range $baseurl $idx(first+1) end]
1148
-@ set idx(next) [string first / $idx(nextRange)]
1149
-@ if {$idx(next) != -1} {
1150
-@ ##
1151
-@ ## NOTE: (part 2) Add the necessary offset to the result of the
1152
-@ ## search for the next slash (i.e. the one after the initial
1153
-@ ## search for the two slashes).
1154
-@ ##
1155
-@ set idx(next) [expr {$idx(next) + $idx(first+1)}]
1156
-@ ##
1157
-@ ## NOTE: Back up one character from the next slash.
1158
-@ ##
1159
-@ set idx(next-1) [expr {$idx(next) - 1}]
1160
-@ ##
1161
-@ ## NOTE: Extract the URI scheme and host from the base URL.
1162
-@ ##
1163
-@ set scheme [string range $baseurl 0 $idx(first)]
1164
-@ set host [string range $baseurl $idx(first+1) $idx(next-1)]
1165
-@ ##
1166
-@ ## NOTE: Try to stay in SSL mode if we are there now.
1167
-@ ##
1168
-@ if {[string compare $scheme http:/] == 0} {
1169
-@ set scheme http://
1170
-@ } else {
1171
-@ set scheme https://
1172
-@ }
1173
-@ set logourl $scheme$host/
1174
-@ } else {
1175
-@ set logourl $baseurl
1176
-@ }
1177
-@ } else {
1178
-@ set logourl $baseurl
1179
-@ }
1180
-@ return $logourl
1181
-@ }
1182
-@ set logourl [getLogoUrl $baseurl]
1183
-@ </th1>
1184
-@ <a href="$logourl">
1185
-@ <img src="$logo_image_url" border="0" alt="$project_name">
1186
-@ </a>
1187
-@ </div>
1188
-@ <div class="title"><small>$<project_name></small><br />$<title></div>
1189
-@ <div class="status"><th1>
1190
-@ if {[info exists login]} {
1191
-@ puts "Logged in as $login"
1192
-@ } else {
1193
-@ puts "Not logged in"
1194
-@ }
1195
-@ </th1></div>
1196
-@ </div>
1197
-@ <div class="mainmenu">
1198
-@ <th1>
1199
-@ html "<a href=''$home$index_page''>Home</a>\n"
1200
-@ if {[anycap jor]} {
1201
-@ html "<a href=''$home/timeline''>Timeline</a>\n"
1202
-@ }
1203
-@ if {[hascap oh]} {
1204
-@ html "<a href=''$home/tree?ci=tip''>Files</a>\n"
1205
-@ }
1206
-@ if {[hascap o]} {
1207
-@ html "<a href=''$home/brlist''>Branches</a>\n"
1208
-@ html "<a href=''$home/taglist''>Tags</a>\n"
1209
-@ }
1210
-@ if {[hascap r]} {
1211
-@ html "<a href=''$home/reportlist''>Tickets</a>\n"
1212
-@ }
1213
-@ if {[hascap j]} {
1214
-@ html "<a href=''$home/wiki''>Wiki</a>\n"
1215
-@ }
1216
-@ if {[hascap s]} {
1217
-@ html "<a href=''$home/setup''>Admin</a>\n"
1218
-@ } elseif {[hascap a]} {
1219
-@ html "<a href=''$home/setup_ulist''>Users</a>\n"
1220
-@ }
1221
-@ if {[info exists login]} {
1222
-@ html "<a href=''$home/login''>Logout</a>\n"
1223
-@ } else {
1224
-@ html "<a href=''$home/login''>Login</a>\n"
1225
-@ }
1226
-@ </th1></div>
1227
-@ ');
1228
-@ REPLACE INTO config(name,mtime,value)
1229
-@ VALUES('footer',now(),'<div class="footer">
1230
-@ <th1>
1231
-@ proc getTclVersion {} {
1232
-@ if {[catch {tclEval info patchlevel} tclVersion] == 0} {
1233
-@ return "<a href=\"http://www.tcl.tk/\">Tcl</a> version $tclVersion"
1234
-@ }
1235
-@ return ""
1236
-@ }
1237
-@ proc getVersion { version } {
1238
-@ set length [string length $version]
1239
-@ return [string range $version 1 [expr {$length - 2}]]
1240
-@ }
1241
-@ set version [getVersion $manifest_version]
1242
-@ set tclVersion [getTclVersion]
1243
-@ set fossilUrl http://www.fossil-scm.org
1244
-@ </th1>
1245
-@ This page was generated in about
1246
-@ <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s by
1247
-@ <a href="$fossilUrl/">Fossil</a>
1248
-@ version $release_version $tclVersion
1249
-@ <a href="$fossilUrl/index.html/info/$version">$manifest_version</a>
1250
-@ <a href="$fossilUrl/index.html/timeline?c=$manifest_date&amp;y=ci">$manifest_date</a>
1251
-@ </div>
1252
-@ </body></html>
1253
-@ ');
1254
-;
1255
-
125624
/*
125725
** An array of available built-in skins.
26
+**
27
+** To add new built-in skins:
28
+**
29
+** 1. Pick a name for the new skin. (Here we use "xyzzy").
30
+**
31
+** 2. Install files skins/xyzzy/css.txt, skins/xyzzy/header.txt,
32
+** and skins/xyzzy/footer.txt into the source tree.
33
+**
34
+** 3. Rerun "tclsh makemake.tcl" in the src/ folder in order to
35
+** rebuild the makefiles to reference the new CSS, headers, and footers.
36
+**
37
+** 4. Make an entry in the following array for the new skin.
125838
*/
125939
static struct BuiltinSkin {
1260
- const char *zName;
1261
- const char *zValue;
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 */
126243
} aBuiltinSkin[] = {
1263
- { "Default", 0 /* Filled in at runtime */ },
1264
- { "Plain Gray, No Logo", zBuiltinSkin1 },
1265
- { "Khaki, No Logo", zBuiltinSkin2 },
1266
- { "Black & White, Menu on Left", zBuiltinSkin3 },
1267
- { "Shadow boxes & Rounded Corners", zBuiltinSkin4 },
1268
- { "Enhanced Default", zBuiltinSkin5 },
44
+ { "Default", "default", 0 },
45
+ { "Plain Gray, No Logo", "plain_gray", 0 },
46
+ { "Khaki, No Logo", "khaki", 0 },
47
+ { "Black & White, Menu on Left", "black_and_white", 0 },
48
+ { "Shadow boxes & Rounded Corners", "rounded1", 0 },
49
+ { "Enhanced Default", "enhanced1", 0 },
126950
};
127051
127152
/*
127253
** For a skin named zSkinName, compute the name of the CONFIG table
127354
** entry where that skin is stored and return it.
@@ -1286,57 +67,65 @@
128667
}
128768
return z;
128869
}
128970
129071
/*
1291
-** Construct and return a string that represents the current skin if
1292
-** useDefault==0 or a string for the default skin if useDefault==1.
72
+** Construct and return an string of SQL statements that represents
73
+** a "skin" setting. If zName==0 then return the skin currently
74
+** installed. Otherwise, return one of the built-in skins designated
75
+** by zName.
129376
**
129477
** Memory to hold the returned string is obtained from malloc.
129578
*/
1296
-static char *getSkin(int useDefault){
79
+static char *getSkin(const char *zName){
80
+ const char *z;
81
+ char *zLabel;
82
+ static const char *azType[] = { "css", "header", "footer" };
83
+ int i;
129784
Blob val;
129885
blob_zero(&val);
1299
- blob_appendf(&val,
1300
- "REPLACE INTO config(name,value,mtime) VALUES('css',%Q,now());\n",
1301
- useDefault ? zDefaultCSS : db_get("css", (char*)zDefaultCSS)
1302
- );
1303
- blob_appendf(&val,
1304
- "REPLACE INTO config(name,value,mtime) VALUES('header',%Q,now());\n",
1305
- useDefault ? zDefaultHeader : db_get("header", (char*)zDefaultHeader)
1306
- );
1307
- blob_appendf(&val,
1308
- "REPLACE INTO config(name,value,mtime) VALUES('footer',%Q,now());\n",
1309
- useDefault ? zDefaultFooter : db_get("footer", (char*)zDefaultFooter)
1310
- );
86
+ for(i=0; i<sizeof(azType)/sizeof(azType[0]); i++){
87
+ if( zName ){
88
+ zLabel = mprintf("skins/%s/%s.txt", zName, azType[i]);
89
+ z = builtin_text(zLabel);
90
+ fossil_free(zLabel);
91
+ }else{
92
+ z = db_get(azType[i], 0);
93
+ if( z==0 ){
94
+ zLabel = mprintf("skins/default/%s.txt", azType[i]);
95
+ z = builtin_text(zLabel);
96
+ fossil_free(zLabel);
97
+ }
98
+ }
99
+ blob_appendf(&val,
100
+ "REPLACE INTO config(name,value,mtime) VALUES(%Q,%Q,now());\n",
101
+ azType[i], z
102
+ );
103
+ }
1311104
return blob_str(&val);
1312105
}
1313106
1314
-/*
1315
-** Construct the default skin string and fill in the corresponding
1316
-** entry in aBuildinSkin[]
1317
-*/
1318
-static void setDefaultSkin(void){
1319
- aBuiltinSkin[0].zValue = getSkin(1);
1320
-}
1321
-
1322107
/*
1323108
** WEBPAGE: setup_skin
1324109
*/
1325110
void setup_skin(void){
1326111
const char *z;
1327112
char *zName;
1328113
char *zErr = 0;
1329
- const char *zCurrent; /* Current skin */
1330
- int i; /* Loop counter */
114
+ const char *zCurrent = 0; /* Current skin */
115
+ int i; /* Loop counter */
1331116
Stmt q;
1332117
1333118
login_check_credentials();
1334119
if( !g.perm.Setup ){
1335120
login_needed();
1336121
}
1337122
db_begin_transaction();
123
+ zCurrent = getSkin(0);
124
+ for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){
125
+ aBuiltinSkin[i].zSQL = getSkin(aBuiltinSkin[i].zLabel);
126
+ }
1338127
1339128
/* Process requests to delete a user-defined skin */
1340129
if( P("del1") && (zName = skinVarName(P("sn"), 1))!=0 ){
1341130
style_header("Confirm Custom Skin Delete");
1342131
@ <form action="%s(g.zTop)/setup_skin" method="post"><div>
@@ -1351,14 +140,10 @@
1351140
return;
1352141
}
1353142
if( P("del2")!=0 && (zName = skinVarName(P("sn"), 1))!=0 ){
1354143
db_multi_exec("DELETE FROM config WHERE name=%Q", zName);
1355144
}
1356
-
1357
- setDefaultSkin();
1358
- zCurrent = getSkin(0);
1359
-
1360145
if( P("save")!=0 && (zName = skinVarName(P("save"),0))!=0 ){
1361146
if( db_exists("SELECT 1 FROM config WHERE name=%Q", zName)
1362147
|| fossil_strcmp(zName, "Default")==0 ){
1363148
zErr = mprintf("Skin name \"%h\" already exists. "
1364149
"Choose a different name.", P("sn"));
@@ -1367,35 +152,39 @@
1367152
zName, zCurrent
1368153
);
1369154
}
1370155
}
1371156
1372
- /* The user pressed the "Use This Skin" button. */
157
+ /* The user pressed one of the "Install" buttons. */
1373158
if( P("load") && (z = P("sn"))!=0 && z[0] ){
1374159
int seen = 0;
160
+
161
+ /* Check to see if the current skin is already saved. If it is, there
162
+ ** is no need to create a backup */
163
+ zCurrent = getSkin(0);
1375164
for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){
1376
- if( fossil_strcmp(aBuiltinSkin[i].zValue, zCurrent)==0 ){
165
+ if( fossil_strcmp(aBuiltinSkin[i].zSQL, zCurrent)==0 ){
1377166
seen = 1;
1378167
break;
1379168
}
1380169
}
1381170
if( !seen ){
1382171
seen = db_exists("SELECT 1 FROM config WHERE name GLOB 'skin:*'"
1383172
" AND value=%Q", zCurrent);
1384
- }
1385
- if( !seen ){
1386
- db_multi_exec(
1387
- "INSERT INTO config(name,value,mtime) VALUES("
1388
- " strftime('skin:Backup On %%Y-%%m-%%d %%H:%%M:%%S'),"
1389
- " %Q,now())", zCurrent
1390
- );
173
+ if( !seen ){
174
+ db_multi_exec(
175
+ "INSERT INTO config(name,value,mtime) VALUES("
176
+ " strftime('skin:Backup On %%Y-%%m-%%d %%H:%%M:%%S'),"
177
+ " %Q,now())", zCurrent
178
+ );
179
+ }
1391180
}
1392181
seen = 0;
1393182
for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){
1394
- if( fossil_strcmp(aBuiltinSkin[i].zName, z)==0 ){
183
+ if( fossil_strcmp(aBuiltinSkin[i].zDesc, z)==0 ){
1395184
seen = 1;
1396
- zCurrent = aBuiltinSkin[i].zValue;
185
+ zCurrent = aBuiltinSkin[i].zSQL;
1397186
db_multi_exec("%s", zCurrent/*safe-for-%s*/);
1398187
break;
1399188
}
1400189
}
1401190
if( !seen ){
@@ -1409,48 +198,50 @@
1409198
if( zErr ){
1410199
@ <p><font color="red">%h(zErr)</font></p>
1411200
}
1412201
@ <p>A "skin" is a combination of
1413202
@ <a href="setup_editcss">CSS</a>,
1414
- @ <a href="setup_header">Header</a>,
1415
- @ <a href="setup_footer">Footer</a>, and
1416
- @ <a href="setup_logo">Logo</a> that determines the look and feel
203
+ @ <a href="setup_header">Header</a>, and
204
+ @ <a href="setup_footer">Footer</a> that determines the look and feel
1417205
@ of the web interface.</p>
1418206
@
1419207
@ <h2>Available Skins:</h2>
1420
- @ <ol>
208
+ @ <table border="0">
1421209
for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){
1422
- z = aBuiltinSkin[i].zName;
1423
- if( fossil_strcmp(aBuiltinSkin[i].zValue, zCurrent)==0 ){
1424
- @ <li><p>%h(z).&nbsp;&nbsp; <b>Currently In Use</b></p>
210
+ z = aBuiltinSkin[i].zDesc;
211
+ @ <tr><td>%d(i+1).<td>%h(z)<td>&nbsp;&nbsp;<td>
212
+ if( fossil_strcmp(aBuiltinSkin[i].zSQL, zCurrent)==0 ){
213
+ @ (Currently In Use)
1425214
}else{
1426
- @ <li><form action="%s(g.zTop)/setup_skin" method="post"><div>
1427
- @ %h(z).&nbsp;&nbsp;
215
+ @ <form action="%s(g.zTop)/setup_skin" method="post">
1428216
@ <input type="hidden" name="sn" value="%h(z)" />
1429
- @ <input type="submit" name="load" value="Use This Skin" />
1430
- @ </div></form></li>
217
+ @ <input type="submit" name="load" value="Install" />
218
+ @ </form>
1431219
}
220
+ @ </tr>
1432221
}
1433222
db_prepare(&q,
1434223
"SELECT substr(name, 6), value FROM config"
1435224
" WHERE name GLOB 'skin:*'"
1436225
" ORDER BY name"
1437226
);
1438227
while( db_step(&q)==SQLITE_ROW ){
1439228
const char *zN = db_column_text(&q, 0);
1440229
const char *zV = db_column_text(&q, 1);
230
+ i++;
231
+ @ <tr><td>%d(i).<td>%h(zN)<td>&nbsp;&nbsp;<td>
1441232
if( fossil_strcmp(zV, zCurrent)==0 ){
1442
- @ <li><p>%h(zN).&nbsp;&nbsp; <b>Currently In Use</b></p>
233
+ @ (Currently In Use)
1443234
}else{
1444
- @ <li><form action="%s(g.zTop)/setup_skin" method="post">
1445
- @ %h(zN).&nbsp;&nbsp;
235
+ @ <form action="%s(g.zTop)/setup_skin" method="post">
1446236
@ <input type="hidden" name="sn" value="%h(zN)">
1447
- @ <input type="submit" name="load" value="Use This Skin">
1448
- @ <input type="submit" name="del1" value="Delete This Skin">
1449
- @ </form></li>
237
+ @ <input type="submit" name="load" value="Install">
238
+ @ <input type="submit" name="del1" value="Delete">
239
+ @ </form>
1450240
}
241
+ @ </tr>
1451242
}
1452243
db_finalize(&q);
1453
- @ </ol>
244
+ @ </table>
1454245
style_footer();
1455246
db_end_transaction(0);
1456247
}
1457248
--- src/skins.c
+++ src/skins.c
@@ -19,1255 +19,36 @@
19 */
20 #include "config.h"
21 #include <assert.h>
22 #include "skins.h"
23
24 /* @-comment: ## */
25 /*
26 ** A black-and-white theme with the project title in a bar across the top
27 ** and no logo image.
28 */
29 static const char zBuiltinSkin1[] =
30 @ REPLACE INTO config(name,mtime,value)
31 @ VALUES('css',now(),'/* General settings for the entire page */
32 @ body {
33 @ margin: 0ex 1ex;
34 @ padding: 0px;
35 @ background-color: white;
36 @ font-family: sans-serif;
37 @ }
38 @
39 @ /* The project logo in the upper left-hand corner of each page */
40 @ div.logo {
41 @ display: table-row;
42 @ text-align: center;
43 @ /* vertical-align: bottom;*/
44 @ font-size: 2em;
45 @ font-weight: bold;
46 @ background-color: #707070;
47 @ color: #ffffff;
48 @ min-width: 200px;
49 @ white-space: nowrap;
50 @ }
51 @
52 @ /* The page title centered at the top of each page */
53 @ div.title {
54 @ display: table-cell;
55 @ font-size: 1.5em;
56 @ font-weight: bold;
57 @ text-align: center;
58 @ padding: 0 0 0 10px;
59 @ color: #404040;
60 @ vertical-align: bottom;
61 @ width: 100%;
62 @ }
63 @
64 @ /* The login status message in the top right-hand corner */
65 @ div.status {
66 @ display: table-cell;
67 @ text-align: right;
68 @ vertical-align: bottom;
69 @ color: #404040;
70 @ font-size: 0.8em;
71 @ font-weight: bold;
72 @ min-width: 200px;
73 @ white-space: nowrap;
74 @ }
75 @
76 @ /* The header across the top of the page */
77 @ div.header {
78 @ display: table;
79 @ width: 100%;
80 @ }
81 @
82 @ /* The main menu bar that appears at the top of the page beneath
83 @ ** the header */
84 @ div.mainmenu {
85 @ padding: 5px 10px 5px 10px;
86 @ font-size: 0.9em;
87 @ font-weight: bold;
88 @ text-align: center;
89 @ letter-spacing: 1px;
90 @ background-color: #404040;
91 @ color: white;
92 @ }
93 @
94 @ /* The submenu bar that *sometimes* appears below the main menu */
95 @ div.submenu, div.sectionmenu {
96 @ padding: 3px 10px 3px 0px;
97 @ font-size: 0.9em;
98 @ text-align: center;
99 @ background-color: #606060;
100 @ color: white;
101 @ }
102 @ div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
103 @ div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
104 @ padding: 3px 10px 3px 10px;
105 @ color: white;
106 @ text-decoration: none;
107 @ }
108 @ div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
109 @ color: #404040;
110 @ background-color: white;
111 @ }
112 @
113 @ /* All page content from the bottom of the menu or submenu down to
114 @ ** the footer */
115 @ div.content {
116 @ padding: 0ex 0ex 0ex 0ex;
117 @ }
118 @ /* Hyperlink colors */
119 @ div.content a { color: #604000; }
120 @ div.content a:link { color: #604000;}
121 @ div.content a:visited { color: #600000; }
122 @
123 @ /* <verbatim> blocks */
124 @ pre.verbatim {
125 @ background-color: #ffffff;
126 @ padding: 0.5em;
127 @ white-space: pre-wrap;
128 @ }
129 @
130 @ /* Some pages have section dividers */
131 @ div.section {
132 @ margin-bottom: 0px;
133 @ margin-top: 1em;
134 @ padding: 1px 1px 1px 1px;
135 @ font-size: 1.2em;
136 @ font-weight: bold;
137 @ background-color: #404040;
138 @ color: white;
139 @ white-space: nowrap;
140 @ }
141 @
142 @ /* The "Date" that occurs on the left hand side of timelines */
143 @ div.divider {
144 @ background: #a0a0a0;
145 @ border: 2px #505050 solid;
146 @ font-size: 1em; font-weight: normal;
147 @ padding: .25em;
148 @ margin: .2em 0 .2em 0;
149 @ float: left;
150 @ clear: left;
151 @ white-space: nowrap;
152 @ }
153 @
154 @ /* The footer at the very bottom of the page */
155 @ div.footer {
156 @ font-size: 0.8em;
157 @ margin-top: 12px;
158 @ padding: 5px 10px 5px 10px;
159 @ text-align: right;
160 @ background-color: #404040;
161 @ color: white;
162 @ }
163 @
164 @ /* The label/value pairs on (for example) the vinfo page */
165 @ table.label-value th {
166 @ vertical-align: top;
167 @ text-align: right;
168 @ padding: 0.2ex 2ex;
169 @ }');
170 @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html>
171 @ <head>
172 @ <base href="$baseurl/$current_page" />
173 @ <title>$<project_name>: $<title></title>
174 @ <link rel="alternate" type="application/rss+xml" title="RSS Feed"
175 @ href="$home/timeline.rss">
176 @ <link rel="stylesheet" href="$stylesheet_url" type="text/css"
177 @ media="screen">
178 @ </head>
179 @ <body>
180 @ <div class="header">
181 @ <div class="title"><small>$<project_name></small><br />$<title></div>
182 @ <div class="status"><th1>
183 @ if {[info exists login]} {
184 @ puts "Logged in as $login"
185 @ } else {
186 @ puts "Not logged in"
187 @ }
188 @ </th1></div>
189 @ </div>
190 @ <div class="mainmenu">
191 @ <th1>
192 @ html "<a href=''$home$index_page''>Home</a>\n"
193 @ if {[anycap jor]} {
194 @ html "<a href=''$home/timeline''>Timeline</a>\n"
195 @ }
196 @ if {[hascap oh]} {
197 @ html "<a href=''$home/tree?ci=tip''>Files</a>\n"
198 @ }
199 @ if {[hascap o]} {
200 @ html "<a href=''$home/brlist''>Branches</a>\n"
201 @ html "<a href=''$home/taglist''>Tags</a>\n"
202 @ }
203 @ if {[hascap r]} {
204 @ html "<a href=''$home/reportlist''>Tickets</a>\n"
205 @ }
206 @ if {[hascap j]} {
207 @ html "<a href=''$home/wiki''>Wiki</a>\n"
208 @ }
209 @ if {[hascap s]} {
210 @ html "<a href=''$home/setup''>Admin</a>\n"
211 @ } elseif {[hascap a]} {
212 @ html "<a href=''$home/setup_ulist''>Users</a>\n"
213 @ }
214 @ if {[info exists login]} {
215 @ html "<a href=''$home/login''>Logout</a>\n"
216 @ } else {
217 @ html "<a href=''$home/login''>Login</a>\n"
218 @ }
219 @ </th1></div>
220 @ ');
221 @ REPLACE INTO config(name,mtime,value)
222 @ VALUES('footer',now(),'<div class="footer">
223 @ Fossil version $manifest_version $manifest_date
224 @ </div>
225 @ </body></html>
226 @ ');
227 ;
228
229 /*
230 ** A tan theme with the project title above the user identification
231 ** and no logo image.
232 */
233 static const char zBuiltinSkin2[] =
234 @ REPLACE INTO config(name,mtime,value)
235 @ VALUES('css',now(),'/* General settings for the entire page */
236 @ body {
237 @ margin: 0ex 0ex;
238 @ padding: 0px;
239 @ background-color: #fef3bc;
240 @ font-family: sans-serif;
241 @ }
242 @
243 @ /* The project logo in the upper left-hand corner of each page */
244 @ div.logo {
245 @ display: inline;
246 @ text-align: center;
247 @ vertical-align: bottom;
248 @ font-weight: bold;
249 @ font-size: 2.5em;
250 @ color: #a09048;
251 @ white-space: nowrap;
252 @ }
253 @
254 @ /* The page title centered at the top of each page */
255 @ div.title {
256 @ display: table-cell;
257 @ font-size: 2em;
258 @ font-weight: bold;
259 @ text-align: left;
260 @ padding: 0 0 0 5px;
261 @ color: #a09048;
262 @ vertical-align: bottom;
263 @ width: 100%;
264 @ }
265 @
266 @ /* The login status message in the top right-hand corner */
267 @ div.status {
268 @ display: table-cell;
269 @ text-align: right;
270 @ vertical-align: bottom;
271 @ color: #a09048;
272 @ padding: 5px 5px 0 0;
273 @ font-size: 0.8em;
274 @ font-weight: bold;
275 @ white-space: nowrap;
276 @ }
277 @
278 @ /* The header across the top of the page */
279 @ div.header {
280 @ display: table;
281 @ width: 100%;
282 @ }
283 @
284 @ /* The main menu bar that appears at the top of the page beneath
285 @ ** the header */
286 @ div.mainmenu {
287 @ padding: 5px 10px 5px 10px;
288 @ font-size: 0.9em;
289 @ font-weight: bold;
290 @ text-align: center;
291 @ letter-spacing: 1px;
292 @ background-color: #a09048;
293 @ color: black;
294 @ }
295 @
296 @ /* The submenu bar that *sometimes* appears below the main menu */
297 @ div.submenu, div.sectionmenu {
298 @ padding: 3px 10px 3px 0px;
299 @ font-size: 0.9em;
300 @ text-align: center;
301 @ background-color: #c0af58;
302 @ color: white;
303 @ }
304 @ div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
305 @ div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
306 @ padding: 3px 10px 3px 10px;
307 @ color: white;
308 @ text-decoration: none;
309 @ }
310 @ div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
311 @ color: #a09048;
312 @ background-color: white;
313 @ }
314 @
315 @ /* All page content from the bottom of the menu or submenu down to
316 @ ** the footer */
317 @ div.content {
318 @ padding: 1ex 5px;
319 @ }
320 @ div.content a { color: #706532; }
321 @ div.content a:link { color: #706532; }
322 @ div.content a:visited { color: #704032; }
323 @ div.content a:hover { background-color: white; color: #706532; }
324 @
325 @ /* Some pages have section dividers */
326 @ div.section {
327 @ margin-bottom: 0px;
328 @ margin-top: 1em;
329 @ padding: 3px 3px 0 3px;
330 @ font-size: 1.2em;
331 @ font-weight: bold;
332 @ background-color: #a09048;
333 @ color: white;
334 @ white-space: nowrap;
335 @ }
336 @
337 @ /* The "Date" that occurs on the left hand side of timelines */
338 @ div.divider {
339 @ background: #e1d498;
340 @ border: 2px #a09048 solid;
341 @ font-size: 1em; font-weight: normal;
342 @ padding: .25em;
343 @ margin: .2em 0 .2em 0;
344 @ float: left;
345 @ clear: left;
346 @ white-space: nowrap;
347 @ }
348 @
349 @ /* The footer at the very bottom of the page */
350 @ div.footer {
351 @ font-size: 0.8em;
352 @ margin-top: 12px;
353 @ padding: 5px 10px 5px 10px;
354 @ text-align: right;
355 @ background-color: #a09048;
356 @ color: white;
357 @ }
358 @
359 @ /* Hyperlink colors */
360 @ div.footer a { color: white; }
361 @ div.footer a:link { color: white; }
362 @ div.footer a:visited { color: white; }
363 @ div.footer a:hover { background-color: white; color: #558195; }
364 @
365 @ /* <verbatim> blocks */
366 @ pre.verbatim {
367 @ background-color: #f5f5f5;
368 @ padding: 0.5em;
369 @ white-space: pre-wrap;
370 @ }
371 @
372 @ /* The label/value pairs on (for example) the ci page */
373 @ table.label-value th {
374 @ vertical-align: top;
375 @ text-align: right;
376 @ padding: 0.2ex 2ex;
377 @ }');
378 @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html>
379 @ <head>
380 @ <base href="$baseurl/$current_page" />
381 @ <title>$<project_name>: $<title></title>
382 @ <link rel="alternate" type="application/rss+xml" title="RSS Feed"
383 @ href="$home/timeline.rss">
384 @ <link rel="stylesheet" href="$stylesheet_url" type="text/css"
385 @ media="screen">
386 @ </head>
387 @ <body>
388 @ <div class="header">
389 @ <div class="title">$<title></div>
390 @ <div class="status">
391 @ <div class="logo">$<project_name></div><br/>
392 @ <th1>
393 @ if {[info exists login]} {
394 @ puts "Logged in as $login"
395 @ } else {
396 @ puts "Not logged in"
397 @ }
398 @ </th1></div>
399 @ </div>
400 @ <div class="mainmenu">
401 @ <th1>
402 @ html "<a href=''$home$index_page''>Home</a>\n"
403 @ if {[anycap jor]} {
404 @ html "<a href=''$home/timeline''>Timeline</a>\n"
405 @ }
406 @ if {[hascap oh]} {
407 @ html "<a href=''$home/tree?ci=tip''>Files</a>\n"
408 @ }
409 @ if {[hascap o]} {
410 @ html "<a href=''$home/brlist''>Branches</a>\n"
411 @ html "<a href=''$home/taglist''>Tags</a>\n"
412 @ }
413 @ if {[hascap r]} {
414 @ html "<a href=''$home/reportlist''>Tickets</a>\n"
415 @ }
416 @ if {[hascap j]} {
417 @ html "<a href=''$home/wiki''>Wiki</a>\n"
418 @ }
419 @ if {[hascap s]} {
420 @ html "<a href=''$home/setup''>Admin</a>\n"
421 @ } elseif {[hascap a]} {
422 @ html "<a href=''$home/setup_ulist''>Users</a>\n"
423 @ }
424 @ if {[info exists login]} {
425 @ html "<a href=''$home/login''>Logout</a>\n"
426 @ } else {
427 @ html "<a href=''$home/login''>Login</a>\n"
428 @ }
429 @ </th1></div>
430 @ ');
431 @ REPLACE INTO config(name,mtime,value)
432 @ VALUES('footer',now(),'<div class="footer">
433 @ Fossil version $manifest_version $manifest_date
434 @ </div>
435 @ </body></html>
436 @ ');
437 ;
438
439 /*
440 ** Black letters on a white or cream background with the main menu
441 ** stuck on the left-hand side.
442 */
443 static const char zBuiltinSkin3[] =
444 @ REPLACE INTO config(name,mtime,value)
445 @ VALUES('css',now(),'/* General settings for the entire page */
446 @ body {
447 @ margin:0px 0px 0px 0px;
448 @ padding:0px;
449 @ font-family:verdana, arial, helvetica, "sans serif";
450 @ color:#333;
451 @ background-color:white;
452 @ }
453 @
454 @ /* consistent colours */
455 @ h2 {
456 @ color: #333;
457 @ }
458 @ h3 {
459 @ color: #333;
460 @ }
461 @
462 @ /* The project logo in the upper left-hand corner of each page */
463 @ div.logo {
464 @ display: table-cell;
465 @ text-align: left;
466 @ vertical-align: bottom;
467 @ font-weight: bold;
468 @ color: #333;
469 @ white-space: nowrap;
470 @ }
471 @
472 @ /* The page title centered at the top of each page */
473 @ div.title {
474 @ display: table-cell;
475 @ font-size: 2em;
476 @ font-weight: bold;
477 @ text-align: center;
478 @ color: #333;
479 @ vertical-align: bottom;
480 @ width: 100%;
481 @ }
482 @
483 @ /* The login status message in the top right-hand corner */
484 @ div.status {
485 @ display: table-cell;
486 @ padding-right: 10px;
487 @ text-align: right;
488 @ vertical-align: bottom;
489 @ padding-bottom: 5px;
490 @ color: #333;
491 @ font-size: 0.8em;
492 @ font-weight: bold;
493 @ white-space: nowrap;
494 @ }
495 @
496 @ /* The header across the top of the page */
497 @ div.header {
498 @ margin:10px 0px 10px 0px;
499 @ padding:1px 0px 0px 20px;
500 @ border-style:solid;
501 @ border-color:black;
502 @ border-width:1px 0px;
503 @ background-color:#eee;
504 @ }
505 @
506 @ /* The main menu bar that appears at the top left of the page beneath
507 @ ** the header. Width must be co-ordinated with the container below */
508 @ div.mainmenu {
509 @ float: left;
510 @ margin-left: 10px;
511 @ margin-right: 10px;
512 @ font-size: 0.9em;
513 @ font-weight: bold;
514 @ padding:5px;
515 @ background-color:#eee;
516 @ border:1px solid #999;
517 @ width:8em;
518 @ }
519 @
520 @ /* Main menu is now a list */
521 @ div.mainmenu ul {
522 @ padding: 0;
523 @ list-style:none;
524 @ }
525 @ div.mainmenu a, div.mainmenu a:visited{
526 @ padding: 1px 10px 1px 10px;
527 @ color: #333;
528 @ text-decoration: none;
529 @ }
530 @ div.mainmenu a:hover {
531 @ color: #eee;
532 @ background-color: #333;
533 @ }
534 @
535 @ /* Container for the sub-menu and content so they don''t spread
536 @ ** out underneath the main menu */
537 @ #container {
538 @ padding-left: 9em;
539 @ }
540 @
541 @ /* The submenu bar that *sometimes* appears below the main menu */
542 @ div.submenu, div.sectionmenu {
543 @ padding: 3px 10px 3px 10px;
544 @ font-size: 0.9em;
545 @ text-align: center;
546 @ border:1px solid #999;
547 @ border-width:1px 0px;
548 @ background-color: #eee;
549 @ color: #333;
550 @ }
551 @ div.submenu a, div.submenu a:visited, div.sectionmenu>a.button:link,
552 @ div.sectionmenu>a.button:visited {
553 @ padding: 3px 10px 3px 10px;
554 @ color: #333;
555 @ text-decoration: none;
556 @ }
557 @ div.submenu a:hover, div.sectionmenu>a.button:hover {
558 @ color: #eee;
559 @ background-color: #333;
560 @ }
561 @
562 @ /* All page content from the bottom of the menu or submenu down to
563 @ ** the footer */
564 @ div.content {
565 @ padding: 2ex 1ex 0ex 2ex;
566 @ }
567 @
568 @ /* Some pages have section dividers */
569 @ div.section {
570 @ margin-bottom: 0px;
571 @ margin-top: 1em;
572 @ padding: 1px 1px 1px 1px;
573 @ font-size: 1.2em;
574 @ font-weight: bold;
575 @ border-style:solid;
576 @ border-color:#999;
577 @ border-width:1px 0px;
578 @ background-color: #eee;
579 @ color: #333;
580 @ white-space: nowrap;
581 @ }
582 @
583 @ /* The "Date" that occurs on the left hand side of timelines */
584 @ div.divider {
585 @ background: #eee;
586 @ border: 2px #999 solid;
587 @ font-size: 1em; font-weight: normal;
588 @ padding: .25em;
589 @ margin: .2em 0 .2em 0;
590 @ float: left;
591 @ clear: left;
592 @ color: #333;
593 @ white-space: nowrap;
594 @ }
595 @
596 @ /* The footer at the very bottom of the page */
597 @ div.footer {
598 @ font-size: 0.8em;
599 @ margin-top: 12px;
600 @ padding: 5px 10px 5px 10px;
601 @ text-align: right;
602 @ background-color: #eee;
603 @ color: #555;
604 @ }
605 @
606 @ /* <verbatim> blocks */
607 @ pre.verbatim {
608 @ background-color: #f5f5f5;
609 @ padding: 0.5em;
610 @ white-space: pre-wrap;
611 @ }
612 @
613 @ /* The label/value pairs on (for example) the ci page */
614 @ table.label-value th {
615 @ vertical-align: top;
616 @ text-align: right;
617 @ padding: 0.2ex 2ex;
618 @ }');
619 @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html>
620 @ <head>
621 @ <base href="$baseurl/$current_page" />
622 @ <title>$<project_name>: $<title></title>
623 @ <link rel="alternate" type="application/rss+xml" title="RSS Feed"
624 @ href="$home/timeline.rss">
625 @ <link rel="stylesheet" href="$stylesheet_url" type="text/css"
626 @ media="screen">
627 @ </head>
628 @ <body>
629 @ <div class="header">
630 @ <div class="logo">
631 @ <img src="$logo_image_url" alt="logo">
632 @ <br />$<project_name>
633 @ </div>
634 @ <div class="title">$<title></div>
635 @ <div class="status"><th1>
636 @ if {[info exists login]} {
637 @ puts "Logged in as $login"
638 @ } else {
639 @ puts "Not logged in"
640 @ }
641 @ </th1></div>
642 @ </div>
643 @ <div class="mainmenu">
644 @ <th1>
645 @ html "<a href=''$home$index_page''>Home</a>\n"
646 @ if {[anycap jor]} {
647 @ html "<a href=''$home/timeline''>Timeline</a>\n"
648 @ }
649 @ if {[hascap oh]} {
650 @ html "<a href=''$home/tree?ci=tip''>Files</a>\n"
651 @ }
652 @ if {[hascap o]} {
653 @ html "<a href=''$home/brlist''>Branches</a>\n"
654 @ html "<a href=''$home/taglist''>Tags</a>\n"
655 @ }
656 @ if {[hascap r]} {
657 @ html "<a href=''$home/reportlist''>Tickets</a>\n"
658 @ }
659 @ if {[hascap j]} {
660 @ html "<a href=''$home/wiki''>Wiki</a>\n"
661 @ }
662 @ if {[hascap s]} {
663 @ html "<a href=''$home/setup''>Admin</a>\n"
664 @ } elseif {[hascap a]} {
665 @ html "<a href=''$home/setup_ulist''>Users</a>\n"
666 @ }
667 @ if {[info exists login]} {
668 @ html "<a href=''$home/login''>Logout</a>\n"
669 @ } else {
670 @ html "<a href=''$home/login''>Login</a>\n"
671 @ }
672 @ </th1></ul></div>
673 @ <div id="container">
674 @ ');
675 @ REPLACE INTO config(name,mtime,value) VALUES('footer',now(),'</div>
676 @ <div class="footer">
677 @ Fossil version $manifest_version $manifest_date
678 @ </div>
679 @ </body></html>
680 @ ');
681 ;
682
683
684 /*
685 ** Shadow boxes and rounded corners.
686 */
687 static const char zBuiltinSkin4[] =
688 @ REPLACE INTO config(name,mtime,value)
689 @ VALUES('css',now(),'/* General settings for the entire page */
690 @ html {
691 @ min-height: 100%;
692 @ }
693 @ body {
694 @ margin: 0ex 1ex;
695 @ padding: 0px;
696 @ background-color: white;
697 @ color: #333;
698 @ font-family: Verdana, sans-serif;
699 @ font-size: 0.8em;
700 @ }
701 @
702 @ /* The project logo in the upper left-hand corner of each page */
703 @ div.logo {
704 @ display: table-cell;
705 @ text-align: right;
706 @ vertical-align: bottom;
707 @ font-weight: normal;
708 @ white-space: nowrap;
709 @ }
710 @
711 @ /* Widths */
712 @ div.header, div.mainmenu, div.submenu, div.content, div.footer {
713 @ max-width: 900px;
714 @ margin: auto;
715 @ padding: 3px 20px 3px 20px;
716 @ clear: both;
717 @ }
718 @
719 @ /* The page title at the top of each page */
720 @ div.title {
721 @ display: table-cell;
722 @ padding-left: 10px;
723 @ font-size: 2em;
724 @ margin: 10px 0 10px -20px;
725 @ vertical-align: bottom;
726 @ text-align: left;
727 @ width: 80%;
728 @ font-family: Verdana, sans-serif;
729 @ font-weight: bold;
730 @ color: #558195;
731 @ text-shadow: 0px 2px 2px #999999;
732 @ }
733 @
734 @ /* The login status message in the top right-hand corner */
735 @ div.status {
736 @ display: table-cell;
737 @ text-align: right;
738 @ vertical-align: bottom;
739 @ color: #333;
740 @ margin-right: -20px;
741 @ white-space: nowrap;
742 @ }
743 @
744 @ /* The main menu bar that appears at the top of the page beneath
745 @ ** the header */
746 @ div.mainmenu {
747 @ text-align: center;
748 @ color: white;
749 @ border-top-left-radius: 5px;
750 @ border-top-right-radius: 5px;
751 @ vertical-align: middle;
752 @ padding-top: 8px;
753 @ padding-bottom: 8px;
754 @ background-color: #446979;
755 @ box-shadow: 0px 3px 4px #333333;
756 @ }
757 @
758 @ /* The submenu bar that *sometimes* appears below the main menu */
759 @ div.submenu {
760 @ padding-top:10px;
761 @ padding-bottom:0;
762 @ text-align: right;
763 @ color: #000;
764 @ background-color: #fff;
765 @ height: 1.5em;
766 @ vertical-align:middle;
767 @ box-shadow: 0px 3px 4px #999;
768 @ }
769 @ div.mainmenu a, div.mainmenu a:visited {
770 @ padding: 3px 10px 3px 10px;
771 @ color: white;
772 @ text-decoration: none;
773 @ }
774 @ div.submenu a, div.submenu a:visited, a.button,
775 @ div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
776 @ padding: 2px 8px;
777 @ color: #000;
778 @ font-family: Arial;
779 @ text-decoration: none;
780 @ margin:auto;
781 @ border-radius: 5px;
782 @ background-color: #e0e0e0;
783 @ text-shadow: 0px -1px 0px #eee;
784 @ border: 1px solid #000;
785 @ }
786 @
787 @ div.mainmenu a:hover {
788 @ color: #000;
789 @ background-color: white;
790 @ }
791 @
792 @ div.submenu a:hover, div.sectionmenu>a.button:hover {
793 @ background-color: #c0c0c0;
794 @ }
795 @
796 @ /* All page content from the bottom of the menu or submenu down to
797 @ ** the footer */
798 @ div.content {
799 @ background-color: #fff;
800 @ box-shadow: 0px 3px 4px #999;
801 @ border-bottom-right-radius: 5px;
802 @ border-bottom-left-radius: 5px;
803 @ padding-bottom: 1em;
804 @ min-height:40%;
805 @ }
806 @
807 @
808 @ /* Some pages have section dividers */
809 @ div.section {
810 @ margin-bottom: 0.5em;
811 @ margin-top: 1em;
812 @ margin-right: auto;
813 @ padding: 1px 1px 1px 1px;
814 @ font-size: 1.2em;
815 @ font-weight: bold;
816 @ text-align: center;
817 @ color: white;
818 @ border-radius: 5px;
819 @ background-color: #446979;
820 @ box-shadow: 0px 3px 4px #333333;
821 @ white-space: nowrap;
822 @ }
823 @
824 @ /* The "Date" that occurs on the left hand side of timelines */
825 @ div.divider {
826 @ font-size: 1.2em;
827 @ font-family: Georgia, serif;
828 @ font-weight: bold;
829 @ margin-top: 1em;
830 @ white-space: nowrap;
831 @ }
832 @
833 @ /* The footer at the very bottom of the page */
834 @ div.footer {
835 @ font-size: 0.9em;
836 @ text-align: right;
837 @ margin-bottom: 1em;
838 @ color: #666;
839 @ }
840 @
841 @ /* Hyperlink colors in the footer */
842 @ div.footer a { color: white; }
843 @ div.footer a:link { color: white; }
844 @ div.footer a:visited { color: white; }
845 @ div.footer a:hover { background-color: white; color: #558195; }
846 @
847 @ /* <verbatim> blocks */
848 @ pre.verbatim, blockquote pre {
849 @ font-family: Dejavu Sans Mono, Monaco, Lucida Console, monospace;
850 @ background-color: #f3f3f3;
851 @ padding: 0.5em;
852 @ white-space: pre-wrap;
853 @ }
854 @
855 @ blockquote pre {
856 @ border: 1px #000 dashed;
857 @ }
858 @
859 @ /* The label/value pairs on (for example) the ci page */
860 @ table.label-value th {
861 @ vertical-align: top;
862 @ text-align: right;
863 @ padding: 0.2ex 2ex;
864 @ }
865 @
866 @ table.report tr th {
867 @ padding: 3px 5px;
868 @ text-transform: capitalize;
869 @ cursor: pointer;
870 @ }
871 @
872 @ table.report tr td {
873 @ padding: 3px 5px;
874 @ cursor: pointer;
875 @ }
876 @
877 @ textarea {
878 @ font-size: 1em;
879 @ }
880 @
881 @ .fullsize-text {
882 @ font-size: 1.25em;
883 @ }');
884 @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html>
885 @ <head>
886 @ <base href="$baseurl/$current_page" />
887 @ <title>$<project_name>: $<title></title>
888 @ <link rel="alternate" type="application/rss+xml" title="RSS Feed"
889 @ href="$home/timeline.rss">
890 @ <link rel="stylesheet" href="$stylesheet_url" type="text/css"
891 @ media="screen">
892 @ </head>
893 @ <body>
894 @ <div class="header">
895 @ <div class="logo">
896 @ <img src="$logo_image_url" alt="logo">
897 @ <br />$<project_name>
898 @ </div>
899 @ <div class="title">$<title></div>
900 @ <div class="status"><th1>
901 @ if {[info exists login]} {
902 @ puts "Logged in as $login"
903 @ } else {
904 @ puts "Not logged in"
905 @ }
906 @ </th1></div>
907 @ </div>
908 @ <div class="mainmenu">
909 @ <th1>
910 @ html "<a href=''$home$index_page''>Home</a>\n"
911 @ if {[anycap jor]} {
912 @ html "<a href=''$home/timeline''>Timeline</a>\n"
913 @ }
914 @ if {[hascap oh]} {
915 @ html "<a href=''$home/tree?ci=tip''>Files</a>\n"
916 @ }
917 @ if {[hascap o]} {
918 @ html "<a href=''$home/brlist''>Branches</a>\n"
919 @ html "<a href=''$home/taglist''>Tags</a>\n"
920 @ }
921 @ if {[hascap r]} {
922 @ html "<a href=''$home/reportlist''>Tickets</a>\n"
923 @ }
924 @ if {[hascap j]} {
925 @ html "<a href=''$home/wiki''>Wiki</a>\n"
926 @ }
927 @ if {[hascap s]} {
928 @ html "<a href=''$home/setup''>Admin</a>\n"
929 @ } elseif {[hascap a]} {
930 @ html "<a href=''$home/setup_ulist''>Users</a>\n"
931 @ }
932 @ if {[info exists login]} {
933 @ html "<a href=''$home/login''>Logout</a>\n"
934 @ } else {
935 @ html "<a href=''$home/login''>Login</a>\n"
936 @ }
937 @ </th1></div>
938 @ <div id="container">
939 @ ');
940 @ REPLACE INTO config(name,mtime,value) VALUES('footer',now(),'</div>
941 @ <div class="footer">
942 @ Fossil version $manifest_version $manifest_date
943 @ </div>
944 @ </body></html>
945 @ ');
946 ;
947
948
949 /*
950 ** This skin is intended to be almost identical to the default one, with the
951 ** following changes to the header and footer:
952 **
953 ** 1. The logo image in the header has been modified to be a hyperlink to the
954 ** root of the web site containing the repository using the same scheme
955 ** (i.e. HTTP or HTTPS) as the base URL for the repository. The header
956 ** contains a TH1 script block to help accomplish these tasks.
957 **
958 ** 2. The Fossil version information in the footer has been augmented with
959 ** hyperlinks to the corresponding points on the timeline in the official
960 ** Fossil repository. Additionally, if the Tcl integration feature is
961 ** enabled, the loaded version of Tcl is included, with a hyperlink to the
962 ** official Tcl/Tk web site. The footer also contains a TH1 script block
963 ** to help accomplish these tasks.
964 */
965 static const char zBuiltinSkin5[] =
966 @ REPLACE INTO config(name,mtime,value)
967 @ VALUES('css',now(),'/* General settings for the entire page */
968 @ body {
969 @ margin: 0ex 1ex;
970 @ padding: 0px;
971 @ background-color: white;
972 @ font-family: sans-serif;
973 @ }
974 @
975 @ /* The project logo in the upper left-hand corner of each page */
976 @ div.logo {
977 @ display: table-cell;
978 @ text-align: center;
979 @ vertical-align: bottom;
980 @ font-weight: bold;
981 @ color: #558195;
982 @ min-width: 200px;
983 @ white-space: nowrap;
984 @ }
985 @
986 @ /* The page title centered at the top of each page */
987 @ div.title {
988 @ display: table-cell;
989 @ font-size: 2em;
990 @ font-weight: bold;
991 @ text-align: center;
992 @ padding: 0 0 0 1em;
993 @ color: #558195;
994 @ vertical-align: bottom;
995 @ width: 100%;
996 @ }
997 @
998 @ /* The login status message in the top right-hand corner */
999 @ div.status {
1000 @ display: table-cell;
1001 @ text-align: right;
1002 @ vertical-align: bottom;
1003 @ color: #558195;
1004 @ font-size: 0.8em;
1005 @ font-weight: bold;
1006 @ min-width: 200px;
1007 @ white-space: nowrap;
1008 @ }
1009 @
1010 @ /* The header across the top of the page */
1011 @ div.header {
1012 @ display: table;
1013 @ width: 100%;
1014 @ }
1015 @
1016 @ /* The main menu bar that appears at the top of the page beneath
1017 @ ** the header */
1018 @ div.mainmenu {
1019 @ padding: 5px 10px 5px 10px;
1020 @ font-size: 0.9em;
1021 @ font-weight: bold;
1022 @ text-align: center;
1023 @ letter-spacing: 1px;
1024 @ background-color: #558195;
1025 @ border-top-left-radius: 8px;
1026 @ border-top-right-radius: 8px;
1027 @ color: white;
1028 @ }
1029 @
1030 @ /* The submenu bar that *sometimes* appears below the main menu */
1031 @ div.submenu, div.sectionmenu {
1032 @ padding: 3px 10px 3px 0px;
1033 @ font-size: 0.9em;
1034 @ text-align: center;
1035 @ background-color: #456878;
1036 @ color: white;
1037 @ }
1038 @ div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
1039 @ div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
1040 @ padding: 3px 10px 3px 10px;
1041 @ color: white;
1042 @ text-decoration: none;
1043 @ }
1044 @ div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
1045 @ color: #558195;
1046 @ background-color: white;
1047 @ }
1048 @
1049 @ /* All page content from the bottom of the menu or submenu down to
1050 @ ** the footer */
1051 @ div.content {
1052 @ padding: 0ex 1ex 1ex 1ex;
1053 @ border: solid #aaa;
1054 @ border-width: 1px;
1055 @ }
1056 @
1057 @ /* Some pages have section dividers */
1058 @ div.section {
1059 @ margin-bottom: 0px;
1060 @ margin-top: 1em;
1061 @ padding: 1px 1px 1px 1px;
1062 @ font-size: 1.2em;
1063 @ font-weight: bold;
1064 @ background-color: #558195;
1065 @ color: white;
1066 @ white-space: nowrap;
1067 @ }
1068 @
1069 @ /* The "Date" that occurs on the left hand side of timelines */
1070 @ div.divider {
1071 @ background: #a1c4d4;
1072 @ border: 2px #558195 solid;
1073 @ font-size: 1em; font-weight: normal;
1074 @ padding: .25em;
1075 @ margin: .2em 0 .2em 0;
1076 @ float: left;
1077 @ clear: left;
1078 @ white-space: nowrap;
1079 @ }
1080 @
1081 @ /* The footer at the very bottom of the page */
1082 @ div.footer {
1083 @ clear: both;
1084 @ font-size: 0.8em;
1085 @ padding: 5px 10px 5px 10px;
1086 @ text-align: right;
1087 @ background-color: #558195;
1088 @ border-bottom-left-radius: 8px;
1089 @ border-bottom-right-radius: 8px;
1090 @ color: white;
1091 @ }
1092 @
1093 @ /* Hyperlink colors in the footer */
1094 @ div.footer a { color: white; }
1095 @ div.footer a:link { color: white; }
1096 @ div.footer a:visited { color: white; }
1097 @ div.footer a:hover { background-color: white; color: #558195; }
1098 @
1099 @ /* verbatim blocks */
1100 @ pre.verbatim {
1101 @ background-color: #f5f5f5;
1102 @ padding: 0.5em;
1103 @ white-space: pre-wrap;
1104 @ }
1105 @
1106 @ /* The label/value pairs on (for example) the ci page */
1107 @ table.label-value th {
1108 @ vertical-align: top;
1109 @ text-align: right;
1110 @ padding: 0.2ex 2ex;
1111 @ }');
1112 @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html>
1113 @ <head>
1114 @ <base href="$baseurl/$current_page" />
1115 @ <title>$<project_name>: $<title></title>
1116 @ <link rel="alternate" type="application/rss+xml" title="RSS Feed"
1117 @ href="$home/timeline.rss" />
1118 @ <link rel="stylesheet" href="$stylesheet_url" type="text/css"
1119 @ media="screen" />
1120 @ </head>
1121 @ <body>
1122 @ <div class="header">
1123 @ <div class="logo">
1124 @ <th1>
1125 @ ##
1126 @ ## NOTE: The purpose of this procedure is to take the base URL of the
1127 @ ## Fossil project and return the root of the entire web site using
1128 @ ## the same URI scheme as the base URL (e.g. http or https).
1129 @ ##
1130 @ proc getLogoUrl { baseurl } {
1131 @ set idx(first) [string first // $baseurl]
1132 @ if {$idx(first) != -1} {
1133 @ ##
1134 @ ## NOTE: Skip second slash.
1135 @ ##
1136 @ set idx(first+1) [expr {$idx(first) + 2}]
1137 @ ##
1138 @ ## NOTE: (part 1) The [string first] command does NOT actually
1139 @ ## the optional startIndex argument as specified in the
1140 @ ## TH1 support manual; therefore, we fake it by using the
1141 @ ## [string range] command and then adding the necessary
1142 @ ## offset to the resulting index manually (below). In Tcl,
1143 @ ## we could use the following instead:
1144 @ ##
1145 @ ## set idx(next) [string first / $baseurl $idx(first+1)]
1146 @ ##
1147 @ set idx(nextRange) [string range $baseurl $idx(first+1) end]
1148 @ set idx(next) [string first / $idx(nextRange)]
1149 @ if {$idx(next) != -1} {
1150 @ ##
1151 @ ## NOTE: (part 2) Add the necessary offset to the result of the
1152 @ ## search for the next slash (i.e. the one after the initial
1153 @ ## search for the two slashes).
1154 @ ##
1155 @ set idx(next) [expr {$idx(next) + $idx(first+1)}]
1156 @ ##
1157 @ ## NOTE: Back up one character from the next slash.
1158 @ ##
1159 @ set idx(next-1) [expr {$idx(next) - 1}]
1160 @ ##
1161 @ ## NOTE: Extract the URI scheme and host from the base URL.
1162 @ ##
1163 @ set scheme [string range $baseurl 0 $idx(first)]
1164 @ set host [string range $baseurl $idx(first+1) $idx(next-1)]
1165 @ ##
1166 @ ## NOTE: Try to stay in SSL mode if we are there now.
1167 @ ##
1168 @ if {[string compare $scheme http:/] == 0} {
1169 @ set scheme http://
1170 @ } else {
1171 @ set scheme https://
1172 @ }
1173 @ set logourl $scheme$host/
1174 @ } else {
1175 @ set logourl $baseurl
1176 @ }
1177 @ } else {
1178 @ set logourl $baseurl
1179 @ }
1180 @ return $logourl
1181 @ }
1182 @ set logourl [getLogoUrl $baseurl]
1183 @ </th1>
1184 @ <a href="$logourl">
1185 @ <img src="$logo_image_url" border="0" alt="$project_name">
1186 @ </a>
1187 @ </div>
1188 @ <div class="title"><small>$<project_name></small><br />$<title></div>
1189 @ <div class="status"><th1>
1190 @ if {[info exists login]} {
1191 @ puts "Logged in as $login"
1192 @ } else {
1193 @ puts "Not logged in"
1194 @ }
1195 @ </th1></div>
1196 @ </div>
1197 @ <div class="mainmenu">
1198 @ <th1>
1199 @ html "<a href=''$home$index_page''>Home</a>\n"
1200 @ if {[anycap jor]} {
1201 @ html "<a href=''$home/timeline''>Timeline</a>\n"
1202 @ }
1203 @ if {[hascap oh]} {
1204 @ html "<a href=''$home/tree?ci=tip''>Files</a>\n"
1205 @ }
1206 @ if {[hascap o]} {
1207 @ html "<a href=''$home/brlist''>Branches</a>\n"
1208 @ html "<a href=''$home/taglist''>Tags</a>\n"
1209 @ }
1210 @ if {[hascap r]} {
1211 @ html "<a href=''$home/reportlist''>Tickets</a>\n"
1212 @ }
1213 @ if {[hascap j]} {
1214 @ html "<a href=''$home/wiki''>Wiki</a>\n"
1215 @ }
1216 @ if {[hascap s]} {
1217 @ html "<a href=''$home/setup''>Admin</a>\n"
1218 @ } elseif {[hascap a]} {
1219 @ html "<a href=''$home/setup_ulist''>Users</a>\n"
1220 @ }
1221 @ if {[info exists login]} {
1222 @ html "<a href=''$home/login''>Logout</a>\n"
1223 @ } else {
1224 @ html "<a href=''$home/login''>Login</a>\n"
1225 @ }
1226 @ </th1></div>
1227 @ ');
1228 @ REPLACE INTO config(name,mtime,value)
1229 @ VALUES('footer',now(),'<div class="footer">
1230 @ <th1>
1231 @ proc getTclVersion {} {
1232 @ if {[catch {tclEval info patchlevel} tclVersion] == 0} {
1233 @ return "<a href=\"http://www.tcl.tk/\">Tcl</a> version $tclVersion"
1234 @ }
1235 @ return ""
1236 @ }
1237 @ proc getVersion { version } {
1238 @ set length [string length $version]
1239 @ return [string range $version 1 [expr {$length - 2}]]
1240 @ }
1241 @ set version [getVersion $manifest_version]
1242 @ set tclVersion [getTclVersion]
1243 @ set fossilUrl http://www.fossil-scm.org
1244 @ </th1>
1245 @ This page was generated in about
1246 @ <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s by
1247 @ <a href="$fossilUrl/">Fossil</a>
1248 @ version $release_version $tclVersion
1249 @ <a href="$fossilUrl/index.html/info/$version">$manifest_version</a>
1250 @ <a href="$fossilUrl/index.html/timeline?c=$manifest_date&amp;y=ci">$manifest_date</a>
1251 @ </div>
1252 @ </body></html>
1253 @ ');
1254 ;
1255
1256 /*
1257 ** An array of available built-in skins.
 
 
 
 
 
 
 
 
 
 
 
 
1258 */
1259 static struct BuiltinSkin {
1260 const char *zName;
1261 const char *zValue;
 
1262 } aBuiltinSkin[] = {
1263 { "Default", 0 /* Filled in at runtime */ },
1264 { "Plain Gray, No Logo", zBuiltinSkin1 },
1265 { "Khaki, No Logo", zBuiltinSkin2 },
1266 { "Black & White, Menu on Left", zBuiltinSkin3 },
1267 { "Shadow boxes & Rounded Corners", zBuiltinSkin4 },
1268 { "Enhanced Default", zBuiltinSkin5 },
1269 };
1270
1271 /*
1272 ** For a skin named zSkinName, compute the name of the CONFIG table
1273 ** entry where that skin is stored and return it.
@@ -1286,57 +67,65 @@
1286 }
1287 return z;
1288 }
1289
1290 /*
1291 ** Construct and return a string that represents the current skin if
1292 ** useDefault==0 or a string for the default skin if useDefault==1.
 
 
1293 **
1294 ** Memory to hold the returned string is obtained from malloc.
1295 */
1296 static char *getSkin(int useDefault){
 
 
 
 
1297 Blob val;
1298 blob_zero(&val);
1299 blob_appendf(&val,
1300 "REPLACE INTO config(name,value,mtime) VALUES('css',%Q,now());\n",
1301 useDefault ? zDefaultCSS : db_get("css", (char*)zDefaultCSS)
1302 );
1303 blob_appendf(&val,
1304 "REPLACE INTO config(name,value,mtime) VALUES('header',%Q,now());\n",
1305 useDefault ? zDefaultHeader : db_get("header", (char*)zDefaultHeader)
1306 );
1307 blob_appendf(&val,
1308 "REPLACE INTO config(name,value,mtime) VALUES('footer',%Q,now());\n",
1309 useDefault ? zDefaultFooter : db_get("footer", (char*)zDefaultFooter)
1310 );
 
 
 
 
 
 
1311 return blob_str(&val);
1312 }
1313
1314 /*
1315 ** Construct the default skin string and fill in the corresponding
1316 ** entry in aBuildinSkin[]
1317 */
1318 static void setDefaultSkin(void){
1319 aBuiltinSkin[0].zValue = getSkin(1);
1320 }
1321
1322 /*
1323 ** WEBPAGE: setup_skin
1324 */
1325 void setup_skin(void){
1326 const char *z;
1327 char *zName;
1328 char *zErr = 0;
1329 const char *zCurrent; /* Current skin */
1330 int i; /* Loop counter */
1331 Stmt q;
1332
1333 login_check_credentials();
1334 if( !g.perm.Setup ){
1335 login_needed();
1336 }
1337 db_begin_transaction();
 
 
 
 
1338
1339 /* Process requests to delete a user-defined skin */
1340 if( P("del1") && (zName = skinVarName(P("sn"), 1))!=0 ){
1341 style_header("Confirm Custom Skin Delete");
1342 @ <form action="%s(g.zTop)/setup_skin" method="post"><div>
@@ -1351,14 +140,10 @@
1351 return;
1352 }
1353 if( P("del2")!=0 && (zName = skinVarName(P("sn"), 1))!=0 ){
1354 db_multi_exec("DELETE FROM config WHERE name=%Q", zName);
1355 }
1356
1357 setDefaultSkin();
1358 zCurrent = getSkin(0);
1359
1360 if( P("save")!=0 && (zName = skinVarName(P("save"),0))!=0 ){
1361 if( db_exists("SELECT 1 FROM config WHERE name=%Q", zName)
1362 || fossil_strcmp(zName, "Default")==0 ){
1363 zErr = mprintf("Skin name \"%h\" already exists. "
1364 "Choose a different name.", P("sn"));
@@ -1367,35 +152,39 @@
1367 zName, zCurrent
1368 );
1369 }
1370 }
1371
1372 /* The user pressed the "Use This Skin" button. */
1373 if( P("load") && (z = P("sn"))!=0 && z[0] ){
1374 int seen = 0;
 
 
 
 
1375 for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){
1376 if( fossil_strcmp(aBuiltinSkin[i].zValue, zCurrent)==0 ){
1377 seen = 1;
1378 break;
1379 }
1380 }
1381 if( !seen ){
1382 seen = db_exists("SELECT 1 FROM config WHERE name GLOB 'skin:*'"
1383 " AND value=%Q", zCurrent);
1384 }
1385 if( !seen ){
1386 db_multi_exec(
1387 "INSERT INTO config(name,value,mtime) VALUES("
1388 " strftime('skin:Backup On %%Y-%%m-%%d %%H:%%M:%%S'),"
1389 " %Q,now())", zCurrent
1390 );
1391 }
1392 seen = 0;
1393 for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){
1394 if( fossil_strcmp(aBuiltinSkin[i].zName, z)==0 ){
1395 seen = 1;
1396 zCurrent = aBuiltinSkin[i].zValue;
1397 db_multi_exec("%s", zCurrent/*safe-for-%s*/);
1398 break;
1399 }
1400 }
1401 if( !seen ){
@@ -1409,48 +198,50 @@
1409 if( zErr ){
1410 @ <p><font color="red">%h(zErr)</font></p>
1411 }
1412 @ <p>A "skin" is a combination of
1413 @ <a href="setup_editcss">CSS</a>,
1414 @ <a href="setup_header">Header</a>,
1415 @ <a href="setup_footer">Footer</a>, and
1416 @ <a href="setup_logo">Logo</a> that determines the look and feel
1417 @ of the web interface.</p>
1418 @
1419 @ <h2>Available Skins:</h2>
1420 @ <ol>
1421 for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){
1422 z = aBuiltinSkin[i].zName;
1423 if( fossil_strcmp(aBuiltinSkin[i].zValue, zCurrent)==0 ){
1424 @ <li><p>%h(z).&nbsp;&nbsp; <b>Currently In Use</b></p>
 
1425 }else{
1426 @ <li><form action="%s(g.zTop)/setup_skin" method="post"><div>
1427 @ %h(z).&nbsp;&nbsp;
1428 @ <input type="hidden" name="sn" value="%h(z)" />
1429 @ <input type="submit" name="load" value="Use This Skin" />
1430 @ </div></form></li>
1431 }
 
1432 }
1433 db_prepare(&q,
1434 "SELECT substr(name, 6), value FROM config"
1435 " WHERE name GLOB 'skin:*'"
1436 " ORDER BY name"
1437 );
1438 while( db_step(&q)==SQLITE_ROW ){
1439 const char *zN = db_column_text(&q, 0);
1440 const char *zV = db_column_text(&q, 1);
 
 
1441 if( fossil_strcmp(zV, zCurrent)==0 ){
1442 @ <li><p>%h(zN).&nbsp;&nbsp; <b>Currently In Use</b></p>
1443 }else{
1444 @ <li><form action="%s(g.zTop)/setup_skin" method="post">
1445 @ %h(zN).&nbsp;&nbsp;
1446 @ <input type="hidden" name="sn" value="%h(zN)">
1447 @ <input type="submit" name="load" value="Use This Skin">
1448 @ <input type="submit" name="del1" value="Delete This Skin">
1449 @ </form></li>
1450 }
 
1451 }
1452 db_finalize(&q);
1453 @ </ol>
1454 style_footer();
1455 db_end_transaction(0);
1456 }
1457
--- src/skins.c
+++ src/skins.c
@@ -19,1255 +19,36 @@
19 */
20 #include "config.h"
21 #include <assert.h>
22 #include "skins.h"
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24 /*
25 ** An array of available built-in skins.
26 **
27 ** To add new built-in skins:
28 **
29 ** 1. Pick a name for the new skin. (Here we use "xyzzy").
30 **
31 ** 2. Install files skins/xyzzy/css.txt, skins/xyzzy/header.txt,
32 ** and skins/xyzzy/footer.txt into the source tree.
33 **
34 ** 3. Rerun "tclsh makemake.tcl" in the src/ folder in order to
35 ** rebuild the makefiles to reference the new CSS, headers, and footers.
36 **
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 { "Plain Gray, No Logo", "plain_gray", 0 },
46 { "Khaki, No Logo", "khaki", 0 },
47 { "Black & White, Menu on Left", "black_and_white", 0 },
48 { "Shadow boxes & Rounded Corners", "rounded1", 0 },
49 { "Enhanced Default", "enhanced1", 0 },
50 };
51
52 /*
53 ** For a skin named zSkinName, compute the name of the CONFIG table
54 ** entry where that skin is stored and return it.
@@ -1286,57 +67,65 @@
67 }
68 return z;
69 }
70
71 /*
72 ** Construct and return an string of SQL statements that represents
73 ** a "skin" setting. If zName==0 then return the skin currently
74 ** installed. Otherwise, return one of the built-in skins designated
75 ** by zName.
76 **
77 ** Memory to hold the returned string is obtained from malloc.
78 */
79 static char *getSkin(const char *zName){
80 const char *z;
81 char *zLabel;
82 static const char *azType[] = { "css", "header", "footer" };
83 int i;
84 Blob val;
85 blob_zero(&val);
86 for(i=0; i<sizeof(azType)/sizeof(azType[0]); i++){
87 if( zName ){
88 zLabel = mprintf("skins/%s/%s.txt", zName, azType[i]);
89 z = builtin_text(zLabel);
90 fossil_free(zLabel);
91 }else{
92 z = db_get(azType[i], 0);
93 if( z==0 ){
94 zLabel = mprintf("skins/default/%s.txt", azType[i]);
95 z = builtin_text(zLabel);
96 fossil_free(zLabel);
97 }
98 }
99 blob_appendf(&val,
100 "REPLACE INTO config(name,value,mtime) VALUES(%Q,%Q,now());\n",
101 azType[i], z
102 );
103 }
104 return blob_str(&val);
105 }
106
 
 
 
 
 
 
 
 
107 /*
108 ** WEBPAGE: setup_skin
109 */
110 void setup_skin(void){
111 const char *z;
112 char *zName;
113 char *zErr = 0;
114 const char *zCurrent = 0; /* Current skin */
115 int i; /* Loop counter */
116 Stmt q;
117
118 login_check_credentials();
119 if( !g.perm.Setup ){
120 login_needed();
121 }
122 db_begin_transaction();
123 zCurrent = getSkin(0);
124 for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){
125 aBuiltinSkin[i].zSQL = getSkin(aBuiltinSkin[i].zLabel);
126 }
127
128 /* Process requests to delete a user-defined skin */
129 if( P("del1") && (zName = skinVarName(P("sn"), 1))!=0 ){
130 style_header("Confirm Custom Skin Delete");
131 @ <form action="%s(g.zTop)/setup_skin" method="post"><div>
@@ -1351,14 +140,10 @@
140 return;
141 }
142 if( P("del2")!=0 && (zName = skinVarName(P("sn"), 1))!=0 ){
143 db_multi_exec("DELETE FROM config WHERE name=%Q", zName);
144 }
 
 
 
 
145 if( P("save")!=0 && (zName = skinVarName(P("save"),0))!=0 ){
146 if( db_exists("SELECT 1 FROM config WHERE name=%Q", zName)
147 || fossil_strcmp(zName, "Default")==0 ){
148 zErr = mprintf("Skin name \"%h\" already exists. "
149 "Choose a different name.", P("sn"));
@@ -1367,35 +152,39 @@
152 zName, zCurrent
153 );
154 }
155 }
156
157 /* The user pressed one of the "Install" buttons. */
158 if( P("load") && (z = P("sn"))!=0 && z[0] ){
159 int seen = 0;
160
161 /* Check to see if the current skin is already saved. If it is, there
162 ** is no need to create a backup */
163 zCurrent = getSkin(0);
164 for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){
165 if( fossil_strcmp(aBuiltinSkin[i].zSQL, zCurrent)==0 ){
166 seen = 1;
167 break;
168 }
169 }
170 if( !seen ){
171 seen = db_exists("SELECT 1 FROM config WHERE name GLOB 'skin:*'"
172 " AND value=%Q", zCurrent);
173 if( !seen ){
174 db_multi_exec(
175 "INSERT INTO config(name,value,mtime) VALUES("
176 " strftime('skin:Backup On %%Y-%%m-%%d %%H:%%M:%%S'),"
177 " %Q,now())", zCurrent
178 );
179 }
180 }
181 seen = 0;
182 for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){
183 if( fossil_strcmp(aBuiltinSkin[i].zDesc, z)==0 ){
184 seen = 1;
185 zCurrent = aBuiltinSkin[i].zSQL;
186 db_multi_exec("%s", zCurrent/*safe-for-%s*/);
187 break;
188 }
189 }
190 if( !seen ){
@@ -1409,48 +198,50 @@
198 if( zErr ){
199 @ <p><font color="red">%h(zErr)</font></p>
200 }
201 @ <p>A "skin" is a combination of
202 @ <a href="setup_editcss">CSS</a>,
203 @ <a href="setup_header">Header</a>, and
204 @ <a href="setup_footer">Footer</a> that determines the look and feel
 
205 @ of the web interface.</p>
206 @
207 @ <h2>Available Skins:</h2>
208 @ <table border="0">
209 for(i=0; i<sizeof(aBuiltinSkin)/sizeof(aBuiltinSkin[0]); i++){
210 z = aBuiltinSkin[i].zDesc;
211 @ <tr><td>%d(i+1).<td>%h(z)<td>&nbsp;&nbsp;<td>
212 if( fossil_strcmp(aBuiltinSkin[i].zSQL, zCurrent)==0 ){
213 @ (Currently In Use)
214 }else{
215 @ <form action="%s(g.zTop)/setup_skin" method="post">
 
216 @ <input type="hidden" name="sn" value="%h(z)" />
217 @ <input type="submit" name="load" value="Install" />
218 @ </form>
219 }
220 @ </tr>
221 }
222 db_prepare(&q,
223 "SELECT substr(name, 6), value FROM config"
224 " WHERE name GLOB 'skin:*'"
225 " ORDER BY name"
226 );
227 while( db_step(&q)==SQLITE_ROW ){
228 const char *zN = db_column_text(&q, 0);
229 const char *zV = db_column_text(&q, 1);
230 i++;
231 @ <tr><td>%d(i).<td>%h(zN)<td>&nbsp;&nbsp;<td>
232 if( fossil_strcmp(zV, zCurrent)==0 ){
233 @ (Currently In Use)
234 }else{
235 @ <form action="%s(g.zTop)/setup_skin" method="post">
 
236 @ <input type="hidden" name="sn" value="%h(zN)">
237 @ <input type="submit" name="load" value="Install">
238 @ <input type="submit" name="del1" value="Delete">
239 @ </form>
240 }
241 @ </tr>
242 }
243 db_finalize(&q);
244 @ </table>
245 style_footer();
246 db_end_transaction(0);
247 }
248
+6 -231
--- src/style.c
+++ src/style.c
@@ -289,11 +289,12 @@
289289
** Draw the header.
290290
*/
291291
void style_header(const char *zTitleFormat, ...){
292292
va_list ap;
293293
char *zTitle;
294
- const char *zHeader = db_get("header", (char*)zDefaultHeader);
294
+ const char *zHeader = db_get("header", 0);
295
+ if( zHeader==0 ) zHeader = builtin_text("skins/default/header.txt");
295296
login_check_credentials();
296297
297298
va_start(ap, zTitleFormat);
298299
zTitle = vmprintf(zTitleFormat, ap);
299300
va_end(ap);
@@ -454,11 +455,12 @@
454455
455456
/* Set the href= field on hyperlinks. Do this before the footer since
456457
** the footer will be generating </html> */
457458
style_resolve_href();
458459
459
- zFooter = db_get("footer", (char*)zDefaultFooter);
460
+ zFooter = db_get("footer", 0);
461
+ if( zFooter==0 ) zFooter = builtin_text("skins/default/footer.txt");
460462
if( g.thTrace ) Th_Trace("BEGIN_FOOTER<br />\n", -1);
461463
Th_Render(zFooter);
462464
if( g.thTrace ) Th_Trace("END_FOOTER<br />\n", -1);
463465
464466
/* Render trace log if TH1 tracing is enabled. */
@@ -484,230 +486,10 @@
484486
*/
485487
void style_sidebox_end(void){
486488
@ </div>
487489
}
488490
489
-/* @-comment: // */
490
-/*
491
-** The default page header.
492
-*/
493
-const char zDefaultHeader[] =
494
-@ <html>
495
-@ <head>
496
-@ <base href="$baseurl/$current_page" />
497
-@ <title>$<project_name>: $<title></title>
498
-@ <link rel="alternate" type="application/rss+xml" title="RSS Feed"
499
-@ href="$home/timeline.rss" />
500
-@ <link rel="stylesheet" href="$stylesheet_url" type="text/css"
501
-@ media="screen" />
502
-@ </head>
503
-@ <body>
504
-@ <div class="header">
505
-@ <div class="logo">
506
-@ <img src="$logo_image_url" alt="logo" />
507
-@ </div>
508
-@ <div class="title"><small>$<project_name></small><br />$<title></div>
509
-@ <div class="status"><th1>
510
-@ if {[info exists login]} {
511
-@ puts "Logged in as $login"
512
-@ } else {
513
-@ puts "Not logged in"
514
-@ }
515
-@ </th1></div>
516
-@ </div>
517
-@ <div class="mainmenu">
518
-@ <th1>
519
-@ html "<a href='$home$index_page'>Home</a>\n"
520
-@ if {[anycap jor]} {
521
-@ html "<a href='$home/timeline'>Timeline</a>\n"
522
-@ }
523
-@ if {[hascap oh]} {
524
-@ html "<a href='$home/tree?ci=tip'>Files</a>\n"
525
-@ }
526
-@ if {[hascap o]} {
527
-@ html "<a href='$home/brlist'>Branches</a>\n"
528
-@ html "<a href='$home/taglist'>Tags</a>\n"
529
-@ }
530
-@ if {[hascap r]} {
531
-@ html "<a href='$home/reportlist'>Tickets</a>\n"
532
-@ }
533
-@ if {[hascap j]} {
534
-@ html "<a href='$home/wiki'>Wiki</a>\n"
535
-@ }
536
-@ if {[hascap s]} {
537
-@ html "<a href='$home/setup'>Admin</a>\n"
538
-@ } elseif {[hascap a]} {
539
-@ html "<a href='$home/setup_ulist'>Users</a>\n"
540
-@ }
541
-@ if {[info exists login]} {
542
-@ html "<a href='$home/login'>Logout</a>\n"
543
-@ } else {
544
-@ html "<a href='$home/login'>Login</a>\n"
545
-@ }
546
-@ </th1></div>
547
-;
548
-
549
-/*
550
-** The default page footer
551
-*/
552
-const char zDefaultFooter[] =
553
-@ <div class="footer">
554
-@ This page was generated in about
555
-@ <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s by
556
-@ Fossil version $manifest_version $manifest_date
557
-@ </div>
558
-@ </body></html>
559
-;
560
-
561
-/*
562
-** The default Cascading Style Sheet.
563
-** It's assembled by different strings for each class.
564
-** The default css contains all definitions.
565
-** The style sheet, send to the client only contains the ones,
566
-** not defined in the user defined css.
567
-*/
568
-const char zDefaultCSS[] =
569
-@ /* General settings for the entire page */
570
-@ body {
571
-@ margin: 0ex 1ex;
572
-@ padding: 0px;
573
-@ background-color: white;
574
-@ font-family: sans-serif;
575
-@ }
576
-@
577
-@ /* The project logo in the upper left-hand corner of each page */
578
-@ div.logo {
579
-@ display: table-cell;
580
-@ text-align: center;
581
-@ vertical-align: bottom;
582
-@ font-weight: bold;
583
-@ color: #558195;
584
-@ min-width: 200px;
585
-@ white-space: nowrap;
586
-@ }
587
-@
588
-@ /* The page title centered at the top of each page */
589
-@ div.title {
590
-@ display: table-cell;
591
-@ font-size: 2em;
592
-@ font-weight: bold;
593
-@ text-align: center;
594
-@ padding: 0 0 0 1em;
595
-@ color: #558195;
596
-@ vertical-align: bottom;
597
-@ width: 100%;
598
-@ }
599
-@
600
-@ /* The login status message in the top right-hand corner */
601
-@ div.status {
602
-@ display: table-cell;
603
-@ text-align: right;
604
-@ vertical-align: bottom;
605
-@ color: #558195;
606
-@ font-size: 0.8em;
607
-@ font-weight: bold;
608
-@ min-width: 200px;
609
-@ white-space: nowrap;
610
-@ }
611
-@
612
-@ /* The header across the top of the page */
613
-@ div.header {
614
-@ display: table;
615
-@ width: 100%;
616
-@ }
617
-@
618
-@ /* The main menu bar that appears at the top of the page beneath
619
-@ ** the header */
620
-@ div.mainmenu {
621
-@ padding: 5px 10px 5px 10px;
622
-@ font-size: 0.9em;
623
-@ font-weight: bold;
624
-@ text-align: center;
625
-@ letter-spacing: 1px;
626
-@ background-color: #558195;
627
-@ border-top-left-radius: 8px;
628
-@ border-top-right-radius: 8px;
629
-@ color: white;
630
-@ }
631
-@
632
-@ /* The submenu bar that *sometimes* appears below the main menu */
633
-@ div.submenu, div.sectionmenu {
634
-@ padding: 3px 10px 3px 0px;
635
-@ font-size: 0.9em;
636
-@ text-align: center;
637
-@ background-color: #456878;
638
-@ color: white;
639
-@ }
640
-@ div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
641
-@ div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
642
-@ padding: 3px 10px 3px 10px;
643
-@ color: white;
644
-@ text-decoration: none;
645
-@ }
646
-@ div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
647
-@ color: #558195;
648
-@ background-color: white;
649
-@ }
650
-@
651
-@ /* All page content from the bottom of the menu or submenu down to
652
-@ ** the footer */
653
-@ div.content {
654
-@ padding: 0ex 1ex 1ex 1ex;
655
-@ border: solid #aaa;
656
-@ border-width: 1px;
657
-@ }
658
-@
659
-@ /* Some pages have section dividers */
660
-@ div.section {
661
-@ margin-bottom: 0px;
662
-@ margin-top: 1em;
663
-@ padding: 1px 1px 1px 1px;
664
-@ font-size: 1.2em;
665
-@ font-weight: bold;
666
-@ background-color: #558195;
667
-@ color: white;
668
-@ white-space: nowrap;
669
-@ }
670
-@
671
-@ /* The "Date" that occurs on the left hand side of timelines */
672
-@ div.divider {
673
-@ background: #a1c4d4;
674
-@ border: 2px #558195 solid;
675
-@ font-size: 1em; font-weight: normal;
676
-@ padding: .25em;
677
-@ margin: .2em 0 .2em 0;
678
-@ float: left;
679
-@ clear: left;
680
-@ white-space: nowrap;
681
-@ }
682
-@
683
-@ /* The footer at the very bottom of the page */
684
-@ div.footer {
685
-@ clear: both;
686
-@ font-size: 0.8em;
687
-@ padding: 5px 10px 5px 10px;
688
-@ text-align: right;
689
-@ background-color: #558195;
690
-@ border-bottom-left-radius: 8px;
691
-@ border-bottom-right-radius: 8px;
692
-@ color: white;
693
-@ }
694
-@
695
-@ /* Hyperlink colors in the footer */
696
-@ div.footer a { color: white; }
697
-@ div.footer a:link { color: white; }
698
-@ div.footer a:visited { color: white; }
699
-@ div.footer a:hover { background-color: white; color: #558195; }
700
-@
701
-@ /* verbatim blocks */
702
-@ pre.verbatim {
703
-@ background-color: #f5f5f5;
704
-@ padding: 0.5em;
705
-@ white-space: pre-wrap;
706
-@}
707
-;
708
-
709491
710492
/* The following table contains bits of default CSS that must
711493
** be included if they are not found in the application-defined
712494
** CSS.
713495
*/
@@ -714,14 +496,10 @@
714496
const struct strctCssDefaults {
715497
const char *elementClass; /* Name of element needed */
716498
const char *comment; /* Comment text */
717499
const char *value; /* CSS text */
718500
} cssDefaultList[] = {
719
- { "",
720
- "",
721
- zDefaultCSS
722
- },
723501
{ "div.sidebox",
724502
"The nomenclature sidebox for branches,..",
725503
@ float: right;
726504
@ background-color: white;
727505
@ border-width: medium;
@@ -1358,19 +1136,16 @@
13581136
** Append all of the default CSS to the CGI output.
13591137
*/
13601138
void cgi_append_default_css(void) {
13611139
int i;
13621140
1141
+ cgi_printf("%s", builtin_text("skins/default/css.txt"));
13631142
for( i=0; cssDefaultList[i].elementClass; i++ ){
13641143
if( cssDefaultList[i].elementClass[0] ){
13651144
cgi_printf("/* %s */\n%s {\n%s\n}\n\n",
13661145
cssDefaultList[i].comment,
13671146
cssDefaultList[i].elementClass,
1368
- cssDefaultList[i].value
1369
- );
1370
- }else{
1371
- cgi_printf("%s",
13721147
cssDefaultList[i].value
13731148
);
13741149
}
13751150
}
13761151
}
@@ -1381,11 +1156,11 @@
13811156
void page_style_css(void){
13821157
Blob css;
13831158
int i;
13841159
13851160
cgi_set_content_type("text/css");
1386
- blob_init(&css, db_get("css",(char*)zDefaultCSS), -1);
1161
+ blob_init(&css, db_get("css",(char*)builtin_text("skins/default/css.txt")), -1);
13871162
13881163
/* add special missing definitions */
13891164
for(i=1; cssDefaultList[i].elementClass; i++){
13901165
if( strstr(blob_str(&css), cssDefaultList[i].elementClass)==0 ){
13911166
blob_appendf(&css, "/* %s */\n%s {\n%s}\n",
13921167
--- src/style.c
+++ src/style.c
@@ -289,11 +289,12 @@
289 ** Draw the header.
290 */
291 void style_header(const char *zTitleFormat, ...){
292 va_list ap;
293 char *zTitle;
294 const char *zHeader = db_get("header", (char*)zDefaultHeader);
 
295 login_check_credentials();
296
297 va_start(ap, zTitleFormat);
298 zTitle = vmprintf(zTitleFormat, ap);
299 va_end(ap);
@@ -454,11 +455,12 @@
454
455 /* Set the href= field on hyperlinks. Do this before the footer since
456 ** the footer will be generating </html> */
457 style_resolve_href();
458
459 zFooter = db_get("footer", (char*)zDefaultFooter);
 
460 if( g.thTrace ) Th_Trace("BEGIN_FOOTER<br />\n", -1);
461 Th_Render(zFooter);
462 if( g.thTrace ) Th_Trace("END_FOOTER<br />\n", -1);
463
464 /* Render trace log if TH1 tracing is enabled. */
@@ -484,230 +486,10 @@
484 */
485 void style_sidebox_end(void){
486 @ </div>
487 }
488
489 /* @-comment: // */
490 /*
491 ** The default page header.
492 */
493 const char zDefaultHeader[] =
494 @ <html>
495 @ <head>
496 @ <base href="$baseurl/$current_page" />
497 @ <title>$<project_name>: $<title></title>
498 @ <link rel="alternate" type="application/rss+xml" title="RSS Feed"
499 @ href="$home/timeline.rss" />
500 @ <link rel="stylesheet" href="$stylesheet_url" type="text/css"
501 @ media="screen" />
502 @ </head>
503 @ <body>
504 @ <div class="header">
505 @ <div class="logo">
506 @ <img src="$logo_image_url" alt="logo" />
507 @ </div>
508 @ <div class="title"><small>$<project_name></small><br />$<title></div>
509 @ <div class="status"><th1>
510 @ if {[info exists login]} {
511 @ puts "Logged in as $login"
512 @ } else {
513 @ puts "Not logged in"
514 @ }
515 @ </th1></div>
516 @ </div>
517 @ <div class="mainmenu">
518 @ <th1>
519 @ html "<a href='$home$index_page'>Home</a>\n"
520 @ if {[anycap jor]} {
521 @ html "<a href='$home/timeline'>Timeline</a>\n"
522 @ }
523 @ if {[hascap oh]} {
524 @ html "<a href='$home/tree?ci=tip'>Files</a>\n"
525 @ }
526 @ if {[hascap o]} {
527 @ html "<a href='$home/brlist'>Branches</a>\n"
528 @ html "<a href='$home/taglist'>Tags</a>\n"
529 @ }
530 @ if {[hascap r]} {
531 @ html "<a href='$home/reportlist'>Tickets</a>\n"
532 @ }
533 @ if {[hascap j]} {
534 @ html "<a href='$home/wiki'>Wiki</a>\n"
535 @ }
536 @ if {[hascap s]} {
537 @ html "<a href='$home/setup'>Admin</a>\n"
538 @ } elseif {[hascap a]} {
539 @ html "<a href='$home/setup_ulist'>Users</a>\n"
540 @ }
541 @ if {[info exists login]} {
542 @ html "<a href='$home/login'>Logout</a>\n"
543 @ } else {
544 @ html "<a href='$home/login'>Login</a>\n"
545 @ }
546 @ </th1></div>
547 ;
548
549 /*
550 ** The default page footer
551 */
552 const char zDefaultFooter[] =
553 @ <div class="footer">
554 @ This page was generated in about
555 @ <th1>puts [expr {([utime]+[stime]+1000)/1000*0.001}]</th1>s by
556 @ Fossil version $manifest_version $manifest_date
557 @ </div>
558 @ </body></html>
559 ;
560
561 /*
562 ** The default Cascading Style Sheet.
563 ** It's assembled by different strings for each class.
564 ** The default css contains all definitions.
565 ** The style sheet, send to the client only contains the ones,
566 ** not defined in the user defined css.
567 */
568 const char zDefaultCSS[] =
569 @ /* General settings for the entire page */
570 @ body {
571 @ margin: 0ex 1ex;
572 @ padding: 0px;
573 @ background-color: white;
574 @ font-family: sans-serif;
575 @ }
576 @
577 @ /* The project logo in the upper left-hand corner of each page */
578 @ div.logo {
579 @ display: table-cell;
580 @ text-align: center;
581 @ vertical-align: bottom;
582 @ font-weight: bold;
583 @ color: #558195;
584 @ min-width: 200px;
585 @ white-space: nowrap;
586 @ }
587 @
588 @ /* The page title centered at the top of each page */
589 @ div.title {
590 @ display: table-cell;
591 @ font-size: 2em;
592 @ font-weight: bold;
593 @ text-align: center;
594 @ padding: 0 0 0 1em;
595 @ color: #558195;
596 @ vertical-align: bottom;
597 @ width: 100%;
598 @ }
599 @
600 @ /* The login status message in the top right-hand corner */
601 @ div.status {
602 @ display: table-cell;
603 @ text-align: right;
604 @ vertical-align: bottom;
605 @ color: #558195;
606 @ font-size: 0.8em;
607 @ font-weight: bold;
608 @ min-width: 200px;
609 @ white-space: nowrap;
610 @ }
611 @
612 @ /* The header across the top of the page */
613 @ div.header {
614 @ display: table;
615 @ width: 100%;
616 @ }
617 @
618 @ /* The main menu bar that appears at the top of the page beneath
619 @ ** the header */
620 @ div.mainmenu {
621 @ padding: 5px 10px 5px 10px;
622 @ font-size: 0.9em;
623 @ font-weight: bold;
624 @ text-align: center;
625 @ letter-spacing: 1px;
626 @ background-color: #558195;
627 @ border-top-left-radius: 8px;
628 @ border-top-right-radius: 8px;
629 @ color: white;
630 @ }
631 @
632 @ /* The submenu bar that *sometimes* appears below the main menu */
633 @ div.submenu, div.sectionmenu {
634 @ padding: 3px 10px 3px 0px;
635 @ font-size: 0.9em;
636 @ text-align: center;
637 @ background-color: #456878;
638 @ color: white;
639 @ }
640 @ div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited,
641 @ div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited {
642 @ padding: 3px 10px 3px 10px;
643 @ color: white;
644 @ text-decoration: none;
645 @ }
646 @ div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover {
647 @ color: #558195;
648 @ background-color: white;
649 @ }
650 @
651 @ /* All page content from the bottom of the menu or submenu down to
652 @ ** the footer */
653 @ div.content {
654 @ padding: 0ex 1ex 1ex 1ex;
655 @ border: solid #aaa;
656 @ border-width: 1px;
657 @ }
658 @
659 @ /* Some pages have section dividers */
660 @ div.section {
661 @ margin-bottom: 0px;
662 @ margin-top: 1em;
663 @ padding: 1px 1px 1px 1px;
664 @ font-size: 1.2em;
665 @ font-weight: bold;
666 @ background-color: #558195;
667 @ color: white;
668 @ white-space: nowrap;
669 @ }
670 @
671 @ /* The "Date" that occurs on the left hand side of timelines */
672 @ div.divider {
673 @ background: #a1c4d4;
674 @ border: 2px #558195 solid;
675 @ font-size: 1em; font-weight: normal;
676 @ padding: .25em;
677 @ margin: .2em 0 .2em 0;
678 @ float: left;
679 @ clear: left;
680 @ white-space: nowrap;
681 @ }
682 @
683 @ /* The footer at the very bottom of the page */
684 @ div.footer {
685 @ clear: both;
686 @ font-size: 0.8em;
687 @ padding: 5px 10px 5px 10px;
688 @ text-align: right;
689 @ background-color: #558195;
690 @ border-bottom-left-radius: 8px;
691 @ border-bottom-right-radius: 8px;
692 @ color: white;
693 @ }
694 @
695 @ /* Hyperlink colors in the footer */
696 @ div.footer a { color: white; }
697 @ div.footer a:link { color: white; }
698 @ div.footer a:visited { color: white; }
699 @ div.footer a:hover { background-color: white; color: #558195; }
700 @
701 @ /* verbatim blocks */
702 @ pre.verbatim {
703 @ background-color: #f5f5f5;
704 @ padding: 0.5em;
705 @ white-space: pre-wrap;
706 @}
707 ;
708
709
710 /* The following table contains bits of default CSS that must
711 ** be included if they are not found in the application-defined
712 ** CSS.
713 */
@@ -714,14 +496,10 @@
714 const struct strctCssDefaults {
715 const char *elementClass; /* Name of element needed */
716 const char *comment; /* Comment text */
717 const char *value; /* CSS text */
718 } cssDefaultList[] = {
719 { "",
720 "",
721 zDefaultCSS
722 },
723 { "div.sidebox",
724 "The nomenclature sidebox for branches,..",
725 @ float: right;
726 @ background-color: white;
727 @ border-width: medium;
@@ -1358,19 +1136,16 @@
1358 ** Append all of the default CSS to the CGI output.
1359 */
1360 void cgi_append_default_css(void) {
1361 int i;
1362
 
1363 for( i=0; cssDefaultList[i].elementClass; i++ ){
1364 if( cssDefaultList[i].elementClass[0] ){
1365 cgi_printf("/* %s */\n%s {\n%s\n}\n\n",
1366 cssDefaultList[i].comment,
1367 cssDefaultList[i].elementClass,
1368 cssDefaultList[i].value
1369 );
1370 }else{
1371 cgi_printf("%s",
1372 cssDefaultList[i].value
1373 );
1374 }
1375 }
1376 }
@@ -1381,11 +1156,11 @@
1381 void page_style_css(void){
1382 Blob css;
1383 int i;
1384
1385 cgi_set_content_type("text/css");
1386 blob_init(&css, db_get("css",(char*)zDefaultCSS), -1);
1387
1388 /* add special missing definitions */
1389 for(i=1; cssDefaultList[i].elementClass; i++){
1390 if( strstr(blob_str(&css), cssDefaultList[i].elementClass)==0 ){
1391 blob_appendf(&css, "/* %s */\n%s {\n%s}\n",
1392
--- src/style.c
+++ src/style.c
@@ -289,11 +289,12 @@
289 ** Draw the header.
290 */
291 void style_header(const char *zTitleFormat, ...){
292 va_list ap;
293 char *zTitle;
294 const char *zHeader = db_get("header", 0);
295 if( zHeader==0 ) zHeader = builtin_text("skins/default/header.txt");
296 login_check_credentials();
297
298 va_start(ap, zTitleFormat);
299 zTitle = vmprintf(zTitleFormat, ap);
300 va_end(ap);
@@ -454,11 +455,12 @@
455
456 /* Set the href= field on hyperlinks. Do this before the footer since
457 ** the footer will be generating </html> */
458 style_resolve_href();
459
460 zFooter = db_get("footer", 0);
461 if( zFooter==0 ) zFooter = builtin_text("skins/default/footer.txt");
462 if( g.thTrace ) Th_Trace("BEGIN_FOOTER<br />\n", -1);
463 Th_Render(zFooter);
464 if( g.thTrace ) Th_Trace("END_FOOTER<br />\n", -1);
465
466 /* Render trace log if TH1 tracing is enabled. */
@@ -484,230 +486,10 @@
486 */
487 void style_sidebox_end(void){
488 @ </div>
489 }
490
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
492 /* The following table contains bits of default CSS that must
493 ** be included if they are not found in the application-defined
494 ** CSS.
495 */
@@ -714,14 +496,10 @@
496 const struct strctCssDefaults {
497 const char *elementClass; /* Name of element needed */
498 const char *comment; /* Comment text */
499 const char *value; /* CSS text */
500 } cssDefaultList[] = {
 
 
 
 
501 { "div.sidebox",
502 "The nomenclature sidebox for branches,..",
503 @ float: right;
504 @ background-color: white;
505 @ border-width: medium;
@@ -1358,19 +1136,16 @@
1136 ** Append all of the default CSS to the CGI output.
1137 */
1138 void cgi_append_default_css(void) {
1139 int i;
1140
1141 cgi_printf("%s", builtin_text("skins/default/css.txt"));
1142 for( i=0; cssDefaultList[i].elementClass; i++ ){
1143 if( cssDefaultList[i].elementClass[0] ){
1144 cgi_printf("/* %s */\n%s {\n%s\n}\n\n",
1145 cssDefaultList[i].comment,
1146 cssDefaultList[i].elementClass,
 
 
 
 
1147 cssDefaultList[i].value
1148 );
1149 }
1150 }
1151 }
@@ -1381,11 +1156,11 @@
1156 void page_style_css(void){
1157 Blob css;
1158 int i;
1159
1160 cgi_set_content_type("text/css");
1161 blob_init(&css, db_get("css",(char*)builtin_text("skins/default/css.txt")), -1);
1162
1163 /* add special missing definitions */
1164 for(i=1; cssDefaultList[i].elementClass; i++){
1165 if( strstr(blob_str(&css), cssDefaultList[i].elementClass)==0 ){
1166 blob_appendf(&css, "/* %s */\n%s {\n%s}\n",
1167
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -484,10 +484,28 @@
484484
$(SRCDIR)/xfer.c \
485485
$(SRCDIR)/xfersetup.c \
486486
$(SRCDIR)/zip.c
487487
488488
EXTRA_FILES = \
489
+ $(SRCDIR)/../skins/black_and_white/css.txt \
490
+ $(SRCDIR)/../skins/black_and_white/footer.txt \
491
+ $(SRCDIR)/../skins/black_and_white/header.txt \
492
+ $(SRCDIR)/../skins/default/css.txt \
493
+ $(SRCDIR)/../skins/default/footer.txt \
494
+ $(SRCDIR)/../skins/default/header.txt \
495
+ $(SRCDIR)/../skins/enhanced1/css.txt \
496
+ $(SRCDIR)/../skins/enhanced1/footer.txt \
497
+ $(SRCDIR)/../skins/enhanced1/header.txt \
498
+ $(SRCDIR)/../skins/khaki/css.txt \
499
+ $(SRCDIR)/../skins/khaki/footer.txt \
500
+ $(SRCDIR)/../skins/khaki/header.txt \
501
+ $(SRCDIR)/../skins/plain_gray/css.txt \
502
+ $(SRCDIR)/../skins/plain_gray/footer.txt \
503
+ $(SRCDIR)/../skins/plain_gray/header.txt \
504
+ $(SRCDIR)/../skins/rounded1/css.txt \
505
+ $(SRCDIR)/../skins/rounded1/footer.txt \
506
+ $(SRCDIR)/../skins/rounded1/header.txt \
489507
$(SRCDIR)/diff.tcl
490508
491509
TRANS_SRC = \
492510
$(OBJDIR)/add_.c \
493511
$(OBJDIR)/allrepo_.c \
494512
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -484,10 +484,28 @@
484 $(SRCDIR)/xfer.c \
485 $(SRCDIR)/xfersetup.c \
486 $(SRCDIR)/zip.c
487
488 EXTRA_FILES = \
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
489 $(SRCDIR)/diff.tcl
490
491 TRANS_SRC = \
492 $(OBJDIR)/add_.c \
493 $(OBJDIR)/allrepo_.c \
494
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -484,10 +484,28 @@
484 $(SRCDIR)/xfer.c \
485 $(SRCDIR)/xfersetup.c \
486 $(SRCDIR)/zip.c
487
488 EXTRA_FILES = \
489 $(SRCDIR)/../skins/black_and_white/css.txt \
490 $(SRCDIR)/../skins/black_and_white/footer.txt \
491 $(SRCDIR)/../skins/black_and_white/header.txt \
492 $(SRCDIR)/../skins/default/css.txt \
493 $(SRCDIR)/../skins/default/footer.txt \
494 $(SRCDIR)/../skins/default/header.txt \
495 $(SRCDIR)/../skins/enhanced1/css.txt \
496 $(SRCDIR)/../skins/enhanced1/footer.txt \
497 $(SRCDIR)/../skins/enhanced1/header.txt \
498 $(SRCDIR)/../skins/khaki/css.txt \
499 $(SRCDIR)/../skins/khaki/footer.txt \
500 $(SRCDIR)/../skins/khaki/header.txt \
501 $(SRCDIR)/../skins/plain_gray/css.txt \
502 $(SRCDIR)/../skins/plain_gray/footer.txt \
503 $(SRCDIR)/../skins/plain_gray/header.txt \
504 $(SRCDIR)/../skins/rounded1/css.txt \
505 $(SRCDIR)/../skins/rounded1/footer.txt \
506 $(SRCDIR)/../skins/rounded1/header.txt \
507 $(SRCDIR)/diff.tcl
508
509 TRANS_SRC = \
510 $(OBJDIR)/add_.c \
511 $(OBJDIR)/allrepo_.c \
512
+19 -1
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -322,11 +322,29 @@
322322
wysiwyg_.c \
323323
xfer_.c \
324324
xfersetup_.c \
325325
zip_.c
326326
327
-EXTRA_FILES = $(SRCDIR)\diff.tcl
327
+EXTRA_FILES = $(SRCDIR)\../skins/black_and_white/css.txt \
328
+ $(SRCDIR)\../skins/black_and_white/footer.txt \
329
+ $(SRCDIR)\../skins/black_and_white/header.txt \
330
+ $(SRCDIR)\../skins/default/css.txt \
331
+ $(SRCDIR)\../skins/default/footer.txt \
332
+ $(SRCDIR)\../skins/default/header.txt \
333
+ $(SRCDIR)\../skins/enhanced1/css.txt \
334
+ $(SRCDIR)\../skins/enhanced1/footer.txt \
335
+ $(SRCDIR)\../skins/enhanced1/header.txt \
336
+ $(SRCDIR)\../skins/khaki/css.txt \
337
+ $(SRCDIR)\../skins/khaki/footer.txt \
338
+ $(SRCDIR)\../skins/khaki/header.txt \
339
+ $(SRCDIR)\../skins/plain_gray/css.txt \
340
+ $(SRCDIR)\../skins/plain_gray/footer.txt \
341
+ $(SRCDIR)\../skins/plain_gray/header.txt \
342
+ $(SRCDIR)\../skins/rounded1/css.txt \
343
+ $(SRCDIR)\../skins/rounded1/footer.txt \
344
+ $(SRCDIR)\../skins/rounded1/header.txt \
345
+ $(SRCDIR)\diff.tcl
328346
329347
OBJ = $(OX)\add$O \
330348
$(OX)\allrepo$O \
331349
$(OX)\attach$O \
332350
$(OX)\bag$O \
333351
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -322,11 +322,29 @@
322 wysiwyg_.c \
323 xfer_.c \
324 xfersetup_.c \
325 zip_.c
326
327 EXTRA_FILES = $(SRCDIR)\diff.tcl
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
329 OBJ = $(OX)\add$O \
330 $(OX)\allrepo$O \
331 $(OX)\attach$O \
332 $(OX)\bag$O \
333
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -322,11 +322,29 @@
322 wysiwyg_.c \
323 xfer_.c \
324 xfersetup_.c \
325 zip_.c
326
327 EXTRA_FILES = $(SRCDIR)\../skins/black_and_white/css.txt \
328 $(SRCDIR)\../skins/black_and_white/footer.txt \
329 $(SRCDIR)\../skins/black_and_white/header.txt \
330 $(SRCDIR)\../skins/default/css.txt \
331 $(SRCDIR)\../skins/default/footer.txt \
332 $(SRCDIR)\../skins/default/header.txt \
333 $(SRCDIR)\../skins/enhanced1/css.txt \
334 $(SRCDIR)\../skins/enhanced1/footer.txt \
335 $(SRCDIR)\../skins/enhanced1/header.txt \
336 $(SRCDIR)\../skins/khaki/css.txt \
337 $(SRCDIR)\../skins/khaki/footer.txt \
338 $(SRCDIR)\../skins/khaki/header.txt \
339 $(SRCDIR)\../skins/plain_gray/css.txt \
340 $(SRCDIR)\../skins/plain_gray/footer.txt \
341 $(SRCDIR)\../skins/plain_gray/header.txt \
342 $(SRCDIR)\../skins/rounded1/css.txt \
343 $(SRCDIR)\../skins/rounded1/footer.txt \
344 $(SRCDIR)\../skins/rounded1/header.txt \
345 $(SRCDIR)\diff.tcl
346
347 OBJ = $(OX)\add$O \
348 $(OX)\allrepo$O \
349 $(OX)\attach$O \
350 $(OX)\bag$O \
351

Keyboard Shortcuts

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