File tree Expand file tree Collapse file tree 5 files changed +15
-3
lines changed
site-content/site/_includes/layouts Expand file tree Collapse file tree 5 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,16 @@ module.exports = {
9
9
const { renderPage} = await import (
10
10
'@webcomponents/internal-site-server/lib/templates/base.js'
11
11
) ;
12
- return [ ...renderPage ( data ) ] . join ( '' ) ;
12
+ // TODO (justinfagnani): move the top-bar to a real template or
13
+ // back into the base template when we enable 11ty / Lit SSR integration
14
+ return [
15
+ ...renderPage ( {
16
+ ...data ,
17
+ content : `
18
+ <wco-top-bar></wco-top-bar>
19
+ ${ data . content }
20
+ ` ,
21
+ } ) ,
22
+ ] . join ( '' ) ;
13
23
} ,
14
24
} ;
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export const handleCatalogRoute = async (
22
22
'/js/catalog.js'
23
23
] ,
24
24
content : `
25
+ <wco-top-bar></wco-top-bar>
25
26
<h1>Catalog</h1>
26
27
<wco-catalog-search></wco-catalog-search>
27
28
` ,
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ import {Readable} from 'stream';
8
8
import { gql } from '@apollo/client/core/index.js' ;
9
9
import Router from '@koa/router' ;
10
10
import { render } from '@lit-labs/ssr/lib/render-with-global-dom-shim.js' ;
11
- import '@webcomponents/internal-site-client/lib/entrypoints/element.js' ;
12
11
13
12
import { renderPage } from '../../../templates/base.js' ;
14
13
import { client } from '../../graphql.js' ;
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import {
12
12
resolveReference ,
13
13
normalizeModulePath ,
14
14
} from '@webcomponents/custom-elements-manifest-tools' ;
15
+ import '@webcomponents/internal-site-client/lib/entrypoints/element.js' ;
15
16
16
17
export const renderElement = ( {
17
18
packageName,
@@ -57,6 +58,7 @@ export const renderElement = ({
57
58
}
58
59
59
60
return html `
61
+ < wco-top-bar > </ wco-top-bar >
60
62
< h1 > ${ packageName } /${ elementName } </ h1 >
61
63
${ declaration . description }
62
64
< h2 > Usage</ h2 >
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export function* renderPage(data: {
52
52
<title>${ escapeHTML ( data . title ) } </title>
53
53
</head>
54
54
<body>
55
- <wco-top-bar></wco-top-bar> `;
55
+ ` ;
56
56
if ( typeof data . content === 'string' ) {
57
57
yield data . content ;
58
58
} else {
You can’t perform that action at this time.
0 commit comments