Skip to content

Commit 4d6f091

Browse files
Add polyglot AppHost documentation for TypeScript, Python, Go, Rust, … (#277)
* Add polyglot AppHost documentation for TypeScript, Python, Go, Rust, and Java * feat: enhance PivotSelector component with marginTop prop for better layout control (#302) docs: update Polyglot AppHost documentation with new features and usage examples docs: add link to Polyglot AppHost in resource model documentation docs: include Polyglot AppHost reference in get-started guide for broader language support style: import utility classes for padding and margin in site CSS style: create utils.css for reusable padding and margin utility classes * fix: format project structure in polyglot AppHost documentation for clarity --------- Co-authored-by: David Pine <david.pine@microsoft.com>
1 parent a0443d3 commit 4d6f091

File tree

7 files changed

+1362
-4
lines changed

7 files changed

+1362
-4
lines changed

src/frontend/config/sidebar/docs.topics.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,10 @@ export const docsTopics: StarlightSidebarTopicsUserConfig = {
746746
label: 'Configuration',
747747
slug: 'app-host/configuration',
748748
},
749+
{
750+
label: 'Polyglot AppHost',
751+
slug: 'app-host/polyglot-apphost',
752+
},
749753
{
750754
label: 'Certificate configuration',
751755
slug: 'app-host/certificate-configuration',

src/frontend/src/components/PivotSelector.astro

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ type Props = {
99
options: Option[];
1010
key: string;
1111
title?: string;
12+
marginTop?: number | null;
1213
};
1314
14-
const { options, key, title } = Astro.props;
15+
const { options, key, title, marginTop } = Astro.props;
1516
---
1617

1718
<div class="pivot-container not-content">
@@ -58,14 +59,14 @@ const { options, key, title } = Astro.props;
5859
</button>
5960
</div>
6061

61-
<style>
62+
<style define:vars={{ marginTop: marginTop !== null && marginTop !== undefined ? `${marginTop}rem` : '0rem' }}>
6263
.pivot-container {
6364
background: var(--sl-color-bg-nav);
6465
border: 1px solid var(--sl-color-gray-5);
6566
border-radius: 0.5rem;
6667
padding: 1rem;
6768
box-shadow: var(--sl-shadow-sm);
68-
margin-top: 0;
69+
margin-top: var(--marginTop);
6970
margin-bottom: 1.5rem;
7071
--pivot-float-x: -50%;
7172
}
@@ -79,6 +80,7 @@ const { options, key, title } = Astro.props;
7980
box-shadow: var(--sl-shadow-md);
8081
border-color: var(--sl-color-gray-4);
8182
max-width: min(calc(100vw - 2rem), 800px);
83+
margin-top: 0;
8284
width: auto;
8385
opacity: 1;
8486
animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);

0 commit comments

Comments
 (0)