Skip to content

Commit 5222f99

Browse files
authored
only show quotes on windows (#1006)
1 parent 3307553 commit 5222f99

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

docs/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ Framework includes a helper script (`observable create`) for creating new projec
9090

9191
To create a new project with npm, run:
9292

93-
<pre data-copy>npm init "@observablehq"</pre>
93+
<pre data-copy>npm init <span class="win">"</span>@observablehq<span class="win">"</span></pre>
9494

9595
If you prefer Yarn, run:
9696

97-
<pre data-copy>yarn create "@observablehq"</pre>
97+
<pre data-copy>yarn create <span class="win">"</span>@observablehq<span class="win">"</span></pre>
9898

9999
You can run the above command anywhere, but you may want to `cd` to your `~/Development` directory first (or wherever you do local development).
100100

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ index: false
110110
<h1>The best dashboards are built with <em class="red">code.</em></h1>
111111
<h2>Create fast, beautiful data apps, dashboards, and reports from the command line. Write Markdown, JavaScript, SQL, Python, R… and any language you like. Free and open-source.</h2>
112112
<div class="cta">
113-
<pre data-copy>npm init @observablehq</pre>
113+
<pre data-copy>npm init <span class="win">"</span>@observablehq<span class="win">"</span></pre>
114114
<a href="./getting-started" class="small arrow" style="color: var(--theme-red);">Get started</a>
115115
</div>
116116
</div>

observablehq.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ export default {
9292
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9B88TP6PKQ"></script>
9393
<script>window.dataLayer=window.dataLayer||[];\nfunction gtag(){dataLayer.push(arguments);}\ngtag('js',new Date());\ngtag('config','G-9B88TP6PKQ');</script>`
9494
: ""
95-
}`,
95+
}
96+
<script type="module">/Win/.test(navigator.platform) || Array.from(document.querySelectorAll(".win"), (e) => e.remove())</script>`,
9697
header: `<div style="display: flex; align-items: center; gap: 0.5rem; height: 2.2rem; margin: -1.5rem -2rem 2rem -2rem; padding: 0.5rem 2rem; border-bottom: solid 1px var(--theme-foreground-faintest); font: 500 16px var(--sans-serif);">
9798
<a href="https://observablehq.com/" style="display: flex; align-items: center;">
9899
<svg width="22" height="22" viewBox="0 0 21.92930030822754 22.68549919128418" fill="currentColor">

src/style/layout.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,11 +426,10 @@
426426
content: "Copied!";
427427
position: absolute;
428428
right: calc(100% + 0.25rem);
429-
background: var(--theme-background-alt);
429+
background: linear-gradient(to right, transparent, var(--theme-background-alt) 10%);
430430
color: var(--theme-green);
431431
font: var(--font-small);
432-
border-radius: 4px;
433-
padding: 4px 8px;
432+
padding: 4px 8px 4px 16px;
434433
pointer-events: none;
435434
animation-name: observablehq-pre-copied;
436435
animation-duration: 250ms;

0 commit comments

Comments
 (0)