Changeset 10919


Ignore:
Timestamp:
2005-11-21T10:57:07+13:00 (18 years ago)
Author:
jrm21
Message:

move background-image: url() style elements into the macro file instead
of the stylesheet so that the _httpimg_ path is correct at runtime.

Also moved all css-related stuff into a new macro to make it easier to
override the css for a particular collection, by overriding the macro
_Style:cssheader_.

Location:
trunk/gsdl
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/images/style.css

    r10871 r10919  
    66}
    77
    8 body.bgimage {
    9   background-image: url("/images/chalk.gif");
    10 }
     8/* bg image set in style macro */
     9body.bgimage { }
    1110
    1211a:link { color: #006666; }
     
    5958  text-align: center;
    6059}
    61 p.bar img {
    62   text-align: center;
    63   height: 17px;
    64 }
     60
     61/* bg image set in style macro */
    6562div.navbar {
    66   text-align: center;
    6763  min-width: 500px;
    6864  white-space: nowrap;
    69   background-image: url("/images/bg_green.png");
    7065  font-family: arial;
    7166  font-size: 10pt;
     
    7368  text-align: top;
    7469  border: 0;
     70  width: 100%; /* for ns4 */
    7571}
     72
     73/* bg image set in style macro */
    7674div.divbar { /* for "select a collection" */
    77   background-image: url("/images/bg_green.png");
    7875  font-family: arial;
    7976  font-size: 10pt;
     
    8178  text-align: top;
    8279  border: 0;
     80  width: 100%; /* for ns4 */
    8381}
    8482p.navbar { /* opt navbar text inside a divbar div */
    8583  text-align: center;
    8684}
     85
     86/* bg image set in style macro */
    8787span.navlink {
    8888  vertical-align: top;
    89   background-image: url("/images/bg_off.png");
    9089  padding: 0 10px;
    91   border: 0;
    9290}
     91
     92/* bg image set in style macro */
    9393span.navlink_sel {
    9494  vertical-align: top;
    95   background-image: url("/images/bg_green.png");
    9695  padding: 0 10px;
    9796}
    98 span.navlink:hover {
    99   background-image: url("/images/bg_on.png");
    100 }
     97
     98/* bg image set in style macro */
     99span.navlink:hover { }
    101100
    102101span.navlink a {
  • trunk/gsdl/macros/html.dm

    r10872 r10919  
    5151<base target="_top">
    5252_globalscripts_
    53 <link rel="stylesheet" href="_httpimg_/style.css" type="text/css"
    54    title="Greenstone Style" charset="UTF-8">
    55 <link rel="alternate stylesheet" href="_httpimg_/style-print.css"
    56    type="text/css" title="Printer" charset="UTF-8" media="print, screen">
    57 <link rel="stylesheet" href="_httpimg_/style-print.css" type="text/css"
    58    title="Printer" charset="UTF-8" media="print">
     53
     54_Style:cssheader_
    5955</head>
    6056
  • trunk/gsdl/macros/status.dm

    r10872 r10919  
    77<head>
    88<title>_1_</title>
    9 <link rel="stylesheet" href="_httpimg_/style.css" type="text/css"
    10    title="Greenstone Style" charset="UTF-8">
     9
     10_Style:cssheader_
    1111</head>
    1212<body>
     
    2424<head>
    2525<title>_1_</title>
    26 <link rel="stylesheet" href="_httpimg_/style.css" type="text/css"
    27    title="Greenstone Style" charset="UTF-8">
     26_Style:cssheader_
    2827</head>
    2928
  • trunk/gsdl/macros/style.dm

    r10872 r10919  
    5252_cgihead_{}
    5353
     54# any declarations relating to CSS that should go in the html head part.
     55# declarations containing images are done here so the path is correct
     56# at runtime.
     57_cssheader_ {<style>
     58body.bgimage \{ background-image: url("_httpimg_/chalk.gif"); \}
     59div.navbar \{ background-image: url("/images/bg_green.png"); \}
     60div.divbar \{ background-image: url("/images/bg_green.png"); \}
     61span.navlink \{ background-image: url("/images/bg_off.png"); \}
     62span.navlink_sel \{ background-image: url("/images/bg_green.png"); \}
     63span.navlink:hover \{ background-image: url("/images/bg_on.png"); \}
     64</style>
     65
     66<link rel="stylesheet" href="_httpimg_/style.css" type="text/css"
     67   title="Greenstone Style" charset="UTF-8">
     68<link rel="alternate stylesheet" href="_httpimg_/style-print.css"
     69   type="text/css" title="Printer" charset="UTF-8" media="print, screen">
     70<link rel="stylesheet" href="_httpimg_/style-print.css" type="text/css"
     71   title="Printer" charset="UTF-8" media="print">
     72}
     73
    5474# htmlhead uses:
    5575# _1_ - extra parameters for the body tag
     
    6282<title>_pagetitle_</title>
    6383_globalscripts_
    64 <link rel="stylesheet" href="_httpimg_/style.css" type="text/css"
    65    title="Greenstone Style" charset="UTF-8">
    66 <link rel="alternate stylesheet" href="_httpimg_/style-print.css"
    67    type="text/css" title="Printer" charset="UTF-8" media="print, screen">
    68 <link rel="stylesheet" href="_httpimg_/style-print.css" type="text/css"
    69    title="Printer" charset="UTF-8" media="print">
     84_cssheader_
    7085</head>
    7186
Note: See TracChangeset for help on using the changeset viewer.