Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch dynamicStyle Excluding Merge-Ins
This is equivalent to a diff from eb1513b7a9 to 354bfe206e
2012-09-18
| ||
05:14 | Sync up base tag in the header with those contained in the skins file. check-in: f4022040f8 user: mistachkin tags: trunk | |
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:15 | Strip out TH1 comments from the header. Closed-Leaf check-in: 354bfe206e user: mistachkin tags: dynamicStyle | |
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) New version of dirent.h, which supports both MBCS and UNICODE check-in: 71d46aba2e user: jan.nijtmans tags: trunk | |
Changes to src/style.c.
308 308 309 309 /* End the side-box 310 310 */ 311 311 void style_sidebox_end(void){ 312 312 @ </div> 313 313 } 314 314 315 -/* @-comment: // */ 315 +/* @-comment: # */ 316 316 /* 317 317 ** The default page header. 318 318 */ 319 319 const char zDefaultHeader[] = 320 320 @ <html> 321 321 @ <head> 322 -@ <base href="$baseurl/$current_page"> 322 +@ <base href="$baseurl/$current_page" /> 323 323 @ <title>$<project_name>: $<title></title> 324 324 @ <link rel="alternate" type="application/rss+xml" title="RSS Feed" 325 325 @ href="$home/timeline.rss" /> 326 326 @ <link rel="stylesheet" href="$home/style.css?default" type="text/css" 327 327 @ media="screen" /> 328 328 @ </head> 329 329 @ <body> 330 330 @ <div class="header"> 331 331 @ <div class="logo"> 332 -@ <img src="$home/logo" alt="logo" /> 332 +@ <th1> 333 +@ # 334 +@ # NOTE: The purpose of this procedure is to take the base URL of the 335 +@ # Fossil project and return the root of the entire web site using 336 +@ # the same URI scheme as the base URL (e.g. http or https). 337 +@ # 338 +@ proc getLogoUrl { baseurl } { 339 +@ set idx(first) [string first // $baseurl] 340 +@ if {$idx(first) != -1} { 341 +@ set idx(first+1) [expr {$idx(first) + 2}]; # NOTE: Skip second slash. 342 +@ # 343 +@ # NOTE: (part 1) The [string first] command does NOT actually support 344 +@ # the optional startIndex argument as specified in the TH1 345 +@ # manual; therefore, we fake it by using [string range] and then 346 +@ # adding the necessary offset to the resulting index manually 347 +@ # (below). 348 +@ # 349 +@ # set idx(next) [string first / $baseurl $idx(first+1)] 350 +@ set idx(next) [string first / [string range $baseurl $idx(first+1) end]] 351 +@ if {$idx(next) != -1} { 352 +@ # 353 +@ # NOTE: (part 2) Add the necessary offset to the result of the 354 +@ # search for the next slash (i.e. the one after the initial 355 +@ # search for the two slashes). 356 +@ # 357 +@ set idx(next) [expr {$idx(next) + $idx(first+1)}] 358 +@ # 359 +@ # NOTE: Back up one character from the next slash. 360 +@ # 361 +@ set idx(next-1) [expr {$idx(next) - 1}] 362 +@ # 363 +@ # NOTE: Extract the URI scheme and host from the base URL. 364 +@ # 365 +@ set scheme [string range $baseurl 0 $idx(first)] 366 +@ set host [string range $baseurl $idx(first+1) $idx(next-1)] 367 +@ # 368 +@ # NOTE: Try to stay in SSL mode if we are there now. 369 +@ # 370 +@ if {[string compare $scheme http:/] == 0} { 371 +@ set scheme "http://" 372 +@ } else { 373 +@ set scheme "https://" 374 +@ } 375 +@ set logourl "$scheme$host/" 376 +@ } else { 377 +@ set logourl $baseurl 378 +@ } 379 +@ } else { 380 +@ set logourl $baseurl 381 +@ } 382 +@ return $logourl 383 +@ } 384 +@ set logourl [getLogoUrl $baseurl] 385 +@ </th1> 386 +@ <a href="$logourl"> 387 +@ <img src="$baseurl/logo" border="0" alt="$project_name"> 388 +@ </a> 333 389 @ </div> 334 390 @ <div class="title"><small>$<project_name></small><br />$<title></div> 335 391 @ <div class="status"><th1> 336 392 @ if {[info exists login]} { 337 393 @ puts "Logged in as $login" 338 394 @ } else { 339 395 @ puts "Not logged in" ................................................................................ 373 429 ; 374 430 375 431 /* 376 432 ** The default page footer 377 433 */ 378 434 const char zDefaultFooter[] = 379 435 @ <div class="footer"> 380 -@ Fossil version $release_version $manifest_version $manifest_date 436 +@ <th1> 437 +@ proc getTclVersion {} { 438 +@ if {[catch {tclEval info patchlevel} tclVersion] == 0} { 439 +@ return "<a href=\"http://www.tcl.tk/\">Tcl</a> version $tclVersion" 440 +@ } 441 +@ return "" 442 +@ } 443 +@ proc getVersion { version } { 444 +@ set length [string length $version] 445 +@ return [string range $version 1 [expr {$length - 2}]] 446 +@ } 447 +@ set version [getVersion $manifest_version] 448 +@ set tclVersion [getTclVersion] 449 +@ set fossilUrl http://www.fossil-scm.org 450 +@ </th1> 451 +@ <a href="$fossilUrl/">Fossil</a> 452 +@ version $release_version $tclVersion 453 +@ <a href="$fossilUrl/index.html/info/$version">$manifest_version</a> 454 +@ <a href="$fossilUrl/fossil/timeline?c=$manifest_date&y=ci">$manifest_date</a> 381 455 @ </div> 382 456 @ </body></html> 383 457 ; 384 458 385 459 /* 386 460 ** The default Cascading Style Sheet. 387 461 ** It's assembled by different strings for each class.