common: development indicator optionally written in html
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 9 Jun 2015 04:17:10 +0000 (06:17 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 21 Sep 2015 22:20:08 +0000 (00:20 +0200)
Reverts hardcoded indicator in css by commit v1.4-5-g387941691e (2010-12-17)
[style: mark development version], instead outputting initial body text if
requested subdomain matches "dev".

base.css
common.inc.plp

index 55d4793af422939c13bbe9b7107e23cff63d600f..7b8586ec4d436b058e5e3eb1a2d384488434c3e8 100644 (file)
--- a/base.css
+++ b/base.css
@@ -17,12 +17,6 @@ a:active, a:hover {
 
 /* common sections */
 
 
 /* common sections */
 
-h1 {
-       background-image: -moz-repeating-linear-gradient(top left -75deg,
-               rgba(255,0,0,.5), rgba(255,0,0,0) 1ex,
-               rgba(255,0,0,0) 2ex, rgba(255,0,0,.5) 3ex
-       );
-}
 h1, h2 {
        font-size: 200%;
        margin: 0;
 h1, h2 {
        font-size: 200%;
        margin: 0;
index 879381d1e6f925b7dcf3965bfbd34c3a89683884..cabdc90923da2f1715a72175d79edea21c947cc2 100644 (file)
@@ -77,6 +77,8 @@ sub Html {
        $meta->{stylesheet} ||= [qw'light dark circus mono red terse'];
        $meta->{charset} ||= 'utf-8';
 
        $meta->{stylesheet} ||= [qw'light dark circus mono red terse'];
        $meta->{charset} ||= 'utf-8';
 
+       ref $_ eq 'ARRAY' or $_ = [$_] for $meta->{raw};
+
        # optional amends
        push @{ $meta->{raw} }, (
                '<!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->',
        # optional amends
        push @{ $meta->{raw} }, (
                '<!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->',
@@ -113,6 +115,15 @@ EOT
        print $_, "\n" for $meta->{raw} || ();
        print qq{</head>\n\n<body id="$file">\n};
 
        print $_, "\n" for $meta->{raw} || ();
        print qq{</head>\n\n<body id="$file">\n};
 
+       # dev indicator
+       printf '<p style="%s">beta</p>', join('; ',
+               'position: fixed',
+               'right: 1em',
+               'opacity: .5',
+               'border: 1ex solid red',
+               'border-width: 1ex 0',
+       ) if $ENV{HTTP_HOST} =~ /\bdev\./;
+
        # prepare trailing output
        PLP_END {
                print <<"EOT";
        # prepare trailing output
        PLP_END {
                print <<"EOT";