Skip to content

Commit f45873d

Browse files
committed
Tidy layout on CIDR by rearranging and adding a sub header
1 parent 08a176b commit f45873d

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

src/components/blend/IPv4Network.svelte

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ to augment IPv4 with Network and Netmask visualization
5656
}
5757
</script>
5858

59+
<small class="absolute mt-0.6">
60+
<pre class="mx-2 text-gray-400">Netmask: {renderedMask}</pre>
61+
</small>
62+
<small class="opacity-0">placeholder</small>
5963
<div class="relative">
6064
<div class="absolute w-full h-full rounded-b overflow-clip z--10">
6165
<div class="h-full bg-gray-200" style:width={`${(prefix / 32) * 100}%`} />
@@ -76,8 +80,12 @@ to augment IPv4 with Network and Netmask visualization
7680
/>
7781
</div>
7882
</div>
79-
<small class="absolute mt-0.6">
80-
<pre class="mx-2 text-gray-400">Netmask: {renderedMask}</pre>
83+
<small class="mx-2 text-gray-600 absolute mt-0.6">
84+
<pre class="inline-block text-cyan">Network:</pre>
85+
<div class="inline-block text-cyan">
86+
<PartialTransition notation={renderedNetwork} />
87+
</div>
88+
<pre class="text-gray-400 inline-block lt-xs:hidden">= Address & Netmask</pre>
8189
</small>
8290
<small class="opacity-0">placeholder</small>
8391
<Bits
@@ -92,11 +100,3 @@ to augment IPv4 with Network and Netmask visualization
92100
on:update={onUpdateForNetwork}
93101
disabledBits={~mask >>> 0}
94102
/>
95-
<small class="mx-2 text-gray-600 absolute mt-0.6">
96-
<pre class="text-gray-400 inline-block lt-xs:hidden">IP & Netmask = </pre>
97-
<pre class="inline-block text-cyan">Network:</pre>
98-
<div class="inline-block text-cyan">
99-
<PartialTransition notation={renderedNetwork} />
100-
</div>
101-
</small>
102-
<small class="opacity-0">placeholder</small>

src/components/parts/IPv4Chart.svelte

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,21 @@ Visualize various IPv4 related info
6262
<div class="flex">
6363
<div class="grow" />
6464
<div class="w-full sm:w-[94%]">
65+
<div class="text-gray-400 my-3">
66+
<span class="i-bi-bar-chart inline-block text-gray-400 translate-y-0.5" />
67+
<span class="text-gray-200">
68+
<span class="text-gray-300"> IPv4 </span>
69+
/
70+
<small>
71+
<span class="text-cyan"> Network </span>
72+
73+
/
74+
<small>
75+
<span class="text-lime-600"> Address </span>
76+
</small>
77+
</small>
78+
</span>
79+
</div>
6580
<!-- overview -->
6681
<div>
6782
<div class="flex text-center text-gray items-end text-xs lt-xs:text-[0.5rem]">

0 commit comments

Comments
 (0)