2022-02-06 12:51:54 +00:00
|
|
|
{{- $assetBusting := not .Site.Params.disableAssetsBusting }}
|
|
|
|
<link href="{{"css/nucleus.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
|
|
|
<link href="{{"css/fontawesome-all.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
|
|
|
<link href="{{"css/featherlight.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
|
|
|
<link href="{{"css/perfect-scrollbar.min.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
|
|
|
<link href="{{"css/auto-complete.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
|
|
|
<link href="{{"css/theme.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
2022-02-13 00:53:23 +00:00
|
|
|
{{- $themevariants := slice | append .Site.Params.themeVariant }}
|
|
|
|
{{- with index $themevariants 0 }}
|
|
|
|
<link id="variant-style" href="{{(printf "css/theme-%s.css" .) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
2022-02-06 12:51:54 +00:00
|
|
|
<link href="{{"css/variant.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
|
|
|
{{- end }}
|
|
|
|
<link href="{{"css/print.css" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet" media="print">
|
|
|
|
{{- range .Site.Params.custom_css }}
|
|
|
|
<link href="{{(printf "%s" .) | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" rel="stylesheet">
|
|
|
|
{{- end }}
|
2022-02-13 01:11:27 +00:00
|
|
|
<script>
|
|
|
|
// we need to define this script in the head to avoid flickering an
|
|
|
|
// page load if the user has selected a non default variant
|
|
|
|
var theme = window.localStorage.getItem( 'theme' );
|
|
|
|
changeTheme( theme, true );
|
|
|
|
|
|
|
|
function changeTheme( theme, noanimation ){
|
|
|
|
if( !theme ){
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
var link = document.querySelector( '#variant-style' );
|
|
|
|
var old_path = link.getAttribute( 'href' );
|
|
|
|
var new_path = old_path.replace( /^(.*\/theme-).*?(\.css.*)$/, '$1' + theme + '$2' );
|
|
|
|
if( old_path != new_path ){
|
|
|
|
var animations = document.querySelectorAll( '.default-animation' );
|
|
|
|
if( noanimation ){
|
|
|
|
animations.forEach( function( e ){
|
|
|
|
e.classList.remove( 'default-animation' );
|
|
|
|
});
|
|
|
|
}
|
|
|
|
window.localStorage.setItem( 'theme', theme );
|
|
|
|
link.setAttribute( 'href', new_path );
|
|
|
|
var select = document.querySelector( '#select-theme' );
|
|
|
|
select.value = theme;
|
|
|
|
// we have to wait to reset the animation style
|
|
|
|
if( noanimation ){
|
|
|
|
setTimeout( function(){
|
|
|
|
animations.forEach( function( e ){
|
|
|
|
e.classList.add( 'default-animation' );
|
|
|
|
});
|
|
|
|
}, 525 );
|
|
|
|
}
|
|
|
|
// remove selection, because if some uses an arrow navigation
|
|
|
|
// by pressing the left or right cursor key, we will automatically
|
|
|
|
// select a different style
|
|
|
|
if( document.activeElement ){
|
|
|
|
document.activeElement.blur();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2022-02-06 12:51:54 +00:00
|
|
|
<style>
|
|
|
|
:root #header + #content > #left > #rlblock_left{
|
|
|
|
display:none !important;
|
|
|
|
}
|
|
|
|
{{- if .Site.Params.disableInlineCopyToClipBoard }}
|
|
|
|
:not(pre) > code.copy-to-clipboard-inline + span.copy-to-clipboard {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
:not(pre) > code.copy-to-clipboard-inline {
|
|
|
|
border-bottom-right-radius: 2px;
|
|
|
|
border-top-right-radius: 2px;
|
|
|
|
border-right-width: 1px;
|
|
|
|
}
|
|
|
|
{{- end }}
|
|
|
|
</style>
|
|
|
|
<script src="{{"js/jquery.min.js"| relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}"></script>
|