1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
|
**
** The output from TH1 becomes the style sheet. Fossil always reports
** that the style sheet is cacheable.
*/
void page_style_css(void){
Blob css = empty_blob;
int i;
const char * zDefaults;
const char *zSkin;
cgi_set_content_type("text/css");
etag_check(0, 0);
/* Emit all default rules... */
zDefaults = (const char*)builtin_file("default.css", &i);
blob_append(&css, zDefaults, i);
/* Page-specific CSS, if any... */
page_style_css_append_page_style(&css);
zSkin = skin_in_use();
if( zSkin==0 ) zSkin = "this repository";
|
|
|
>
>
>
>
>
>
>
>
>
|
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
|
**
** The output from TH1 becomes the style sheet. Fossil always reports
** that the style sheet is cacheable.
*/
void page_style_css(void){
Blob css = empty_blob;
int i;
const char *zDefaults;
const char *zSkin;
const char *zRequestUri = P("REQUEST_URI");
const char *zScriptName = P("SCRIPT_NAME");
const char *zKey = 0;
cgi_set_content_type("text/css");
etag_check(0, 0);
if( zRequestUri && zScriptName && strlen(zScriptName)<strlen(zRequestUri) ){
zKey = zRequestUri + strlen(zScriptName);
}
if( zKey && cache_read(cgi_output_blob(), zKey) ){
g.isConst = 1;
return;
}
/* Emit all default rules... */
zDefaults = (const char*)builtin_file("default.css", &i);
blob_append(&css, zDefaults, i);
/* Page-specific CSS, if any... */
page_style_css_append_page_style(&css);
zSkin = skin_in_use();
if( zSkin==0 ) zSkin = "this repository";
|
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
|
*/
Th_Store("baseurl", g.zBaseURL);
Th_Store("secureurl", fossil_wants_https(1)? g.zHttpsURL: g.zBaseURL);
Th_Store("home", g.zTop);
image_url_var("logo");
image_url_var("background");
Th_Render(blob_str(&css));
blob_reset(&css);
/* Tell CGI that the content returned by this page is considered cacheable */
g.isConst = 1;
}
/*
|
>
|
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
|
*/
Th_Store("baseurl", g.zBaseURL);
Th_Store("secureurl", fossil_wants_https(1)? g.zHttpsURL: g.zBaseURL);
Th_Store("home", g.zTop);
image_url_var("logo");
image_url_var("background");
Th_Render(blob_str(&css));
if( zKey ) cache_write(cgi_output_blob(), zKey);
blob_reset(&css);
/* Tell CGI that the content returned by this page is considered cacheable */
g.isConst = 1;
}
/*
|