diff --git a/src/lib/components/BurgerMenu.svelte b/src/lib/components/BurgerMenu.svelte new file mode 100644 index 0000000..68a03ff --- /dev/null +++ b/src/lib/components/BurgerMenu.svelte @@ -0,0 +1,510 @@ + + +
+ + + + + {#if isOpen} + + {/if} + + + +
+ + + + diff --git a/src/lib/components/Footer.svelte b/src/lib/components/Footer.svelte index 030a335..964f920 100644 --- a/src/lib/components/Footer.svelte +++ b/src/lib/components/Footer.svelte @@ -1,5 +1,5 @@ @@ -17,10 +17,9 @@ {author.name} {license.date}

diff --git a/src/lib/components/Header.svelte b/src/lib/components/Header.svelte index 2ef4fb4..5be92f7 100644 --- a/src/lib/components/Header.svelte +++ b/src/lib/components/Header.svelte @@ -3,7 +3,8 @@ import { TOP_NAV, isActive } from '$lib/constants/nav'; import { site } from '$lib/constants/site'; import favicon from '$lib/assets/favicon.svg'; - import Icon from '$lib/components/Icon.svelte'; + import Icon from '$lib/components/Icon.svelte'; + import BurgerMenu from '$lib/components/BurgerMenu.svelte'; // Props from +layout for theme state & toggler export let darkMode: boolean; @@ -43,25 +44,29 @@ {/each} - +
+ + + +
diff --git a/src/lib/components/Icon.svelte b/src/lib/components/Icon.svelte index f234f41..825a0eb 100644 --- a/src/lib/components/Icon.svelte +++ b/src/lib/components/Icon.svelte @@ -56,28 +56,28 @@ {:else if name === 'networking'} {:else if name === 'ip-convertor'} - + {:else if name === 'cidr-summarize'} - + {:else if name === 'subnet-calculator'} - + {:else if name === 'vlsm-calculator'} - + {:else if name === 'ipv6-subnet-calculator'} - + {:else if name === 'supernet-calculator'} {:else if name === 'cidr-convertor-mask'} - + {:else if name === 'cidr-convertor'} - + {:else if name === 'ipv6-compress'} - + {:else if name === 'subnet-splitter'} - + {:else if name === 'ipv6-expand'} - + {:else if name === 'network-classes'} {:else if name === 'reserved-ranges'} @@ -85,25 +85,67 @@ {:else if name === 'common-subnets'} {:else if name === 'subnet-planner'} - + {:else if name === 'cidr-alignment'} - + {:else if name === 'wildcard-mask'} {:else if name === 'ip-distance'} - + {:else if name === 'nth-ip'} - + {:else if name === 'random-ip'} - + {:else if name === 'ip-normalize'} - + {:else if name === 'zone-id-handler'} - + {:else if name === 'eui64-converter'} - + {:else if name === 'ula-generator'} - + + + + {:else if name === 'ref-cidr'} + + {:else if name === 'ref-vlsm'} + + {:else if name === 'ref-supernetting'} + + {:else if name === 'ref-ipv6-address-types'} + + {:else if name === 'ref-ipv6-prefix-lens'} + + {:else if name === 'ref-ipv4-in-ipv6'} + + {:else if name === 'ref-ipv6-privacy-address'} + + {:else if name === 'ref-special-blocks'} + + {:else if name === 'ref-public-vs-private'} + + {:else if name === 'ref-carrier-nat'} + + {:else if name === 'ref-link-local-apia'} + + {:else if name === 'ref-multicast-basics'} + + {:else if name === 'ref-reverse-dns'} + + {:else if name === 'ref-reverse-zones'} + + {:else if name === 'ref-icmp'} + + {:else if name === 'ref-arp-vs-ndp'} + + {:else if name === 'ref-asn'} + + {:else if name === 'ref-ports'} + + {:else if name === 'ref-wildcard-masks'} + + {:else if name === 'ref-mtu-mss'} + {:else if name === 'plus'} {:else if name === 'trash'} @@ -117,35 +159,43 @@ {:else if name === 'tick'} {:else if name === 'lightbulb'} - + {:else if name === 'contiguous'} - + {:else if name === 'scattered'} - + {:else if name === 'help'} - + {:else if name === 'check-circle'} - + {:else if name === 'alert-triangle'} - + {:else if name === 'arrow-down'} - + {:else if name === 'grid'} {:else if name === 'union'} - + {:else if name === 'intersection'} - + {:else if name === 'diff'} - + {:else if name === 'containment'} - + {:else if name === 'next-available-subnet'} - + + {:else if name === 'x'} + + {:else if name === 'refresh'} + + {:else if name === 'next'} + + {:else if name === 'previous'} + {:else if name === 'draggable'} - + {:else} @@ -174,6 +224,10 @@ width: 1.5rem; height: 1.5rem; } + &.w-8 { + width: 1.75rem; + height: 1.75rem; + } } .icon svg { diff --git a/src/lib/components/SubHeader.svelte b/src/lib/components/SubHeader.svelte index 292d75e..82625a1 100644 --- a/src/lib/components/SubHeader.svelte +++ b/src/lib/components/SubHeader.svelte @@ -82,6 +82,7 @@ background-color: var(--bg-tertiary); border-bottom: 1px solid var(--border-primary); padding: var(--spacing-sm) 0; + display: none; @media (max-width: 768px) { display: none; } diff --git a/src/lib/constants/nav.ts b/src/lib/constants/nav.ts index 67040ec..e44ab06 100644 --- a/src/lib/constants/nav.ts +++ b/src/lib/constants/nav.ts @@ -1,3 +1,5 @@ +import { site, author, license } from '$lib/constants/site'; + export type NavItem = { href: string; label: string; @@ -233,19 +235,19 @@ export const SUB_NAV: Record = { href: '/reference/cidr', label: 'CIDR Notation Explained', description: 'What CIDR is, why it replaced IP classes, and how to read network prefixes', - icon: 'hash' + icon: 'ref-cidr' }, { href: '/reference/vlsm', label: 'VLSM in Plain English', description: 'Variable Length Subnet Masking - when to use it and common pitfalls', - icon: 'scissors' + icon: 'ref-vlsm' }, { href: '/reference/supernetting', label: 'Route Summarization / Supernetting', description: 'Combine multiple networks into single routes for efficient routing', - icon: 'layers' + icon: 'ref-supernetting' } ] }, @@ -256,25 +258,25 @@ export const SUB_NAV: Record = { href: '/reference/ipv6-address-types', label: 'IPv6 Address Types & Key Prefixes', description: 'Global unicast, ULA, link-local, multicast, and special IPv6 addresses', - icon: 'globe' + icon: 'ref-ipv6-address-types' }, { href: '/reference/ipv6-prefix-lengths', label: 'Common IPv6 Prefix Lengths', description: 'Quick reference for /128, /127, /64, /60, /56, /48, /32 with typical uses', - icon: 'grid' + icon: 'ref-ipv6-prefix-lens' }, { href: '/reference/ipv6-embedded-ipv4', label: 'IPv4 in IPv6', description: 'IPv4-mapped addresses, 6to4, Teredo, and transition mechanisms', - icon: 'shuffle' + icon: 'ref-ipv4-in-ipv6' }, { href: '/reference/ipv6-privacy-addresses', label: 'IPv6 Privacy Addresses', description: 'SLAAC privacy extensions: temporary vs stable interface identifiers', - icon: 'eye-off' + icon: 'ref-ipv6-privacy-address' } ] }, @@ -285,31 +287,31 @@ export const SUB_NAV: Record = { href: '/reference/special-use-ipv4', label: 'Special-Use IPv4 Blocks (RFC 6890)', description: 'Reserved IPv4 ranges including private networks, CGNAT, and test blocks', - icon: 'shield' + icon: 'ref-special-blocks' }, { href: '/reference/private-vs-public-ip', label: 'Private vs Public IP Addresses', description: 'Understanding private/public IPs, NAT implications, and identification', - icon: 'lock' + icon: 'ref-public-vs-private' }, { href: '/reference/cgnat', label: 'Carrier-Grade NAT Explained', description: 'CGNAT (100.64.0.0/10), how to identify it, and service impacts', - icon: 'layers' + icon: 'ref-carrier-nat' }, { href: '/reference/link-local-apipa', label: 'Link-Local & APIPA Addresses', description: 'IPv4 APIPA (169.254/16) and IPv6 link-local (fe80::/10) at a glance', - icon: 'wifi' + icon: 'ref-link-local-apia' }, { href: '/reference/multicast', label: 'IPv4 & IPv6 Multicast Basics', description: 'Multicast scopes, well-known groups, and local subnet limitations', - icon: 'radio' + icon: 'ref-multicast-basics' } ] }, @@ -320,25 +322,25 @@ export const SUB_NAV: Record = { href: '/reference/reverse-dns', label: 'Reverse DNS (PTR Records)', description: 'How in-addr.arpa and ip6.arpa work with examples for IPv4 and IPv6', - icon: 'corner-down-left' + icon: 'ref-reverse-dns' }, { href: '/reference/reverse-zones', label: 'Reverse Zones for CIDR Delegation', description: 'Minimal reverse DNS zones needed to delegate IPv4 and IPv6 CIDR blocks', - icon: 'corner-down-left' + icon: 'ref-reverse-zones' }, { href: '/reference/icmp', label: 'ICMP & ICMPv6: Common Types', description: 'Practical guide to ICMP message types for network troubleshooting', - icon: 'activity' + icon: 'ref-icmp' }, { href: '/reference/arp-vs-ndp', label: 'ARP vs NDP', description: 'Side-by-side comparison of IPv4 ARP and IPv6 Neighbor Discovery', - icon: 'git-compare' + icon: 'ref-arp-vs-ndp' } ] }, @@ -349,31 +351,37 @@ export const SUB_NAV: Record = { href: '/reference/asn', label: 'What is an ASN?', description: 'Autonomous Systems, BGP basics, and how IP addresses map to ASNs', - icon: 'share-2' + icon: 'ref-asn' }, { href: '/reference/ports', label: 'Common TCP/UDP Ports', description: 'Quick reference for frequently used port numbers and services', - icon: 'server' + icon: 'ref-ports' }, { href: '/reference/wildcard-masks', label: 'ACL Wildcard Masks', description: 'Wildcard masks vs netmasks, quick conversions and ACL examples', - icon: 'filter' + icon: 'ref-wildcard-masks' }, { href: '/reference/mtu-mss', label: 'Common MTU/MSS Values', description: 'MTU and MSS values for Ethernet, PPPoE, VPN, and overhead calculations', - icon: 'package' + icon: 'ref-mtu-mss' } ] } ], }; +export const footerLinks: NavItem[] = [ + { href: '/about', label: 'About' }, + { href: site.repo, label: 'GitHub' }, + { href: author.portfolio, label: 'More Apps →' }, +]; + // Helper: is a nav item active for a given pathname? export function isActive(pathname: string, href: string): boolean { if (href === '/') return pathname === '/'; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 589bcbd..8250ffa 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -63,7 +63,7 @@ main { padding: 0 var(--spacing-md); margin: 1rem auto; background: var(--bg-primary); - padding: var(--spacing-lg) 0; + padding: var(--spacing-lg) var(--spacing-md); } diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 98ebb06..598d2d1 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -37,7 +37,7 @@ margin: 0 auto; h2 { - font-size: var(--font-size-2xl); + font-size: var(--font-size-3xl); font-weight: 700; color: var(--text-primary); margin-bottom: var(--spacing-md); diff --git a/src/routes/cidr/+page.svelte b/src/routes/cidr/+page.svelte index bcc14c9..fa45eb3 100644 --- a/src/routes/cidr/+page.svelte +++ b/src/routes/cidr/+page.svelte @@ -1,17 +1,119 @@ - {pages.cidrConverter.title} - + CIDR Tools & Converters | {site.title} + + + + + - -
Redirecting to CIDR to Subnet Mask converter...
+
+ + + + +
+

