mirror of
https://github.com/gohugoio/hugo.git
synced 2025-05-06 18:56:32 +03:00
Merge commit 'eb16165694
'
This commit is contained in:
commit
b17a61a605
199 changed files with 10860 additions and 22630 deletions
10
docs/themes/gohugoioTheme/assets/js/codeblocks.js
vendored
Normal file
10
docs/themes/gohugoioTheme/assets/js/codeblocks.js
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
let article = document.getElementById('prose')
|
||||
|
||||
if (article) {
|
||||
let codeBlocks = article.getElementsByTagName('code')
|
||||
for (let [key, codeBlock] of Object.entries(codeBlocks)){
|
||||
var widthDif = codeBlock.scrollWidth - codeBlock.clientWidth
|
||||
if (widthDif > 0)
|
||||
codeBlock.parentNode.classList.add('expand')
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue