dbda8d6ce9 2007-07-21 drh: /* 5cd9597428 2007-09-24 jnc: ** Copyright (c) 2006,2007 D. Richard Hipp dbda8d6ce9 2007-07-21 drh: ** dbda8d6ce9 2007-07-21 drh: ** This program is free software; you can redistribute it and/or dbda8d6ce9 2007-07-21 drh: ** modify it under the terms of the GNU General Public dbda8d6ce9 2007-07-21 drh: ** License version 2 as published by the Free Software Foundation. dbda8d6ce9 2007-07-21 drh: ** dbda8d6ce9 2007-07-21 drh: ** This program is distributed in the hope that it will be useful, dbda8d6ce9 2007-07-21 drh: ** but WITHOUT ANY WARRANTY; without even the implied warranty of dbda8d6ce9 2007-07-21 drh: ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dbda8d6ce9 2007-07-21 drh: ** General Public License for more details. dbda8d6ce9 2007-07-21 drh: ** dbda8d6ce9 2007-07-21 drh: ** You should have received a copy of the GNU General Public dbda8d6ce9 2007-07-21 drh: ** License along with this library; if not, write to the dbda8d6ce9 2007-07-21 drh: ** Free Software Foundation, Inc., 59 Temple Place - Suite 330, dbda8d6ce9 2007-07-21 drh: ** Boston, MA 02111-1307, USA. dbda8d6ce9 2007-07-21 drh: ** dbda8d6ce9 2007-07-21 drh: ** Author contact information: dbda8d6ce9 2007-07-21 drh: ** drh@hwaci.com dbda8d6ce9 2007-07-21 drh: ** http://www.hwaci.com/drh/ dbda8d6ce9 2007-07-21 drh: ** dbda8d6ce9 2007-07-21 drh: ******************************************************************************* dbda8d6ce9 2007-07-21 drh: ** dbda8d6ce9 2007-07-21 drh: ** This file contains code to implement the basic web page look and feel. dbda8d6ce9 2007-07-21 drh: ** dbda8d6ce9 2007-07-21 drh: */ dbda8d6ce9 2007-07-21 drh: #include "config.h" dbda8d6ce9 2007-07-21 drh: #include "style.h" dbda8d6ce9 2007-07-21 drh: dbda8d6ce9 2007-07-21 drh: dbda8d6ce9 2007-07-21 drh: /* dbda8d6ce9 2007-07-21 drh: ** Elements of the submenu are collected into the following dbda8d6ce9 2007-07-21 drh: ** structure and displayed below the main menu by style_header(). dbda8d6ce9 2007-07-21 drh: ** dbda8d6ce9 2007-07-21 drh: ** Populate this structure with calls to style_submenu_element() dbda8d6ce9 2007-07-21 drh: ** prior to calling style_header(). dbda8d6ce9 2007-07-21 drh: */ dbda8d6ce9 2007-07-21 drh: static struct Submenu { dbda8d6ce9 2007-07-21 drh: const char *zLabel; dbda8d6ce9 2007-07-21 drh: const char *zTitle; dbda8d6ce9 2007-07-21 drh: const char *zLink; dbda8d6ce9 2007-07-21 drh: } aSubmenu[30]; dbda8d6ce9 2007-07-21 drh: static int nSubmenu = 0; dbda8d6ce9 2007-07-21 drh: dbda8d6ce9 2007-07-21 drh: /* dcc48662f8 2008-06-08 drh: ** Remember that the header has been generated. The footer is omitted dcc48662f8 2008-06-08 drh: ** if an error occurs before the header. dcc48662f8 2008-06-08 drh: */ dcc48662f8 2008-06-08 drh: static int headerHasBeenGenerated = 0; dcc48662f8 2008-06-08 drh: dcc48662f8 2008-06-08 drh: /* dbda8d6ce9 2007-07-21 drh: ** Add a new element to the submenu dbda8d6ce9 2007-07-21 drh: */ dbda8d6ce9 2007-07-21 drh: void style_submenu_element( dbda8d6ce9 2007-07-21 drh: const char *zLabel, dbda8d6ce9 2007-07-21 drh: const char *zTitle, 5f3ddcc1b8 2007-11-25 drh: const char *zLink, 5f3ddcc1b8 2007-11-25 drh: ... dbda8d6ce9 2007-07-21 drh: ){ 5f3ddcc1b8 2007-11-25 drh: va_list ap; dbda8d6ce9 2007-07-21 drh: assert( nSubmenu < sizeof(aSubmenu)/sizeof(aSubmenu[0]) ); dbda8d6ce9 2007-07-21 drh: aSubmenu[nSubmenu].zLabel = zLabel; dbda8d6ce9 2007-07-21 drh: aSubmenu[nSubmenu].zTitle = zTitle; 5f3ddcc1b8 2007-11-25 drh: va_start(ap, zLink); 5f3ddcc1b8 2007-11-25 drh: aSubmenu[nSubmenu].zLink = vmprintf(zLink, ap); 5f3ddcc1b8 2007-11-25 drh: va_end(ap); dbda8d6ce9 2007-07-21 drh: nSubmenu++; dbda8d6ce9 2007-07-21 drh: } dbda8d6ce9 2007-07-21 drh: dbda8d6ce9 2007-07-21 drh: /* dbda8d6ce9 2007-07-21 drh: ** Compare two submenu items for sorting purposes dbda8d6ce9 2007-07-21 drh: */ dbda8d6ce9 2007-07-21 drh: static int submenuCompare(const void *a, const void *b){ dbda8d6ce9 2007-07-21 drh: const struct Submenu *A = (const struct Submenu*)a; 50a58adb76 2007-10-10 drh: const struct Submenu *B = (const struct Submenu*)b; dbda8d6ce9 2007-07-21 drh: return strcmp(A->zLabel, B->zLabel); dbda8d6ce9 2007-07-21 drh: } dbda8d6ce9 2007-07-21 drh: dbda8d6ce9 2007-07-21 drh: /* dbda8d6ce9 2007-07-21 drh: ** Draw the header. dbda8d6ce9 2007-07-21 drh: */ 55342eb9fb 2008-05-17 drh: void style_header(const char *zTitleFormat, ...){ 55342eb9fb 2008-05-17 drh: va_list ap; 55342eb9fb 2008-05-17 drh: char *zTitle; 34af72801d 2007-11-23 drh: const char *zHeader = db_get("header", (char*)zDefaultHeader); 916b6e4b3b 2007-07-21 drh: login_check_credentials(); 555911dff5 2007-11-21 drh: 55342eb9fb 2008-05-17 drh: va_start(ap, zTitleFormat); 55342eb9fb 2008-05-17 drh: zTitle = vmprintf(zTitleFormat, ap); 55342eb9fb 2008-05-17 drh: va_end(ap); 55342eb9fb 2008-05-17 drh: 6af8fdc230 2007-12-04 drh: cgi_destination(CGI_HEADER); 6af8fdc230 2007-12-04 drh: f55c6a1b62 2008-10-24 drh: if( g.thTrace ) Th_Trace("BEGIN_HEADER<br />\n", -1); f394d84560 2007-11-25 drh: 555911dff5 2007-11-21 drh: /* Generate the header up through the main menu */ fde1d82372 2008-02-13 drh: Th_Store("project_name", db_get("project-name","Unnamed Fossil Project")); fde1d82372 2008-02-13 drh: Th_Store("title", zTitle); fde1d82372 2008-02-13 drh: Th_Store("baseurl", g.zBaseURL); c7c81df138 2008-05-16 drh: Th_Store("index_page", db_get("index-page","/home")); a0f1864499 2008-05-17 drh: Th_Store("current_page", g.zPath); fde1d82372 2008-02-13 drh: Th_Store("manifest_version", MANIFEST_VERSION); fde1d82372 2008-02-13 drh: Th_Store("manifest_date", MANIFEST_DATE); 555911dff5 2007-11-21 drh: if( g.zLogin ){ fde1d82372 2008-02-13 drh: Th_Store("login", g.zLogin); dbda8d6ce9 2007-07-21 drh: } f55c6a1b62 2008-10-24 drh: if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1); ffe92f1a2f 2008-02-13 drh: Th_Render(zHeader); f55c6a1b62 2008-10-24 drh: if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1); 68c24b1857 2008-05-16 drh: Th_Unstore("title"); /* Avoid collisions with ticket field names */ 6af8fdc230 2007-12-04 drh: cgi_destination(CGI_BODY); dbda8d6ce9 2007-07-21 drh: g.cgiPanic = 1; dcc48662f8 2008-06-08 drh: headerHasBeenGenerated = 1; dbda8d6ce9 2007-07-21 drh: } dbda8d6ce9 2007-07-21 drh: dbda8d6ce9 2007-07-21 drh: /* dbda8d6ce9 2007-07-21 drh: ** Draw the footer at the bottom of the page. dbda8d6ce9 2007-07-21 drh: */ dbda8d6ce9 2007-07-21 drh: void style_footer(void){ 6af8fdc230 2007-12-04 drh: const char *zFooter; 6af8fdc230 2007-12-04 drh: dcc48662f8 2008-06-08 drh: if( !headerHasBeenGenerated ) return; 50a58adb76 2007-10-10 drh: 6af8fdc230 2007-12-04 drh: /* Go back and put the submenu at the top of the page. We delay the 6af8fdc230 2007-12-04 drh: ** creation of the submenu until the end so that we can add elements 6af8fdc230 2007-12-04 drh: ** to the submenu while generating page text. 6af8fdc230 2007-12-04 drh: */ 23ed5e2cd6 2008-07-18 eric: cgi_destination(CGI_HEADER); 555911dff5 2007-11-21 drh: if( nSubmenu>0 ){ 555911dff5 2007-11-21 drh: int i; 34af72801d 2007-11-23 drh: @ <div class="submenu"> 555911dff5 2007-11-21 drh: qsort(aSubmenu, nSubmenu, sizeof(aSubmenu[0]), submenuCompare); 555911dff5 2007-11-21 drh: for(i=0; i<nSubmenu; i++){ 555911dff5 2007-11-21 drh: struct Submenu *p = &aSubmenu[i]; 555911dff5 2007-11-21 drh: if( p->zLink==0 ){ 555911dff5 2007-11-21 drh: @ <span class="label">%h(p->zLabel)</span> 555911dff5 2007-11-21 drh: }else{ 555911dff5 2007-11-21 drh: @ <a class="label" href="%s(p->zLink)">%h(p->zLabel)</a> 555911dff5 2007-11-21 drh: } 555911dff5 2007-11-21 drh: } 555911dff5 2007-11-21 drh: @ </div> 555911dff5 2007-11-21 drh: } 34af72801d 2007-11-23 drh: @ <div class="content"> 23ed5e2cd6 2008-07-18 eric: cgi_destination(CGI_BODY); 50a58adb76 2007-10-10 drh: 6af8fdc230 2007-12-04 drh: /* Put the footer at the bottom of the page. 6af8fdc230 2007-12-04 drh: */ 249f1beaec 2009-09-21 drh: @ </div><br clear="both"></br> 6af8fdc230 2007-12-04 drh: zFooter = db_get("footer", (char*)zDefaultFooter); f55c6a1b62 2008-10-24 drh: if( g.thTrace ) Th_Trace("BEGIN_FOOTER<br />\n", -1); 3ad9a5e210 2008-02-13 drh: Th_Render(zFooter); f55c6a1b62 2008-10-24 drh: if( g.thTrace ) Th_Trace("END_FOOTER<br />\n", -1); 4f641e7e4e 2007-09-02 drh: f55c6a1b62 2008-10-24 drh: /* Render trace log if TH1 tracing is enabled. */ f55c6a1b62 2008-10-24 drh: if( g.thTrace ){ f55c6a1b62 2008-10-24 drh: cgi_append_content("<font color=\"red\"><hr>\n", -1); f55c6a1b62 2008-10-24 drh: cgi_append_content(blob_str(&g.thLog), blob_size(&g.thLog)); f55c6a1b62 2008-10-24 drh: cgi_append_content("</font>\n", -1); 4f641e7e4e 2007-09-02 drh: } 4f641e7e4e 2007-09-02 drh: } 4f641e7e4e 2007-09-02 drh: 4f641e7e4e 2007-09-02 drh: /* 83ac468aae 2009-01-24 drh: ** Begin a side-box on the right-hand side of a page. The title and 83ac468aae 2009-01-24 drh: ** the width of the box are given as arguments. The width is usually 83ac468aae 2009-01-24 drh: ** a percentage of total screen width. 5cd9597428 2007-09-24 jnc: */ 83ac468aae 2009-01-24 drh: void style_sidebox_begin(const char *zTitle, const char *zWidth){ 83ac468aae 2009-01-24 drh: @ <table width="%s(zWidth)" align="right" border="1" cellpadding=5 83ac468aae 2009-01-24 drh: @ vspace=5 hspace=5> 83ac468aae 2009-01-24 drh: @ <tr><td> 83ac468aae 2009-01-24 drh: @ <b>%h(zTitle)</b> 83ac468aae 2009-01-24 drh: } f394d84560 2007-11-25 drh: 83ac468aae 2009-01-24 drh: /* End the side-box 5cd9597428 2007-09-24 jnc: */ 83ac468aae 2009-01-24 drh: void style_sidebox_end(void){ 83ac468aae 2009-01-24 drh: @ </td></tr></table> dbda8d6ce9 2007-07-21 drh: } dbda8d6ce9 2007-07-21 drh: 34af72801d 2007-11-23 drh: /* @-comment: // */ 555911dff5 2007-11-21 drh: /* 555911dff5 2007-11-21 drh: ** The default page header. 555911dff5 2007-11-21 drh: */ 555911dff5 2007-11-21 drh: const char zDefaultHeader[] = 555911dff5 2007-11-21 drh: @ <html> 555911dff5 2007-11-21 drh: @ <head> ffe92f1a2f 2008-02-13 drh: @ <title>$<project_name>: $<title></title> 555911dff5 2007-11-21 drh: @ <link rel="alternate" type="application/rss+xml" title="RSS Feed" 3ad9a5e210 2008-02-13 drh: @ href="$baseurl/timeline.rss"> 3ad9a5e210 2008-02-13 drh: @ <link rel="stylesheet" href="$baseurl/style.css" type="text/css" 555911dff5 2007-11-21 drh: @ media="screen"> 555911dff5 2007-11-21 drh: @ </head> 555911dff5 2007-11-21 drh: @ <body> 34af72801d 2007-11-23 drh: @ <div class="header"> 34af72801d 2007-11-23 drh: @ <div class="logo"> 631c52bc96 2009-10-01 drh: @ <img src="$baseurl/logo" alt="logo"> 43481115ed 2009-09-21 drh: @ <br><nobr>$<project_name></nobr> 34af72801d 2007-11-23 drh: @ </div> ffe92f1a2f 2008-02-13 drh: @ <div class="title">$<title></div> 3ad9a5e210 2008-02-13 drh: @ <div class="status"><nobr><th1> 3ad9a5e210 2008-02-13 drh: @ if {[info exists login]} { 07f6780c98 2009-08-16 drh: @ puts "Logged in as $login" 3ad9a5e210 2008-02-13 drh: @ } else { 3ad9a5e210 2008-02-13 drh: @ puts "Not logged in" 3ad9a5e210 2008-02-13 drh: @ } 3ad9a5e210 2008-02-13 drh: @ </th1></nobr></div> 34af72801d 2007-11-23 drh: @ </div> ffe92f1a2f 2008-02-13 drh: @ <div class="mainmenu"><th1> 449094a8ff 2009-09-02 bch: @ html "<a href='$baseurl$index_page'>Home</a> " ffe92f1a2f 2008-02-13 drh: @ if {[hascap h]} { 449094a8ff 2009-09-02 bch: @ html "<a href='$baseurl/dir'>Files</a> " f08599e87b 2008-03-03 drh: @ } f08599e87b 2008-03-03 drh: @ if {[hascap o]} { 449094a8ff 2009-09-02 bch: @ html "<a href='$baseurl/leaves'>Leaves</a> " 449094a8ff 2009-09-02 bch: @ html "<a href='$baseurl/timeline'>Timeline</a> " 449094a8ff 2009-09-02 bch: @ html "<a href='$baseurl/brlist'>Branches</a> " 449094a8ff 2009-09-02 bch: @ html "<a href='$baseurl/taglist'>Tags</a> " d3e711fd2f 2008-07-15 drh: @ } d3e711fd2f 2008-07-15 drh: @ if {[hascap r]} { 449094a8ff 2009-09-02 bch: @ html "<a href='$baseurl/reportlist'>Tickets</a> " ffe92f1a2f 2008-02-13 drh: @ } ffe92f1a2f 2008-02-13 drh: @ if {[hascap j]} { 449094a8ff 2009-09-02 bch: @ html "<a href='$baseurl/wiki'>Wiki</a> " ffe92f1a2f 2008-02-13 drh: @ } ffe92f1a2f 2008-02-13 drh: @ if {[hascap s]} { 449094a8ff 2009-09-02 bch: @ html "<a href='$baseurl/setup'>Admin</a> " f8831f447a 2008-07-19 drh: @ } elseif {[hascap a]} { 449094a8ff 2009-09-02 bch: @ html "<a href='$baseurl/setup_ulist'>Users</a> " ffe92f1a2f 2008-02-13 drh: @ } ffe92f1a2f 2008-02-13 drh: @ if {[info exists login]} { 449094a8ff 2009-09-02 bch: @ html "<a href='$baseurl/login'>Logout</a> " ffe92f1a2f 2008-02-13 drh: @ } else { 449094a8ff 2009-09-02 bch: @ html "<a href='$baseurl/login'>Login</a> " ffe92f1a2f 2008-02-13 drh: @ } ffe92f1a2f 2008-02-13 drh: @ </th1></div> 34af72801d 2007-11-23 drh: ; 34af72801d 2007-11-23 drh: 34af72801d 2007-11-23 drh: /* 34af72801d 2007-11-23 drh: ** The default page footer 34af72801d 2007-11-23 drh: */ 34af72801d 2007-11-23 drh: const char zDefaultFooter[] = 34af72801d 2007-11-23 drh: @ <div class="footer"> 3ad9a5e210 2008-02-13 drh: @ Fossil version $manifest_version $manifest_date 555911dff5 2007-11-21 drh: @ </div> 34af72801d 2007-11-23 drh: @ </body></html> 555911dff5 2007-11-21 drh: ; 555911dff5 2007-11-21 drh: 8ffd32c2b7 2007-10-28 drh: /* 8ffd32c2b7 2007-10-28 drh: ** The default Cascading Style Sheet. 8ffd32c2b7 2007-10-28 drh: */ 8ffd32c2b7 2007-10-28 drh: const char zDefaultCSS[] = 34af72801d 2007-11-23 drh: @ /* General settings for the entire page */ 8ffd32c2b7 2007-10-28 drh: @ body { 34af72801d 2007-11-23 drh: @ margin: 0ex 1ex; 8ffd32c2b7 2007-10-28 drh: @ padding: 0px; 8ffd32c2b7 2007-10-28 drh: @ background-color: white; 34af72801d 2007-11-23 drh: @ font-family: "sans serif"; 34af72801d 2007-11-23 drh: @ } 34af72801d 2007-11-23 drh: @ 34af72801d 2007-11-23 drh: @ /* The project logo in the upper left-hand corner of each page */ 34af72801d 2007-11-23 drh: @ div.logo { 34af72801d 2007-11-23 drh: @ display: table-cell; 34af72801d 2007-11-23 drh: @ text-align: center; 34af72801d 2007-11-23 drh: @ vertical-align: bottom; 34af72801d 2007-11-23 drh: @ font-weight: bold; 34af72801d 2007-11-23 drh: @ color: #558195; 34af72801d 2007-11-23 drh: @ } 34af72801d 2007-11-23 drh: @ 34af72801d 2007-11-23 drh: @ /* The page title centered at the top of each page */ 34af72801d 2007-11-23 drh: @ div.title { 34af72801d 2007-11-23 drh: @ display: table-cell; 34af72801d 2007-11-23 drh: @ font-size: 2em; 8ffd32c2b7 2007-10-28 drh: @ font-weight: bold; 43481115ed 2009-09-21 drh: @ text-align: left; 43481115ed 2009-09-21 drh: @ padding: 0 0 0 1em; 34af72801d 2007-11-23 drh: @ color: #558195; 34af72801d 2007-11-23 drh: @ vertical-align: bottom; 34af72801d 2007-11-23 drh: @ width: 100%; 34af72801d 2007-11-23 drh: @ } 34af72801d 2007-11-23 drh: @ 34af72801d 2007-11-23 drh: @ /* The login status message in the top right-hand corner */ 34af72801d 2007-11-23 drh: @ div.status { 34af72801d 2007-11-23 drh: @ display: table-cell; 8ffd32c2b7 2007-10-28 drh: @ text-align: right; 34af72801d 2007-11-23 drh: @ vertical-align: bottom; 34af72801d 2007-11-23 drh: @ color: #558195; 34af72801d 2007-11-23 drh: @ font-size: 0.8em; 34af72801d 2007-11-23 drh: @ font-weight: bold; 34af72801d 2007-11-23 drh: @ } 34af72801d 2007-11-23 drh: @ 34af72801d 2007-11-23 drh: @ /* The header across the top of the page */ 34af72801d 2007-11-23 drh: @ div.header { 34af72801d 2007-11-23 drh: @ display: table; 34af72801d 2007-11-23 drh: @ width: 100%; 8ffd32c2b7 2007-10-28 drh: @ } 34af72801d 2007-11-23 drh: @ 34af72801d 2007-11-23 drh: @ /* The main menu bar that appears at the top of the page beneath 34af72801d 2007-11-23 drh: @ ** the header */ 34af72801d 2007-11-23 drh: @ div.mainmenu { 8ffd32c2b7 2007-10-28 drh: @ padding: 5px 10px 5px 10px; 8ffd32c2b7 2007-10-28 drh: @ font-size: 0.9em; 8ffd32c2b7 2007-10-28 drh: @ font-weight: bold; 8ffd32c2b7 2007-10-28 drh: @ text-align: center; 8ffd32c2b7 2007-10-28 drh: @ letter-spacing: 1px; 34af72801d 2007-11-23 drh: @ background-color: #558195; 8ffd32c2b7 2007-10-28 drh: @ color: white; 8ffd32c2b7 2007-10-28 drh: @ } 34af72801d 2007-11-23 drh: @ 34af72801d 2007-11-23 drh: @ /* The submenu bar that *sometimes* appears below the main menu */ 34af72801d 2007-11-23 drh: @ div.submenu { 8ffd32c2b7 2007-10-28 drh: @ padding: 3px 10px 3px 0px; 8ffd32c2b7 2007-10-28 drh: @ font-size: 0.9em; 8ffd32c2b7 2007-10-28 drh: @ text-align: center; 34af72801d 2007-11-23 drh: @ background-color: #456878; 8ffd32c2b7 2007-10-28 drh: @ color: white; 8ffd32c2b7 2007-10-28 drh: @ } 34af72801d 2007-11-23 drh: @ div.mainmenu a, div.mainmenu a:visited, div.submenu a, div.submenu a:visited { 8ffd32c2b7 2007-10-28 drh: @ padding: 3px 10px 3px 10px; 8ffd32c2b7 2007-10-28 drh: @ color: white; 34af72801d 2007-11-23 drh: @ text-decoration: none; 8ffd32c2b7 2007-10-28 drh: @ } 34af72801d 2007-11-23 drh: @ div.mainmenu a:hover, div.submenu a:hover { 34af72801d 2007-11-23 drh: @ color: #558195; 8ffd32c2b7 2007-10-28 drh: @ background-color: white; 8ffd32c2b7 2007-10-28 drh: @ } 34af72801d 2007-11-23 drh: @ 34af72801d 2007-11-23 drh: @ /* All page content from the bottom of the menu or submenu down to 34af72801d 2007-11-23 drh: @ ** the footer */ 34af72801d 2007-11-23 drh: @ div.content { 34af72801d 2007-11-23 drh: @ padding: 0ex 1ex 0ex 2ex; 34af72801d 2007-11-23 drh: @ } 34af72801d 2007-11-23 drh: @ 34af72801d 2007-11-23 drh: @ /* Some pages have section dividers */ 34af72801d 2007-11-23 drh: @ div.section { 34af72801d 2007-11-23 drh: @ margin-bottom: 0px; 34af72801d 2007-11-23 drh: @ margin-top: 1em; 34af72801d 2007-11-23 drh: @ padding: 1px 1px 1px 1px; 34af72801d 2007-11-23 drh: @ font-size: 1.2em; 34af72801d 2007-11-23 drh: @ font-weight: bold; 34af72801d 2007-11-23 drh: @ background-color: #558195; 34af72801d 2007-11-23 drh: @ color: white; 34af72801d 2007-11-23 drh: @ } 34af72801d 2007-11-23 drh: @ 34af72801d 2007-11-23 drh: @ /* The "Date" that occurs on the left hand side of timelines */ 34af72801d 2007-11-23 drh: @ div.divider { 34af72801d 2007-11-23 drh: @ background: #a1c4d4; 34af72801d 2007-11-23 drh: @ border: 2px #558195 solid; 34af72801d 2007-11-23 drh: @ font-size: 1em; font-weight: normal; 34af72801d 2007-11-23 drh: @ padding: .25em; 34af72801d 2007-11-23 drh: @ margin: .2em 0 .2em 0; 34af72801d 2007-11-23 drh: @ float: left; 34af72801d 2007-11-23 drh: @ clear: left; 8ffd32c2b7 2007-10-28 drh: @ } 34af72801d 2007-11-23 drh: @ 34af72801d 2007-11-23 drh: @ /* The footer at the very bottom of the page */ 34af72801d 2007-11-23 drh: @ div.footer { 8ffd32c2b7 2007-10-28 drh: @ font-size: 0.8em; 8ffd32c2b7 2007-10-28 drh: @ margin-top: 12px; 8ffd32c2b7 2007-10-28 drh: @ padding: 5px 10px 5px 10px; 8ffd32c2b7 2007-10-28 drh: @ text-align: right; 34af72801d 2007-11-23 drh: @ background-color: #558195; 8ffd32c2b7 2007-10-28 drh: @ color: white; 8ffd32c2b7 2007-10-28 drh: @ } dff17229ff 2007-12-02 drh: @ 89a2d5e899 2008-02-20 stephan: @ /* Make the links in the footer less ugly... */ 89a2d5e899 2008-02-20 stephan: @ div.footer a { color: white; } 89a2d5e899 2008-02-20 stephan: @ div.footer a:link { color: white; } 89a2d5e899 2008-02-20 stephan: @ div.footer a:visited { color: white; } 89a2d5e899 2008-02-20 stephan: @ div.footer a:hover { background-color: white; color: #558195; } 89a2d5e899 2008-02-20 stephan: @ bb542b80c7 2008-05-16 stephan: @ /* <verbatim> blocks */ bb542b80c7 2008-05-16 stephan: @ pre.verbatim { bb542b80c7 2008-05-16 stephan: @ background-color: #f5f5f5; bb542b80c7 2008-05-16 stephan: @ padding: 0.5em; bb542b80c7 2008-05-16 stephan: @} bb542b80c7 2008-05-16 stephan: @ 9be1b00392 2009-01-25 drh: @ /* The label/value pairs on (for example) the ci page */ dff17229ff 2007-12-02 drh: @ table.label-value th { 8ffd32c2b7 2007-10-28 drh: @ vertical-align: top; dff17229ff 2007-12-02 drh: @ text-align: right; dff17229ff 2007-12-02 drh: @ padding: 0.2ex 2ex; b5b04dcf85 2008-02-04 stephan: @ } b5b04dcf85 2008-02-04 stephan: @ b5b04dcf85 2008-02-04 stephan: @ /* For marking important UI elements which shouldn't be b5b04dcf85 2008-02-04 stephan: @ lightly dismissed. I mainly use it to mark "not yet b5b04dcf85 2008-02-04 stephan: @ implemented" parts of a page. Whether or not to have b5b04dcf85 2008-02-04 stephan: @ a 'border' attribute set is arguable. */ b5b04dcf85 2008-02-04 stephan: @ .achtung { b5b04dcf85 2008-02-04 stephan: @ color: #ff0000; b5b04dcf85 2008-02-04 stephan: @ background: #ffff00; b5b04dcf85 2008-02-04 stephan: @ border: 1px solid #ff0000; 8ffd32c2b7 2007-10-28 drh: @ } 0095e24ba9 2008-02-04 stephan: @ 8d529a7ae9 2008-11-26 eric: @ div.miniform { 8d529a7ae9 2008-11-26 eric: @ font-size: smaller; 8d529a7ae9 2008-11-26 eric: @ margin: 8px; 8ffd32c2b7 2007-10-28 drh: @ } 8ffd32c2b7 2007-10-28 drh: ; 5cd9597428 2007-09-24 jnc: dbda8d6ce9 2007-07-21 drh: /* 5cd9597428 2007-09-24 jnc: ** WEBPAGE: style.css dbda8d6ce9 2007-07-21 drh: */ 5cd9597428 2007-09-24 jnc: void page_style_css(void){ 8ffd32c2b7 2007-10-28 drh: char *zCSS = 0; 5cd9597428 2007-09-24 jnc: 8ffd32c2b7 2007-10-28 drh: cgi_set_content_type("text/css"); 34af72801d 2007-11-23 drh: zCSS = db_get("css",(char*)zDefaultCSS); 34af72801d 2007-11-23 drh: cgi_append_content(zCSS, -1); dbda8d6ce9 2007-07-21 drh: } dbda8d6ce9 2007-07-21 drh: dbda8d6ce9 2007-07-21 drh: /* dbda8d6ce9 2007-07-21 drh: ** WEBPAGE: test_env dbda8d6ce9 2007-07-21 drh: */ dbda8d6ce9 2007-07-21 drh: void page_test_env(void){ 66f4caa379 2007-07-23 drh: style_header("Environment Test"); 7ba10f1a6a 2009-08-31 drh: #if !defined(__MINGW32__) 7ba10f1a6a 2009-08-31 drh: @ uid=%d(getuid()), gid=%d(getgid())<br> 7ba10f1a6a 2009-08-31 drh: #endif 218577e3af 2007-10-11 drh: @ g.zBaseURL = %h(g.zBaseURL)<br> 1ce716b2ec 2007-10-11 drh: @ g.zTop = %h(g.zTop)<br> dbda8d6ce9 2007-07-21 drh: cgi_print_all(); dbda8d6ce9 2007-07-21 drh: style_footer(); dbda8d6ce9 2007-07-21 drh: }