BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} Text Based Display
On 2 Mar 00, at 9:06, Dominik Kubla <bb@bb4.com> wrote:
[text omitted]
> BTW. Has anybody ever tried to modify the mkbb scripts to use CSS1?
> I want to do this but would like to avoid reinventing the wheel...
Yes, but only on 1.3 beta (I know, I know, but I haven't had time to upgrade -
I want the new stuff, but other fires are burning brighter <sigh>). When I get
a chance to upgrade to the latest version I hope to clean up my changes and
make a real patch out of 'em. (In my spare time, of course. :) )
Anyroad, if you don't mind some half-done stuff, here's the style sheet that
I'm using:
--snip--[ bb/www/bb.css ]--snip--
/* Style sheet for Big Brother pages. */
/* Original styles from bb_header: */
A:link {text-decoration: none}
A:visited{text-decoration:none}
A:active{text-decoration:none}
/* Table background colors. Use a color name or #RGB or #RRGGBB format to
specify the color; see http://www.w3.org/TR/REC-CSS1#color-units
for a list of color names and other details. */
TD.green { background-color: lime }
TD.yellow { background-color: yellow }
TD.red { background-color: red }
TD.purple { background-color: #f0f }
.groupname { color: ivory; font-size: 100%; background-color: black }
.testname { color: teal; font-size: 70%; background-color: black }
.macname { color: #FFFFFF; font-size: 90%; background-color: black;
font-family: Helvetica, Tahoma, Arial}
.update {color: silver; font-size:130%; background-color: black;
font-family: Arial, Helvetica }
.key {color: silver; background-color: black;
font-family: Arial, Helvetica }
--snip--[ ]--snip--
I added this line inside the HEAD element in bb_header and bb2_header:
<LINK REL=STYLESHEET TYPE="text/css" HREF="bb.css" TITLE="bb.css">
Then I added CLASS attributes to the TD tags in mkbb.sh and mkbb2.sh. The most
important change:
--snip--[ mkbb.sh ]--snip--
# FOR EACH OF THE THINGS WE MONITOR...
for column in $COLMNS
do
if test -f "$BBLOGS/${NAME}.${column}"
then
set `${CAT} ${BBLOGS}/${NAME}.${column}` >/dev/null 2>&1
if [ -d "$BBHOME/www/html" ]
then
echo "<TD ALIGN=CENTER CLASS=\"$1\"><A HREF=\"html/${FNAME}.${column}.html\">
<IMG SRC=\"gifs/$1.gif\" ALT=\"${column}:$1\" HEIGHT=16 WIDTH=16 BORDER=0></A></TD>"
else
echo "<TD ALIGN=CENTER CLASS=\"$1\"><A HREF=\"logs/${NAME}.${column}\">
<IMG SRC=\"gifs/$1.gif\" ALT=\"${column}:$1\" HEIGHT=16 WIDTH=16 BORDER=0></A></TD>"
fi
else
echo "<TD ALIGN=CENTER>-</TD>"
fi
done
--snip--[ ]--snip--
The above change makes the colors really stand out, even across a room; in
particular, the green diamonds look really sharp on a lime background. YMMV -
and the great thing is that you only need to change the style sheet to make a
change. (CSS is cool!)
I made most of the changes using CLASS selectors; IMHO this is more logical,
and it seems to work on most browsers. (I've tried Netscape 4.5, IE, Amaya,
and Opera. Oh, and Lynx, but somehow the colors didn't quite make it through.
:D )
--
Rick Owens <rowens@fvcc.cc.mt.us> | FVCC, Kalispell, MT, USA, Sol 3
#include <std-disclaim.h>
C Error #030: tisk, tisk, tisk
--
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.
Home |
Main Index |
Thread Index