File size: 6,850 Bytes
f07f1e7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd9082d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title>FixMint QR Code Mini</title>
  <script src="https://cdn.jsdelivr.net/npm/qrcode@1.5.4/build/qrcode.min.js"></script>
  <style>
    :root {
      --bg: #f4faf6;
      --card: #ffffff;
      --ink: #10241a;
      --muted: #4d6a5a;
      --mint: #1f8a5b;
      --mint-dark: #146644;
      --line: #d7ebe0;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
      background: radial-gradient(1200px 600px at 10% -10%, #dff7ea, transparent), var(--bg);
      color: var(--ink);
      line-height: 1.45;
    }
    main {
      max-width: 880px;
      margin: 0 auto;
      padding: 28px 18px 48px;
    }
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      font-weight: 600;
      color: var(--mint-dark);
      background: #e7f8ef;
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 4px 12px;
      text-decoration: none;
    }
    h1 { margin: 14px 0 8px; font-size: 1.8rem; letter-spacing: -0.02em; }
    .lead { color: var(--muted); margin: 0 0 22px; max-width: 58ch; }
    .lead a, footer a, .full a { color: var(--mint-dark); }
    .grid {
      display: grid;
      grid-template-columns: 1.1fr 0.9fr;
      gap: 18px;
    }
    @media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }
    .card {
      background: var(--card);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 16px;
      box-shadow: 0 8px 24px rgba(16, 36, 26, 0.04);
    }
    label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
    textarea, select, input[type="color"] {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px 12px;
      font: inherit;
      margin-bottom: 12px;
      background: #fff;
      color: var(--ink);
    }
    textarea { min-height: 96px; resize: vertical; }
    .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    button {
      width: 100%;
      border: 0;
      border-radius: 12px;
      padding: 12px 14px;
      font: inherit;
      font-weight: 700;
      background: var(--mint);
      color: #fff;
      cursor: pointer;
    }
    button:hover { background: var(--mint-dark); }
    .preview {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 320px;
      gap: 12px;
    }
    canvas, img { max-width: 100%; border-radius: 12px; background: #fff; }
    .hint { color: var(--muted); font-size: 13px; text-align: center; }
    .full {
      margin-top: 16px;
      padding: 14px 16px;
      border-radius: 14px;
      background: #eefaf3;
      border: 1px dashed #b9dfc9;
    }
    footer { margin-top: 22px; color: var(--muted); font-size: 13px; }
    .err { color: #9b1c1c; font-size: 13px; min-height: 1.2em; }
  </style>
</head>
<body>
  <main>
    <a class="badge" href="https://fixmint.cc?utm_source=huggingface&utm_medium=space&utm_campaign=fixmint-relaunch" target="_blank" rel="noopener">FixMint · 83 free tools</a>
    <h1>QR code mini</h1>
    <p class="lead">
      Tiny static QR demo. For SVG, email/SMS/phone modes, and quiet-zone control, open the full
      <a href="https://fixmint.cc/qr-code-generator?utm_source=huggingface&utm_medium=space&utm_campaign=fixmint-relaunch" target="_blank" rel="noopener">FixMint QR code generator</a>
      (runs in your browser, no account).
    </p>

    <div class="grid">
      <section class="card">
        <label for="text">Link or text</label>
        <textarea id="text">https://fixmint.cc</textarea>

        <label for="ec">Error correction</label>
        <select id="ec">
          <option value="L">L (7%)</option>
          <option value="M" selected>M (15%)</option>
          <option value="Q">Q (25%)</option>
          <option value="H">H (30%)</option>
        </select>

        <div class="row">
          <div>
            <label for="fg">Code colour</label>
            <input id="fg" type="color" value="#111111" />
          </div>
          <div>
            <label for="bg">Background</label>
            <input id="bg" type="color" value="#ffffff" />
          </div>
        </div>

        <div class="err" id="err"></div>
        <button id="make" type="button">Make QR</button>
        <button id="dl" type="button" style="margin-top:8px;background:#234;font-weight:600">Download PNG</button>
      </section>

      <section class="card preview">
        <canvas id="qr" width="280" height="280" aria-label="QR preview"></canvas>
        <p class="hint">Static code — content is baked into the pattern, so it never expires and nothing tracks scans.</p>
      </section>
    </div>

    <div class="full">
      Want colours, SVG, Wi‑Fi / email / SMS payloads, and more polish?
      <a href="https://fixmint.cc/qr-code-generator?utm_source=huggingface&utm_medium=space&utm_campaign=fixmint-relaunch" target="_blank" rel="noopener">Use the full FixMint tool →</a>
    </div>

    <footer>
      Mini demo of <a href="https://fixmint.cc?utm_source=huggingface&utm_medium=space&utm_campaign=fixmint-relaunch" target="_blank" rel="noopener">FixMint</a>
      (83 free on-device tools + 100 guides). Files stay on your device on the full site.
    </footer>
  </main>

  <script>
    const canvas = document.getElementById('qr');
    const err = document.getElementById('err');

    function render() {
      err.textContent = '';
      const text = document.getElementById('text').value.trim();
      if (!text) {
        err.textContent = 'Type a link or some text first.';
        return;
      }
      if (text.length > 1200) {
        err.textContent = 'Keep it under 1200 characters in this mini demo.';
        return;
      }
      QRCode.toCanvas(canvas, text, {
        errorCorrectionLevel: document.getElementById('ec').value,
        width: 280,
        margin: 2,
        color: {
          dark: document.getElementById('fg').value,
          light: document.getElementById('bg').value,
        },
      }, (e) => {
        if (e) err.textContent = e.message || String(e);
      });
    }

    document.getElementById('make').addEventListener('click', render);
    document.getElementById('dl').addEventListener('click', () => {
      render();
      const a = document.createElement('a');
      a.download = 'fixmint-qr.png';
      a.href = canvas.toDataURL('image/png');
      a.click();
    });
    ['text','ec','fg','bg'].forEach(id => {
      document.getElementById(id).addEventListener('change', render);
    });
    render();
  </script>
</body>
</html>