Skip to content

Commit 80d01b2

Browse files
committed
feat: add embedZoom parameter handling for demo iframe and adjust body zoom
1 parent dd6901e commit 80d01b2

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

adminforth/documentation/src/pages/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import HomepageFeatures from '@site/src/components/HomepageFeatures';
66
import Heading from '@theme/Heading';
77
import styles from './index.module.css';
88

9-
const LIVE_DEMO_IFRAME_URL = `https://demo.adminforth.dev/overview?autologin=${encodeURIComponent('demo@adminfoth.dev:demo')}`;
9+
const LIVE_DEMO_IFRAME_URL = `https://demo.adminforth.dev/overview?autologin=${encodeURIComponent('demo@adminfoth.dev:demo')}&embedZoom=0.7`;
1010

1111

1212
const images = [
@@ -140,7 +140,7 @@ function HomepageHeader() {
140140
</Heading>
141141
<p className="hero__subtitle">{siteConfig.tagline}</p>
142142

143-
<div class="heroRow">
143+
<div className="heroRow">
144144
<div className={styles.buttons}>
145145
<Link
146146
className="button button--secondary button--outline button--lg"

adminforth/spa/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
<!-- /* IMPORTANT:ADMINFORTH HEAD */ -->
1818
</head>
1919
<body class="min-h-screen flex flex-col">
20+
<script>
21+
const embedZoom = Number(new URLSearchParams(window.location.search).get('embedZoom'));
22+
if (Number.isFinite(embedZoom) && embedZoom > 0) {
23+
document.body.style.zoom = String(embedZoom);
24+
}
25+
</script>
2026
<div id="app" class="grow bg-lightHtml dark:bg-darkHtml w-full"></div>
2127
<script type="module" src="/src/main.ts"></script>
2228
</body>

0 commit comments

Comments
 (0)