Merge pull request #520 from duckduckgo/mintsoft/private_network

Styling and HTML updates for PrivateNetwork
master
Jag Talon 2014-07-10 16:26:53 -04:00
commit ee621a7985
4 changed files with 65 additions and 41 deletions

View File

@ -19,9 +19,15 @@ attribution twitter => 'crazedpsyc',
my $text = scalar share('private_network.txt')->slurp,
my $html = scalar share('private_network.html')->slurp;
my $css = scalar share('style.css')->slurp;
sub append_css {
my $html = shift;
return "<style type='text/css'>$css</style>$html";
}
handle sub {
$text, html => $html;
$text, html => append_css($html)
};
1;

View File

@ -1,17 +1,41 @@
Private network IP addresses:
<br>IPv4 addresses (<a href="https://www.ietf.org/rfc/rfc1918.txt">rfc1918</a>):
<br>10.0.0.0 - 10.255.255.255 | 10.0.0.0/8
<br>172.16.0.0 - 172.31.255.255 | 172.16.0.0/12
<br>192.168.0.0 - 192.168.255.255 | 192.168.0.0/16
<br>
<br>Carrier NAT (<a href="https://www.ietf.org/rfc/rfc6598.txt">rfc6598</a>):
<br>100.64.0.0 - 100.127.255.255 | 100.64.0.0/10
<br>
<br>Test Networks (<a href="https://www.ietf.org/rfc/rfc5735.txt">rfc5735</a>):
<br>TEST-NET-1: 192.0.2.0 - 192.0.2.255 | 192.0.2.0/24
<br>TEST-NET-2: 198.51.100.0 - 198.51.100.255 | 198.51.100.0/24
<br>TEST-NET-3: 203.0.113.0 - 203.0.113.255 | 203.0.113.0/24
<br>Benchmarks: 198.18.0.1 - 198.19.255.255 | 198.18.0.0/15
<br>
<br>Private network IPv6 addresses (<a href="https://www.ietf.org/rfc/rfc4193.txt">rfc4193</a>):
<br>Unique local addresses: fd00::/8
<div class='private_network record'>
<table class='record__body'>
<tr class='record__row record__highlight'>
<td class="record__cell__key">
<p>IPv4 addresses (<a href="https://www.ietf.org/rfc/rfc1918.txt">rfc1918</a>):</p>
</td>
<td class="record__cell__value">
<p>10.0.0.0 - 10.255.255.255 | 10.0.0.0/8</p>
<p>172.16.0.0 - 172.31.255.255 | 172.16.0.0/12</p>
<p>192.168.0.0 - 192.168.255.255 | 192.168.0.0/16</p>
</td>
</tr>
<tr class='record__row record__highlight'>
<td class="record__cell__key">
<p>Carrier NAT (<a href="https://www.ietf.org/rfc/rfc6598.txt">rfc6598</a>):</p>
</td>
<td class="record__cell__value">
<p>100.64.0.0 - 100.127.255.255 | 100.64.0.0/10</p>
</td>
</tr>
<tr class='record__row record__highlight'>
<td class="record__cell__key">
<p>Test Networks (<a href="https://www.ietf.org/rfc/rfc5735.txt">rfc5735</a>):</p>
</td>
<td class="record__cell__value">
<p>TEST-NET-1: 192.0.2.0 - 192.0.2.255 | 192.0.2.0/24</p>
<p>TEST-NET-2: 198.51.100.0 - 198.51.100.255 | 198.51.100.0/24</p>
<p>TEST-NET-3: 203.0.113.0 - 203.0.113.255 | 203.0.113.0/24</p>
<p>Benchmarks: 198.18.0.1 - 198.19.255.255 | 198.18.0.0/15</p>
</td>
</tr>
<tr class='record__row record__highlight'>
<td class="record__cell__key">
<p>IPv6 addresses (<a href="https://www.ietf.org/rfc/rfc4193.txt">rfc4193</a>):</p>
</td>
<td class="record__cell__value">
<p>Unique local addresses: fd00::/8</p>
</td>
</tr>
</table>
</div>

View File

@ -0,0 +1,11 @@
.zci--answer .private_network .record__cell__key {
padding: 0.4em;
}
.zci--answer .private_network .record__cell__value {
padding: 0.4em;
}
.zci--answer .private_network p {
padding: 0;
}

View File

@ -30,24 +30,7 @@ Benchmarks: 198.18.0.1 - 198.19.255.255 | 198.18.0.0/15
Private network IPv6 addresses (rfc4193):
Unique local addresses: fd00::/8
',
html => 'Private network IP addresses:
<br>IPv4 addresses (<a href="https://www.ietf.org/rfc/rfc1918.txt">rfc1918</a>):
<br>10.0.0.0 - 10.255.255.255 | 10.0.0.0/8
<br>172.16.0.0 - 172.31.255.255 | 172.16.0.0/12
<br>192.168.0.0 - 192.168.255.255 | 192.168.0.0/16
<br>
<br>Carrier NAT (<a href="https://www.ietf.org/rfc/rfc6598.txt">rfc6598</a>):
<br>100.64.0.0 - 100.127.255.255 | 100.64.0.0/10
<br>
<br>Test Networks (<a href="https://www.ietf.org/rfc/rfc5735.txt">rfc5735</a>):
<br>TEST-NET-1: 192.0.2.0 - 192.0.2.255 | 192.0.2.0/24
<br>TEST-NET-2: 198.51.100.0 - 198.51.100.255 | 198.51.100.0/24
<br>TEST-NET-3: 203.0.113.0 - 203.0.113.255 | 203.0.113.0/24
<br>Benchmarks: 198.18.0.1 - 198.19.255.255 | 198.18.0.0/15
<br>
<br>Private network IPv6 addresses (<a href="https://www.ietf.org/rfc/rfc4193.txt">rfc4193</a>):
<br>Unique local addresses: fd00::/8
'
html => qr#.*#
)) } ( 'private network', 'private networks', 'private ips' )
);