Ticket UUID: | 993287b389d78384ca1ab16641e08885f04b898a | ||
Title: | Patch to allow sidebox to be skinable. | ||
Status: | Open | Type: | Feature_Request |
Severity: | Cosmetic | Priority: | |
Subsystem: | Resolution: | ||
Last Modified: | 2010-02-16 19:44:24 | ||
Version Found In: | 94bb313444 | ||
Description & Comments: | |||
Small patch, of many I hope, to make more of fossil 'skinable'
This patch renames the sidebox object -> infobox, to make it more useable elsewhere, and applies some css to the default skins to emulate current look and feel. Only tested against Firefox 3.5 and IE8. Patch generated against [94bb313444] Index: src/branch.c =================================================================== --- src/branch.c +++ src/branch.c @@ -229,11 +230,11 @@ style_header("Branches"); style_submenu_element("Timeline", "Timeline", "brtimeline"); login_anonymous_available(); compute_leaves(0, 1); - style_sidebox_begin("Nomenclature:", "33%"); + style_infobox_begin("Nomenclature:"); @ <ol> @ <li> An <b>open branch</b> is a branch that has one or @ more <a href="leaves">open leaves.</a> @ The presence of open leaves presumably means @ that the branch is still being extended with new check-ins.</li> @@ -240,11 +241,11 @@ @ <li> A <b>closed branch</b> is a branch with only @ <a href="leaves?closed">closed leaves</a>. @ Closed branches are fixed and do not change (unless they are first @ reopened)</li> @ </ol> - style_sidebox_end(); + style_infobox_end(); db_prepare(&q, "SELECT DISTINCT value FROM tagxref" " WHERE tagid=%d AND value NOT NULL" " AND rid IN leaves" Index: src/descendants.c =================================================================== --- src/descendants.c +++ src/descendants.c @@ -322,19 +322,19 @@ style_submenu_element("Open", "Open", "leaves"); } style_header("Leaves"); login_anonymous_available(); compute_leaves(0, showAll ? 0 : showClosed ? 2 : 1); - style_sidebox_begin("Nomenclature:", "33%"); + style_infobox_begin("Nomenclature:"); @ <ol> @ <li> A <b>leaf</b> is a check-in with no descendants.</li> @ <li> An <b>open leaf</b> is a leaf that does not have a "closed" tag @ and is thus assumed to still be in use.</li> @ <li> A <b>closed leaf</b> has a "closed" tag and is thus assumed to @ be historical and no longer in active use.</li> @ </ol> - style_sidebox_end(); + style_infobox_end(); if( showAll ){ @ <h1>All leaves, both open and closed:</h1> }else if( showClosed ){ @ <h1>Closed leaves:</h1> Index: src/skins.c =================================================================== --- src/skins.c +++ src/skins.c @@ -156,11 +156,19 @@ @ /* The label/value pairs on (for example) the vinfo page */ @ table.label-value th { @ vertical-align: top; @ text-align: right; @ padding: 0.2ex 2ex; -@ }'); +@ } +@ +@ /* Information/instruction boxes */ +@ table.infoBox { +@ border:2px solid #606060; +@ float:right; +@ width:33%; +@ } +@'); @ REPLACE INTO config VALUES('header','<html> @ <head> @ <title>$<project_name>: $<title></title> @ <link rel="alternate" type="application/rss+xml" title="RSS Feed" @ href="$baseurl/timeline.rss"> @@ -361,11 +369,18 @@ @ table.label-value th { @ vertical-align: top; @ text-align: right; @ padding: 0.2ex 2ex; @ } -@ '); +@ +@ /* Information/instruction boxes */ +@ table.infoBox { +@ border:2px solid #a09048; +@ float:right; +@ width:33%; +@ } +@'); @ REPLACE INTO config VALUES('header','<html> @ <head> @ <title>$<project_name>: $<title></title> @ <link rel="alternate" type="application/rss+xml" title="RSS Feed" @ href="$baseurl/timeline.rss"> @@ -594,11 +609,19 @@ @ /* The label/value pairs on (for example) the ci page */ @ table.label-value th { @ vertical-align: top; @ text-align: right; @ padding: 0.2ex 2ex; -@ }'); +@ } +@ +@ /* Information/instruction boxes */ +@ table.infoBox { +@ border:2px solid #eeeeee; +@ float:right; +@ width:33%; +@ } +@'); @ REPLACE INTO config VALUES('header','<html> @ <head> @ <title>$<project_name>: $<title></title> @ <link rel="alternate" type="application/rss+xml" title="RSS Feed" @ href="$baseurl/timeline.rss"> Index: src/style.c =================================================================== --- src/style.c +++ src/style.c @@ -158,24 +158,22 @@ cgi_append_content("</font>\n", -1); } } /* -** Begin a side-box on the right-hand side of a page. The title and -** the width of the box are given as arguments. The width is usually -** a percentage of total screen width. +** Begin a side-box on the right-hand side of a page. The title +** of the box is given as arguments. */ -void style_sidebox_begin(const char *zTitle, const char *zWidth){ - @ <table width="%s(zWidth)" align="right" border="1" cellpadding=5 - @ vspace=5 hspace=5> +void style_infobox_begin(const char *zTitle){ + @ <table class="infoBox"> @ <tr><td> @ <b>%h(zTitle)</b> } /* End the side-box */ -void style_sidebox_end(void){ +void style_infobox_end(void){ @ </td></tr></table> } /* @-comment: // */ /* @@ -379,10 +377,15 @@ @ /* The label/value pairs on (for example) the ci page */ @ table.label-value th { @ vertical-align: top; @ text-align: right; @ padding: 0.2ex 2ex; +@ } +@ +@ /* Info box */ +@ table.infoBox { +@ width:33%; @ } ; /* ** WEBPAGE: style.css |