hugo

Fork of github.com/gohugoio/hugo with reverse pagination support

git clone git://git.shimmy1996.com/hugo.git

codeblocks.js (325B)

    1 let article = document.getElementById('prose')
    2 
    3 if (article) {
    4   let codeBlocks = article.getElementsByTagName('code')
    5     for (let [key, codeBlock] of Object.entries(codeBlocks)){
    6     var widthDif = codeBlock.scrollWidth - codeBlock.clientWidth
    7     if (widthDif > 0)
    8       codeBlock.parentNode.classList.add('expand')
    9   }
   10 }