UNPKG

@gouvfr/dsfr-roller

Version:

Le module `dsfr-roller` permet de publier le site de documentation du Système de Design de l’État - DSFR

23 lines (20 loc) 1.01 kB
import './minisearch/index.js'; import { instantiateElements } from './core/element.js' import CopySnippet from './elements/copy-snippet.js'; import CopyLink from './elements/copy-link.js'; import ConsentCGU from './elements/consent-cgu.js'; import Storybook from './elements/storybook.js'; import { SearchBar } from './elements/search-bar/index.js'; import { FilterBar } from './elements/filter-bar/index.js'; import { ConsentManagementPlatform } from './cmp/index.js'; window.onload = async () => { await instantiateElements('.code-snippet--copy', CopySnippet); await instantiateElements('#modal-cgu', ConsentCGU); await instantiateElements('.dsfr-doc-anchor-heading__button', CopyLink); await instantiateElements('.dsfr-doc-storybook-leaf iframe', Storybook); await instantiateElements('#search', SearchBar); await instantiateElements('.dsfr-doc-filter', FilterBar); }; const consentResource = window.resource?.consent || {}; const cmp = new ConsentManagementPlatform(consentResource); cmp.init();