Skip to content

Commit 16ee189

Browse files
committed
docs: update getting-started cast font size
1 parent 17c3a28 commit 16ee189

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

site/src/components/AsciinemaPlayer.astro

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ interface Props extends HTMLAttributes<'div'> {
99
theme?: string;
1010
rows?: number;
1111
cols?: number;
12+
terminalFontSize?: number;
1213
}
1314
1415
const {
@@ -19,6 +20,7 @@ const {
1920
theme = 'asciinema',
2021
rows,
2122
cols,
23+
terminalFontSize,
2224
...rest
2325
} = Astro.props;
2426
@@ -33,7 +35,7 @@ const playerId = `player-${Math.random().toString(36).slice(2, 9)}`;
3335
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/asciinema-player@3/dist/bundle/asciinema-player.css" />
3436
<script src="https://cdn.jsdelivr.net/npm/asciinema-player@3/dist/bundle/asciinema-player.min.js" defer is:inline></script>
3537

36-
<script define:vars={{ playerId, src, autoPlay, loop, speed, theme, rows, cols }} is:inline>
38+
<script define:vars={{ playerId, src, autoPlay, loop, speed, theme, rows, cols, terminalFontSize }} is:inline>
3739
// Wait for AsciinemaPlayer to be available
3840
function initPlayer() {
3941
const playerDiv = document.getElementById(playerId);
@@ -45,7 +47,8 @@ const playerId = `player-${Math.random().toString(36).slice(2, 9)}`;
4547
loop,
4648
speed,
4749
theme,
48-
fit: 'width',
50+
fit: terminalFontSize ? false : 'width',
51+
terminalFontSize: terminalFontSize ?? 'medium'
4952
};
5053

5154
if (rows) options.rows = parseInt(rows);

site/src/content/docs/getting-started/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ modestbench provides clean, colorized output in interactive terminals:
190190
speed={1.0}
191191
theme="asciinema"
192192
rows={60}
193+
terminalFontSize={16}
193194
/>
194195

195196
:::note[Output Format]

0 commit comments

Comments
 (0)