417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
|
** This URL will include query parameters such as "id=" and "once&skin="
** to cause the correct stylesheet to be loaded after a skin change
** or after a change to the stylesheet.
*/
static void stylesheet_url_var(void){
char *zBuiltin; /* Auxiliary page-specific CSS page */
Blob url; /* The URL */
/* Initialize the URL to its baseline */
url = empty_blob;
blob_appendf(&url, "%R/style.css");
/* If page-specific CSS exists for the current page, then append
** the pathname for the page-specific CSS. The default CSS is
**
** /style.css
**
** But for the "/wikiedit" page (to name but one example), we
** append a path as follows:
**
** /style.css/wikiedit
**
** The /style.css page (implemented below) will detect this extra "wikiedit"
** path information and include the page-specific CSS along with the
** default CSS when it delivers the page.
*/
zBuiltin = mprintf("style.%s.css", g.zPath);
if( builtin_file(zBuiltin,0)!=0 ){
blob_appendf(&url, "/%s", g.zPath);
}
fossil_free(zBuiltin);
/* Add query parameters that will change whenever the skin changes
** or after any updates to the CSS files
*/
blob_appendf(&url, "?id=%x", skin_id("css"));
|
>
|
|
|
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
|
** This URL will include query parameters such as "id=" and "once&skin="
** to cause the correct stylesheet to be loaded after a skin change
** or after a change to the stylesheet.
*/
static void stylesheet_url_var(void){
char *zBuiltin; /* Auxiliary page-specific CSS page */
Blob url; /* The URL */
const char * zPage = local_zCurrentPage ? local_zCurrentPage : g.zPath;
/* Initialize the URL to its baseline */
url = empty_blob;
blob_appendf(&url, "%R/style.css");
/* If page-specific CSS exists for the current page, then append
** the pathname for the page-specific CSS. The default CSS is
**
** /style.css
**
** But for the "/wikiedit" page (to name but one example), we
** append a path as follows:
**
** /style.css/wikiedit
**
** The /style.css page (implemented below) will detect this extra "wikiedit"
** path information and include the page-specific CSS along with the
** default CSS when it delivers the page.
*/
zBuiltin = mprintf("style.%s.css", zPage);
if( builtin_file(zBuiltin,0)!=0 ){
blob_appendf(&url, "/%s", zPage);
}
fossil_free(zBuiltin);
/* Add query parameters that will change whenever the skin changes
** or after any updates to the CSS files
*/
blob_appendf(&url, "?id=%x", skin_id("css"));
|