Skip to content

Commit d0672fd

Browse files
committed
design changes
1 parent f503985 commit d0672fd

File tree

5 files changed

+65
-145
lines changed

5 files changed

+65
-145
lines changed

astro.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default defineConfig({
4040
favicon: '/images/favicons/favicon.ico',
4141
customCss: ['./src/styles/global.css'],
4242
components: {
43-
TwoColumnContent: './src/components/ContentWithPricing.astro',
43+
PageTitle: './src/components/PageTitleWithPricing.astro',
4444
},
4545
head: [
4646
{

src/components/ContentWithPricing.astro

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
import Default from '@astrojs/starlight/components/PageTitle.astro';
3+
4+
// Get the current page route
5+
const route = Astro.locals.starlightRoute;
6+
const isAwsServicePage = route.id.startsWith('aws/services/') && !route.id.includes('/index');
7+
const tags = route.entry?.data?.tags || [];
8+
9+
// Find pricing tags
10+
const pricingTags = tags.filter(tag =>
11+
['Free', 'Base', 'Ultimate'].includes(tag)
12+
);
13+
---
14+
15+
<Default />
16+
17+
{isAwsServicePage && pricingTags.length > 0 && (
18+
<div class="pricing-badges">
19+
{pricingTags.map(tag => (
20+
<span class={`pricing-badge pricing-badge-${tag.toLowerCase()}`}>
21+
{tag}
22+
</span>
23+
))}
24+
</div>
25+
)}
26+
27+
<style>
28+
.pricing-badges {
29+
margin-top: 0.5rem;
30+
margin-bottom: 1.5rem;
31+
display: flex;
32+
gap: 0.5rem;
33+
flex-wrap: wrap;
34+
}
35+
36+
.pricing-badge {
37+
display: inline-flex;
38+
align-items: center;
39+
padding: 0.25rem 0.75rem;
40+
border-radius: 1rem;
41+
font-size: 0.875rem;
42+
font-weight: 600;
43+
text-transform: uppercase;
44+
letter-spacing: 0.025em;
45+
}
46+
47+
.pricing-badge-free {
48+
background-color: #dcfce7;
49+
color: #166534;
50+
border: 1px solid #bbf7d0;
51+
}
52+
53+
.pricing-badge-base {
54+
background-color: #dbeafe;
55+
color: #1e40af;
56+
border: 1px solid #93c5fd;
57+
}
58+
59+
.pricing-badge-ultimate {
60+
background-color: #fef3c7;
61+
color: #92400e;
62+
border: 1px solid #fcd34d;
63+
}
64+
</style>

src/components/PricingBadge.astro

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/components/PricingBadge.tsx

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)