summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2025-05-23 22:01:18 +0200
committerYuval Adam <_@yuv.al>2025-05-23 22:01:18 +0200
commit4fcc5fd603c249d480670878837411c99955144f (patch)
tree92e8e9b305daf770fa66e9c039683f908e28d092
parentb21e842345843fa4e06a8f09558d6ed2c3b6395e (diff)
Fix prose pages
-rw-r--r--src/components/Prose.astro31
-rw-r--r--src/content/cidr-guide.md32
-rw-r--r--src/content/privacy-policy.md2
-rw-r--r--src/pages/privacy-policy.astro5
-rw-r--r--src/pages/subnet-guide.astro5
5 files changed, 21 insertions, 54 deletions
diff --git a/src/components/Prose.astro b/src/components/Prose.astro
deleted file mode 100644
index e7aeed1..0000000
--- a/src/components/Prose.astro
+++ /dev/null
@@ -1,31 +0,0 @@
----
-// Prose component for styling markdown content
----
-
-<div
- class="prose prose-lg prose-custom max-w-none mx-auto px-4 sm:px-6 lg:px-8 py-8
- prose-headings:font-bold prose-headings:text-gray-900 prose-headings:mb-4 prose-headings:mt-8
- prose-h1:text-4xl prose-h1:mt-0
- prose-h2:text-2xl prose-h2:pb-2
- prose-h3:text-xl
- prose-p:text-gray-900 prose-p:my-4 prose-p:leading-relaxed
- prose-a:text-blue-600 prose-a:font-medium prose-a:no-underline hover:prose-a:underline
- prose-strong:font-bold prose-strong:text-gray-900
- prose-ul:my-6 prose-ul:list-disc prose-ul:pl-6
- prose-ol:my-6 prose-ol:list-decimal prose-ol:pl-6
- prose-li:my-2 prose-li:text-gray-900
- prose-blockquote:border-l-4 prose-blockquote:border-blue-500 prose-blockquote:pl-4 prose-blockquote:py-3 prose-blockquote:my-6 prose-blockquote:bg-blue-50 prose-blockquote:rounded-md
- prose-blockquote:text-gray-900 prose-blockquote:font-normal prose-blockquote:before:content-none prose-blockquote:after:content-none
- prose-img:rounded-lg prose-img:shadow-md prose-img:my-8
- prose-hr:hidden
- prose-code:font-mono prose-code:text-blue-700 prose-code:bg-blue-50 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:text-sm prose-code:border prose-code:border-blue-100
- prose-pre:bg-gray-800 prose-pre:border prose-pre:border-gray-700 prose-pre:p-4 prose-pre:rounded-lg prose-pre:overflow-x-auto prose-pre:my-6
- prose-pre:shadow-sm prose-pre:text-sm prose-pre:text-gray-300
- [&_pre_code]:text-gray-300 [&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:border-0
- dark:prose-invert
- dark:prose-pre:bg-gray-800 dark:prose-pre:border-gray-700
- dark:prose-code:bg-gray-700 dark:prose-code:border-gray-600 dark:prose-code:text-blue-300
- dark:prose-blockquote:bg-gray-800 dark:prose-blockquote:text-gray-300 dark:prose-blockquote:border-blue-700"
->
- <slot />
-</div>
diff --git a/src/content/cidr-guide.md b/src/content/cidr-guide.md
index 1ba0da7..93e6186 100644
--- a/src/content/cidr-guide.md
+++ b/src/content/cidr-guide.md
@@ -1,21 +1,25 @@
+---
+title: "Subnet Guide — IP Ranges and Masks"
+description:
+ "Free interactive CIDR calculator and comprehensive guide covering subnetting, IP ranges, subnet masks and addressing."
+---
+
## What is CIDR?
**Classless Inter-Domain Routing (CIDR)** is the system that replaced the old class-A/B/C scheme in 1993.
A network is written as
```
-address/prefix-length → 10.0.0.0/24
+address/prefix-length → 10.0.0.0/24
```
The *prefix length* (the number after the slash) tells routers how many of the 32 bits belong to the network portion:
-* `10.0.0.0/24`  → 24 network bits + 8 host bits → **256** addresses (254 usable)
-* `10.0.0.0/30`  → 30 network bits + 2 host bits → **4** addresses (2 usable)
+* `10.0.0.0/24` → 24 network bits + 8 host bits → **256** addresses (254 usable)
+* `10.0.0.0/30` → 30 network bits + 2 host bits → **4** addresses (2 usable)
CIDR lets ISPs advertise aggregated “supernets” such as `203.0.113.0/22` instead of listing a thousand individual /24 routes—shrinking global routing tables and conserving address space.
----
-
## CIDR → IP Range Converter
Paste any block—say `192.168.15.64/27`—into the calculator. Behind the scenes it:
@@ -26,8 +30,6 @@ Paste any block—say `192.168.15.64/27`—into the calculator. Behind the scene
Hit **Copy Share Link** to bookmark or send an exact result.
----
-
## Subnetting Tutorial — Quick Steps
Subnetting seems daunting until you break it into four predictable moves:
@@ -37,13 +39,15 @@ Subnetting seems daunting until you break it into four predictable moves:
3. **List subnet starts** 0, 64, 128, 192
4. **Pick your block** Usable hosts = block size − 2 (62 in a /26)
-> **Example**
-> Split `172.16.0.0/16` into at least 10 equal subnets.
-> *Need ≥10 blocks → 4 extra bits (2⁴ = 16)*
-> New prefix = **/20**. Each /20 holds 4094 hosts.
-> Ranges begin 172.16.0.0, 172.16.16.0, 172.16.32.0 … to 172.16.240.0.
+### Example
----
+Split `172.16.0.0/16` into at least 10 equal subnets.
+
+*Need ≥10 blocks → 4 extra bits (2⁴ = 16)*
+
+New prefix = **/20**. Each /20 holds 4094 hosts.
+
+Ranges begin 172.16.0.0, 172.16.16.0, 172.16.32.0 … to 172.16.240.0.
## IPv6 Subnetting Basics
@@ -58,8 +62,6 @@ The slash notation is identical in IPv6—just with 128-bit addresses.
Toggle **IPv6** in the calculator and try `2001:db8::/48` to explore the range graphically.
----
-
## Further Reading & Tools
* RFC 4632 — *Classless Inter-Domain Routing for IPv6*
diff --git a/src/content/privacy-policy.md b/src/content/privacy-policy.md
index 3ed61e8..d680587 100644
--- a/src/content/privacy-policy.md
+++ b/src/content/privacy-policy.md
@@ -30,6 +30,4 @@ Since we collect no personal information, we have no personal data to access, mo
Questions about this policy? Contact us at: [hello@magicmonad.com](mailto:hello@magicmonad.com).
----
-
*This policy applies to cidr.xyz and is effective as of 2025-05-22.* \ No newline at end of file
diff --git a/src/pages/privacy-policy.astro b/src/pages/privacy-policy.astro
index 669f107..b78b631 100644
--- a/src/pages/privacy-policy.astro
+++ b/src/pages/privacy-policy.astro
@@ -1,6 +1,5 @@
---
import Layout from "../layouts/Layout.astro";
-import Prose from "../components/Prose.astro";
const title = "Privacy Policy | CIDR.xyz";
const description = "Privacy policy for CIDR.xyz";
@@ -9,7 +8,7 @@ import { Content as PrivacyPolicyContent } from "../content/privacy-policy.md";
---
<Layout title={title} description={description}>
- <Prose>
+ <article class="prose prose-lg mx-auto">
<PrivacyPolicyContent />
- </Prose>
+ </article>
</Layout>
diff --git a/src/pages/subnet-guide.astro b/src/pages/subnet-guide.astro
index 5f0c42c..9a4a949 100644
--- a/src/pages/subnet-guide.astro
+++ b/src/pages/subnet-guide.astro
@@ -1,7 +1,6 @@
---
import Layout from "../layouts/Layout.astro";
import Cidr from "../components/Cidr";
-import Prose from "../components/Prose.astro";
const title = "Subnet Guide — IP Ranges and Masks";
const description =
@@ -29,7 +28,7 @@ import { Content as GuideContent } from "../content/cidr-guide.md";
<Cidr client:load />
</section>
- <Prose>
+ <article class="prose prose-lg mx-auto">
<GuideContent />
- </Prose>
+ </article>
</Layout>