Made CSS if IN ADDITION to default CSS file which is now "elog.css". This way it is simpler to override settings from the default file.

This commit is contained in:
2015-06-05 14:20:51 +02:00
parent 07031f54d8
commit e7ba64e370
6 changed files with 33 additions and 628 deletions
+3 -2
View File
@@ -550,8 +550,9 @@ Admin user = bill
<b><code>CSS = &lt;filename&gt;</code></b><br>
A given theme can contain several Cascading Style Sheets (CSS). This
can be usefule if several logbooks use the same images and icons, but
differnt colors. By default, the CSS <i>default.css</i> is used. This
can be overwritten by this statement. If different CSS'es should be used
differnt colors. By default, the CSS <i>elog.css</i> is used. This
statement adds an additional CSS, which can overwrite settings from
<i>elog.css</i>. If different CSS'es should be used
for different output media, this can be accomplished with a comma-
separated list in the form
<code><b>CSS = &lt;file1&gt;&amp;&lt;media1&gt;,&lt;file2&gt;&amp;&lt;media2&gt;</b></code>. This will then be translated into separate style sheet
+25 -20
View File
@@ -7581,7 +7581,7 @@ void show_html_header(LOGBOOK * lbs, BOOL expires, char *title, BOOL close_head,
int absolute_link, int refresh)
{
int i, n;
char css[1000], str[1000], media[1000];
char css[1000], css_base[1000], str[1000], media[1000];
char css_list[MAX_N_LIST][NAME_LENGTH];
show_http_header(lbs, expires, cookie);
@@ -7603,29 +7603,34 @@ void show_html_header(LOGBOOK * lbs, BOOL expires, char *title, BOOL close_head,
/* Cascading Style Sheet */
if (absolute_link)
compose_base_url(lbs, css, sizeof(css), FALSE);
compose_base_url(lbs, css_base, sizeof(css_base), FALSE);
else
css_base[0] = 0;
rsprintf("<link rel=\"stylesheet\" type=\"text/css\" href=\"%selog.css\">\n", css_base);
if (lbs != NULL && getcfg(lbs->name, "CSS", str, sizeof(str)))
strlcpy(css, str, sizeof(css));
else if (lbs == NULL && getcfg("global", "CSS", str, sizeof(str)))
strlcpy(css, str, sizeof(css));
else
css[0] = 0;
if (lbs != NULL && getcfg(lbs->name, "CSS", str, sizeof(str)))
strlcat(css, str, sizeof(css));
else if (lbs == NULL && getcfg("global", "CSS", str, sizeof(str)))
strlcat(css, str, sizeof(css));
else
strlcat(css, "default.css", sizeof(css));
if (strchr(css, ',')) {
n = strbreak(css, css_list, MAX_N_LIST, ",", FALSE);
for (i = 0; i < n; i++) {
strlcpy(str, css_list[i], sizeof(str));
if (strchr(str, '&')) {
strlcpy(media, strchr(str, '&') + 1, sizeof(media));
*strchr(str, '&') = 0;
rsprintf("<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\" media=\"%s\">\n", str, media);
if (css[0]) {
if (strchr(css, ',')) {
n = strbreak(css, css_list, MAX_N_LIST, ",", FALSE);
for (i = 0; i < n; i++) {
strlcpy(str, css_list[i], sizeof(str));
if (strchr(str, '&')) {
strlcpy(media, strchr(str, '&') + 1, sizeof(media));
*strchr(str, '&') = 0;
rsprintf("<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\" media=\"%s\">\n", str, media);
}
}
}
} else
rsprintf("<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\">\n", css);
} else
rsprintf("<link rel=\"stylesheet\" type=\"text/css\" href=\"%s%s\">\n", css_base, css);
}
rsprintf("<link rel=\"shortcut icon\" href=\"favicon.ico\" />\n");
rsprintf("<link rel=\"icon\" href=\"favicon.png\" type=\"image/png\" />\n");
+1 -332
View File
@@ -1,391 +1,60 @@
/* default formatting */
/* compact formatting */
body {
margin:0px;
color:black;
background-color:white;
font-family:sans-serif;
/* background-image:url(elog.gif); */
}
/* standard link colors and decorations */
a:link { color:#0000FF; text-decoration:none }
a:visited { color:#800080; text-decoration:none }
a:hover { color:#0000FF; text-decoration:underline }
a:active { color:#0000FF; text-decoration:underline }
a:focus { color:#0000FF; text-decoration:underline }
td {
color:black;
font-family:sans-serif;
}
/* frame table */
.frame {
width:100%;
}
/* printable frame table */
.pframe {
width:600px;
}
/* standard formatting for logbook tabs */
.tabs {
font-family:sans-serif;
font-size:10pt;
background-color:white;
}
/* unselected and selected group tabs */
.gtab a {
background-color:#B0E0B0;
padding-left:1px;
padding-right:1px;
}
.gtab {
background-color:#B0E0B0;
border-right:1px solid #409040;
}
.sgtab a {
color:white;
padding-left:1px;
padding-right:1px;
}
.sgtab {
background-color:#486090;
color:white;
border-right:1px solid #084070;
}
.sgtab a:visited { color:white; } /* buf for IE */
/* unselected and selected logbook tabs */
.ltab a {
background-color:#E0E0E0;
padding-left:1px;
padding-right:1px;
}
.ltab {
background-color:#E0E0E0;
border-right:1px solid gray;
}
.sltab a {
background-color:#486090;
color:white;
padding-left:1px;
padding-right:1px;
}
.sltab {
background-color:#486090;
color:white;
border-right:1px solid #084070;
}
.sltab a:visited { color:white; } /* bug for IE */
/* logbook title, left, middle and right cell */
.title1 {
background-color:#486090;
border-bottom:1px solid black;
border-top:1px solid #E0E0E0;
border-left:1px solid #E0E0E0;
color:white;
font-size:medium;
font-family:sans-serif;
text-align:left;
}
.title2 {
background-color:#486090;
border-bottom:1px solid black;
border-top:1px solid #E0E0E0;
color:white;
font-size:medium;
font-family:sans-serif;
text-align:center;
}
.title3 {
border-bottom:1px solid black;
border-top:1px solid #E0E0E0;
border-right:1px solid black;
background-color:#486090;
text-align:right;
}
/* main menu row */
.menuframe {
border:1px solid #486090;
border-top:1px solid white;
border-left:1px solid white;
padding:1px;
background-color:#E0E0E0;
}
.menu1 {
text-align:left;
font-size:10pt;
}
.menu2a {
text-align:left;
font-size:10pt;
}
.menu2b {
text-align:right;
font-size:10pt;
}
.menu3 {
text-align:left;
font-size:8pt;
font-weight:bold;
}
.menu4 {
text-align:right;
font-size:10pt;
vertical-align:middle;
}
/* frame table in listings */
.listframe {
border:1px solid #0000FF;
border-top:1px solid white;
border-left:1pc solid white;
background-color:#486090;
border:0px;
}
/* title row in listing */
.listtitle {
border:1px solid #0000FF;
border-top:1px solid white;
border-left:1px solid white;
background-color:#CCCCFF;
text-align:center;
}
/* odd and even lines in message listing */
.list1 {
border:1px solid #308000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#DDEEBB;
text-align:center;
}
.list2 {
border:1px solid #808040;
border-top:1px solid white;
border-left:1px solid white;
background-color:#FFFFB0;
text-align:center;
}
.list1h {
border:1px solid #308000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#DDEEBB;
text-align:center;
font-weight:bold;
}
.list2h {
border:1px solid #808040;
border-top:1px solid white;
border-left:1px solid white;
background-color:#FFFFB0;
text-align:center;
font-weight:bold;
}
/* attachment line */
.attachment {
border:1px solid #808040;
border-top:1px solid white;
border-left:1px solid white;
background-color:#FFFFB0;
text-align:left;
}
/* threaded listing */
.thread {
border:1px solid #308000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#DDEEBB;
text-align:left;
}
.threadreply {
border:1px solid #808040;
border-top:1px solid white;
border-left:1px solid white;
background-color:#FFFFB0;
text-align:left;
}
/* attribute names and values on single message page */
.attribhead {
background-color:#E0E0A0;
border:1px solid #0000FF;
border-top:1px solid white;
border-left:1px solid white;
padding:1px;
font-size:10pt;
font-family:sans-serif;
}
.attribname {
width:150px;
background-color:#CCCCFF;
border:1px solid #0000FF;
border-top:1px solid white;
border-left:1px solid white;
padding:1px;
}
.attribvalue {
border:1px solid #308000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#DDEEBB;
padding:1px;
}
.attribvalue2 {
border:1px solid #808040;
border-top:1px solid white;
border-left:1px solid white;
background-color:#FFFFB0;
padding:1px;
}
/* message cell in listing */
.messagelist {
background-color:white;
border-right:1px solid gray;
border-left:1px solid gray;
border-bottom:1px solid gray;
font-family:'lucida console',courier,monospace;
font-size:10pt;
padding:1px;
}
/* message display in single message page */
.messageframe {
background-color:white;
border:1px solid #486090;
border-top:0px;
padding:1px;
}
.messagepre {
font-family:'lucida console',courier,monospace;
font-size:10pt;
}
/* attachment size */
.bytes {
font-family:'lucida console',courier,monospace;
font-size:10pt;
}
/* summary display (threaded mode expand) */
.summary {
border:1px solid black;
border-top:1px solid white;
border-left:1px solid white;
background-color:white;
font-family:'lucida console',courier,monospace;
font-size:8pt;
}
/* input forms */
.form1 {
border:1px solid #308000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#DDEEBB;
padding:1px;
}
.form2 {
border:1px solid #308000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#DDEEBB;
padding:1px;
}
/* error message */
.errormsg {
border:1px solid #486090;
padding:1px;
background-color:#FFB0B0;
text-align:center;
font-size:medium;
}
/* notification (warning) */
.notifymsg {
padding:1px;
border:1px solid #806000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#FFD070;
text-align:center;
font-size:small;
}
/* dialog boxes (login, delete, etc.) */
.dlgframe {
width:50%;
background-color:#486090;
border:1px solid #486090;
margin-top:2cm;
}
.dlgerror {
background-color:red;
padding:10px;
font-size:small;
text-align:center;
font-size:medium;
color:white;
}
.dlgtitle {
background-color:#486090;
color:white;
font-size:medium;
text-align:center;
padding:5px;
}
.dlgform {
background-color:#DDEEBB;
padding:5px;
}
/* ELOG home page link at bottom of page */
.bottomlink {
font-family:sans-serif;
font-size:xx-small;
}
+2 -272
View File
@@ -1,392 +1,122 @@
/* default formatting */
/* tiny formatting */
body {
margin:0px;
color:black;
background-color:white;
font-family:sans-serif;
/* background-image:url(elog.gif); */
}
/* standard link colors and decorations */
a:link { color:#0000FF; text-decoration:none }
a:visited { color:#800080; text-decoration:none }
a:hover { color:#0000FF; text-decoration:underline }
a:active { color:#0000FF; text-decoration:underline }
a:focus { color:#0000FF; text-decoration:underline }
td {
color:black;
font-family:sans-serif;
font-size:8pt;
}
/* frame table */
.frame {
width:100%;
}
/* printable frame table */
.pframe {
width:600px;
}
/* standard formatting for logbook tabs */
.tabs {
font-family:sans-serif;
font-size:8pt;
background-color:white;
}
/* unselected and selected group tabs */
.gtab a {
background-color:#B0E0B0;
padding-left:1px;
padding-right:1px;
}
.gtab {
background-color:#B0E0B0;
border-right:1px solid #409040;
}
.sgtab a {
color:white;
padding-left:1px;
padding-right:1px;
}
.sgtab {
background-color:#486090;
color:white;
border-right:1px solid #084070;
}
.sgtab a:visited { color:white; } /* buf for IE */
/* unselected and selected logbook tabs */
.ltab a {
background-color:#E0E0E0;
padding-left:1px;
padding-right:1px;
}
.ltab {
background-color:#E0E0E0;
border-right:1px solid gray;
}
.sltab a {
background-color:#486090;
color:white;
padding-left:1px;
padding-right:1px;
}
.sltab {
background-color:#486090;
color:white;
border-right:1px solid #084070;
}
.sltab a:visited { color:white; } /* bug for IE */
/* logbook title, left, middle and right cell */
.title1 {
background-color:#486090;
border-bottom:1px solid black;
border-top:1px solid #E0E0E0;
border-left:1px solid #E0E0E0;
color:white;
font-size:10pt;
font-family:sans-serif;
text-align:left;
}
.title2 {
background-color:#486090;
border-bottom:1px solid black;
border-top:1px solid #E0E0E0;
color:white;
font-size:10pt;
font-family:sans-serif;
text-align:center;
}
.title3 {
border-bottom:1px solid black;
border-top:1px solid #E0E0E0;
border-right:1px solid black;
background-color:#486090;
text-align:right;
}
/* main menu row */
.menuframe {
border:1px solid #486090;
border-top:1px solid white;
border-left:1px solid white;
padding:1px;
background-color:#E0E0E0;
font-size:10pt;
}
.menu1 {
text-align:left;
font-size:8pt;
}
.menu2a {
text-align:left;
font-size:8pt;
}
.menu2b {
text-align:right;
font-size:8pt;
}
.menu3 {
text-align:left;
font-size:8pt;
font-weight:bold;
}
.menu4 {
text-align:right;
font-size:8pt;
vertical-align:middle;
}
/* frame table in listings */
.listframe {
border:1px solid #0000FF;
border-top:1px solid white;
border-left:1pc solid white;
background-color:#486090;
border:0px;
}
/* title row in listing */
.listtitle {
border:1px solid #0000FF;
border-top:1px solid white;
border-left:1px solid white;
background-color:#CCCCFF;
text-align:center;
}
/* odd and even lines in message listing */
.list1 {
border:1px solid #308000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#DDEEBB;
text-align:center;
}
.list2 {
border:1px solid #808040;
border-top:1px solid white;
border-left:1px solid white;
background-color:#FFFFB0;
text-align:center;
}
.list1h {
border:1px solid #308000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#DDEEBB;
text-align:center;
font-weight:bold;
}
.list2h {
border:1px solid #808040;
border-top:1px solid white;
border-left:1px solid white;
background-color:#FFFFB0;
text-align:center;
font-weight:bold;
}
/* attachment line */
.attachment {
border:1px solid #808040;
border-top:1px solid white;
border-left:1px solid white;
background-color:#FFFFB0;
text-align:left;
}
/* threaded listing */
.thread {
border:1px solid #308000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#DDEEBB;
text-align:left;
}
.threadreply {
border:1px solid #808040;
border-top:1px solid white;
border-left:1px solid white;
background-color:#FFFFB0;
text-align:left;
}
/* attribute names and values on single message page */
.attribhead {
background-color:#E0E0A0;
border:1px solid #0000FF;
border-top:1px solid white;
border-left:1px solid white;
padding:1px;
font-size:8pt;
font-family:sans-serif;
}
.attribname {
width:150px;
background-color:#CCCCFF;
border:1px solid #0000FF;
border-top:1px solid white;
border-left:1px solid white;
padding:1px;
}
.attribvalue {
border:1px solid #308000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#DDEEBB;
padding:1px;
}
.attribvalue2 {
border:1px solid #808040;
border-top:1px solid white;
border-left:1px solid white;
background-color:#FFFFB0;
padding:1px;
}
/* message cell in listing */
.messagelist {
background-color:white;
border-right:1px solid gray;
border-left:1px solid gray;
border-bottom:1px solid gray;
font-family:'lucida console',courier,monospace;
font-size:8pt;
padding:1px;
}
/* message display in single message page */
.messageframe {
background-color:white;
border:1px solid #486090;
border-top:0px;
padding:1px;
}
.messagepre {
font-family:'lucida console',courier,monospace;
font-size:8pt;
}
/* attachment size */
.bytes {
font-family:'lucida console',courier,monospace;
font-size:8pt;
}
/* summary display (threaded mode expand) */
.summary {
border:1px solid black;
border-top:1px solid white;
border-left:1px solid white;
background-color:white;
font-family:'lucida console',courier,monospace;
font-size:8pt;
}
/* input forms */
.form1 {
border:1px solid #308000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#DDEEBB;
padding:1px;
}
.form2 {
border:1px solid #308000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#DDEEBB;
padding:1px;
}
/* error message */
.errormsg {
border:1px solid #486090;
padding:1px;
background-color:#FFB0B0;
text-align:center;
font-size:10pt;
}
/* notification (warning) */
.notifymsg {
padding:1px;
border:1px solid #806000;
border-top:1px solid white;
border-left:1px solid white;
background-color:#FFD070;
text-align:center;
font-size:10pt;
}
/* dialog boxes (login, delete, etc.) */
.dlgframe {
width:50%;
background-color:#486090;
border:1px solid #486090;
margin-top:2cm;
}
.dlgerror {
background-color:red;
padding:10px;
font-size:10pt;
text-align:center;
font-size:10pt;
color:white;
}
.dlgtitle {
background-color:#486090;
color:white;
font-size:10pt;
text-align:center;
padding:5px;
}
.dlgform {
background-color:#DDEEBB;
padding:5px;
}
/* ELOG home page link at bottom of page */
.bottomlink {
font-family:sans-serif;
font-size:6pt;
}
+2 -2
View File
@@ -47,7 +47,7 @@
D548630A1ACA9A9F00BA8C69 /* im.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = im.js; path = ../scripts/im.js; sourceTree = "<group>"; };
D548630B1ACA9AAB00BA8C69 /* load-ckeditor.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "load-ckeditor.js"; path = "../scripts/load-ckeditor.js"; sourceTree = "<group>"; };
D548630C1ACA9AC600BA8C69 /* elcode.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = elcode.js; path = ../scripts/elcode.js; sourceTree = "<group>"; };
D548630D1ACAEF5400BA8C69 /* default.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = default.css; path = ../themes/default/default.css; sourceTree = "<group>"; };
D57031C51B21CAF900A7C6EE /* elog.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = elog.css; path = ../themes/default/elog.css; sourceTree = "<group>"; };
D58A366615AF103300682DC0 /* elog-version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "elog-version.h"; path = "../src/elog-version.h"; sourceTree = SOURCE_ROOT; };
D5AC5BF9154AC7200018DD90 /* config.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = config.html; path = ../doc/config.html; sourceTree = SOURCE_ROOT; };
D5C8CD7A1ACC02A0008B1201 /* elogd.cfg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = elogd.cfg; path = ../../../elogdemo/elogd.cfg; sourceTree = "<group>"; };
@@ -115,8 +115,8 @@
D5F11B9013AFA146002CE8BF /* Resources */ = {
isa = PBXGroup;
children = (
D57031C51B21CAF900A7C6EE /* elog.css */,
D5C8CD7A1ACC02A0008B1201 /* elogd.cfg */,
D548630D1ACAEF5400BA8C69 /* default.css */,
D5AC5BF9154AC7200018DD90 /* config.html */,
D51F4A9214F27F3C00CB29E9 /* index.html */,
D528A7C514F278DA00D33974 /* checklist.txt */,