mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-07-19 22:02:30 +00:00
deploy: 442a4f4832
This commit is contained in:
parent
b364c89157
commit
cfa8e30a35
165 changed files with 4895 additions and 13190 deletions
basics/customization
|
@ -9,76 +9,24 @@
|
|||
<meta name="author" content="Sören Weber">
|
||||
<title>Customization :: Documentation for Hugo Relearn Theme</title>
|
||||
<link rel="alternate" type="application/rss+xml" href="/hugo-theme-relearn/basics/customization/index.xml" title="Documentation for Hugo Relearn Theme" />
|
||||
<link rel="icon" href="/hugo-theme-relearn/images/logo.svg?1645374819" type="image/svg+xml">
|
||||
<link href="/hugo-theme-relearn/css/nucleus.css?1645374819" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/fontawesome-all.min.css?1645374819" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/featherlight.min.css?1645374819" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/perfect-scrollbar.min.css?1645374819" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/auto-complete.css?1645374819" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/theme.css?1645374819" rel="stylesheet">
|
||||
<link id="variant-style" href="/hugo-theme-relearn/css/theme-relearn-light.css?1645374819" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/variant.css?1645374819" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/theme-relearn-light.css?1645374819" rel="stylesheet" media="print">
|
||||
<link href="/hugo-theme-relearn/css/print.css?1645374819" rel="stylesheet" media="print">
|
||||
<link rel="icon" href="/hugo-theme-relearn/images/logo.svg?1645397927" type="image/svg+xml">
|
||||
<link href="/hugo-theme-relearn/css/nucleus.css?1645397927" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/fontawesome-all.min.css?1645397927" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/featherlight.min.css?1645397927" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/perfect-scrollbar.min.css?1645397927" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/auto-complete.css?1645397927" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/theme.css?1645397927" rel="stylesheet">
|
||||
<link id="variant-style" href="/hugo-theme-relearn/css/theme-relearn-light.css?1645397927" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/variant.css?1645397927" rel="stylesheet">
|
||||
<link href="/hugo-theme-relearn/css/theme-relearn-light.css?1645397927" rel="stylesheet" media="print">
|
||||
<link href="/hugo-theme-relearn/css/print.css?1645397927" rel="stylesheet" media="print">
|
||||
<style>
|
||||
</style>
|
||||
<script src="/hugo-theme-relearn/js/variant.js?1645397927"></script>
|
||||
<script>
|
||||
// we need to define this script in the head to avoid flickering
|
||||
// on page load if the user has selected a non default variant
|
||||
var theme = window.localStorage.getItem( 'theme' );
|
||||
changeTheme( theme );
|
||||
function parseTheme( s ){
|
||||
if( !s || !s.match ){
|
||||
return '';
|
||||
}
|
||||
var matches = s.match(/^.*\/?theme-([^\/]*?)\.css.*$/);
|
||||
var theme = matches && matches.length == 2 ? matches[ 1 ] : '';
|
||||
return theme;
|
||||
}
|
||||
function getTheme(){
|
||||
var link = document.querySelector( '#variant-style' );
|
||||
if( !link ){
|
||||
return;
|
||||
}
|
||||
var path = link.getAttribute( 'href' );
|
||||
var theme = parseTheme( path );
|
||||
return theme;
|
||||
}
|
||||
function markTheme( theme ){
|
||||
var select = document.querySelector( '#select-theme' );
|
||||
if( !select ){
|
||||
return;
|
||||
}
|
||||
select.value = theme;
|
||||
}
|
||||
function changeTheme( theme ){
|
||||
var themes = [ "relearn-light", "relearn-dark", "learn", "neon", "blue", "green", "red" ];
|
||||
if( themes.indexOf( theme ) < 0 ){
|
||||
theme = themes.length ? themes[ 0 ] : null;
|
||||
}
|
||||
if( !theme ){
|
||||
return;
|
||||
}
|
||||
var link = document.querySelector( '#variant-style' );
|
||||
if( !link ){
|
||||
return;
|
||||
}
|
||||
var old_path = link.getAttribute( 'href' );
|
||||
var new_path = old_path.replace( /^(.*\/theme-).*?(\.css.*)$/, '$1' + theme + '$2' );
|
||||
if( old_path != new_path ){
|
||||
window.localStorage.setItem( 'theme', theme );
|
||||
link.setAttribute( 'href', new_path );
|
||||
markTheme( theme );
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
variants.init( [ "relearn-light", "relearn-dark", "learn", "neon", "blue", "green", "red" ] );
|
||||
</script>
|
||||
<script src="/hugo-theme-relearn/js/jquery.min.js?1645374819"></script>
|
||||
<script src="/hugo-theme-relearn/js/jquery.min.js?1645397927"></script>
|
||||
</head>
|
||||
<body class="default-animation" data-url="/hugo-theme-relearn/basics/customization/">
|
||||
<!-- hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic: -->
|
||||
|
@ -121,9 +69,9 @@
|
|||
<input data-search-input id="search-by" type="search" placeholder="Search...">
|
||||
<span data-search-clear=""><i class="fas fa-times"></i></span>
|
||||
</div>
|
||||
<script src="/hugo-theme-relearn/js/lunr.min.js?1645374819"></script>
|
||||
<script src="/hugo-theme-relearn/js/auto-complete.js?1645374819"></script>
|
||||
<script src="/hugo-theme-relearn/js/search.js?1645374819"></script>
|
||||
<script src="/hugo-theme-relearn/js/lunr.min.js?1645397927"></script>
|
||||
<script src="/hugo-theme-relearn/js/auto-complete.js?1645397927"></script>
|
||||
<script src="/hugo-theme-relearn/js/search.js?1645397927"></script>
|
||||
</div>
|
||||
<div id="content-wrapper" class="highlightable">
|
||||
<ul class="topics">
|
||||
|
@ -178,7 +126,7 @@
|
|||
<hr class="default-animation"/>
|
||||
<div id="prefooter">
|
||||
<ul>
|
||||
<li>
|
||||
<li id="select-language-container">
|
||||
<a class="padding select-container">
|
||||
<i class="fas fa-language fa-fw"></i>
|
||||
<span> </span>
|
||||
|
@ -191,12 +139,12 @@
|
|||
<div class="select-clear"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<li id="select-variant-container">
|
||||
<a class="padding select-container">
|
||||
<i class="fas fa-paint-brush fa-fw"></i>
|
||||
<span> </span>
|
||||
<div class="select-style">
|
||||
<select id="select-theme" onchange="changeTheme( this.value );">
|
||||
<select id="select-variant" onchange="variants.changeVariant( this.value );">
|
||||
<option id="relearn-light" value="relearn-light" selected>Relearn Light</option>
|
||||
<option id="relearn-dark" value="relearn-dark">Relearn Dark</option>
|
||||
<option id="learn" value="learn">Learn</option>
|
||||
|
@ -208,7 +156,7 @@
|
|||
</div>
|
||||
<div class="select-clear"></div>
|
||||
</a>
|
||||
<script>markTheme( getTheme() );</script>
|
||||
<script>variants.markSelectedVariant( variants.getVariant() );</script>
|
||||
</li>
|
||||
<li><a class="padding" href="#" data-clear-history-toggle=""><i class="fas fa-history fa-fw"></i> Clear History</a></li>
|
||||
</ul>
|
||||
|
@ -431,13 +379,13 @@ You could use an <code>img</code> HTML tag and reference an image created under
|
|||
<div style="left: -1000px; overflow: scroll; position: absolute; top: -1000px; border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;">
|
||||
<div style="border: none; box-sizing: content-box; height: 200px; margin: 0px; padding: 0px; width: 200px;"></div>
|
||||
</div>
|
||||
<script src="/hugo-theme-relearn/js/clipboard.min.js?1645374819"></script>
|
||||
<script src="/hugo-theme-relearn/js/perfect-scrollbar.min.js?1645374819"></script>
|
||||
<script src="/hugo-theme-relearn/js/perfect-scrollbar.jquery.min.js?1645374819"></script>
|
||||
<script src="/hugo-theme-relearn/js/jquery.svg.pan.zoom.js?1645374819"></script>
|
||||
<script src="/hugo-theme-relearn/js/featherlight.min.js?1645374819"></script>
|
||||
<script src="/hugo-theme-relearn/js/modernizr.custom-3.6.0.js?1645374819"></script>
|
||||
<script src="/hugo-theme-relearn/js/mermaid.min.js?1645374819"></script>
|
||||
<script src="/hugo-theme-relearn/js/clipboard.min.js?1645397927"></script>
|
||||
<script src="/hugo-theme-relearn/js/perfect-scrollbar.min.js?1645397927"></script>
|
||||
<script src="/hugo-theme-relearn/js/perfect-scrollbar.jquery.min.js?1645397927"></script>
|
||||
<script src="/hugo-theme-relearn/js/jquery.svg.pan.zoom.js?1645397927"></script>
|
||||
<script src="/hugo-theme-relearn/js/featherlight.min.js?1645397927"></script>
|
||||
<script src="/hugo-theme-relearn/js/modernizr.custom-3.6.0.js?1645397927"></script>
|
||||
<script src="/hugo-theme-relearn/js/mermaid.min.js?1645397927"></script>
|
||||
<script>
|
||||
if (typeof mermaid != 'undefined' && typeof mermaid.mermaidAPI != 'undefined') {
|
||||
mermaid.mermaidAPI.initialize( Object.assign( { "securityLevel": "antiscript" }, JSON.parse("{ \"securityLevel\": \"loose\"}"), { startOnLoad: false } ) );
|
||||
|
@ -449,6 +397,6 @@ You could use an <code>img</code> HTML tag and reference an image created under
|
|||
window.T_Copy_link_to_clipboard = 'Copy link to clipboard';
|
||||
window.T_Link_copied_to_clipboard = 'Copied link to clipboard!';
|
||||
</script>
|
||||
<script src="/hugo-theme-relearn/js/relearn.js?1645374819"></script>
|
||||
<script src="/hugo-theme-relearn/js/theme.js?1645397927"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue