<% function layoutDiv() { var el = ''; var item = []; if (page.references?.length > 0) { item.push('references'); } if (theme.article.license?.length > 0) { item.push('license'); } if (theme.article.share?.length > 0) { item.push('share'); } if (item.length === 0) { return el; } el += `
` if (page.references?.length > 0) { function refList() { var el = ''; for (let ref of page.references) { el += `
  • ${markdown(ref)}
  • ` } return el; } el += `
    ${__('meta.references')}
      ${refList()}
    ` } var license = '' if (page.wiki) { const proj = theme.wiki.tree[page.wiki] if (page.license != null) { license = page.license || theme.article.license } else if (proj?.license != null) { if (proj.license == true) { license = theme.article.license } else { license = proj.license } } } else if (page.layout == 'post') { if (theme.article.license && (page.license != false)) { license = page.license || theme.article.license } } else if (page.license) { license = page.license === true ? theme.article.license : page.license } if (license?.length > 0) { var author = null if (theme.authors) { if (page.author?.length > 0 && theme.authors[page.author] != null) { author = theme.authors[page.author] } else { author = theme.default_author } } if (author) { license = license.replace('{author.name}', author.name).replace('{author.url}', author.url) } el += `
    ${__('meta.license')}
    ${markdown(license)}
    ` } var showSharePlugin = false if (page.wiki) { const proj = theme.wiki.tree[page.wiki] if (page.share != null) { showSharePlugin = page.share == true } else if (proj != null) { showSharePlugin = proj.share == true } } else if (page.layout == 'post') { showSharePlugin = page.share != false } else if (page.share) { showSharePlugin = true } if (theme.article.share && showSharePlugin) { function socialButtons() { var el = '' theme.article.share.forEach((item, i) => { if (['wechat', 'weibo', 'email', 'link'].includes(item)) { el += '
    ` } else { return '' } } el += `
    ${__('meta.share')}
    ${qrcode()}
    ` } el += ''; return el; } %> <%- layoutDiv(); %>