base.astro
1017 Bytes
---
import { getSitePage } from '@lib/api.ts'
import { appendClasses } from '@lib/html.ts'
import { Node, Replace } from '@lib/astro.ts'
import '@config.ts'
const { data: layoutHtml } = await getSitePage('msd', '/')
const layoutReplacements = {
['body']: 'body',
['.hero-section']: 'content',
['.content-section']: 'DELETE',
['.content-section-4']: 'DELETE',
//['.navbar.w-nav:nth-child(n + 1)']: 'DELETE',
// The following 2 are not implemented yet
//[':nth-child(n + 1 of .navbar.w-nav)']: 'DELETE',
//['.navbar.w-nav:nth-of-type(n + 1)']: 'DELETE',
}
---
<Replace html={layoutHtml} replacements={layoutReplacements}>
<define slot="DELETE">{(node) => ''}</define>
<define slot='body'>{(node, context) => <Node {...context} node={appendClasses(node, 'astro')} parent={node.parent}/>}</define>
<define slot='content'>{(node) => <div><slot/></div>}</define>
</Replace>
<style>
.astro {}
a.w-webflow-badge {
display:none;
}
:global(a.w-webflow-badge) {
display:none;
}
</style>