Skip to content

Commit

Permalink
feat: update videos
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoperra committed Dec 10, 2023
1 parent 2650454 commit b07462b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions apps/codeimage/changelog/1-5-0_12-09-2023.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Prior authorisation, this allows you to access yours locally installed fonts to
compatibilityTableLink={'https://developer.mozilla.org/en-US/docs/Web/API/Local_Font_Access_API#browser_compatibility'}
supported={'queryLocalFonts' in window}/>

<MdxVideo src={fontPickerUrl} />
<MdxVideo src={fontPickerUrl} ratio={'4/3'}/>

### 🖥️ New Window style themes

Expand All @@ -29,12 +29,12 @@ The window select has been updated introducing two new terminal themes:

We've also moved the old "accent mode" toggle in the sidebar to the window selection as a checkbox.

<MdxVideo src={windowStyleUrl} />
<MdxVideo src={windowStyleUrl} ratio={'14/9'} />

### 🎨 New Xcode like themes

The themes collection has been updated introducing two new themes inspired from Xcode:
- `Xcode Dark`
- `Xcode light`

<MdxVideo src={xcodeThemeUrl} />
<MdxVideo src={xcodeThemeUrl} ratio={'4/3'} />
Empty file modified apps/codeimage/changelog/data/1-5-0/font-picker.mp4
100644 → 100755
Empty file.
Binary file modified apps/codeimage/changelog/data/1-5-0/xcode-theme.mp4
Binary file not shown.
8 changes: 7 additions & 1 deletion apps/codeimage/src/mdx/Video.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import {themeVars} from '@codeui/kit';
import {JSX, onCleanup, onMount} from 'solid-js';
import * as styles from './components.css';

export function MdxVideo(props: JSX.IntrinsicElements['video']) {
export function MdxVideo(
props: JSX.IntrinsicElements['video'] & {ratio: string},
) {
let ref!: HTMLVideoElement;

onMount(() => {
Expand All @@ -28,6 +31,9 @@ export function MdxVideo(props: JSX.IntrinsicElements['video']) {
muted
preload={'none'}
loop
style={{
'aspect-ratio': props.ratio,
}}
{...props}
/>
);
Expand Down
1 change: 1 addition & 0 deletions apps/codeimage/src/mdx/components.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export const video = style({
display: 'block',
marginTop: themeTokens.spacing['3'],
marginBottom: themeTokens.spacing['6'],
backgroundColor: themeVars.formAccent,
});

export const a = style({
Expand Down

0 comments on commit b07462b

Please sign in to comment.