Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch skin5 Excluding Merge-Ins
This is equivalent to a diff from eb1513b7a9 to 6282cdf0c3
2012-09-18
| ||
21:16 | Merge the new theme to trunk. check-in: d5272ee958 user: mistachkin tags: trunk | |
05:14 | Sync up base tag in the header with those contained in the skins file. check-in: f4022040f8 user: mistachkin tags: trunk | |
05:11 | Enhance comments from the previous commit. Closed-Leaf check-in: 6282cdf0c3 user: mistachkin tags: skin5 | |
05:08 | Add a skin with enhanced handling of hyperlinks in the header and footer. check-in: 59fb15865c user: mistachkin tags: skin5 | |
03:21 | Add experimental support for copying the initial settings of a repository from another repository. check-in: e771171c68 user: mistachkin tags: newTemplate | |
00:06 | Make the default header and footer a bit more dynamic. check-in: 6cea1e4920 user: mistachkin tags: dynamicStyle | |
00:03 | Fix the <base> tag in the default header. check-in: eb1513b7a9 user: drh tags: trunk | |
2012-09-13
| ||
07:12 | re-enable unicode commandline for MSVC build (previous commit accidently removed that) <p>New version of dirent.h, which supports both MBCS and UNICODE check-in: 71d46aba2e user: jan.nijtmans tags: trunk | |
Changes to src/skins.c.
︙ | ︙ | |||
17 18 19 20 21 22 23 | ** ** Implementation of the Setup page for "skins". */ #include <assert.h> #include "config.h" #include "skins.h" | | | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ** ** Implementation of the Setup page for "skins". */ #include <assert.h> #include "config.h" #include "skins.h" /* @-comment: ## */ /* ** A black-and-white theme with the project title in a bar across the top ** and no logo image. */ static const char zBuiltinSkin1[] = @ REPLACE INTO config(name,mtime,value) @ VALUES('css',now(),'/* General settings for the entire page */ |
︙ | ︙ | |||
918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 | @ <div class="footer"> @ Fossil version $manifest_version $manifest_date @ </div> @ </body></html> @ '); ; /* ** An array of available built-in skins. */ static struct BuiltinSkin { const char *zName; const char *zValue; } aBuiltinSkin[] = { { "Default", 0 /* Filled in at runtime */ }, { "Plain Gray, No Logo", zBuiltinSkin1 }, { "Khaki, No Logo", zBuiltinSkin2 }, { "Black & White, Menu on Left", zBuiltinSkin3 }, { "Shadow boxes & Rounded Corners", zBuiltinSkin4 }, }; /* ** For a skin named zSkinName, compute the name of the CONFIG table ** entry where that skin is stored and return it. ** ** Return NULL if zSkinName is NULL or an empty string. | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 | @ <div class="footer"> @ Fossil version $manifest_version $manifest_date @ </div> @ </body></html> @ '); ; /* ** This skin is intended to be almost identical to the default one, with the ** following changes to the header and footer: ** ** 1. The logo image in the header has been modified to be a hyperlink to the ** root of the web site containing the repository using the same scheme ** (i.e. HTTP or HTTPS) as the base URL for the repository. The header ** contains a TH1 script block to help accomplish these tasks. ** ** 2. The Fossil version information in the footer has been augmented with ** hyperlinks to the corresponding points on the timeline in the official ** Fossil repository. Additionally, if the Tcl integration feature is ** enabled, the loaded version of Tcl is included, with a hyperlink to the ** official Tcl/Tk web site. The footer also contains a TH1 script block ** to help accomplish these tasks. */ static const char zBuiltinSkin5[] = @ REPLACE INTO config(name,mtime,value) @ VALUES('css',now(),'/* General settings for the entire page */ @ body { @ margin: 0ex 1ex; @ padding: 0px; @ background-color: white; @ font-family: sans-serif; @ } @ @ /* The project logo in the upper left-hand corner of each page */ @ div.logo { @ display: table-cell; @ text-align: center; @ vertical-align: bottom; @ font-weight: bold; @ color: #558195; @ min-width: 200px; @ } @ @ /* The page title centered at the top of each page */ @ div.title { @ display: table-cell; @ font-size: 2em; @ font-weight: bold; @ text-align: center; @ padding: 0 0 0 1em; @ color: #558195; @ vertical-align: bottom; @ width: 100% ; @ } @ @ /* The login status message in the top right-hand corner */ @ div.status { @ display: table-cell; @ text-align: right; @ vertical-align: bottom; @ color: #558195; @ font-size: 0.8em; @ font-weight: bold; @ min-width: 200px; @ white-space: nowrap; @ } @ @ /* The header across the top of the page */ @ div.header { @ display: table; @ width: 100% ; @ } @ @ /* The main menu bar that appears at the top of the page beneath @ ** the header */ @ div.mainmenu { @ padding: 5px 10px 5px 10px; @ font-size: 0.9em; @ font-weight: bold; @ text-align: center; @ letter-spacing: 1px; @ background-color: #558195; @ border-top-left-radius: 8px; @ border-top-right-radius: 8px; @ color: white; @ } @ @ /* The submenu bar that *sometimes* appears below the main menu */ @ div.submenu, div.sectionmenu { @ padding: 3px 10px 3px 0px; @ font-size: 0.9em; @ text-align: center; @ background-color: #456878; @ color: white; @ } @ div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited, @ div.sectionmenu>a.button:link, div.sectionmenu>a.button:visited { @ padding: 3px 10px 3px 10px; @ color: white; @ text-decoration: none; @ } @ div.mainmenu a:hover, div.submenu a:hover, div.sectionmenu>a.button:hover { @ color: #558195; @ background-color: white; @ } @ @ /* All page content from the bottom of the menu or submenu down to @ ** the footer */ @ div.content { @ padding: 0ex 1ex 1ex 1ex; @ border: solid #aaa; @ border-width: 1px; @ } @ @ /* Some pages have section dividers */ @ div.section { @ margin-bottom: 0px; @ margin-top: 1em; @ padding: 1px 1px 1px 1px; @ font-size: 1.2em; @ font-weight: bold; @ background-color: #558195; @ color: white; @ white-space: nowrap; @ } @ @ /* The "Date" that occurs on the left hand side of timelines */ @ div.divider { @ background: #a1c4d4; @ border: 2px #558195 solid; @ font-size: 1em; font-weight: normal; @ padding: .25em; @ margin: .2em 0 .2em 0; @ float: left; @ clear: left; @ white-space: nowrap; @ } @ @ /* The footer at the very bottom of the page */ @ div.footer { @ clear: both; @ font-size: 0.8em; @ padding: 5px 10px 5px 10px; @ text-align: right; @ background-color: #558195; @ border-bottom-left-radius: 8px; @ border-bottom-right-radius: 8px; @ color: white; @ } @ @ /* Hyperlink colors in the footer */ @ div.footer a { color: white; } @ div.footer a:link { color: white; } @ div.footer a:visited { color: white; } @ div.footer a:hover { background-color: white; color: #558195; } @ @ /* verbatim blocks */ @ pre.verbatim { @ background-color: #f5f5f5; @ padding: 0.5em; @} @ @ /* The label/value pairs on (for example) the ci page */ @ table.label-value th { @ vertical-align: top; @ text-align: right; @ padding: 0.2ex 2ex; @ }'); @ REPLACE INTO config(name,mtime,value) VALUES('header',now(),'<html> @ <head> @ <base href="$baseurl/$current_page" /> @ <title>$<project_name>: $<title></title> @ <link rel="alternate" type="application/rss+xml" title="RSS Feed" @ href="$home/timeline.rss" /> @ <link rel="stylesheet" href="$home/style.css?enhanced" type="text/css" @ media="screen" /> @ </head> @ <body> @ <div class="header"> @ <div class="logo"> @ <th1> @ ## @ ## NOTE: The purpose of this procedure is to take the base URL of the @ ## Fossil project and return the root of the entire web site using @ ## the same URI scheme as the base URL (e.g. http or https). @ ## @ proc getLogoUrl { baseurl } { @ set idx(first) [string first // $baseurl] @ if {$idx(first) != -1} { @ ## @ ## NOTE: Skip second slash. @ ## @ set idx(first+1) [expr {$idx(first) + 2}] @ ## @ ## NOTE: (part 1) The [string first] command does NOT actually @ ## the optional startIndex argument as specified in the @ ## TH1 support manual; therefore, we fake it by using the @ ## [string range] command and then adding the necessary @ ## offset to the resulting index manually (below). In Tcl, @ ## we could use the following instead: @ ## @ ## set idx(next) [string first / $baseurl $idx(first+1)] @ ## @ set idx(nextRange) [string range $baseurl $idx(first+1) end] @ set idx(next) [string first / $idx(nextRange)] @ if {$idx(next) != -1} { @ ## @ ## NOTE: (part 2) Add the necessary offset to the result of the @ ## search for the next slash (i.e. the one after the initial @ ## search for the two slashes). @ ## @ set idx(next) [expr {$idx(next) + $idx(first+1)}] @ ## @ ## NOTE: Back up one character from the next slash. @ ## @ set idx(next-1) [expr {$idx(next) - 1}] @ ## @ ## NOTE: Extract the URI scheme and host from the base URL. @ ## @ set scheme [string range $baseurl 0 $idx(first)] @ set host [string range $baseurl $idx(first+1) $idx(next-1)] @ ## @ ## NOTE: Try to stay in SSL mode if we are there now. @ ## @ if {[string compare $scheme http:/] == 0} { @ set scheme http:// @ } else { @ set scheme https:// @ } @ set logourl $scheme$host/ @ } else { @ set logourl $baseurl @ } @ } else { @ set logourl $baseurl @ } @ return $logourl @ } @ set logourl [getLogoUrl $baseurl] @ </th1> @ <a href="$logourl"> @ <img src="$baseurl/logo" border="0" alt="$project_name"> @ </a> @ </div> @ <div class="title"><small>$<project_name></small><br />$<title></div> @ <div class="status"><nobr><th1> @ if {[info exists login]} { @ puts "Logged in as $login" @ } else { @ puts "Not logged in" @ } @ </th1></nobr></div> @ </div> @ <div class="mainmenu"> @ <th1> @ html "<a href=''$home$index_page''>Home</a>\n" @ if {[anycap jor]} { @ html "<a href=''timeline''>Timeline</a>\n" @ } @ if {[hascap oh]} { @ html "<a href=''dir?ci=tip''>Files</a>\n" @ } @ if {[hascap o]} { @ html "<a href=''brlist''>Branches</a>\n" @ html "<a href=''taglist''>Tags</a>\n" @ } @ if {[hascap r]} { @ html "<a href=''reportlist''>Tickets</a>\n" @ } @ if {[hascap j]} { @ html "<a href=''wiki''>Wiki</a>\n" @ } @ if {[hascap s]} { @ html "<a href=''setup''>Admin</a>\n" @ } elseif {[hascap a]} { @ html "<a href=''setup_ulist''>Users</a>\n" @ } @ if {[info exists login]} { @ html "<a href=''login''>Logout</a>\n" @ } else { @ html "<a href=''login''>Login</a>\n" @ } @ </th1></div> @ '); @ REPLACE INTO config(name,mtime,value) @ VALUES('footer',now(),'<div class="footer"> @ <th1> @ proc getTclVersion {} { @ if {[catch {tclEval info patchlevel} tclVersion] == 0} { @ return "<a href=\"http://www.tcl.tk/\">Tcl</a> version $tclVersion" @ } @ return "" @ } @ proc getVersion { version } { @ set length [string length $version] @ return [string range $version 1 [expr {$length - 2}]] @ } @ set version [getVersion $manifest_version] @ set tclVersion [getTclVersion] @ set fossilUrl http://www.fossil-scm.org @ </th1> @ <a href="$fossilUrl/">Fossil</a> @ version $release_version $tclVersion @ <a href="$fossilUrl/index.html/info/$version">$manifest_version</a> @ <a href="$fossilUrl/fossil/timeline?c=$manifest_date&y=ci">$manifest_date</a> @ </div> @ </body></html> @ '); ; /* ** An array of available built-in skins. */ static struct BuiltinSkin { const char *zName; const char *zValue; } aBuiltinSkin[] = { { "Default", 0 /* Filled in at runtime */ }, { "Plain Gray, No Logo", zBuiltinSkin1 }, { "Khaki, No Logo", zBuiltinSkin2 }, { "Black & White, Menu on Left", zBuiltinSkin3 }, { "Shadow boxes & Rounded Corners", zBuiltinSkin4 }, { "Enhanced Default", zBuiltinSkin5 }, }; /* ** For a skin named zSkinName, compute the name of the CONFIG table ** entry where that skin is stored and return it. ** ** Return NULL if zSkinName is NULL or an empty string. |
︙ | ︙ |