Skip to content

observable promo #1757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/.vitepress/theme/CustomLayout.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<script setup>

import DefaultTheme from "vitepress/theme-without-fonts";
import ObservablePromo from "./ObservablePromo.vue";

const {Layout} = DefaultTheme;

</script>

<template>
<Layout>
<template #home-features-after>
<ObservablePromo />
</template>
</Layout>
</template>
131 changes: 131 additions & 0 deletions docs/.vitepress/theme/ObservablePromo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
<template>
<div :class="`vp-doc ${$style.promo}`">
<h1 :class="$style.hed">Build your best work with Plot on Observable</h1>
<div :class="$style.subhed">The only data workflow platform capable of supporting the full power of Plot</div>
<div :class="$style.columns">
<div :class="$style.column">
<span :class="$style['column-header']">Connect to your data instantly</span>
<span :class="$style['column-body']">Pull live data from the cloud, files, and databases into one secure place — without installing anything, ever.</span>
</div>
<div :class="$style.column">
<span :class="$style['column-header']">Code faster than you thought possible</span>
<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>
</div>
<div :class="$style.column">
<span :class="$style['column-header']">Accelerate your team’s analysis</span>
<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>
</div>
</div>
<a :class="$style.button" href="https://observablehq.com" target="_blank">Build with Plot on Observable →</a>
</div>
</template>

<style scoped>

h1 {
border-top: none;
}

</style>

<style module>

.promo {
margin: 96px auto 0 auto;
max-width: 1152px;
padding: 0 24px;
text-align: center;
}

.column {
margin: 2rem 0;
}

.column-header {
font-weight: 600;
}

.hed,
.subhed,
.column {
padding: 0 24px;
}

.hed,
.subhed,
.column-header {
text-wrap: balance;
}

.subhed {
margin-top: 1rem;
opacity: 0.7;
}

a.button {
display: inline-block;
border: 1px solid transparent;
text-align: center;
font-weight: 600;
white-space: nowrap;
background-color: var(--vp-c-neutral);
color: var(--vp-c-neutral-inverse);
border-radius: 20px;
padding: 0 20px;
line-height: 38px;
font-size: 14px;
margin: 0 24px;
}

a.button:hover {
text-decoration: none;;
}

@media (min-width: 640px) {
.promo {
padding: 0 48px;
}
}

@media (min-width: 768px) {
.promo {
margin-top: 128px;
}
}

@media (max-width: 959px) {
.promo {
max-width: 768px;
}
.column-header::after {
content: " · ";
}
.columns {
text-align: initial;
}
}

@media (min-width: 960px) {
.promo {
padding: 0 64px;
}
.subhed {
margin-top: 0.5rem;
}
.columns {
display: grid;
grid-template-columns: repeat(3, 1fr);
}
.column {
margin: 4rem 0;
}
.column-header {
margin-bottom: 0.5rem;
}
.column-header,
.column-body {
display: block;
}
}

</style>
2 changes: 2 additions & 0 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import DefaultTheme from "vitepress/theme-without-fonts";
import {useData} from "vitepress";
import {watch} from "vue";
import PlotRender from "../../components/PlotRender.js";
import CustomLayout from "./CustomLayout.vue";
import "./custom.css";

export default {
extends: DefaultTheme,
Layout: CustomLayout,
enhanceApp({app, router}) {
Object.defineProperty(app.config.globalProperties, "$dark", {get: () => useData().isDark.value});
app.component("PlotRender", PlotRender);
Expand Down