diff --git a/docs/images/quartz layout.png b/docs/images/quartz layout.png deleted file mode 100644 index 71ef3ac71..000000000 Binary files a/docs/images/quartz layout.png and /dev/null differ diff --git a/docs/images/quartz-layout-desktop.png b/docs/images/quartz-layout-desktop.png new file mode 100644 index 000000000..461d7916a Binary files /dev/null and b/docs/images/quartz-layout-desktop.png differ diff --git a/docs/images/quartz-layout-mobile.png b/docs/images/quartz-layout-mobile.png new file mode 100644 index 000000000..ad6c09e12 Binary files /dev/null and b/docs/images/quartz-layout-mobile.png differ diff --git a/docs/images/quartz-layout-tablet.png b/docs/images/quartz-layout-tablet.png new file mode 100644 index 000000000..6349f2975 Binary files /dev/null and b/docs/images/quartz-layout-tablet.png differ diff --git a/docs/layout.md b/docs/layout.md index 686b2f29f..d8427c4cd 100644 --- a/docs/layout.md +++ b/docs/layout.md @@ -13,15 +13,19 @@ export interface FullPageLayout { beforeBody: QuartzComponent[] // laid out vertically pageBody: QuartzComponent // single component afterBody: QuartzComponent[] // laid out vertically - left: QuartzComponent[] // vertical on desktop, horizontal on mobile - right: QuartzComponent[] // vertical on desktop, horizontal on mobile + left: QuartzComponent[] // vertical on desktop and tablet, horizontal on mobile + right: QuartzComponent[] // vertical on desktop, horizontal on tablet and mobile footer: QuartzComponent // single component } ``` These correspond to following parts of the page: -![[quartz layout.png|800]] +| Layout | Preview | +| ------------------------------- | ----------------------------------- | +| Desktop (width > 1200px) | ![[quartz-layout-desktop.png\|800]] | +| Tablet (800px < width < 1200px) | ![[quartz-layout-tablet.png\|800]] | +| Mobile (width < 800px) | ![[quartz-layout-mobile.png\|800]] | > [!note] > There are two additional layout fields that are _not_ shown in the above diagram. @@ -33,6 +37,23 @@ Quartz **components**, like plugins, can take in additional properties as config See [a list of all the components](component.md) for all available components along with their configuration options. You can also checkout the guide on [[creating components]] if you're interested in further customizing the behaviour of Quartz. +### Layout breakpoints + +Quartz has different layouts depending on the width the screen viewing the website. + +The breakpoints for layouts can be configured in `variables.scss`. + +- `mobile`: screen width below this size will use mobile layout. +- `desktop`: screen width above this size will use desktop layout. +- Screen width between `mobile` and `desktop` width will use the tablet layout. + +```scss +$breakpoints: ( + mobile: 800px, + desktop: 1200px, +); +``` + ### Style Most meaningful style changes like colour scheme and font can be done simply through the [[configuration#General Configuration|general configuration]] options. However, if you'd like to make more involved style changes, you can do this by writing your own styles. Quartz 4, like Quartz 3, uses [Sass](https://sass-lang.com/guide/) for styling. diff --git a/package-lock.json b/package-lock.json index 89287e602..b53f28fea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@jackyzha0/quartz", - "version": "4.3.1", + "version": "4.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@jackyzha0/quartz", - "version": "4.3.1", + "version": "4.4.0", "license": "MIT", "dependencies": { "@clack/prompts": "^0.7.0", diff --git a/package.json b/package.json index b24f66704..44d7bb3ad 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@jackyzha0/quartz", "description": "🌱 publish your digital garden and notes as a website", "private": true, - "version": "4.3.1", + "version": "4.4.0", "type": "module", "author": "jackyzha0 ", "license": "MIT", diff --git a/quartz/components/renderPage.tsx b/quartz/components/renderPage.tsx index ec5124f4f..f2dcceaa5 100644 --- a/quartz/components/renderPage.tsx +++ b/quartz/components/renderPage.tsx @@ -242,8 +242,8 @@ export function renderPage( {RightComponent} +