Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/awk -f
- # style.awk
- # place next to status.awk
- function styleadd( _match, _newstyle ) {
- if ( style[_match] == "" ) style[ _match ] = _newstyle
- else style[ _match ] = style[ _match ] ";" _newstyle
- }
- function output_header() {
- print "Content-Type: text/css"
- print ""
- }
- function setup_style() {
- styleadd( "table th, table td", "border: 1px solid black" )
- styleadd( "table td", "-moz-border-radius: 9px" )
- styleadd( "tr.even", "background-color: #e0e0ff" )
- styleadd( "tr.odd", "background-color: #ffffff" )
- styleadd( "th", "font-family: arial" )
- styleadd( "th", "font-size: 14px" )
- styleadd( "th", "padding: 6px" )
- styleadd( "th", "font-weight: bold" )
- styleadd( "th", "background-color: #808080" )
- styleadd( "th", "color: #4f0000" )
- styleadd( "td", "padding: 2px 12px" )
- styleadd( "td:hover", "background-color: #ffff80" )
- styleadd( ".title", "" )
- styleadd( ".progress", "text-align: center" )
- }
- function output_style( _s) {
- for( _s in style ) {
- print _s " { " style[_s] " }"
- }
- }
- BEGIN {
- output_header()
- setup_style()
- output_style()
- }
Add Comment
Please, Sign In to add comment