-
- {{.}}
-
+
+
+ ${joinFragments(fileSet, ({name, href}) =>
+ PlaceholderFileListItem({name, href, selectModePrefix}))}
+
+
+
+ ${FileListItem({
+ href: `${basepath}{{.}}`,
+ boundHref: containsExpr(
+ '\'{{.}}\'',
+ '\'.html\'',
+ `(${selectModeKey} || '${selectModePrefix}') +` +
+ `'${replaceLeadingSlash(basepath, '')}{{.}}'`,
+ `'${basepath}{{.}}'`),
+ name: '{{.}}',
+ })}
class="list-overflow">
Show more
+ `,
+]);
-
Loading...
- `;
-
-const ProxyFormOptional = ({isMainPage}) => {
- return isMainPage ? ProxyForm() : '';
-};
+const ProxyFormOptional = ({isMainPage}) => isMainPage ? ProxyForm() : '';
const selectModePrefix = '/';
@@ -178,7 +232,8 @@ const renderTemplate = ({
basepath,
css,
isMainPage,
- serveMode}) => html`
+ fileSet,
+ serveMode}) => addRequiredExtensionsToHead(html`
@@ -193,8 +248,6 @@ const renderTemplate = ({
content="width=device-width,minimum-scale=1,initial-scale=1">
${boilerPlate}
- ${requiredExtensions.map(({name, version}) =>
- ExtensionScript({name, version})).join('')}
@@ -207,18 +260,23 @@ const renderTemplate = ({
${basepath}
- ${FileListSearch({basepath})}
+ ${FileListSearchInput({basepath})}
-
-
-
+ ${AmpState(selectModeStateId, {
+ [selectModeStateKey]: selectModePrefix,
+ })}
${ExamplesSelectModeOptional({basepath, selectModePrefix})}
List root directory
- ${FileList({basepath})}
+ ${FileList({
+ basepath,
+ selectModePrefix,
+ fileSet: fileSet.map(name => ({
+ name,
+ href: maybePrefixExampleDocHref(basepath, name, selectModePrefix),
+ })),
+ })}