From 509baec232c373c520eb6c223ad9f775ae50d08a Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Sat, 31 Oct 2026 03:43:53 -0500 Subject: [PATCH] feat: add initial testing site and Cloudflare edge headers - Implement semantic HTML5 layout with deployment diagnostics and test widget - Add responsive stylesheet supporting light and dark color schemes - Add client-side logic for real-time clock, hostname reflection, and counter - Add _headers configuration for baseline edge security policies --- _headers | 4 + app.js | 49 ++++++++++++ index.html | 73 +++++++++++++++++ style.css | 224 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 350 insertions(+) create mode 100644 _headers create mode 100644 app.js create mode 100644 index.html create mode 100644 style.css diff --git a/_headers b/_headers new file mode 100644 index 0000000..3258f0e --- /dev/null +++ b/_headers @@ -0,0 +1,4 @@ +/* + X-Frame-Options: DENY + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin diff --git a/app.js b/app.js new file mode 100644 index 0000000..0ab2731 --- /dev/null +++ b/app.js @@ -0,0 +1,49 @@ +document.addEventListener("DOMContentLoaded", () => { + // Update year + const yearEl = document.getElementById("year"); + if (yearEl) { + yearEl.textContent = new Date().getFullYear(); + } + + // Update domain display based on current window location + const domainEl = document.getElementById("domain-display"); + if (domainEl && window.location.hostname) { + domainEl.textContent = window.location.hostname; + } + + // Update protocol + const protocolEl = document.getElementById("protocol-display"); + if (protocolEl) { + protocolEl.textContent = window.location.protocol.replace(":", "").toUpperCase(); + } + + // Live client clock + const timeEl = document.getElementById("client-time"); + function updateTime() { + if (timeEl) { + timeEl.textContent = new Date().toLocaleTimeString(); + } + } + updateTime(); + setInterval(updateTime, 1000); + + // Simple interactive counter + let count = 0; + const counterVal = document.getElementById("counter-value"); + const btnIncrement = document.getElementById("btn-increment"); + const btnReset = document.getElementById("btn-reset"); + + if (btnIncrement && counterVal) { + btnIncrement.addEventListener("click", () => { + count += 1; + counterVal.textContent = count; + }); + } + + if (btnReset && counterVal) { + btnReset.addEventListener("click", () => { + count = 0; + counterVal.textContent = count; + }); + } +}); diff --git a/index.html b/index.html new file mode 100644 index 0000000..2fa2287 --- /dev/null +++ b/index.html @@ -0,0 +1,73 @@ + + + + + + + Cloudflare Pages Test | roadtotech.me + + + +
+ + +
+
+

Deployment Status

+
+
+ Network + Cloudflare Edge CDN +
+
+ Domain Target + *.roadtotech.me +
+
+ Protocol + Detecting... +
+
+ Client Time + --:--:-- +
+
+
+ +
+

Interactive Test Widget

+

Test client-side execution and latency:

+
+
+ Click Count: + 0 +
+
+ + +
+
+
+ +
+

Architecture Highlights

+
    +
  • Zero Origin Cold-Start: Static assets are cached and distributed worldwide.
  • +
  • Automatic SSL/TLS: HTTPS certs are provisioned and renewed automatically by Cloudflare.
  • +
  • Native Subdomain: Mapped to roadtotech.me via CNAME within the same Cloudflare zone.
  • +
+
+
+ + +
+ + + + diff --git a/style.css b/style.css new file mode 100644 index 0000000..58fa7fc --- /dev/null +++ b/style.css @@ -0,0 +1,224 @@ +:root { + --bg-color: #0f172a; + --card-bg: #1e293b; + --text-primary: #f8fafc; + --text-secondary: #94a3b8; + --accent-color: #f97316; + --accent-hover: #ea580c; + --success-color: #10b981; + --border-color: #334155; + --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; +} + +@media (prefers-color-scheme: light) { + :root { + --bg-color: #f8fafc; + --card-bg: #ffffff; + --text-primary: #0f172a; + --text-secondary: #64748b; + --border-color: #e2e8f0; + } +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: var(--font-family); + background-color: var(--bg-color); + color: var(--text-primary); + line-height: 1.6; + min-height: 100vh; + display: flex; + justify-content: center; + padding: 2rem 1rem; +} + +.container { + max-width: 720px; + width: 100%; + display: flex; + flex-direction: column; + gap: 1.75rem; +} + +.site-header { + text-align: center; + padding: 1rem 0; +} + +.badge { + display: inline-block; + padding: 0.25rem 0.75rem; + font-size: 0.75rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.05em; + color: #fff; + background-color: var(--accent-color); + border-radius: 9999px; + margin-bottom: 0.75rem; +} + +.site-header h1 { + font-size: 2rem; + font-weight: 800; + letter-spacing: -0.025em; + margin-bottom: 0.5rem; +} + +.subtitle { + color: var(--text-secondary); + font-size: 1.1rem; +} + +.site-main { + display: flex; + flex-direction: column; + gap: 1.25rem; +} + +.card { + background-color: var(--card-bg); + border: 1px solid var(--border-color); + border-radius: 12px; + padding: 1.5rem; + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); +} + +.card h2 { + font-size: 1.25rem; + font-weight: 700; + margin-bottom: 1rem; + border-bottom: 1px solid var(--border-color); + padding-bottom: 0.5rem; +} + +.status-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + gap: 1rem; +} + +.status-item { + display: flex; + flex-direction: column; + gap: 0.25rem; +} + +.status-label { + font-size: 0.8rem; + text-transform: uppercase; + color: var(--text-secondary); + font-weight: 600; +} + +.status-value { + font-size: 1rem; + font-weight: 600; +} + +.status-online { + color: var(--success-color); +} + +.interactive-panel { + display: flex; + align-items: center; + justify-content: space-between; + margin-top: 1rem; + padding: 1rem; + background-color: rgba(0, 0, 0, 0.05); + border-radius: 8px; +} + +.counter-display { + font-size: 1.1rem; +} + +.counter-display strong { + font-size: 1.5rem; + color: var(--accent-color); + margin-left: 0.5rem; +} + +.button-group { + display: flex; + gap: 0.5rem; +} + +.btn { + padding: 0.5rem 1rem; + border: none; + border-radius: 6px; + font-size: 0.9rem; + font-weight: 600; + cursor: pointer; + transition: background-color 0.15s ease-in-out; +} + +.btn.primary { + background-color: var(--accent-color); + color: #fff; +} + +.btn.primary:hover { + background-color: var(--accent-hover); +} + +.btn.secondary { + background-color: var(--border-color); + color: var(--text-primary); +} + +.btn.secondary:hover { + opacity: 0.8; +} + +.features-list { + list-style: none; + display: flex; + flex-direction: column; + gap: 0.75rem; +} + +.features-list li { + padding-left: 1.5rem; + position: relative; + font-size: 0.95rem; +} + +.features-list li::before { + content: "✓"; + position: absolute; + left: 0; + color: var(--accent-color); + font-weight: 700; +} + +code { + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; + background-color: rgba(0, 0, 0, 0.1); + padding: 0.2rem 0.4rem; + border-radius: 4px; + font-size: 0.9em; +} + +.site-footer { + text-align: center; + padding: 1rem 0; + color: var(--text-secondary); + font-size: 0.875rem; +} + +.site-footer a { + color: var(--accent-color); + text-decoration: none; +} + +.site-footer a:hover { + text-decoration: underline; +}