echoip/index.html

67 lines
2.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>What is my IP address &mdash; ifconfig.co</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Lookup my IP address">
<link href="http://fonts.googleapis.com/css?family=Oswald" rel="stylesheet" type="text/css">
<link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<style>
body {
font-family: "Oswald", sans-serif;
}
.response {
font-family: "Monaco", "Menlo", "Consolas", "Courier New", monospace;
font-size: 12px;
}
#wrapper {
margin: 0 auto;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div id="wrapper">
<h1>What is my IP address?</h1>
<p>Your IP address is:</p>
<h2>{{ .IP }}</h2>
</div>
</div>
<div class="row">
<div class="span12">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="span4">Command</th>
<th>Response</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>curl ifconfig.co</code></td>
<td class="response">{{ .IP }}</td>
</tr>
<tr>
<td><code>curl ifconfig.co/port</code></td>
<td class="response">{{ .Port }}</td>
</tr>
{{ if $self := . }}
{{ range $key, $value := .Header }}
<tr>
<td><code>curl ifconfig.co/{{ ToLower $key }}</code></td>
<td class="response">{{ index $self.Header $key }}
</tr>
{{end}}
{{end}}
</tbody>
</table>
</div>
</div>
</div>
<a href="https://github.com/martinp/ifconfig"><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>
</body>
</html>