2007-11-13 Black and White

So now I’ve done away with the “real” logo. Clicking on the logo no longer takes you to the Diary. I never used that functionality anyway. The logo now switches between the normal color theme and a black and white theme using blue, underlined links. As standard as can be. :)

push(@MyInitVariables, \&LogoBar);

sub LogoBar {
  $InvisibleCookieParameters{theme} = 1;
  my $id = GetId();
  $id = $RCName if GetParam('action', 'browse') eq 'rc';
  $id = $HomePage unless $id;
  my $url = $ScriptName . '/' . $id;
  my $css = GetParam('css', $StyleSheet);
  my $text;
  my $pic;
  if (GetParam('theme', //) eq //) {
    # default: offer to switch to black-and-white                                                                          
    $url .= "?theme=bw";
    $text = 'black and white';
    $pic = '/pics/alex.png';
  } else {
    $url .= "?theme=";
    $text = 'default color';
    $pic = '/alex/pics/alex-face-balcony-small.jpg';
  }
  # $url .= ';css=' if $css;                                                                                               
  $UserGotoBar .= qq {                                                                                                      
<a class="logo" href="$url" title="Switch to $text theme">                                                                 
  <img class="logo" src="$pic" />                                                                                          
</a>                                                                                                                       
};

And for the CSS:

@import "/css/beige-red.css";

body.bw {
    color: black;
    background-color: white;
}

body.bw h1, body.bw h2, body.bw h3,
body.bw h1 a, body.bw h2 a, body.bw h3 a,
body.bw div.journal h1, body.bw div.journal h2, body.bw div.journal h3,
body.bw a.number {
    color: inherit;
    text-decoration: none;
}

body.bw a {
    color: blue;
    text-decoration: underline;
}

div.footer a.logo {
    display: none;
}

Tags:

Comments

Sounds like an Easter Egg. :)

AaronHawley 2007-11-13 15:38 UTC


Totally. :)

AlexSchroeder 2007-11-13 17:35 UTC


Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

To save this page you must answer this question:

Please say HELLO.