mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-05-31 22:14:10 +00:00
deploy: e090fc89c0
This commit is contained in:
parent
74822b8e7b
commit
c214b4fe38
260 changed files with 6588 additions and 6586 deletions
js
|
@ -73,7 +73,7 @@ function adjustContentWidth(){
|
|||
function fixCodeTabs(){
|
||||
/* if only a single code block is contained in the tab and no style was selected, treat it like style=code */
|
||||
var codeTabContents = Array.from( document.querySelectorAll( '.tab-content.tab-panel-style' ) ).filter( function( tabContent ){
|
||||
return tabContent.querySelector( '*:scope > .tab-content-text > div.highlight:only-child, *:scope > .tab-content-text > pre.pre-code:only-child');
|
||||
return tabContent.querySelector( '*:scope > .tab-content-text > div.highlight:only-child, *:scope > .tab-content-text > pre:not(.mermaid).pre-code:only-child');
|
||||
});
|
||||
|
||||
codeTabContents.forEach( function( tabContent ){
|
||||
|
@ -322,7 +322,9 @@ function initMermaid( update, attrs ) {
|
|||
svg.call( zoom );
|
||||
var parent = this.parentElement;
|
||||
// we need to copy the maxWidth, otherwise our reset button will not align in the upper right
|
||||
parent.style.maxWidth = this.style.maxWidth;
|
||||
parent.style.maxWidth = this.style.maxWidth || this.getAttribute( 'width' );
|
||||
// if no unit is given for the width
|
||||
parent.style.maxWidth = parent.style.maxWidth || this.getAttribute( 'width' ) + 'px';
|
||||
parent.insertAdjacentHTML( 'beforeend', '<span class="svg-reset-button" title="' + window.T_Reset_view + '"><i class="fas fa-undo-alt"></i></span>' );
|
||||
parent.querySelector( '.svg-reset-button' ).addEventListener( 'click', function( event ){
|
||||
inner.transition()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue