-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.html
More file actions
835 lines (789 loc) · 37.6 KB
/
Copy pathindex.html
File metadata and controls
835 lines (789 loc) · 37.6 KB
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
<!doctype html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>FreeToken — Bring Frontier to Edge | FlashML</title>
<meta name="description" content="FreeToken by FlashML — 本地大模型运行时与桌面客户端, 前沿智能, 触手可及。Bring Frontier to Edge: download and run local LLMs on your own Windows or Linux machine. Private, offline, free download." />
<meta name="keywords" content="FreeToken, FlashML, local LLM, LLM runtime, run LLM locally, 本地大模型, 本地部署, 大语言模型, desktop app, Windows, Linux" />
<link rel="canonical" href="https://www.flashml.ai/" />
<meta property="og:title" content="FreeToken — Bring Frontier to Edge" />
<meta property="og:description" content="Download and run large language models on your own machine — private, offline, free." />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.flashml.ai/" />
<meta property="og:site_name" content="FlashML" />
<meta property="og:image" content="https://www.flashml.ai/assets/icon.png" />
<meta property="og:image:width" content="512" />
<meta property="og:image:height" content="512" />
<meta property="og:locale" content="zh_CN" />
<meta property="og:locale:alternate" content="en_US" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="FreeToken — Bring Frontier to Edge" />
<meta name="twitter:description" content="Download and run large language models on your own machine. Free for Windows & Linux." />
<meta name="twitter:image" content="https://www.flashml.ai/assets/icon.png" />
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "FreeToken",
"url": "https://www.flashml.ai/",
"image": "https://www.flashml.ai/assets/icon.png",
"description": "FreeToken is a local-LLM runtime and desktop control panel: download large language models and run them on your own machine — private and offline. Bring Frontier to Edge.",
"applicationCategory": "DeveloperApplication",
"operatingSystem": "Windows, Linux",
"offers": { "@type": "Offer", "price": "0", "priceCurrency": "USD" },
"downloadUrl": "https://www.flashml.ai/",
"codeRepository": "https://github.com/FlashML-org/FreeToken",
"sameAs": "https://github.com/FlashML-org/FreeToken",
"publisher": {
"@type": "Organization",
"name": "FlashML",
"url": "https://www.flashml.ai/",
"slogan": "Bring Frontier to Edge"
}
}
</script>
<!-- Tab icon: the blue F on the dark squircle. SVG first for browsers that take it; the PNG
stays as the fallback every browser reads and is what Windows/Safari pin to a taskbar.
Both PNGs are rasterised from this same SVG, so the three never drift apart. -->
<link rel="icon" type="image/svg+xml" href="assets/f-icon.svg" />
<link rel="icon" type="image/png" sizes="128x128" href="assets/icon-128.png" />
<link rel="apple-touch-icon" href="assets/icon.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<!-- Rubik, because the wordmark IS Rubik 700 — the lockup's own glyphs are outlined Rubik, so
setting the page in it makes the copy read as the same voice as the logo instead of merely
sitting near it. Latin only: Rubik has no CJK, so Noto Sans SC still carries 中文 by
per-glyph fallback. 700 is loaded for the CTA; the wordmark needs no webfont at all. -->
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700&display=swap" />
<style>
:root {
color-scheme: dark;
/* reserve the scrollbar gutter on both sides so it appearing/disappearing
(e.g. when "all platforms" expands) never shifts the centered layout */
scrollbar-gutter: stable both-edges;
/* Palette is the brand's, not One Dark's. The old ramp was Atom's editor chrome (#21252b /
#282c34 / #61afef); every value below derives from the four brand colours, recorded here
because the brand assets that documented them no longer live in this repo:
#14171C ink · #58A6F0 blue · #3CB98F green · #F5F7FA paper.
--bg IS the ink, which is also the fill behind the F in the tab icon and the tile — so
the icon's ground and the page's ground are literally the same colour, and the surfaces
above it are that ink lifted toward the blue rather than a separate grey. */
--bg: #14171c;
--surface: #1b1f27;
--surface-2: #232830;
--surface-3: #2e343e;
--border: rgba(255, 255, 255, 0.07);
--border-2: #2c323c;
--text: #dde2e9;
--text-2: #a8b0bd;
--text-3: #7c8492;
--text-4: #5b6371;
--accent: #58a6f0; /* exactly the blue of the wordmark's "Token" and of the F in the icon */
--success: #3cb98f; /* the FreeToken green from the icon set, replacing One Dark's #98c379 */
--warn: #e5c07b; /* warn/danger stay Atom's: they are the traffic-light dots, i.e. */
--danger: #e06c75; /* window chrome being imitated, not brand colours */
--mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", "Noto Sans SC", monospace;
--sans: "Rubik", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei",
ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; letter-spacing: 0; }
body {
min-width: 320px;
min-height: 100vh;
margin: 0;
display: grid;
place-items: center;
padding: 24px;
background: var(--bg);
color: var(--text);
font-family: var(--sans);
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
/* ambient glow on a fixed layer behind everything, slowly breathing brighter/dimmer.
opacity-only animation → GPU-composited, no layout/text impact. */
body::before {
content: "";
position: fixed;
inset: 0;
z-index: -1;
pointer-events: none;
/* Brand blue 88,166,240 and brand green 60,185,143 — was One Dark's 97,175,239 and its
#56b6c2 teal. Alphas nudged up a touch because --bg dropped to the darker brand ink and
the same values read weaker against it. */
background:
radial-gradient(circle at 50% 44%, rgba(88, 166, 240, 0.12), transparent 55%),
radial-gradient(circle at 26% 20%, rgba(88, 166, 240, 0.14), transparent 34rem),
radial-gradient(circle at 74% 18%, rgba(60, 185, 143, 0.08), transparent 30rem);
animation: bg-breathe 6s ease-in-out infinite;
}
/* token.ai-style breathe — slow scale + brightness pulse (their colors swapped for ours) */
@keyframes bg-breathe {
0%, 100% { opacity: .55; transform: scale(1); }
50% { opacity: 1; transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
body::before { animation: none; }
}
a { color: inherit; text-decoration: none; }
/* Lifted to --surface. It used to be --bg, i.e. the same colour as the page, which worked
when that was #21252b and the drop shadow could darken the ground beneath it. Against the
brand ink there is nothing left to darken — a black shadow on near-black reads as nothing —
so the panel now separates by being one step LIGHTER than the page instead. */
.window {
width: min(760px, 100%);
overflow: hidden;
border: 1px solid var(--border-2);
border-radius: 10px;
background: var(--surface);
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}
.titlebar {
height: 38px;
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
padding: 0 14px;
border-bottom: 1px solid var(--border);
color: var(--text-3);
font-size: 11px;
}
.dots { display: flex; gap: 7px; }
.dot { width: 11px; height: 11px; border-radius: 999px; }
.red { background: var(--danger); }
.yellow { background: var(--warn); }
.green { background: var(--success); }
.title {
display: inline-flex;
align-items: center;
gap: 8px;
letter-spacing: 0.04em;
}
.title::before {
content: "";
width: 6px;
height: 6px;
border-radius: 2px;
background: var(--accent);
}
.lang { justify-self: end; display: inline-flex; gap: 2px; }
.lang-btn {
appearance: none;
border: 0;
background: transparent;
color: var(--text-4);
font-size: 11px;
line-height: 1;
padding: 4px 7px;
border-radius: 5px;
cursor: pointer;
transition: color .15s ease, background .15s ease;
}
.lang-btn:hover { color: var(--text-2); }
.lang-btn.active {
color: var(--accent);
background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.content {
min-height: 520px;
display: grid;
place-items: center;
padding: 80px 36px 72px;
text-align: center;
}
/* THE HERO IS NOW THE LOCKUP, not a tile plus a typeset word.
h1 keeps its semantics and its text (in the img's alt) — the wordmark ships as outlined
paths, so nothing here depends on Rubik being available. The lockup already contains the F
mark, which is why the separate 92px icon above it is gone: showing both put the same mark
on screen twice. Sizing is by HEIGHT, since the art is a fixed 1048x216 (4.85:1) and only
the height is visually comparable to the old 64px type. */
.wordmark {
margin: 0 auto;
/* Tracks the old h1's clamp() so the hero grows and shrinks as it always did. The old rule
was font-size: clamp(38px, 6.4vw, 64px) on Inter 600; the ceiling here is 1.5x that,
which is what makes the wordmark's cap height land where the type's used to.
The FLOOR is deliberately not 1.5x: a 4.85:1 lockup runs out of room long before a word
of type does, and 56px there measured 272px inside the 284px a 320px phone leaves —
12px of air. 48px gives 233px, which is about what "FreeToken" set at 38px Inter used to
occupy, so the narrow end matches the old hero instead of straining against the card.
min(100%, …) is the backstop: below ~300px the art just tracks the container. */
width: min(100%, calc(clamp(48px, 9.6vw, 96px) * 1048 / 216));
position: relative;
isolation: isolate; /* keeps the bloom above the card but under the art */
line-height: 0; /* h1 is a block of text to the layout engine; the img is not text */
}
/* The bloom — the page's one light source, inherited from the old icon treatment and reshaped
from a disc to a wide ellipse so it sits under a 4.85:1 lockup instead of a square tile.
Accent blue only: the lockup's mark and its "Token" half are both #58a6f0, so a second
hue would be lighting something that is not there. */
.wordmark::before {
content: "";
position: absolute;
inset: -68% -14%;
z-index: -1;
pointer-events: none;
border-radius: 50%;
background:
radial-gradient(closest-side at 50% 50%,
color-mix(in srgb, var(--accent) 26%, transparent),
color-mix(in srgb, var(--accent) 9%, transparent) 46%,
transparent 76%);
filter: blur(10px);
/* Phase-locked to bg-breathe: SAME 6s, and the same 0/50/100 shape. `alternate` would be
the intuitive way to write a there-and-back and it is wrong — it makes one round trip
take 12s, so the mark would meet the page's rhythm only every other cycle and drift
visibly against it in between. Half the amplitude, so it follows rather than competes. */
animation: mark-bloom 6s ease-in-out infinite;
will-change: opacity, transform;
}
@keyframes mark-bloom {
0%, 100% { opacity: .43; transform: scale(1); }
50% { opacity: .71; transform: scale(1.07); }
}
/* The tight core. drop-shadow, not box-shadow: box-shadow traces the element's RECTANGLE,
which for a wordmark means a glowing box around the letters, while filter follows the
glyphs' own alpha. Kept far weaker than the icon's version was — at this scale the same
values smeared the counters in "ee" and the gap inside the F shut. */
.wordmark img {
position: relative;
width: 100%;
height: auto;
display: block;
filter:
drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 18%, transparent))
drop-shadow(0 2px 3px rgba(0, 0, 0, .45));
}
@media (prefers-reduced-motion: reduce) {
/* Frozen mid-cycle rather than at rest, so the still version is the one that was designed. */
.wordmark::before { animation: none; opacity: .57; transform: scale(1.035); }
}
/* Kept even though the h1 now holds an image rather than text: this is what styles the alt
text if the SVG ever fails to load, so the fallback is the hero the page used to have
instead of a browser-default serif heading. .wordmark overrides what it needs to. */
h1 {
margin: 0;
color: #f0f2f5;
font-size: clamp(38px, 6.4vw, 64px);
font-weight: 600;
line-height: 0.98;
letter-spacing: -0.015em; /* Rubik needs less negative tracking than Inter did at display size */
}
.lead {
width: min(560px, 100%);
margin: 20px auto 0;
color: var(--text-2);
font-size: 17px;
line-height: 1.7;
}
.actions {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 12px;
margin-top: 40px;
}
.version {
display: inline-block;
margin-top: 14px;
color: var(--text-4);
font-size: 12.5px;
letter-spacing: 0.02em;
transition: color .15s ease;
}
.version:hover { color: var(--text-2); }
.button {
min-height: 42px;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 0 18px;
border: 1px solid var(--border-2);
border-radius: 8px;
background: var(--surface-2);
color: var(--text);
font-size: 13.5px;
font-weight: 600;
transition: filter .15s ease, border-color .15s ease;
}
.button:hover { filter: brightness(1.12); }
/* The primary CTA is now SOLID brand blue with ink text, where it used to be a 13% accent
wash on --surface-2 with #8ecbff text. That ghost treatment made the one action the page
exists for look like a secondary control — and on the darker ink ground it receded further.
Ink on #58a6f0 measures 6.95:1, so the inversion buys contrast rather than spending it.
The blue shadow is the same light-source idea as the wordmark's bloom: the button is lit,
not merely coloured. */
.button.primary {
min-height: 56px;
padding: 0 36px;
border-radius: 11px;
font-size: 16px;
font-weight: 700; /* Rubik 600 reads lighter than Inter 600 did; 700 holds the weight */
border-color: transparent;
background: var(--accent);
color: #14171c;
box-shadow:
0 2px 10px color-mix(in srgb, var(--accent) 26%, transparent),
0 8px 28px color-mix(in srgb, var(--accent) 16%, transparent);
}
.button.primary:hover {
/* brightness() on a saturated fill goes chalky, so lift toward paper instead and let the
shadow bloom — reads as the surface catching more light. */
filter: none;
background: color-mix(in srgb, var(--accent) 88%, #f5f7fa);
box-shadow:
0 2px 12px color-mix(in srgb, var(--accent) 34%, transparent),
0 10px 34px color-mix(in srgb, var(--accent) 22%, transparent);
}
.button .os { color: var(--text-3); font-weight: 500; }
/* The OS name is a qualifier, not part of the call to action, so it steps back from the verb
beside it — but only as far as AA allows. Measured on the #58a6f0 fill: 58% ink is 3.10:1
and fails at this size (16px/500 needs 4.5:1); 76% is the first passing value at 4.57:1.
78% is used for a little margin (4.80:1) and is still visibly lighter than the 100%-ink verb. */
.button.primary .os { color: color-mix(in srgb, #14171c 78%, transparent); font-weight: 500; }
.button.is-disabled {
cursor: default;
pointer-events: none;
color: var(--text-3);
border-color: var(--border-2);
background: var(--surface-2); /* was --surface, which is now the window itself */
box-shadow: none; /* never inherit the primary CTA's blue glow */
}
/* ── split download button: main = default format, chevron = "other versions" ── */
.dl-split { position: relative; display: inline-flex; align-items: stretch; }
/* one seamless button: main keeps left corners, drops its right border/radius so the
two halves meet flush with a single divider (the chevron's left border). */
.dl-split.has-more #primary {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-right: 0;
}
.dl-more {
min-height: 56px;
/* Divider is now ink-on-blue: the old accent/border-2 mix was tuned to show up against a
dark translucent fill and is invisible sitting on the solid accent. */
border-left: 1px solid color-mix(in srgb, #14171c 22%, transparent);
cursor: pointer;
}
/* square the inner edge + slim it down — both must beat .button.primary
(0,2,0), which otherwise forces radius 11px, padding 0 36px, font 16px. */
.dl-split.has-more .dl-more {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
padding: 0 13px;
font-size: 11px;
}
.dl-more[hidden] { display: none; }
.dl-more .chev { display: inline-block; transition: transform .2s ease; }
.dl-more[aria-expanded="true"] .chev { transform: rotate(180deg); }
/* no harsh default outline on mouse click; keep an accessible ring for keyboard focus.
The ring is paper, not accent: an accent ring offset 2px from an accent-filled button is
two blues with a 2px gap of --bg between them, which reads as a rendering artefact rather
than focus. Paper reads unambiguously against both the button and the ground. */
.dl-split .button:focus { outline: none; }
.dl-split .button:focus-visible { outline: 2px solid #f5f7fa; outline-offset: 2px; }
/* Full width of the split button (its left edge → the chevron's right edge), dropping
straight down like the button extended. Grows from the top when opened. */
.dl-menu {
position: absolute;
top: calc(100% + 6px);
left: 0;
right: 0;
z-index: 20;
display: flex;
flex-direction: column;
gap: 4px;
padding: 6px;
border: 1px solid var(--border-2);
border-radius: 11px;
background: var(--surface-2); /* one step above the window, which is now --surface */
box-shadow: 0 16px 44px rgba(0, 0, 0, 0.44);
text-align: left;
transform-origin: top center;
transform: translateY(-6px) scaleY(.97);
opacity: 0;
visibility: hidden;
transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
.dl-menu.open {
transform: none;
opacity: 1;
visibility: visible;
transition: opacity .16s ease, transform .16s ease, visibility 0s;
}
.dl-menu-item {
display: flex;
flex-direction: column;
gap: 2px;
padding: 9px 12px;
border-radius: 7px;
transition: background .15s ease;
}
.dl-menu-item:hover { background: var(--surface-3); }
.dl-menu-item .os-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.dl-menu-item .file { font-family: var(--mono); font-size: 11px; color: var(--text-3); word-break: break-all; }
/* ── download-specific, built on the same tokens ── */
.disclosure {
appearance: none;
border: 0;
background: transparent;
cursor: pointer;
margin: 52px 0 0;
display: inline-flex;
align-items: center;
gap: 7px;
color: var(--text-4);
font-size: 11px;
letter-spacing: 0.12em;
text-transform: uppercase;
transition: color .15s ease;
}
.disclosure:hover { color: var(--text-2); }
.disclosure .chev { font-size: 9px; transition: transform .2s ease; }
.disclosure[aria-expanded="true"] .chev { transform: rotate(180deg); }
/* Animated disclosure: the 0fr→1fr grid-row trick transitions to the content's
natural height (no JS measuring). The inner element clips during the slide. */
.cards {
display: grid;
grid-template-rows: 0fr;
width: 100%;
margin-top: 0;
opacity: 0;
visibility: hidden;
transition: grid-template-rows .3s ease, opacity .22s ease,
margin-top .3s ease, visibility 0s linear .3s;
}
.cards.open {
grid-template-rows: 1fr;
margin-top: 16px;
opacity: 1;
visibility: visible;
transition: grid-template-rows .3s ease, opacity .22s ease .04s,
margin-top .3s ease, visibility 0s;
}
.cards-inner {
overflow: hidden;
min-height: 0;
display: flex;
flex-direction: column;
gap: 14px;
text-align: left;
}
@media (prefers-reduced-motion: reduce) {
.cards { transition: opacity .01s, visibility 0s; }
}
.dl-label {
display: block;
margin: 0 0 8px 2px;
color: var(--text-4);
font-size: 10.5px;
letter-spacing: 0.14em;
text-transform: uppercase;
}
.dl-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.card {
display: flex;
flex-direction: column;
gap: 3px;
padding: 14px 16px;
text-align: left;
border: 1px solid var(--border-2);
border-radius: 8px;
/* Both bumped one step: the cards sit ON the window, and the window is --surface now. */
background: var(--surface-2);
transition: border-color .15s ease, background .15s ease;
}
.card:hover {
border-color: color-mix(in srgb, var(--accent) 40%, var(--border-2));
background: var(--surface-3);
}
.card .os-name { font-size: 14px; font-weight: 600; color: var(--text); }
.card .file { font-family: var(--mono); font-size: 11px; color: var(--text-3); word-break: break-all; }
.footer {
height: 44px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 0 18px;
border-top: 1px solid var(--border);
color: var(--text-4);
font-size: 11px;
}
.footer a { color: var(--text-3); }
.footer a:hover { color: var(--text-2); }
.footer .sep { margin: 0 8px; opacity: .45; }
/* GitHub mark on the engine link only: it says "this is a repo", which the ↗ (which only
says "leaves the page") cannot. Inline SVG rather than an asset — it is 300 bytes and a
separate request for a 12px glyph is not worth a round trip. currentColor so it picks up
the link's hover along with the text. */
.footer .gh {
width: 12px;
height: 12px;
vertical-align: -1.5px;
margin-right: 5px;
fill: currentColor;
}
@media (max-width: 560px) {
body { padding: 14px; }
.titlebar { grid-template-columns: auto 1fr auto; padding: 0 10px; }
.title { justify-self: center; max-width: 138px; overflow: hidden; white-space: nowrap; }
.content { padding: 44px 18px 30px; }
.actions { align-items: stretch; flex-direction: column; }
.button { width: 100%; }
.dl-split { width: 100%; }
.dl-split .button { width: auto; }
.dl-split #primary { flex: 1; }
.dl-row { grid-template-columns: 1fr; }
.footer { align-items: flex-start; height: auto; flex-direction: column; padding: 14px 16px; }
}
</style>
</head>
<body>
<main class="window" aria-label="FreeToken download">
<div class="titlebar">
<div class="dots" aria-hidden="true">
<span class="dot red"></span>
<span class="dot yellow"></span>
<span class="dot green"></span>
</div>
<div class="title">FreeToken</div>
<div class="lang" role="group" aria-label="Language">
<button type="button" class="lang-btn" data-lang="zh">中文</button>
<button type="button" class="lang-btn" data-lang="en">EN</button>
</div>
</div>
<section class="content">
<div style="width: 100%; max-width: 620px;">
<h1 class="wordmark">
<img src="assets/freetoken-logo-dark.svg" alt="FreeToken"
width="1048" height="216" />
</h1>
<p class="lead" id="lead">Bring Frontier to Edge</p>
<div class="actions">
<div class="dl-split" id="dl-split">
<a id="primary" class="button primary" href="#">Download</a>
<button type="button" id="primary-more" class="button primary dl-more"
aria-haspopup="menu" aria-expanded="false" hidden>
<span class="chev" aria-hidden="true">▾</span>
</button>
<div class="dl-menu" id="dl-menu" role="menu"></div>
</div>
</div>
<a class="version" id="version" href="#"></a>
<button type="button" class="disclosure" id="platforms-toggle"
aria-expanded="false" aria-controls="cards">
<span id="platforms-label">All platforms</span>
<span class="chev" aria-hidden="true">▾</span>
</button>
<div class="cards" id="cards">
<div class="cards-inner" id="cards-inner"></div>
</div>
</div>
</section>
<footer class="footer">
<span id="tagline">FreeToken · Bring Frontier to Edge</span>
<span id="ver">Releases</span>
</footer>
</main>
<script>
// ── edit these ─────────────────────────────────────────────
const GH_ORG = "FlashML-org";
const GH_REPO = "FreeToken-Web";
const BETA_TAG = "beta"; // rolling release tag: assets are clobbered per build, URL never changes
const VERSION = "0.2.0-beta.15"; // shown on the page — bump this each release
// ───────────────────────────────────────────────────────────
// The engine itself is open source and lives in its own repo, separate from this
// download/release host.
const GH_ENGINE = `https://github.com/${GH_ORG}/FreeToken`;
// GitHub's own mark, 16x16 viewBox, single path.
const GH_MARK =
'<svg class="gh" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 0C3.58 0 0 3.58 0 8c0' +
' 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69' +
'-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87' +
'.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2' +
'-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.8' +
'2 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.5' +
'4.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8' +
'-8-8Z"/></svg>';
const REL = `https://github.com/${GH_ORG}/${GH_REPO}/releases`;
// Download by fixed tag (works for prereleases too), not the "latest release" redirect
const DL = `${REL}/download/${BETA_TAG}`;
// The immutable per-version release CI mirrors alongside the rolling one. Its tag is the
// version with a `v` — the same `GITHUB_REF_NAME` that created it — so deriving it here
// keeps one thing to bump instead of two that could drift apart.
const VER_TAG = `v${VERSION}`;
// Desktop full package (bundles the whl) — uploaded under fixed filenames so the URLs stay stable.
// Linux ships three formats; the browser can't tell the distro (UA is a generic "X11; Linux"),
// so we default Linux to .deb and let the user pick Arch / AppImage from "All platforms".
const PLATFORMS = [
{ key: "win", label: "Windows", file: "FreeToken-Setup-win-x64.exe" },
{ key: "deb", label: "Ubuntu", file: "freetoken-desktop-amd64.deb" },
{ key: "arch", label: "Arch Linux", file: "freetoken-desktop-x86_64.pkg.tar.zst" },
{ key: "appimage", label: "AppImage", file: "freetoken-desktop-x86_64.AppImage" },
];
const LINUX_KEYS = ["deb", "arch", "appimage"];
// Detect the current OS -> return its default download; anything but Win/Linux -> null.
// Linux is marked "linux" and defaults to .deb (Arch / AppImage live in the dropdown).
// Append ?os=win|linux|arch|appimage|none to force a state (handy for local preview).
function detectPlatform() {
const forced = new URLSearchParams(location.search).get("os");
if (forced === "none") return null;
if (forced === "linux") return PLATFORMS.find(p => p.key === "deb"); // Linux default = .deb
if (forced) return PLATFORMS.find(p => p.key === forced) || null;
const ua = navigator.userAgent || "";
if (/Android/i.test(ua)) return null; // mobile
if (/Windows|Win32|Win64/i.test(ua)) return PLATFORMS.find(p => p.key === "win");
if (/Linux|X11/i.test(ua)) return PLATFORMS.find(p => p.key === "deb"); // Android already excluded above
return null; // macOS / iOS / others
}
const current = detectPlatform();
// Downloads grouped by OS so the Linux formats sit together (platform names are proper
// nouns, left untranslated). Windows is a single card; Linux shows its three formats.
const GROUPS = [
{ name: "Windows", keys: ["win"] },
{ name: "Linux", keys: LINUX_KEYS },
];
const byKey = k => PLATFORMS.find(p => p.key === k);
const cardHtml = p => `
<a class="card" href="${DL}/${p.file}">
<span class="os-name">${p.label}</span>
<span class="file">${p.file}</span>
</a>`;
document.getElementById("cards-inner").innerHTML = GROUPS.map(g => {
const items = g.keys.map(byKey).filter(Boolean);
// Fixed 3-column grid across every group so all cards are the same size
// (a group with fewer items just leaves the trailing columns empty).
return `
<div class="dl-group">
<span class="dl-label">${g.name}</span>
<div class="dl-row">${items.map(cardHtml).join("")}</div>
</div>`;
}).join("");
// Split-button dropdown: the other download formats within the current OS's group
// (e.g. on Linux the main button is .deb, the chevron opens Arch / AppImage).
const currentGroup = current ? GROUPS.find(g => g.keys.includes(current.key)) : null;
const alternatives = currentGroup
? currentGroup.keys.map(byKey).filter(p => p && p.key !== current.key)
: [];
const dlSplit = document.getElementById("dl-split");
const moreBtn = document.getElementById("primary-more");
const dlMenu = document.getElementById("dl-menu");
if (alternatives.length) {
dlSplit.classList.add("has-more");
moreBtn.hidden = false;
dlMenu.innerHTML = alternatives.map(p => `
<a class="dl-menu-item" role="menuitem" href="${DL}/${p.file}">
<span class="os-name">${p.label}</span>
<span class="file">${p.file}</span>
</a>`).join("");
}
// Current version (bump VERSION above per release). Links to THIS version's own release,
// not the rolling `beta` one: that page always describes the newest build, so following a
// version number landed on notes for something else the moment the next release shipped.
// The download buttons keep using the rolling tag, where the filenames never change.
const verEl = document.getElementById("version");
verEl.textContent = "v" + VERSION;
verEl.href = `${REL}/tag/${VER_TAG}`;
// ── i18n(en / zh_CN)────────────────────────────────────────
const I18N = {
zh: {
htmlLang: "zh-CN",
title: "FreeToken — 前沿智能, 触手可及 | FlashML",
lead: "前沿智能, 触手可及",
download: "下载 FreeToken",
unsupported: "暂不支持当前系统",
moreVersions: "其他版本",
platforms: "所有平台",
tagline: "FreeToken · 前沿智能, 触手可及",
source: "引擎源码",
releases: "全部版本",
},
en: {
htmlLang: "en",
title: "FreeToken — Bring Frontier to Edge | FlashML",
lead: "Bring Frontier to Edge",
download: "Download FreeToken",
unsupported: "Not supported on your OS yet",
moreVersions: "Other versions",
platforms: "All platforms",
tagline: "FreeToken · Bring Frontier to Edge",
source: "Engine source",
releases: "Releases",
},
};
function pickLang() {
try {
const saved = localStorage.getItem("ft-lang");
if (saved === "zh" || saved === "en") return saved;
} catch (_) {}
return /^zh/i.test(navigator.language || "") ? "zh" : "en";
}
let lang = pickLang();
function applyLang() {
const t = I18N[lang];
document.documentElement.lang = t.htmlLang;
document.title = t.title;
document.getElementById("lead").textContent = t.lead;
document.getElementById("platforms-label").textContent = t.platforms;
const primary = document.getElementById("primary");
if (current) {
primary.classList.remove("is-disabled");
primary.setAttribute("href", `${DL}/${current.file}`);
primary.innerHTML = `${t.download} <span class="os">${current.label}</span>`;
} else {
primary.classList.add("is-disabled");
primary.removeAttribute("href");
primary.textContent = t.unsupported;
}
if (moreBtn) moreBtn.setAttribute("aria-label", t.moreVersions);
document.getElementById("tagline").textContent = t.tagline;
document.getElementById("ver").innerHTML =
`<a href="${GH_ENGINE}">${GH_MARK}${t.source} ↗</a>` +
`<span class="sep" aria-hidden="true">·</span>` +
`<a href="${REL}">${t.releases} ↗</a>`;
document.querySelectorAll(".lang-btn").forEach(b =>
b.classList.toggle("active", b.dataset.lang === lang));
}
document.querySelectorAll(".lang-btn").forEach(b =>
b.addEventListener("click", () => {
lang = b.dataset.lang;
try { localStorage.setItem("ft-lang", lang); } catch (_) {}
applyLang();
}));
// Split-button dropdown: open/close the "other versions" menu, and dismiss it on an
// outside click or Escape. Only wired when the current OS actually has alternatives.
if (alternatives.length) {
const setMenuOpen = open => {
moreBtn.setAttribute("aria-expanded", String(open));
dlMenu.classList.toggle("open", open);
};
moreBtn.addEventListener("click", e => {
e.preventDefault();
setMenuOpen(moreBtn.getAttribute("aria-expanded") !== "true");
});
document.addEventListener("click", e => {
if (!dlSplit.contains(e.target)) setMenuOpen(false);
});
document.addEventListener("keydown", e => {
if (e.key === "Escape") setMenuOpen(false);
});
}
// "All platforms" disclosure: the full grouped list, collapsed by default; expanded only
// when the OS is unsupported (so a visitor still sees everything they can download).
const platformsToggle = document.getElementById("platforms-toggle");
const cardsEl = document.getElementById("cards");
function setPlatformsOpen(open) {
platformsToggle.setAttribute("aria-expanded", String(open));
cardsEl.classList.toggle("open", open);
}
setPlatformsOpen(!current);
platformsToggle.addEventListener("click", () => {
setPlatformsOpen(platformsToggle.getAttribute("aria-expanded") !== "true");
});
applyLang();
</script>
</body>
</html>