About CIDR (Classless Inter-Domain Routing)

+

+ CIDR is a method for allocating IP addresses and routing IP packets more efficiently than the old classful network addressing architecture. + CIDR notation uses a slash followed by the number of network bits (e.g., /24) to specify network boundaries. +

+ +

Key Advantages

+
    +
  • Flexible Addressing: Create networks of any size
  • +
  • Route Aggregation: Combine multiple routes into summaries
  • +
  • Efficient Allocation: Reduce IP address waste
  • +
  • Scalable Routing: Smaller routing tables
  • +
+ +

Common CIDR Blocks

+
+
+ /24 - 256 addresses (254 hosts) +
+
+ /28 - 16 addresses (14 hosts) +
+
+ /16 - 65,536 addresses (65,534 hosts) +
+
+ /8 - 16,777,216 addresses (16,777,214 hosts) +
+
+
+
+ + diff --git a/src/routes/cidr/mask-converter/+layout.svelte b/src/routes/cidr/mask-converter/+layout.svelte index 81f1862..f2bd794 100644 --- a/src/routes/cidr/mask-converter/+layout.svelte +++ b/src/routes/cidr/mask-converter/+layout.svelte @@ -2,7 +2,10 @@
-

CIDR ↔ Subnet Mask Converter

-

Convert between CIDR notation and subnet mask formats.

