Skip to content

Commit 1b2cf53

Browse files
committed
Include sidebar also on the startpage
1 parent 155af5a commit 1b2cf53

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

docs/src/components/Hero.astro

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
import type { Props } from '@astrojs/starlight/props'
3-
import CallToAction from '@astrojs/starlight/components/CallToAction.astro'
4-
import { Code } from '@astrojs/starlight/components'
5-
import { Content as Tagline } from './tagline.md'
2+
import type { Props } from '@astrojs/starlight/props';
3+
import CallToAction from '@astrojs/starlight/components/CallToAction.astro';
4+
import { Code } from '@astrojs/starlight/components';
5+
import { Content as Tagline } from './tagline.md';
66
---
77

8-
<div class="hero">
9-
<div class="hero-html sl-flex">
8+
<div class="hero lg:grid lg:grid-cols-hero lg:gap-5">
9+
<div class="hero-html">
1010
<div>
1111
<Code
1212
code={`
@@ -31,7 +31,7 @@ local k = import "k.libsonnet";
3131
</div>
3232
</div>
3333
</div>
34-
<div class="sl-flex stack">
34+
<div class="flex stack">
3535
<div class="sl-flex copy">
3636
<h1 data-page-title>Define. Reuse. Override.</h1>
3737
<div class="tagline">
@@ -59,10 +59,11 @@ local k = import "k.libsonnet";
5959
</div>
6060

6161
<style>
62+
:global([data-has-hero] .sl-container) {
63+
max-width: 67.5rem;
64+
}
65+
6266
.hero {
63-
display: grid;
64-
align-items: center;
65-
gap: 1rem;
6667
padding-bottom: 1rem;
6768
}
6869

@@ -117,8 +118,6 @@ local k = import "k.libsonnet";
117118

118119
@media (min-width: 50rem) {
119120
.hero {
120-
grid-template-columns: 7fr 4fr;
121-
gap: 3%;
122121
padding-block: clamp(2.5rem, calc(1rem + 10vmin), 10rem);
123122
}
124123

docs/src/content/docs/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: 'Grafana Tanka'
3-
template: splash
43
head:
54
- tag: title
65
content: Grafana Tanka
76
# This needs to be here for starlight to pick up the correct Hero override
87
hero:
98
tagline: ''
9+
tableOfContents: false
1010
---
1111

1212
import { Card, CardGrid } from '@astrojs/starlight/components';

docs/tailwind.config.mjs

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ export default {
1313
fontFamily: {
1414
sans: ['"Inter Variable"'],
1515
},
16+
gridTemplateColumns: {
17+
'hero': '7fr 4fr',
18+
},
1619
},
1720
},
1821
plugins: [starlightPlugin()],

0 commit comments

Comments
 (0)