Merge pull request #941 from roshanr95/resistor-colors-markup
Resistor Colors: Fix extra div and marginmaster
commit
a4b784001e
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
padding: 5px 15px;
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
|
|
|
@ -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 ×100</span><span class='resistor-band gold'>Gold ±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 ×100</span><span class='resistor-band gold'>Gold ±5%</span></div></div><br/><a href='http://resisto.rs/#4.7K' class='zci__more-at'>More at resisto.rs</a>"
|
||||
),
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue