Skip to content

Commit dcf6439

Browse files
authored
Add a get started button to the top nav (#172)
1 parent 64d4a13 commit dcf6439

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

astro.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export default defineConfig({
5353
},
5454
components: {
5555
PageSidebar: './src/components/PageSidebarWithBadges.astro',
56+
LanguageSelect: './src/components/LanguageSelectWithGetStarted.astro',
5657
},
5758
expressiveCode: {
5859
themes: ['one-light', 'one-dark-pro'],
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
import Default from '@astrojs/starlight/components/LanguageSelect.astro';
3+
4+
// Get the current page route
5+
const route = Astro.locals.starlightRoute;
6+
const isSnowflakePage = route.id.startsWith('snowflake');
7+
8+
let getStartedUrl = 'https://app.localstack.cloud/sign-up';
9+
10+
if (isSnowflakePage) {
11+
getStartedUrl += 'p?emulator=snowflake';
12+
}
13+
---
14+
15+
<style>
16+
.button {
17+
background-color: #703cea;
18+
color: #fff;
19+
padding: 5px 10px;
20+
font-size: 14px;
21+
border-radius: 6px;
22+
display: flex;
23+
align-items: center;
24+
justify-content: center;
25+
height: 36px;
26+
text-decoration: none;
27+
border-color: #703cea;
28+
border-width: 1px;
29+
}
30+
.button:hover {
31+
box-shadow: 0 0 8px 0 #6e3ae8;
32+
border-color: #4d0dcf;
33+
border-width: 1px;
34+
}
35+
</style>
36+
37+
<Default><slot /></Default>
38+
<a class="button" href={getStartedUrl}>Get Started for Free</a>

0 commit comments

Comments
 (0)