+
+

{title}

+

{description}

+
+
+ + + +
@@ -179,6 +211,62 @@
diff --git a/src/routes/reference/+layout.svelte b/src/routes/reference/+layout.svelte new file mode 100644 index 0000000..29271a6 --- /dev/null +++ b/src/routes/reference/+layout.svelte @@ -0,0 +1,128 @@ + + +{@render children?.()} + +{#if isRef} + +{/if} + + diff --git a/src/routes/reference/+page.svelte b/src/routes/reference/+page.svelte index b511d7b..63eac50 100644 --- a/src/routes/reference/+page.svelte +++ b/src/routes/reference/+page.svelte @@ -1,129 +1,23 @@ @@ -135,82 +29,13 @@ -
-
-
-

Networking Reference Guide

-

Quick guides and cheat sheets for networking concepts, IP addressing, and common protocols

-
- -
-

Available References

-
- {#each referencePages as page} - -
- - {page.title} -
-
{page.description}
-
- {/each} -
-
- -
-

How to Use These References

-

Each reference page provides:

-
    -
  • Plain English explanations - No confusing jargon
  • -
  • Practical examples - Real-world scenarios you'll encounter
  • -
  • Quick reference tables - Easy to scan and find what you need
  • -
  • Common pitfalls - Mistakes to avoid
  • -
  • Best practices - How to do things right
  • -
- -
-
- - Tip -
-
- These references pair perfectly with the calculators and tools on this site. Use them to understand the concepts, then use the tools to do the calculations. -
-
-
- -
-

More References Coming Soon

-

We're continuously adding more networking references. Coming soon:

-
    -
  • DHCPv4 vs DHCPv6 Differences
  • -
  • NAT Types and Behavior
  • -
  • Network Troubleshooting Methodologies
  • -
  • IPv6 Transition Mechanisms
  • -
  • QoS Basics and DSCP Markings
  • -
  • And more...
  • -
-
-
+
+

Networking Pocket Reference

+

Offline quick guides, cheat sheets and reference info, for networking concepts, IP addressing, and common protocols

+ + diff --git a/src/routes/subnetting/+page.svelte b/src/routes/subnetting/+page.svelte index 06c1af2..f9cf5ed 100644 --- a/src/routes/subnetting/+page.svelte +++ b/src/routes/subnetting/+page.svelte @@ -1,10 +1,24 @@ @@ -25,7 +39,9 @@

-
+ + +

About Subnetting

Subnetting is the practice of dividing a network into smaller, more manageable sub-networks (subnets). @@ -33,7 +49,7 @@

Key Benefits

-
    +
    • Improved Security: Isolate different network segments
    • Reduced Broadcast Traffic: Smaller broadcast domains
    • Better Organization: Logical grouping of devices
    • @@ -52,27 +68,28 @@
- -
- {#if Array.isArray(subnettingTools)} - {#each subnettingTools as tool} - -
- {#if tool.icon} - - {/if} -
-
-

{tool.label}

-

{tool.description}

-
-
- {/each} - {/if} -
\ No newline at end of file + diff --git a/src/styles/pages.scss b/src/styles/pages.scss index 7b8fafd..072acb4 100644 --- a/src/styles/pages.scss +++ b/src/styles/pages.scss @@ -9,6 +9,12 @@ } } +.header-buttons { + display: flex; + align-items: center; + gap: var(--spacing-sm); +} + .nav-links { display: flex; gap: var(--spacing-md); diff --git a/src/styles/ref-pages.scss b/src/styles/ref-pages.scss index 5e2cced..1926695 100644 --- a/src/styles/ref-pages.scss +++ b/src/styles/ref-pages.scss @@ -2,7 +2,7 @@ // Used across all /reference/* pages for consistent styling .ref-page { - max-width: 800px; + max-width: 1000px; margin: 0 auto; .ref-header { @@ -269,4 +269,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 1a96c68..6d0c179 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -62,6 +62,7 @@ --font-size-lg: 1.125rem; --font-size-xl: 1.25rem; --font-size-2xl: 1.5rem; + --font-size-3xl: 2rem; /* Transitions */ --transition-fast: 0.15s ease;