add CSS styles for Lowercase Goodie

master
Zaahir Moolla 2014-07-23 17:31:06 -04:00
parent f9c3c07aa2
commit 6c93e44809
2 changed files with 21 additions and 1 deletions

View File

@ -16,8 +16,21 @@ zci answer_type => "lowercase";
triggers start => 'lowercase', 'lower case', 'lc', 'strtolower', 'tolower';
my $css = share("style.css")->slurp();
sub append_css {
my $html = shift;
return "<style type='text/css'>$css</style>\n" . $html;
};
handle remainder => sub {
return lc $_ if $_;
return unless $_;
my $lower = lc $_;
my $text = "$lower";
my $html = qq(<div class="zci--lowercase"><span class="text--primary">$lower</span></div>);
$html = append_css($html);
return $text, html => $html;
return;
};

View File

@ -0,0 +1,7 @@
.zci--answer .zci--lowercase {
padding-top: 0.25em;
padding-bottom: 0.25em;
font-weight: 300;
font-size: 1.5em;
word-wrap:break-word;
}