Skip to content

Commit 4e2bdc2

Browse files
committed
feat: add assets for device preview content
1 parent fb96022 commit 4e2bdc2

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

docs/07-Pro Features/06-device-preview.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,25 @@
22
title: Device Preview
33
---
44

5+
import React from 'react';
6+
import VideoPlayer from '@site/src/components/Video/player';
7+
58
:::info Pro Feature
69
[Upgrade to Phoenix Code Pro](https://phcode.io/pricing) to access this feature.
710
:::
811

912
**Device Preview** lets you check how your page looks at different screen widths without leaving Phoenix Code. This is useful for testing responsive designs and debugging CSS media queries.
1013

11-
<!-- Add an image here showing the Live Preview toolbar with the device-size button on the right and the width ruler visible during a resize -->
14+
<VideoPlayer
15+
src="https://docs-images.phcode.dev/website/videos/device-size-pro-dialog.mp4"
16+
/>
1217

1318
## Choosing a device size
1419

1520
The right end of the Live Preview toolbar has a device-size button.
1621
You can click on the device icon to switch between mobile, tablet and desktop sizes. For more specific sizes, click the dropdown arrow to open a list of predefined devices and CSS breakpoints (from your stylesheets).
1722

18-
<!-- Add an image here showing the device-size dropdown with the list of devices and CSS breakpoint entries -->
23+
![Device size dropdown showing phone, tablet, and desktop entries with their widths](./images/device-size-dropdown.png "The device size dropdown")
1924

2025
> Some devices might not be available if your screen is too narrow to fit the Live Preview at that size. In that case, you can try zooming out (`Ctrl/Cmd + -`) to make more space for the preview.
2126
@@ -28,15 +33,15 @@ Phoenix Code reads your page's stylesheets and picks up the media-query breakpoi
2833

2934
> When you edit your CSS and change the breakpoints, Phoenix Code updates the device dropdown and width ruler in real time. This makes it easy to test your responsive design as you work.
3035
31-
<!-- Add an image here showing CSS breakpoint entries (@media labels) at the bottom of the device dropdown -->
32-
3336
## Width ruler
3437

3538
While you drag the edge of the Live Preview panel, a ruler appears across the toolbar with tick marks and colored bands for each of your breakpoints. A label above the preview shows the current width and the closest matching device, like `iPad Mini — 768px`.
3639

37-
<!-- Add an image here showing the width ruler with tick marks, colored breakpoint bands, and the floating device label -->
40+
![Width ruler with breakpoint bands and device label"](./images/width-ruler.png "Width ruler with breakpoint bands and device label")
3841

3942
### In Design Mode
4043

41-
In [Design Mode](./edit-mode-live-preview), the Live Preview takes over the full window. In that case, you'll see resize handles directly on the page: drag the left or right handle to change the **width**, or drag the bottom handle to change the **height**. The same ruler appears, and the label now shows both dimensions, like `iPad Mini — 768px × 1024px`.
44+
In [Design Mode](./edit-mode-live-preview), the Live Preview takes over the full window. In that case, you'll see resize handles directly on the page: drag the left or right handle to change the **width**, or drag the bottom handle to change the **height**. The same ruler appears, and the label now shows both dimensions, like `iPad Mini — 768px × 1024px`.
45+
In Design Mode, a **Fit to screen** option is also available in the device dropdown. This resizes the page to fit the available space in the Live Preview.
46+
4247

40.9 KB
Loading
84.5 KB
Loading

0 commit comments

Comments
 (0)