Skip to content

Commit

Permalink
hide other landing pages for now, rework CTA component
Browse files Browse the repository at this point in the history
  • Loading branch information
philmillman committed Sep 3, 2024
1 parent 73ee5fb commit 9a1323d
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
---
import DIcon from '@/components/DIcon.astro';
interface Props {
text?: string;
href?: string;
command?: string;
}
const { text, href, command } = Astro.props as Props;
const { command } = Astro.props;
---

<div class="cta-wrap">
<div class="install-command">
<DIcon name="console" />
<div>{command}</div>
<DIcon name={['copy', 'check']} class="install-command__copy" />
</div>
{ href && text &&
<a href={href} class="button">{text}</a>
}
{command &&
<div class="install-command">
<DIcon name="console" />
<div>{command}</div>
<DIcon name={['copy', 'check']} class="install-command__copy" />
</div>
}
</div>

<style lang="less">
Expand Down
4 changes: 4 additions & 0 deletions packages/docs-site/src/components/FeatureBlock.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ const { title, imagePath, imageAlt, description } = Astro.props as Props;
h2 {
margin: 3rem;
}
img {
max-width: 90%;
margin: 0 auto;
}
</style>
1 change: 1 addition & 0 deletions packages/docs-site/src/components/VideoBlock.astro
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const { muxId } = Astro.props;
margin: 0 auto;
width: 90%;
aspect-ratio: 16/10;
--mute-button: none;
}
}
</style>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import LandingPage from '@/components/layouts/LandingPage.astro';
import VideoBlock from '@/components/VideoBlock.astro';
import InitCTA from '@/components/InitCTA.astro';
import CTABlock from '@/components/CTABlock.astro';
import Hero from '@/components/Hero.astro';
---
Expand All @@ -16,8 +16,7 @@ import Hero from '@/components/Hero.astro';
heading="Stop worrying about environment variables and just write code."
subheading="DMNO augments your favorite frameworks with type-safe env vars while detecting and preventing you from leaking sensitive information. Worried about hybrid rendering? Don't be. DMNO has you covered."
/>
<VideoBlock url="https://drive.google.com/file/d/1NP3jE0UVeEbBvVczVnevvcDtAZOFo9tJ/preview"/>
<InitCTA
<CTABlock
command="npx dmno init"
/>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import LandingPage from '@/components/layouts/LandingPage.astro';
import VideoBlock from '@/components/VideoBlock.astro';
import InitCTA from '@/components/InitCTA.astro';
import CTABlock from '@/components/CTABlock.astro';
import Hero from '@/components/Hero.astro';
---
Expand All @@ -16,11 +16,10 @@ import Hero from '@/components/Hero.astro';
heading="Keep your env vars close to your code and deploy with ease."
subheading="No more fiddling with multiple .env files or manually pasting values in 5 different places. DMNO's knows how to deal with your frameworks and the platforms you deploy them on."
/>
<VideoBlock url="https://drive.google.com/file/d/1NP3jE0UVeEbBvVczVnevvcDtAZOFo9tJ/preview"/>
<InitCTA
<CTABlock
command="npm add @dmno/vercel-platform"
/>
<InitCTA
<CTABlock
command="npm add @dmno/netlify-platform"
/>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import LandingPage from '@/components/layouts/LandingPage.astro';
import VideoBlock from '@/components/VideoBlock.astro';
import InitCTA from '@/components/InitCTA.astro';
import CTABlock from '@/components/CTABlock.astro';
import Hero from '@/components/Hero.astro';
---
Expand All @@ -16,8 +16,7 @@ import Hero from '@/components/Hero.astro';
heading="Secrets: secure and simplified."
subheading="DMNO makes it as easy as possible to use secrets in your applications. Encrypt in a vault, or sync with your provider of choice."
/>
<VideoBlock url="https://drive.google.com/file/d/1capuTZAMUFNFeuMmNOGGpFi32fuSvIa9/preview"/>
<InitCTA
<CTABlock
command="npm add @dmno/encrypted-vault-plugin"
/>

Expand Down
24 changes: 16 additions & 8 deletions packages/docs-site/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Code } from '@astrojs/starlight/components';
import LandingPage from '@/components/layouts/LandingPage.astro';
import VideoBlock from '@/components/VideoBlock.astro';
import InitCTA from '@/components/InitCTA.astro';
import CTABlock from '@/components/CTABlock.astro';
import Hero from '@/components/Hero.astro';
import FeatureBlock from '@/components/FeatureBlock.astro';
Expand All @@ -24,13 +24,15 @@ const muxId = "dTb7Y3p00ajAOcSF4x00DZN7lkXGU00i2nfW3puCWVfyos";
heading="Environment Variables. \n Evolved."
subheading="DMNO makes your configuration safer and smarter. It integrates with the tools you already use and it's powered by TypeScript and Vite."
/>
<InitCTA
<CTABlock
text="Get started ->"
href="/docs/get-started/quickstart/"
command="npx dmno init"
/>
<!-- <img src={screenshotImg.src} alt="an annotated screenshot showing DMNO's various features"> -->
<VideoBlock muxId={muxId}/>

<h2>Configuration as Code</h2>
<h2>Schema-defined configuration</h2>
<Code
code={`
import { DmnoBaseTypes, defineDmnoService, switchBy } from 'dmno';
Expand Down Expand Up @@ -78,23 +80,29 @@ export default defineDmnoService({
title=".dmno/config.mts - sample config file"
class="landing-page-code"
/>
<CTABlock
text="Read more ->"
href="/docs/guides/schema/"
/>
<FeatureBlock
title="Leak prevention and detection"
imagePath={leakImg.src}
imageAlt="DMNO Warning of a potential leak"
description=""
/>
<InitCTA
command="npx dmno init"
<CTABlock
text="Read more ->"
href="/docs/get-started/security/#leak-detection"
/>
<FeatureBlock
title="Feature-rich IntelliSense"
imagePath={intellisenseImg.src}
imageAlt="VS Code screenshot showing DMNO's IntelliSense"
description=""
/>
<InitCTA
command="npx dmno init"
<CTABlock
text="Read more ->"
href="https://dmno.dev/docs/guides/schema/#docs--intellisense"
/>

</LandingPage>
Expand All @@ -106,6 +114,6 @@ export default defineDmnoService({
margin-top: 2rem;
}
h2 {
margin: 2rem 1rem;
margin: 2rem 3rem;
}
</style>

0 comments on commit 9a1323d

Please sign in to comment.