echoip/index.html

81 lines
2.8 KiB
HTML
Raw Normal View History

2012-11-19 19:50:32 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
2014-01-26 21:58:16 +01:00
<title>What is my IP address? &mdash; ifconfig.co</title>
2012-11-19 19:50:32 +01:00
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2014-01-26 21:58:16 +01:00
<meta name="description" content="What is my IP address?">
2012-11-27 10:59:01 +01:00
<link href="//fonts.googleapis.com/css?family=Oswald" rel="stylesheet">
2015-09-17 20:57:27 +02:00
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/pure-min.css">
2012-11-21 14:04:43 +01:00
<style>
2012-11-25 13:30:39 +01:00
body {
font-family: "Oswald", sans-serif;
2014-01-26 21:58:16 +01:00
font-size: 12px;
2012-11-21 14:04:43 +01:00
}
2012-11-25 13:30:39 +01:00
.response {
font-family: "Monaco", "Menlo", "Consolas", "Courier New", monospace;
2014-01-26 21:58:16 +01:00
}
.content {
margin-left: auto;
margin-right: auto;
max-width: 1024px;
2012-11-21 14:04:43 +01:00
}
#wrapper {
2014-01-26 21:58:16 +01:00
margin-bottom: 10px;
2012-11-21 14:04:43 +01:00
text-align: center;
}
2016-03-06 07:10:58 +01:00
#footer {
margin-top: 10px;
text-align: center;
}
2014-01-26 21:58:16 +01:00
.ip {
border: 1px solid #cbcbcb;
background: #f2f2f2;
font-size: 36px;
}
2012-11-21 14:04:43 +01:00
</style>
2012-11-19 19:50:32 +01:00
</head>
<body>
2014-01-26 21:58:16 +01:00
<div class="content">
<div id="wrapper">
<h1>What is my IP address?</h1>
<h2>Your IP:</h2>
<p><code class="ip">{{ .IP }}</code></p>
2014-12-22 16:46:36 +01:00
<a href="?cmd=curl" class="pure-button{{ if eq .Cmd.Name "curl" }} pure-button-active pure-button-primary{{end}}">curl</a>
<a href="?cmd=wget" class="pure-button{{ if eq .Cmd.Name "wget" }} pure-button-active pure-button-primary{{end}}">wget</a>
<a href="?cmd=fetch" class="pure-button{{ if eq .Cmd.Name "fetch" }} pure-button-active pure-button-primary{{end}}">fetch</a>
2012-11-25 13:30:39 +01:00
</div>
2014-01-26 21:58:16 +01:00
<table class="pure-table pure-table-bordered pure-table-striped">
<thead>
<tr>
2014-12-22 16:46:36 +01:00
<th style="width: 350px">Command</th>
2014-01-26 21:58:16 +01:00
<th>Response</th>
</tr>
</thead>
<tbody>
<tr>
2014-12-22 16:46:36 +01:00
<td><code><span class="command">{{ .Cmd.String }}</span> ifconfig.co</code></td>
2014-01-26 21:58:16 +01:00
<td class="response">{{ .IP }}</td>
</tr>
{{ if $self := . }}
{{ range $key, $value := .Header }}
<tr>
2014-12-22 16:46:36 +01:00
<td><code><span class="command">{{ $self.Cmd.String }}</span> ifconfig.co/{{ ToLower $key }}</code></td>
2014-01-26 21:58:16 +01:00
<td class="response">{{ index $self.Header $key 0 }}</td>
</tr>
{{end}}
{{end}}
2015-09-18 17:42:43 +02:00
<td><code><span class="command">{{ .Cmd.String }}</span> ifconfig.co/all.json</code></td>
<td><pre class="response">{{ .JSON }}</pre></td>
2014-01-26 21:58:16 +01:00
</tbody>
</table>
2012-11-21 14:04:43 +01:00
</div>
2016-03-06 07:10:58 +01:00
<div id="footer">
{{ if .IsV6 }}
<a href="http://v4.ifconfig.co">IPv4 page</a>
{{end}}
</div>
2015-09-17 21:26:29 +02:00
<a href="https://github.com/martinp/ifconfigd"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
2012-11-19 19:50:32 +01:00
</body>
</html>