add CSS styles for Lowercase Goodie
parent
f9c3c07aa2
commit
6c93e44809
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue