Merge pull request #941 from roshanr95/resistor-colors-markup

Resistor Colors: Fix extra div and margin
master
Jag Talon 2015-01-23 08:20:22 -05:00
commit a4b784001e
3 changed files with 7 additions and 7 deletions

View File

@ -132,11 +132,10 @@ sub render {
my $ohms = $formatted_value eq '1' ? 'ohm' : 'ohms';
my $text = "$formatted_value\x{2126}";
my $bands = ucfirst to_string(scalar @$digits);
my $html = "<div class='zci__body'>" .
"<div class='zci--resistor-colors'>" .
"<h3 class='zci__header'>$text</h3>" .
"<h4 class='zci__subheader'>$bands Bands</h4>" .
"<div class='zci__content'>";
my $html = "<div class='zci--resistor-colors'>" .
"<h3 class='zci__header'>$text</h3>" .
"<h4 class='zci__subheader'>$bands Bands</h4>" .
"<div class='zci__content'>";
$text .= " ($ohms) resistor colors:";
#while (my ($index, $digit) = each @$digits) {
@ -177,7 +176,7 @@ sub render {
$html .= "</div></div>"
. "<br/>"
. "<a href='http://resisto.rs/#$formatted_value' class='zci__more-at'>"
. "More at resisto.rs</a></div>";
. "More at resisto.rs</a>";
return $text, html => $html;
};

View File

@ -2,6 +2,7 @@
padding: 5px 15px;
display: inline-block;
margin-right: 5px;
margin-top: 5px;
color: #333;
}

View File

@ -95,7 +95,7 @@ ddg_goodie_test(
# Check the HTML. Just once.
"4.7k ohm" => test_zci(
"4.7K\x{2126} (ohms) resistor colors: yellow (4), purple (7), red (\x{00D7}100), gold (\x{00B1}5%)",
html => "<div class='zci__body'><div class='zci--resistor-colors'><h3 class='zci__header'>4.7K\x{2126}</h3><h4 class='zci__subheader'>Four Bands</h4><div class='zci__content'><span class='resistor-band yellow'>Yellow 4</span><span class='resistor-band purple'>Purple 7</span><span class='resistor-band red'>Red &times;100</span><span class='resistor-band gold'>Gold &plusmn;5%</span></div></div><br/><a href='http://resisto.rs/#4.7K' class='zci__more-at'>More at resisto.rs</a></div>"
html => "<div class='zci--resistor-colors'><h3 class='zci__header'>4.7K\x{2126}</h3><h4 class='zci__subheader'>Four Bands</h4><div class='zci__content'><span class='resistor-band yellow'>Yellow 4</span><span class='resistor-band purple'>Purple 7</span><span class='resistor-band red'>Red &times;100</span><span class='resistor-band gold'>Gold &plusmn;5%</span></div></div><br/><a href='http://resisto.rs/#4.7K' class='zci__more-at'>More at resisto.rs</a>"
),
);