Skip to content

Commit c3c4fe6

Browse files
committed
feat: update
1 parent e74c152 commit c3c4fe6

20 files changed

+326
-211
lines changed

docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export default defineConfig({
6969
{ text: "CLI", link: "/cli/" },
7070
{ text: "API", link: "/api/" },
7171
{ text: "Fontist", link: "https://www.fontist.org/fontist/", target: "_self" },
72+
{ text: "Formulas", link: "https://www.fontist.org/formulas/", target: "_self" },
7273
],
7374

7475
// Sidebar configuration
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<script setup>
2+
defineProps({
3+
title: {
4+
type: String,
5+
default: 'Terminal'
6+
}
7+
})
8+
</script>
9+
10+
<template>
11+
<div class="hero-code-block">
12+
<div class="code-header">
13+
<span class="dot"></span>
14+
<span class="dot"></span>
15+
<span class="dot"></span>
16+
<span class="code-title">{{ title }}</span>
17+
</div>
18+
<div class="code-content"><slot /></div>
19+
</div>
20+
</template>
21+
22+
<style scoped>
23+
.hero-code-block {
24+
background: var(--vp-c-bg-soft);
25+
border: 1px solid var(--vp-c-divider);
26+
border-radius: 12px;
27+
overflow: hidden;
28+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
29+
max-width: 550px;
30+
width: 100%;
31+
font-size: 0.85rem;
32+
}
33+
34+
@media (max-width: 768px) {
35+
.hero-code-block {
36+
max-width: 100%;
37+
font-size: 0.8rem;
38+
}
39+
}
40+
41+
.code-header {
42+
display: flex;
43+
align-items: center;
44+
gap: 0.5rem;
45+
padding: 0.75rem 1rem;
46+
background: var(--vp-c-bg-alt);
47+
border-bottom: 1px solid var(--vp-c-divider);
48+
}
49+
50+
.dot {
51+
width: 12px;
52+
height: 12px;
53+
border-radius: 50%;
54+
flex-shrink: 0;
55+
}
56+
57+
.dot:nth-child(1) { background: #ff5f56; }
58+
.dot:nth-child(2) { background: #ffbd2e; }
59+
.dot:nth-child(3) { background: #28c840; }
60+
61+
.code-title {
62+
margin-left: auto;
63+
font-size: 0.8rem;
64+
color: var(--vp-c-text-3);
65+
}
66+
67+
.code-content {
68+
margin: 0;
69+
padding: 1.25rem;
70+
font-family: var(--vp-font-family-mono);
71+
font-size: inherit;
72+
line-height: 1.7;
73+
overflow-x: auto;
74+
-webkit-overflow-scrolling: touch;
75+
}
76+
77+
.code-content :deep(.line) {
78+
display: block;
79+
}
80+
81+
.code-content :deep(.prompt) {
82+
color: var(--vp-c-brand-1);
83+
font-weight: 500;
84+
}
85+
86+
.code-content :deep(.success) {
87+
color: #28c840;
88+
}
89+
90+
.code-content :deep(.comment) {
91+
color: var(--vp-c-text-3);
92+
font-style: italic;
93+
}
94+
95+
.code-content :deep(.cmd) {
96+
font-weight: 600;
97+
}
98+
</style>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<template>
2+
<ClientOnly>
3+
<Teleport to=".VPHero > .container">
4+
<div class="within-hero__slot-container">
5+
<slot />
6+
</div>
7+
</Teleport>
8+
</ClientOnly>
9+
</template>
10+
11+
<style>
12+
.within-hero__slot-container {
13+
order: 2;
14+
}
15+
16+
.VPHero > .container > .main {
17+
width: unset;
18+
flex-shrink: unset;
19+
}
20+
21+
.VPHero > .container {
22+
gap: 32px;
23+
}
24+
25+
@media (min-width: 960px) {
26+
.VPHero > .container {
27+
gap: 64px;
28+
}
29+
}
30+
</style>

docs/.vitepress/theme/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import "./style.css";
66
import FeatureComparison from "./components/FeatureComparison.vue";
77
import Badge from "./components/Badge.vue";
88
import ApiMethod from "./components/ApiMethod.vue";
9+
import HeroCodeBlock from "./components/HeroCodeBlock.vue";
10+
import WithinHero from "./components/WithinHero.vue";
911

1012
export default {
1113
extends: DefaultTheme,
@@ -14,5 +16,7 @@ export default {
1416
app.component("FeatureComparison", FeatureComparison);
1517
app.component("Badge", Badge);
1618
app.component("ApiMethod", ApiMethod);
19+
app.component("HeroCodeBlock", HeroCodeBlock);
20+
app.component("WithinHero", WithinHero);
1721
},
1822
} satisfies Theme;

docs/apple-touch-icon.png

-4.06 KB
Binary file not shown.

docs/favicon-96x96.png

-2.09 KB
Binary file not shown.

docs/favicon.ico

-14.7 KB
Binary file not shown.

docs/favicon.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/index.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ features:
3636
details: Zero external dependencies. No Python, no C++, no C# required. Works anywhere Ruby runs.
3737
---
3838

39+
<WithinHero>
40+
<HeroCodeBlock title="fontisan"><div class="line"><span class="comment"># Get detailed font information</span></div><div class="line"><span class="prompt">$</span> <span class="cmd">fontisan</span> info OpenSans-Regular.ttf</div><div class="line">Family: Open Sans Style: Regular Format: TTF</div><div class="line"><span class="comment"># Convert between formats</span></div><div class="line"><span class="prompt">$</span> <span class="cmd">fontisan</span> convert font.ttf --to woff2</div><div class="line"><span class="success">✓</span> font.woff2 created (45% smaller)</div><div class="line"><span class="comment"># Validate with Google Fonts profile</span></div><div class="line"><span class="prompt">$</span> <span class="cmd">fontisan</span> validate font.ttf -p google_fonts</div><div class="line"><span class="success">✓</span> All 56 checks passed</div></HeroCodeBlock>
41+
</WithinHero>
42+
3943
<style>
4044
.pure-ruby-hero {
4145
display: inline-flex;
@@ -81,7 +85,23 @@ Fontisan is the **most comprehensive font processing library in pure Ruby**, com
8185

8286
[See full comparison →](/guide/comparisons/)
8387

84-
## Quick Start
88+
## CLI Usage
89+
90+
```bash
91+
# Get font information
92+
fontisan info font.ttf
93+
94+
# Convert fonts
95+
fontisan convert input.ttf --to otf --output output.otf
96+
97+
# Validate fonts
98+
fontisan validate font.ttf --profile google_fonts
99+
100+
# Work with collections
101+
fontisan unpack fonts.ttc --output-dir ./extracted
102+
```
103+
104+
## Ruby API
85105

86106
```ruby
87107
require 'fontisan'
@@ -102,22 +122,6 @@ result = Fontisan::FontValidator.validate('font.otf', profile: :google_fonts)
102122
puts result.passed?
103123
```
104124

105-
## CLI Usage
106-
107-
```bash
108-
# Get font information
109-
fontisan info font.ttf
110-
111-
# Convert fonts
112-
fontisan convert input.ttf --to otf --output output.otf
113-
114-
# Validate fonts
115-
fontisan validate font.ttf --profile google_fonts
116-
117-
# Work with collections
118-
fontisan unpack fonts.ttc --output-dir ./extracted
119-
```
120-
121125
## Migration Guides
122126

123127
Coming from another tool? We have migration guides:

0 commit comments

Comments
 (0)