Skip to content

Commit 100bb88

Browse files
committed
redo screenshots
1 parent 80c23d7 commit 100bb88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+14
-5
lines changed

screenshot-examples.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ const takeScreenshot = async (page, urlPath, outputPath, isDarkMode = false) =>
9494
const finalOutputPath = outputPath.replace('.png', `${themeSuffix}.png`);
9595

9696
// Wait for the Plot component to be rendered
97-
await page.waitForSelector('.content > figure.svelteplot', { timeout: 10000 });
97+
await page.waitForSelector('.content figure.svelteplot ', {
98+
timeout: 10000
99+
});
98100

99101
// Toggle dark mode if needed
100102
if (isDarkMode) {
@@ -112,7 +114,7 @@ const takeScreenshot = async (page, urlPath, outputPath, isDarkMode = false) =>
112114

113115
// Get the Plot SVG element
114116
const elementHandle = await page.evaluateHandle(() =>
115-
document.querySelector('.content > figure.svelteplot > .plot-body > svg')
117+
document.querySelector('.content .screenshot')
116118
);
117119

118120
// Take a screenshot of the element

src/routes/examples/[group]/[page]/+page.svelte

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<script>
1+
<script lang="ts">
22
import { page } from '$app/state';
33
import { HighlightSvelte } from 'svelte-highlight';
44
import codeStyleLight from 'svelte-highlight/styles/atom-one-light';
@@ -56,14 +56,21 @@
5656
<h1 class="page-title">{mod.title}</h1>
5757
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
5858
{#if mod.description}<p>{@html mod.description}</p>{/if}
59-
<mod.default />
59+
60+
<div class="screenshot">
61+
<mod.default />
62+
</div>
6063

6164
<div class="svp-code-block-wrapper">
6265
<div class="svp-code-block">
6366
<HighlightSvelte
6467
lang="svelte"
6568
code={pagesSrc[plotKey].substring(
66-
pagesSrc[plotKey].indexOf('<Plot')
69+
pagesSrc[plotKey].indexOf(
70+
pages[plotKey].fullCode
71+
? '<script lang="ts">'
72+
: '<Plot'
73+
)
6774
)} />
6875
</div>
6976
</div>
222 Bytes
216 Bytes
127 Bytes

static/examples/axis/major-minor.png

126 Bytes
157 Bytes

static/examples/axis/tick-count.png

134 Bytes
135 Bytes
135 Bytes

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy