Skip to content

Commit ecbb4fc

Browse files
committed
feat: Add <toggle-popover> custom element to client-js plugin (#20)
1 parent 52e8dbe commit ecbb4fc

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

plugins/client-js/importMapPlugin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const importMap = {
1616
'site-search': `${elementServer}/MySearchElement.js`,
1717
'search-api': `${elementServer}/MySearchApiElement.js`,
1818
'site-counter': `${elementServer}/MySiteCounterElement.js`, */
19+
'eleventy-plugin-popover/browser': 'https://esm.sh/gh/nfreear/eleventy-plugin-popover/browser'
1920
'validator-button': `${elementServer}/MyTestElement.js`
2021
};
2122

plugins/client-js/js/app.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import PageNoteElement from 'page-note';
22
import { MySearchApiElement, MySharingWidgetElement, MySiteCounterElement } from 'ndf-elements/dia';
33
import { fixTitleAttributes, fixArchiveLinks, TitleTipElement } from 'fix-title-attr';
4+
import defineTogglePopoverElement from 'eleventy-plugin-popover/browser';
45

56
const { customElements } = window;
67

@@ -11,6 +12,8 @@ customElements.define('site-counter', MySiteCounterElement);
1112
// customElements.define('site-search', SiteSearchElement);
1213
customElements.define('title-tip', TitleTipElement);
1314

15+
defineTogglePopoverElement();
16+
1417
// Only add the HTML validator button when serving locally.
1518
if (pageInfo().isServeMode) {
1619
import('validator-button').then(({ default: ValidatorButton }) => {

0 commit comments

Comments
 (0)