From d47b3ccf615639ee7c83a7be10aaa581e5a934e1 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Thu, 22 May 2025 13:13:14 +0200 Subject: Add embed page and more cleanup --- src/pages/embed-example.astro | 66 ---------------------------------- src/pages/embed-widget.astro | 84 +++++++++++++++++++++++++++++++++++++++++++ src/pages/embed.astro | 31 ++++++++-------- src/pages/subnet-guide.astro | 2 +- 4 files changed, 100 insertions(+), 83 deletions(-) delete mode 100644 src/pages/embed-example.astro create mode 100644 src/pages/embed-widget.astro (limited to 'src/pages') diff --git a/src/pages/embed-example.astro b/src/pages/embed-example.astro deleted file mode 100644 index f66feab..0000000 --- a/src/pages/embed-example.astro +++ /dev/null @@ -1,66 +0,0 @@ ---- -import Layout from "../layouts/Layout.astro"; - -const title = "CIDR Calculator Widget Embed Example"; -const description = "Learn how to embed the CIDR calculator widget in your website"; ---- - - -

- CIDR Calculator Widget -

-

- Embed the CIDR Calculator in your website -

- -
-

- You can embed the CIDR calculator widget in your website or application using an iframe. - Copy the code below and adjust the width and height as needed: -

- -
<iframe 
-  src="https://cidr.xyz/embed" 
-  width="100%" 
-  height="600" 
-  frameborder="0" 
-  allowtransparency="true"
-  title="CIDR Calculator"
-  loading="lazy"
-></iframe>
- -

Live Example

-

Here's how the embedded widget looks:

-
- -
- -
- -
-

Customization

-

- The widget adapts to the width of its container. For best results: -

- - -

Usage Notes

- -
-
diff --git a/src/pages/embed-widget.astro b/src/pages/embed-widget.astro new file mode 100644 index 0000000..eafed9e --- /dev/null +++ b/src/pages/embed-widget.astro @@ -0,0 +1,84 @@ +--- +import Layout from "../layouts/Layout.astro"; + +const title = "CIDR Calculator Widget Embed Example"; +const description = + "Learn how to embed the CIDR calculator widget in your website"; +--- + + +
+
+

+ CIDR Calculator Widget +

+

+ Embed the CIDR Calculator in your website +

+
+
+ +
+

+ You can embed the CIDR calculator widget in your website or + application using an iframe. Copy the code below and adjust the + width and height as needed: +

+ +
<iframe 
+  src="https://cidr.xyz/embed" 
+  width="100%" height="600" 
+  frameborder="0" 
+  allowtransparency="true"
+  title="CIDR Calculator"
+  loading="lazy"
+></iframe>
+ +

Live Example

+
+ +
+ +
+ +
+

Customization

+

+ The widget adapts to the width of its container. For best results: +

+ + +

Usage Notes

+ +
+
diff --git a/src/pages/embed.astro b/src/pages/embed.astro index 3496287..f924445 100644 --- a/src/pages/embed.astro +++ b/src/pages/embed.astro @@ -3,10 +3,11 @@ import Cidr from "../components/Cidr"; import { GOOGLE_ANALYTICS_ID } from "../config"; const title = "CIDR Calculator Widget"; -const description = "Embeddable CIDR calculator widget for network calculations"; +const description = + "Embeddable CIDR calculator widget for network calculations"; --- - + @@ -29,17 +30,12 @@ const description = "Embeddable CIDR calculator widget for network calculations" background: transparent; overflow: hidden; } - .embed-container { - width: 100%; - height: 100%; - background-color: rgba(255, 255, 255, 0.9); - border-radius: 8px; - padding: 10px; - box-sizing: border-box; - } - + -
- +
+
diff --git a/src/pages/subnet-guide.astro b/src/pages/subnet-guide.astro index 9a0d67f..cbe3d65 100644 --- a/src/pages/subnet-guide.astro +++ b/src/pages/subnet-guide.astro @@ -35,7 +35,7 @@ import { Content as GuideContent } from "../content/cidr-guide.md";

Convert CIDR blocks to IP ranges and master subnetting for IPv4 - & IPv6 — in one streamlined resource. + — in one streamlined resource.

-- cgit v1.3.1