Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 replace paragraph with dl dt dd #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 58 additions & 79 deletions src/templates/full.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,97 +15,76 @@
<div class="grid gap-16 grid-cols-1 lg:grid-cols-3">
<section class="flex flex-col gap-4">
<h2 class="text-sm text-slate-500">Network</h2>
<div class="flex flex-col gap-2">
<!-- TODO: replace with dl dt dd -->
<p>
Reverse:
<span class="text-slate-800 select-all">
{{reverse}}
</span>
</p>
<p>
CIDR:
<span class="text-slate-800 select-all">
{{whois.cidr}}
</span>
</p>
<p>
AS:
<span class="text-slate-800">
{{as.org}} (<span class="text-slate-800 select-all">{{as.asn}}</span>)
</span>
</p>
<p>
Organization:
<span class="text-slate-800">
{{whois.org}}
</span>
</p>
</div>
<dl class="flex flex-col gap-2">
<div class="flex">
<dt>Reverse:&nbsp;</dt>
<dd class="text-slate-800 select-all">{{reverse}}</dd>
</div>
<div class="flex">
<dt>CIDR:&nbsp;</dt>
<dd class="text-slate-800 select-all">{{whois.cidr}}</dd>
</div>
<div class="flex">
<dt>AS:&nbsp;</dt>
<dd class="text-slate-800">{{as.org}} (<span class="text-slate-800 select-all">{{as.asn}}</span>)</dd>
</div>
<div class="flex">
<dt>Organization:&nbsp;</dt>
<dd class="text-slate-800 select-all">{{whois.org}}</dd>
</div>
</dl>
</section>
<section class="flex flex-col gap-4">
<h2 class="text-sm text-slate-500">Geo</h2>
<div class="flex flex-col gap-2">
<p>
City:
<span class="text-slate-800">
<dl class="flex flex-col gap-2">
<div class="flex">
<dt>City:&nbsp;</dt>
<dd class="text-slate-800">
{{geo.city}}, {{geo.country}}
<span id="geo-flag" data-country="{{geo.country}}" />
</span>
</p>
<p>
Location:
<span class="text-slate-800 select-all">
</dd>
</div>
<div class="flex">
<dt>Location:&nbsp;</dt>
<dd class="text-slate-800 select-all">
{{geo.latitude}}, {{geo.longitude}}
</span>
</p>
</div>
</dd>
</div>
</dl>
</section>
<section class="flex flex-col gap-4">
<h2 class="text-sm text-slate-500">HTTP</h2>
<div class="flex flex-col gap-2">
<p>
Version:
<span class="text-slate-800">
{{http.version}}
</span>
</p>
<p>
TLS:
<span class="text-slate-800">
{{http.tls}}
</span>
</p>
<p>
User Agent:
<span class="text-slate-800 truncate max-w-[200px] inline-block align-bottom">
{{http.user_agent}}
</span>
</p>
</div>
<dl class="flex flex-col gap-2">
<div class="flex">
<dt>Version:&nbsp;</dt>
<dd class="text-slate-800">{{http.version}}</dd>
</div>
<div class="flex">
<dt>TLS:&nbsp;</dt>
<dd class="text-slate-800">{{http.tls}}</dd>
</div>
<div class="flex">
<dt>User Agent:&nbsp;</dt>
<dd class="text-slate-800 truncate max-w-[200px] inline-block align-bottom">{{http.user_agent}}</dd>
</div>
</dl>
</section>
<section class="flex flex-col gap-4">
<h2 class="text-sm text-slate-500">API</h2>
<div class="flex flex-col gap-2">
<p>
Get all (JSON):
<span class="text-slate-800 select-all font-mono">
curl myip.dev
</span>
</p>
<p>
Get IPv4 (plain text):
<span class="text-slate-800 select-all font-mono">
curl myip.dev/raw
</span>
</p>
<p>
Get IPv6 (plain text):
<span class="text-slate-800 select-all font-mono">
curl 6.myip.dev/raw
</span>
</p>
</div>
<dl class="flex flex-col gap-2">
<div class="flex">
<dt>Get all (JSON):&nbsp;</dt>
<dd class="text-slate-800 select-all font-mono">curl myip.dev</dd>
</div>
<div class="flex">
<dt>Get IPv4 (plain text):&nbsp;</dt>
<dd class="text-slate-800 select-all font-mono">curl myip.dev/raw</dd>
</div>
<div class="flex">
<dt>Get IPv6 (plain text):&nbsp;</dt>
<dd class="text-slate-800 select-all font-mono">curl 6.myip.dev/raw</dd>
</div>
</dl>
</section>
</div>
<div class="mx-auto max-w-5xl px-8">
Expand Down
86 changes: 38 additions & 48 deletions src/templates/ip.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,62 +18,52 @@
<div class="grid gap-16 grid-cols-1 lg:grid-cols-3">
<section class="flex flex-col gap-4">
<h2 class="text-sm text-slate-500">Network</h2>
<div class="flex flex-col gap-2">
<!-- TODO: replace with dl dt dd -->
<p>
Reverse:
<span class="text-slate-800 select-all">
{{reverse}}
</span>
</p>
<p>
CIDR:
<span class="text-slate-800 select-all">
{{whois.cidr}}
</span>
</p>
<p>
AS:
<span class="text-slate-800">
{{as.org}} (<span class="text-slate-800 select-all">{{as.asn}}</span>)
</span>
</p>
<p>
Organization:
<span class="text-slate-800">
{{whois.org}}
</span>
</p>
</div>
<dl class="flex flex-col gap-2">
<div class="flex">
<dt>Reverse:&nbsp;</dt>
<dd class="text-slate-800 select-all">{{reverse}}</dd>
</div>
<div class="flex">
<dt>CIDR:&nbsp;</dt>
<dd class="text-slate-800 select-all">{{whois.cidr}}</dd>
</div>
<div class="flex">
<dt>AS:&nbsp;</dt>
<dd class="text-slate-800">{{as.org}} (<span class="text-slate-800 select-all">{{as.asn}}</span>)</dd>
</div>
<div class="flex">
<dt>Organization:&nbsp;</dt>
<dd class="text-slate-800 select-all">{{whois.org}}</dd>
</div>
</dl>
</section>
<section class="flex flex-col gap-4">
<h2 class="text-sm text-slate-500">Geo</h2>
<div class="flex flex-col gap-2">
<p>
City:
<span class="text-slate-800">
<dl class="flex flex-col gap-2">
<div class="flex">
<dt>City:&nbsp;</dt>
<dd class="text-slate-800">
{{geo.city}}, {{geo.country}}
<span id="geo-flag" data-country="{{geo.country}}" />
</span>
</p>
<p>
Location:
<span class="text-slate-800 select-all">
<span id="geo-flag"
data-country="{{geo.country}}" />
</dd>
</div>
<div class="flex">
<dt>Location:&nbsp;</dt>
<dd class="text-slate-800 select-all">
{{geo.latitude}}, {{geo.longitude}}
</span>
</p>
</div>
</dd>
</div>
</dl>
</section>
<section class="flex flex-col gap-4">
<h2 class="text-sm text-slate-500">API</h2>
<div class="flex flex-col gap-2">
<p>
Get all (JSON):
<span class="text-slate-800 select-all font-mono">
curl myip.dev/{IP}
</span>
</p>
</div>
<dl class="flex flex-col gap-2">
<div class="flex">
<dt>Get all (JSON):&nbsp;</dt>
<dd class="text-slate-800 select-all font-mono">curl myip.dev/{IP}</dd>
</div>
</dl>
</section>
</div>
<div class="mx-auto max-w-5xl px-8">
Expand Down