about summary refs log tree commit diff stats
path: root/html/immoral/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/immoral/index.html')
-rw-r--r--html/immoral/index.html221
1 files changed, 221 insertions, 0 deletions
diff --git a/html/immoral/index.html b/html/immoral/index.html
new file mode 100644
index 0000000..b7d3ca4
--- /dev/null
+++ b/html/immoral/index.html
@@ -0,0 +1,221 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>An Immoral Web Font Vacuum</title>
+    <meta name="description" content="Enter a URL to find, preview, and download web fonts (WOFF/TTF/WOFF2/OTF) present on the page.">
+    <style>
+        :root {
+            --beige: #f5f2e9;
+            --dark: #111111;
+            --accent: #ff4d00;
+            --grid-line: #ccbea7;
+            --container-bg: #ffffff;
+            --focus-outline: #2563eb;
+        }
+        
+        body {
+            font-family: 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
+            max-width: 900px;
+            margin: 0 auto;
+            padding: 1rem;
+            line-height: 1.5;
+            background: var(--beige);
+            color: var(--dark);
+        }
+        
+        h1, h2 {
+            text-transform: uppercase;
+            letter-spacing: 2px;
+            border-bottom: 3px solid var(--accent);
+            padding-bottom: 0.5rem;
+            font-weight: 900;
+        }
+        
+        .container {
+            background: var(--container-bg);
+            padding: 2rem;
+            border: 3px solid var(--dark);
+            box-shadow: 8px 8px 0 var(--dark);
+            margin-top: 2rem;
+        }
+        
+        .input-group {
+            display: flex;
+            gap: 1rem;
+            margin-bottom: 2rem;
+            border: 2px solid var(--dark);
+            padding: 1rem;
+            background: var(--beige);
+        }
+        
+        @media (max-width: 600px) {
+            .input-group {
+                flex-direction: column;
+                gap: 0.75rem;
+            }
+            
+            .input-group button {
+                width: 100%;
+            }
+        }
+        
+        .sr-only {
+            position: absolute;
+            width: 1px;
+            height: 1px;
+            padding: 0;
+            margin: -1px;
+            overflow: hidden;
+            clip: rect(0, 0, 0, 0);
+            white-space: nowrap;
+            border: 0;
+        }
+        
+        input[type="url"] {
+            flex: 1;
+            padding: 0.75rem;
+            font-size: 1rem;
+            border: 2px solid var(--dark);
+            background: var(--beige);
+            font-family: 'Courier New', monospace;
+        }
+        
+        input[type="url"]:focus {
+            outline: 3px solid var(--focus-outline);
+            outline-offset: 2px;
+        }
+        
+        button {
+            padding: 0.75rem 1.5rem;
+            font-size: 1rem;
+            background: var(--dark);
+            color: var(--beige);
+            border: 2px solid var(--dark);
+            cursor: pointer;
+            text-transform: uppercase;
+            font-weight: bold;
+            font-family: 'Courier New', monospace;
+            transition: all 0.2s;
+        }
+        
+        button:hover,
+        button:focus-visible {
+            background: var(--accent);
+            transform: translateY(-2px);
+            outline: 3px solid var(--focus-outline);
+            outline-offset: 2px;
+        }
+        
+        button:focus:not(:focus-visible) {
+            outline: none;
+        }
+        
+        .error {
+            color: var(--accent);
+            padding: 1rem;
+            background: rgba(255, 77, 0, 0.1);
+            border: 2px solid var(--accent);
+            margin-top: 1rem;
+            display: none;
+            font-weight: bold;
+        }
+        
+        #results {
+            margin-top: 1rem;
+        }
+
+        .immoral {
+            color: #cc0000;
+            text-shadow: 
+                0 0 1px #fff,
+                0 0 3px #fff,
+                0 0 5px #ff0000,
+                2px 2px 0 #600;
+            font-weight: 900;
+            letter-spacing: 2px;
+            transform: skew(-5deg);
+            display: inline-block;
+            position: relative;
+            padding: 0 4px;
+        }
+        
+        .immoral::first-letter {
+            font-size: 1.2em;
+            text-shadow: 
+                0 0 1px #fff,
+                0 0 3px #fff,
+                0 0 5px #ff0000,
+                2px 2px 0 #800;
+        }
+
+        footer {
+            margin-top: 1rem;
+            margin-bottom: 2rem;
+        }
+
+        footer abbr {
+            color: var(--accent);
+            text-decoration: none;
+            border-bottom: 1px dotted var(--dark);
+        }
+
+        footer abbr:hover {
+            cursor: help;
+        }
+    </style>
+</head>
+<body>
+    <main class="container">
+        <h1><span class="immoral">Immoral</span> Web Font Vacuum</h1>
+        <p>Enter a URL to find, preview, and download web fonts (WOFF/TTF/WOFF2/OTF) present on the page.</p>
+        <section id="urlForm">
+            <form class="input-group" role="search" aria-label="Website URL search form" onsubmit="event.preventDefault();">
+                <label for="urlInput" class="sr-only">Website URL</label>
+                <input 
+                    type="url" 
+                    id="urlInput" 
+                    name="urlInput"
+                    placeholder="Enter website URL (e.g., https://example.com)" 
+                    required
+                    aria-required="true"
+                    aria-describedby="urlHint"
+                >
+                <span id="urlHint" class="sr-only">Enter the full website URL including https:// or http://</span>
+                <button 
+                    id="analyzeBtn" 
+                    type="submit"
+                    aria-label="Find all web fonts on the website"
+                >Find Fonts</button>
+            </form>
+        </section>
+        <section id="error" class="error" role="alert" aria-live="polite"></section>
+        <section id="results" role="region" aria-label="Font analysis results"></section>
+        <section class="bookmarklet-section" style="margin: 2rem 0; padding: 1rem; border: 2px dashed var(--dark); background: var(--beige);">
+            <h2>Web Font Vacuum Bookmarklet</h2>
+            <p>Drag this link to your bookmarks bar to vacuum web fonts from any webpage:</p>
+            <p style="text-align: center;">
+                <a href="javascript:(function(){
+                    const script = document.createElement('script');
+                    script.src = 'https://smallandnearlysilent.com/immoral/bookmarklet.js';
+                    document.body.appendChild(script);
+                })()" 
+                class="bookmarklet-link" 
+                style="display: inline-block; padding: 0.5rem 1rem; background: var(--dark); color: var(--beige); text-decoration: none; border-radius: 4px; font-weight: bold;"
+                onclick="event.preventDefault(); alert('Drag this to your bookmarks bar!');">
+                    Web Font Vacuum
+                </a>
+            </p>
+            <p>
+                Use the bookmarklet on any webpage to find and download its fonts directly.
+            </p>
+        </section>
+    </main>
+    <footer>
+        <p class="immoral">A note for those among us on the web who don't love having to pipe web traffic through random, mostly unknown services:</p>
+        <p>Because of <abbr title="Cross-Origin Resource Sharing">CORS</abbr> I've had to funnel requests through a CORS proxy service, and, because I'm too lazy to host my own I'm using a random one I found after 11 minutes of searching...and because that one seemed unreliable I went ahead and found a few more to cycle through at every request. The CORS issue only comes to play when you use the form on this website. The bookmarklet runs in the same scope as the website that you run it against, so, no CORS issues at all. No weird, unknown and untrusted servers in the way. Bookmarklets, ftw.</p>
+    </footer>
+    <script src="app.js"></script>
+</body>
+</html>