Update lit-starter-ts to lit-next
* Upgrades the source to work with lit-next * Aligns the linting and formatting rules/settings & ignores with the monorepo * Upgrades to the same version of typescript and tsconfig settings as the monorepo * Upgrades the test runner from karma to web-test-runner * Upgrades the dev server from es-dev-server to @web/dev-server
This commit is contained in:
@@ -4,8 +4,7 @@ const relative = require('./relative-path.cjs');
|
||||
/**
|
||||
* This template extends the page template and adds an examples list.
|
||||
*/
|
||||
module.exports = function(data) {
|
||||
|
||||
module.exports = function (data) {
|
||||
return page({
|
||||
...data,
|
||||
content: renderExample(data),
|
||||
@@ -18,13 +17,22 @@ const renderExample = ({name, content, collections, page}) => {
|
||||
<section class="examples">
|
||||
<nav class="collection">
|
||||
<ul>
|
||||
${collections.example === undefined
|
||||
${
|
||||
collections.example === undefined
|
||||
? ''
|
||||
: collections.example.map((post) => `
|
||||
: collections.example
|
||||
.map(
|
||||
(post) => `
|
||||
<li class=${post.url === page.url ? 'selected' : ''}>
|
||||
<a href="${relative(page.url, post.url)}">${post.data.description.replace('<', '<')}</a>
|
||||
<a href="${relative(
|
||||
page.url,
|
||||
post.url
|
||||
)}">${post.data.description.replace('<', '<')}</a>
|
||||
</li>
|
||||
`).join('')}
|
||||
`
|
||||
)
|
||||
.join('')
|
||||
}
|
||||
</ul>
|
||||
</nav>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user