Skip to content

Commit ee5eff7

Browse files
authored
observable promo (#1757)
1 parent 34e5dc5 commit ee5eff7

File tree

3 files changed

+149
-0
lines changed

3 files changed

+149
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<script setup>
2+
3+
import DefaultTheme from "vitepress/theme-without-fonts";
4+
import ObservablePromo from "./ObservablePromo.vue";
5+
6+
const {Layout} = DefaultTheme;
7+
8+
</script>
9+
10+
<template>
11+
<Layout>
12+
<template #home-features-after>
13+
<ObservablePromo />
14+
</template>
15+
</Layout>
16+
</template>
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
<template>
2+
<div :class="`vp-doc ${$style.promo}`">
3+
<h1 :class="$style.hed">Build your best work with Plot on Observable</h1>
4+
<div :class="$style.subhed">The only data workflow platform capable of supporting the full power of Plot</div>
5+
<div :class="$style.columns">
6+
<div :class="$style.column">
7+
<span :class="$style['column-header']">Connect to your data instantly</span>
8+
<span :class="$style['column-body']">Pull live data from the cloud, files, and databases into one secure place — without installing anything, ever.</span>
9+
</div>
10+
<div :class="$style.column">
11+
<span :class="$style['column-header']">Code faster than you thought possible</span>
12+
<span :class="$style['column-body']">Get everything you need and none of what you don’t with lightweight automatic versioning, instant sharing, and real-time multiplayer editing.</span>
13+
</div>
14+
<div :class="$style.column">
15+
<span :class="$style['column-header']">Accelerate your team’s analysis</span>
16+
<span :class="$style['column-body']">Create a home for your team’s data analysis where you can spin up charts, maps, and data apps to explore, analyze, and iterate on together.</span>
17+
</div>
18+
</div>
19+
<a :class="$style.button" href="https://observablehq.com" target="_blank">Build with Plot on Observable →</a>
20+
</div>
21+
</template>
22+
23+
<style scoped>
24+
25+
h1 {
26+
border-top: none;
27+
}
28+
29+
</style>
30+
31+
<style module>
32+
33+
.promo {
34+
margin: 96px auto 0 auto;
35+
max-width: 1152px;
36+
padding: 0 24px;
37+
text-align: center;
38+
}
39+
40+
.column {
41+
margin: 2rem 0;
42+
}
43+
44+
.column-header {
45+
font-weight: 600;
46+
}
47+
48+
.hed,
49+
.subhed,
50+
.column {
51+
padding: 0 24px;
52+
}
53+
54+
.hed,
55+
.subhed,
56+
.column-header {
57+
text-wrap: balance;
58+
}
59+
60+
.subhed {
61+
margin-top: 1rem;
62+
opacity: 0.7;
63+
}
64+
65+
a.button {
66+
display: inline-block;
67+
border: 1px solid transparent;
68+
text-align: center;
69+
font-weight: 600;
70+
white-space: nowrap;
71+
background-color: var(--vp-c-neutral);
72+
color: var(--vp-c-neutral-inverse);
73+
border-radius: 20px;
74+
padding: 0 20px;
75+
line-height: 38px;
76+
font-size: 14px;
77+
margin: 0 24px;
78+
}
79+
80+
a.button:hover {
81+
text-decoration: none;;
82+
}
83+
84+
@media (min-width: 640px) {
85+
.promo {
86+
padding: 0 48px;
87+
}
88+
}
89+
90+
@media (min-width: 768px) {
91+
.promo {
92+
margin-top: 128px;
93+
}
94+
}
95+
96+
@media (max-width: 959px) {
97+
.promo {
98+
max-width: 768px;
99+
}
100+
.column-header::after {
101+
content: " · ";
102+
}
103+
.columns {
104+
text-align: initial;
105+
}
106+
}
107+
108+
@media (min-width: 960px) {
109+
.promo {
110+
padding: 0 64px;
111+
}
112+
.subhed {
113+
margin-top: 0.5rem;
114+
}
115+
.columns {
116+
display: grid;
117+
grid-template-columns: repeat(3, 1fr);
118+
}
119+
.column {
120+
margin: 4rem 0;
121+
}
122+
.column-header {
123+
margin-bottom: 0.5rem;
124+
}
125+
.column-header,
126+
.column-body {
127+
display: block;
128+
}
129+
}
130+
131+
</style>

docs/.vitepress/theme/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ import DefaultTheme from "vitepress/theme-without-fonts";
22
import {useData} from "vitepress";
33
import {watch} from "vue";
44
import PlotRender from "../../components/PlotRender.js";
5+
import CustomLayout from "./CustomLayout.vue";
56
import "./custom.css";
67

78
export default {
89
extends: DefaultTheme,
10+
Layout: CustomLayout,
911
enhanceApp({app, router}) {
1012
Object.defineProperty(app.config.globalProperties, "$dark", {get: () => useData().isDark.value});
1113
app.component("PlotRender", PlotRender);

0 commit comments

Comments
 (0)