Skip to content

Commit

Permalink
feat(ld-pagination): add pagination component
Browse files Browse the repository at this point in the history
  • Loading branch information
renet committed Jan 21, 2022
1 parent 7435645 commit 978a58e
Show file tree
Hide file tree
Showing 110 changed files with 5,487 additions and 108 deletions.
10 changes: 6 additions & 4 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,15 @@ module.exports = function (eleventyConfig) {
// Code example short codes
eleventyConfig.addPairedShortcode('example', function (code, config) {
const defaultConfig = {
lang: 'html',
stacked: false,
opened: false,
background: undefined,
themable: true,
centered: false,
hasPadding: true,
heighlight: undefined,
heighlightCssComponent: undefined,
lang: 'html',
opened: false,
stacked: false,
themable: true,
}
const finalConfig = Object.assign(defaultConfig, JSON.parse(config || '{}'))
const [codeWebComponent, codeCssComponent] = code
Expand All @@ -142,6 +143,7 @@ module.exports = function (eleventyConfig) {
output += `code-css-component="${encodeURIComponent(codeCssComponent)}" `
}

output += `${finalConfig.centered ? ' centered' : ''}`
output += `${finalConfig.stacked ? ' stacked' : ''}`
output += `${finalConfig.opened ? ' opened' : ''}`
if (finalConfig.background) {
Expand Down
Loading

0 comments on commit 978a58e

Please sign in to comment.