hugo-theme-relearn/pir/basics/topbar/index.print.html

405 lines
21 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="pir" dir="rtl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta name="generator" content="Hugo 0.118.2">
<meta name="generator" content="Relearn 5.21.0+tip">
<meta name="description" content="Documentation for Hugo Relearn Theme">
<meta name="author" content="Sören Weber">
<title>Topbarrr modificat&#39;n :: Cap&#39;n Hugo Relearrrn Theme</title>
<link href="https://McShelby.github.io/hugo-theme-relearn/basics/topbar/index.html" rel="alternate" hreflang="x-default">
<link href="https://McShelby.github.io/hugo-theme-relearn/basics/topbar/index.html" rel="alternate" hreflang="en">
<link href="https://McShelby.github.io/hugo-theme-relearn/pir/basics/topbar/index.html" rel="alternate" hreflang="pir">
<link href="https://McShelby.github.io/hugo-theme-relearn/pir/basics/topbar/index.html" rel="canonical" type="text/html" title="Topbarrr modificat&#39;n :: Cap&#39;n Hugo Relearrrn Theme">
<link href="../../../pir/basics/topbar/index.xml" rel="alternate" type="application/rss+xml" title="Topbarrr modificat&#39;n :: Cap&#39;n Hugo Relearrrn Theme">
<link href="../../../images/logo.svg?1695064030" rel="icon" type="image/svg+xml">
<!-- https://github.com/filamentgroup/loadCSS/blob/master/README.md#how-to-use -->
<link href="../../../css/fontawesome-all.min.css?1695064033" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../../css/fontawesome-all.min.css?1695064033" rel="stylesheet"></noscript>
<link href="../../../css/nucleus.css?1695064033" rel="stylesheet">
<link href="../../../css/auto-complete.css?1695064033" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../../css/auto-complete.css?1695064033" rel="stylesheet"></noscript>
<link href="../../../css/perfect-scrollbar.min.css?1695064033" rel="stylesheet">
<link href="../../../css/fonts.css?1695064033" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../../css/fonts.css?1695064033" rel="stylesheet"></noscript>
<link href="../../../css/theme.css?1695064033" rel="stylesheet">
<link href="../../../css/theme-auto.css?1695064033" rel="stylesheet" id="variant-style">
<link href="../../../css/variant.css?1695064033" rel="stylesheet">
<link href="../../../css/print.css?1695064033" rel="stylesheet" media="print">
<link href="../../../css/format-print.css?1695064033" rel="stylesheet">
<link href="../../../css/ie.css?1695064033" rel="stylesheet">
<script src="../../../js/url.js?1695064033"></script>
<script src="../../../js/variant.js?1695064033"></script>
<script>
// 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:
// https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72
window.index_js_url="../../../pir/index.search.js";
var root_url="../../../";
var baseUri=root_url.replace(/\/$/, '');
// translations
window.T_Copy_to_clipboard = 'Copy t\u0027 clipboard';
window.T_Copied_to_clipboard = 'Copied t\u0027 clipboard!';
window.T_Copy_link_to_clipboard = 'Copy link t\u0027 clipboard';
window.T_Link_copied_to_clipboard = 'Copied link t\u0027 clipboard!';
window.T_No_results_found = 'No rrresults found fer \u0022{0}\u0022';
window.T_N_results_found = '{1} rrresults found fer \u0022{0}\u0022';
// some further base stuff
var baseUriFull='https:\/\/McShelby.github.io\/hugo-theme-relearn/';
window.variants && variants.init( [ 'auto', 'relearn-bright', 'relearn-light', 'relearn-dark', 'zen-light', 'zen-dark', 'neon', 'learn', 'blue', 'green', 'red' ] );
</script>
<style>
#body img.bg-white {
background-color: white;
}
</style>
</head>
<body class="mobile-support print disableInlineCopyToClipboard" data-url="../../../pir/basics/topbar/index.html">
<div id="body" class="default-animation">
<div id="body-overlay"></div>
<nav id="topbar">
<div class="topbar-wrapper">
<div class="topbar-sidebar-divider"></div>
<div class="topbar-area topbar-area-start" data-area="start">
<div class="topbar-button topbar-button-sidebar" data-content-empty="disable" data-width-s="show" data-width-m="hide" data-width-l="hide">
<button class="topbar-control" onclick="toggleNav()" type="button" title="Menu (CTRL&#43;ALT&#43;n)">
<i class="fa-fw fas fa-bars"></i>
</button>
</div>
</div>
<ol class="topbar-breadcrumbs highlightable" itemscope itemtype="http://schema.org/BreadcrumbList">
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><a itemprop="item" href="../../../pir/index.html"><span itemprop="name">Cap&#39;n Hugo Relearrrn Theme</span></a><meta itemprop="position" content="1">&nbsp;>&nbsp;</li>
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><a itemprop="item" href="../../../pir/basics/index.html"><span itemprop="name">Basics</span></a><meta itemprop="position" content="2">&nbsp;>&nbsp;</li>
<li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><span itemprop="name">Topbarrr modificat&#39;n</span><meta itemprop="position" content="3"></li>
</ol>
<div class="topbar-area topbar-area-end" data-area="end">
</div>
</div>
</nav>
<div id="main-overlay"></div>
<main id="body-inner" class="highlightable default" tabindex="-1">
<div class="flex-block-wrapper">
<article class="default">
<header class="headline">
</header>
<h1 id="topbarrr-modificatn">Topbarrr modificat&#39;n</h1>
<p>Th' theme comes wit' a reasonably configured topbar.</p>
<p><a href="#image-429bf225833535e10f9bfff550706c57" class="lightbox-link"><img src="../../../basics/topbar/topbar-closed.png" alt="Topbar on mobile devices" class="figure-image bg-white border lightbox noshadow" style="height: auto; width: auto;" loading="lazy"></a>
<a href="javascript:history.back();" class="lightbox-back" id="image-429bf225833535e10f9bfff550706c57"><img src="../../../basics/topbar/topbar-closed.png" alt="Topbar on mobile devices" class="lightbox-image bg-white border lightbox noshadow" loading="lazy"></a></p>
<p>Nevertheless, yer requirements may differ from this configurat'n. Luckily th' theme got ye covered as th' themebar, its buttons an' th' functionality behind these buttons be fully configur'ble by ye.</p>
<h2 id="areas">Areas</h2>
<p>Th' default configurat'n comes wit' three predefined areas that may contain an arbitrary set o' buttons.</p>
<p><a href="#image-b43606b6a4463f516d15e101aa6afda4" class="lightbox-link"><img src="../../../basics/topbar/topbar-areas.png" alt="Topbar wit' default areas marked" class="figure-image bg-white border lightbox noshadow" style="height: auto; width: auto;" loading="lazy"></a>
<a href="javascript:history.back();" class="lightbox-back" id="image-b43606b6a4463f516d15e101aa6afda4"><img src="../../../basics/topbar/topbar-areas.png" alt="Topbar wit' default areas marked" class="lightbox-image bg-white border lightbox noshadow" loading="lazy"></a></p>
<ul>
<li><strong>start</strong>: shown between menu an' breadcrumb</li>
<li><strong>end</strong>: shown on th' opposite breadcrumb side 'n comparison t' th' <em>start</em> area</li>
<li><strong>more</strong>: shown when press'n th'
<span class="btn cstyle transparent">
<button type="button">
<i class="fa-fw fas fa-ellipsis-v"></i>
</button>
</span> <em>more</em> button 'n th' topbar</li>
</ul>
<p>While ye can not add additional areas 'n th' topbar, ye be free t' configure addtional buttons that behave like th' <em>more</em> button, provid'n further user defined areas.</p>
<h2 id="buttons">Buttons</h2>
<p>Th' theme ships wit' th' follow'n predefined buttons (from left t' right 'n th' screenshot)</p>
<ul>
<li>
<span class="btn cstyle transparent">
<button type="button">
<i class="fa-fw fas fa-bars"></i>
</button>
</span> <strong>sidebar</strong>: opens th' sidebar flyout if 'n mobile layout</li>
<li>
<span class="btn cstyle transparent">
<button type="button">
<i class="fa-fw fas fa-list-alt"></i>
</button>
</span> <strong>toc</strong>: opens th' t'ble o' contents 'n an overlay</li>
<li>
<span class="btn cstyle transparent">
<button type="button">
<i class="fa-fw fas fa-pen"></i>
</button>
</span> <strong>edit</strong>: browses t' th' edit'ble plank if th' <code>editURL</code> <a href="../../../basics/configuration/#global-site-parameters">parameter be set</a></li>
<li>
<span class="btn cstyle transparent">
<button type="button">
<i class="fa-fw fas fa-print"></i>
</button>
</span> <strong>print</strong>: browses t' th' chapters print'ble plank if <a href="../../../basics/configuration/#activate-print-support">print support</a> was activated</li>
<li>
<span class="btn cstyle transparent">
<button type="button">
<i class="fa-fw fas fa-chevron-left"></i>
</button>
</span> <strong>prev</strong>: browses t' th' previous plank if there be one</li>
<li>
<span class="btn cstyle transparent">
<button type="button">
<i class="fa-fw fas fa-chevron-right"></i>
</button>
</span> <strong>next</strong>: browses t' th' next plank if there be one</li>
<li>
<span class="btn cstyle transparent">
<button type="button">
<i class="fa-fw fas fa-ellipsis-v"></i>
</button>
</span> <strong>more</strong>: opens th' overlay fer th' <em>more</em> area</li>
</ul>
<p>Not all buttons be displayed at every given time. This be configur'ble (see below if interested).</p>
<h2 id="redefining-areas">Redefin'n Areas</h2>
<p>Each predefined area an' button comes 'n their own file. By that it be easy fer ye t' overwrite an area file 'n yer installat'n reus'n only th' buttons ye like.</p>
<p>Eg. ye can redefine th' predefined <em>end</em> area by add'n th' file <code>layouts/partials/topbar/area/end.html</code> 'n yer installt'n (not 'n th' theme itself) t' remove all but th' <em>more</em> button.</p>
<div class="wrap-code highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span> <span class="nx">partial</span> <span class="s">&#34;topbar/button/more.html&#34;</span> <span class="p">(</span><span class="nx">dict</span>
</span></span><span class="line"><span class="cl"> <span class="s">&#34;page&#34;</span> <span class="p">.</span>
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div><h2 id="defining-own-buttons">Defin'n own Buttons</h2>
<h3 id="button-types">Button Types</h3>
<p>Th' theme distingushies between two types o' buttons:</p>
<ul>
<li><strong>button</strong>: a click'ble button that either browses t' another ship or triggers a user defined script</li>
<li><strong>area-button</strong>: th' template fer th'
<span class="btn cstyle transparent">
<button type="button">
<i class="fa-fw fas fa-ellipsis-v"></i>
</button>
</span> <em>more</em> button, t' define yer own area overlay buttons</li>
</ul>
<h3 id="button-parameter">Button Parameter</h3>
<h4 id="screen-widths-and-actions">Screen Widths an' Act'ns</h4>
<p>Depend'n on th' screen width ye can configure how th' button should behave. Screen width be divided into three classes:</p>
<ul>
<li><strong>s</strong>: (controlled by th' <code>onwidths</code> parameter) mobile layout whar' th' menu sidebar be hidden</li>
<li><strong>m</strong>: (controlled by th' <code>onwidthm</code> parameter) desktop layout wit' vis'ble sidebar while th' rrrambl'n area width still resizes</li>
<li><strong>l</strong>: (controlled by th' <code>onwidthl</code> parameter) desktop layout wit' vis'ble sidebar once th' rrrambl'n area reached its maximum width</li>
</ul>
<p>For each width class, ye can configure one o' th' follow'n act'ns:</p>
<ul>
<li><code>show</code>: th' button be displayed 'n its configured area</li>
<li><code>hide</code>: th' button be hidden</li>
<li><code>area-XXX</code>: th' button be moved from its configured area into th' area <code>XXX</code>; eg. this be used t' move buttons t' th' <em>more</em> area 'n th' mobile layout</li>
</ul>
<h4 id="hiding-and-disabling-stuff">Hid'n an' Disabl'n Stuff</h4>
<p>While hid'n a button dependend on th' screen size can be configured wit' th' above described <em>hide</em> act'n, ye may want t' hide th' button on certain other condit'ns aswell.</p>
<p>For example, th' <em>print</em> button 'n its default configurat'n should only be displayed if print support was configured. This be done 'n yer button template by check'n th' condit'ns first before display'n th' button (see <code>layouts/partials/topbar/button/print.html</code>).</p>
<p>Another prefered condit'n fer hid'n a button be, if th' displayed overlay be empty. This be th' case fer th' <em>toc</em> (see <code>layouts/partials/topbar/button/toc.html</code>) aswell as th' <em>more</em> button (see <code>layouts/partials/topbar/button/more.html</code>) an' controlled by th' parameter <code>onempty</code>.</p>
<p>This parameter can have one o' th' follow'n values:</p>
<ul>
<li><code>hide</code>: th' button be hidden if th' overlay be empty</li>
<li><code>dis'ble</code>: th' button be disabled if th' overlay be empty</li>
</ul>
<p>If ye want t' dis'ble a button contain'n <em>no overlay</em>, this can be achieved by an empty <code>href</code> parameter. An example can be seen 'n th' <em>prev</em> button (see <code>layouts/partials/topbar/button/prev.html</code>) whar' th' URL fer th' previous ship may be empty.</p>
<h2 id="reference">Reference</h2>
<h3 id="button">Button</h3>
<p>Contains th' basic button functionality an' be used as a base implementat'n fer all other buttons (<code>layouts/partials/topbar/func/button.html</code>). Call this from yer own button templates if ye want t' implement a button wit' <em>no overlay</em> area.</p>
<h4 id="parameter">Parameter</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>plank</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Mandatory reference t' th' plank.</td>
</tr>
<tr>
<td><strong>class</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Mandatory unique class name fer this button. Display'n two buttons wit' th' same value fer <strong>class</strong> be undefined.</td>
</tr>
<tr>
<td><strong>href</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Either th' destinat'n URL fer th' button or JavaScript code t' be executed on click.<br><br>- if start'n wit' <code>javascript:</code> all follow'n text will be executed 'n yer browser<br>- every other str'n will be interpreted as URL<br><br>If this parameter be not set, th' button will be displayed<br><br>- as disabled if no <strong>rrrambl'n</strong> be specified<br>- accord'n t' <strong>onempty</strong> if any <strong>rrrambl'n</strong> be given.</td>
</tr>
<tr>
<td><strong>ay'con</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Mandatory <a href="../../../shortcodes/icon/#finding-an-icon">Font Awesome ay'con name</a>.</td>
</tr>
<tr>
<td><strong>onempty</strong></td>
<td><code>dis'ble</code></td>
<td>Defines what t' do wit' th' button if its rrrambl'n overlay be empty:<br><br>- <code>dis'ble</code>: Th' button be displayed 'n disabled state.<br>- <code>hide</code>: Th' button be not displayed. Th' next button will move into th' gap.</td>
</tr>
<tr>
<td><strong>onwidths</strong></td>
<td><code>show</code></td>
<td>Th' act'n, that should be executed if th' ship be displayed 'n th' given width:<br><br>- <code>show</code>: Th' button be displayed 'n its configured area<br>- <code>hide</code>: Th' button be hidden.<br>- <code>area-XXX</code>: Th' button be moved from its configured area into th' area <code>XXX</code>.</td>
</tr>
<tr>
<td><strong>onwidthm</strong></td>
<td><code>show</code></td>
<td>See above.</td>
</tr>
<tr>
<td><strong>onwidthl</strong></td>
<td><code>show</code></td>
<td>See above.</td>
</tr>
<tr>
<td><strong>title</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Arbitrary text fer title, displayed 'n th' tooltip.</td>
</tr>
<tr>
<td><strong>rrrambl'n</strong></td>
<td>see notes</td>
<td>Arbitrary HTML t' put into th' rrrambl'n overlay. This parameter may be empty. In this case no overlay will be generated.</td>
</tr>
</tbody>
</table>
<h3 id="area-button">Area-Button</h3>
<p>Contains th' basic functionality t' display area overlay buttons (<code>layouts/partials/topbar/func/area-button.html</code>). Call this from yer own button templates if ye want t' implement a button wit' an overlay area like th' <em>more</em> button.</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>plank</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Mandatory reference t' th' plank.</td>
</tr>
<tr>
<td><strong>area</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Mandatory unique area name fer this area. Display'n two areas wit' th' same value fer <strong>area</strong> be undefined.</td>
</tr>
<tr>
<td><strong>ay'con</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Mandatory <a href="../../../shortcodes/icon/#finding-an-icon">Font Awesome ay'con name</a>.</td>
</tr>
<tr>
<td><strong>onempty</strong></td>
<td><code>dis'ble</code></td>
<td>Defines what t' do wit' th' button if its rrrambl'n overlay be empty:<br><br>- <code>dis'ble</code>: Th' button be displayed 'n disabled state.<br>- <code>hide</code>: Th' button be not displayed. Th' next button will move into th' gap.</td>
</tr>
<tr>
<td><strong>onwidths</strong></td>
<td><code>show</code></td>
<td>Th' act'n, that should be executed if th' ship be displayed 'n th' given width:<br><br>- <code>show</code>: Th' button be displayed 'n its configured area<br>- <code>hide</code>: Th' button be hidden.<br>- <code>area-XXX</code>: Th' button be moved from its configured area into th' area <code>XXX</code>.</td>
</tr>
<tr>
<td><strong>onwidthm</strong></td>
<td><code>show</code></td>
<td>See above.</td>
</tr>
<tr>
<td><strong>onwidthl</strong></td>
<td><code>show</code></td>
<td>See above.</td>
</tr>
<tr>
<td><strong>title</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Arbitrary text fer title, displayed 'n th' tooltip.</td>
</tr>
</tbody>
</table>
<h3 id="predefined-buttons">Predefined Buttons</h3>
<p>Th' predefined buttons by th' theme (all other buttons besides th' <em>more</em> an' <em>toc</em> button 'n <code>layouts/partials/topbar/button</code>). Call these from yer own redefined area templates if ye want t' offer some o' th' default button behavior.</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>plank</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Mandatory reference t' th' plank.</td>
</tr>
<tr>
<td><strong>onwidths</strong></td>
<td><em>&lt;varying&gt;</em></td>
<td>Th' act'n, that should be executed if th' ship be displayed 'n th' given width:<br><br>- <code>show</code>: Th' button be displayed 'n its configured area<br>- <code>hide</code>: Th' button be hidden.<br>- <code>area-XXX</code>: Th' button be moved from its configured area into th' area <code>XXX</code>.</td>
</tr>
<tr>
<td><strong>onwidthm</strong></td>
<td><em>&lt;varying&gt;</em></td>
<td>See above.</td>
</tr>
<tr>
<td><strong>onwidthl</strong></td>
<td><em>&lt;varying&gt;</em></td>
<td>See above.</td>
</tr>
</tbody>
</table>
<h3 id="predefined-overlay-buttons">Predefined Overlay-Buttons</h3>
<p>Th' predefined buttons by th' theme that open an overlay (the <em>more</em> an' <em>toc</em> button 'n <code>layouts/partials/topbar/button</code>). Call these from yer own redefined area templates if ye want t' offer some o' th' default area button behavior.</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>plank</strong></td>
<td><em>&lt;empty&gt;</em></td>
<td>Mandatory reference t' th' plank.</td>
</tr>
<tr>
<td><strong>onempty</strong></td>
<td><em>&lt;varying&gt;</em></td>
<td>Defines what t' do wit' th' button if its rrrambl'n overlay be empty:<br><br>- <code>dis'ble</code>: Th' button be displayed 'n disabled state.<br>- <code>hide</code>: Th' button be not displayed. Th' next button will move into th' gap.</td>
</tr>
<tr>
<td><strong>onwidths</strong></td>
<td><em>&lt;varying&gt;</em></td>
<td>Th' act'n, that should be executed if th' ship be displayed 'n th' given width:<br><br>- <code>show</code>: Th' button be displayed 'n its configured area<br>- <code>hide</code>: Th' button be hidden.<br>- <code>area-XXX</code>: Th' button be moved from its configured area into th' area <code>XXX</code>.</td>
</tr>
<tr>
<td><strong>onwidthm</strong></td>
<td><em>&lt;varying&gt;</em></td>
<td>See above.</td>
</tr>
<tr>
<td><strong>onwidthl</strong></td>
<td><em>&lt;varying&gt;</em></td>
<td>See above.</td>
</tr>
</tbody>
</table>
<footer class="footline">
</footer>
</article>
</div>
</main>
</div>
<script src="../../../js/clipboard.min.js?1695064033" defer></script>
<script src="../../../js/perfect-scrollbar.min.js?1695064033" defer></script>
<script src="../../../js/theme.js?1695064033" defer></script>
</body>
</html>