<liitemscopeitemtype="https://schema.org/ListItem"itemprop="itemListElement"><aitemprop="item"href="../../../pir/index.html"><spanitemprop="name">Cap'n Hugo Relearrrn Theme</span></a><metaitemprop="position"content="1"> > </li>
<p><ahref="#image-429bf225833535e10f9bfff550706c57"class="lightbox-link"><imgsrc="../../../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>
<ahref="javascript:history.back();"class="lightbox-back"id="image-429bf225833535e10f9bfff550706c57"><imgsrc="../../../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>
<h2id="areas">Areas</h2>
<p>Th' default configurat'n comes wit' three predefined areas that may contain an arbitrary set o' buttons.</p>
<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'
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="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>
<h2id="buttons">Buttons</h2>
<p>Th' theme ships wit' th' follow'n predefined buttons (from left t' right 'n th' screenshot)</p>
<ul>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-bars"></i>
</button>
</span><strong>sidebar</strong>: opens th' sidebar flyout if 'n mobile layout</li>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-list-alt"></i>
</button>
</span><strong>toc</strong>: opens th' t'ble o' contents 'n an overlay</li>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-pen"></i>
</button>
</span><strong>edit</strong>: browses t' th' edit'ble plank if th' <code>editURL</code><ahref="../../../basics/configuration/#global-site-parameters">parameter be set</a></li>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-print"></i>
</button>
</span><strong>print</strong>: browses t' th' chapters print'ble plank if <ahref="../../../basics/configuration/#activate-print-support">print support</a> was activated</li>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-chevron-left"></i>
</button>
</span><strong>prev</strong>: browses t' th' previous plank if there be one</li>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-chevron-right"></i>
</button>
</span><strong>next</strong>: browses t' th' next plank if there be one</li>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="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>
<h2id="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>
</span></span><spanclass="line"><spanclass="cl"><spanclass="p">)}}</span></span></span></code></pre></div><h2id="defining-own-buttons">Defin'n own Buttons</h2>
<h3id="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'
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-ellipsis-v"></i>
</button>
</span><em>more</em> button, t' define yer own area overlay buttons</li>
<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>
<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>
<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>
<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>
<h2id="reference">Reference</h2>
<h3id="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>
<h4id="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><empty></em></td>
<td>Mandatory reference t' th' plank.</td>
</tr>
<tr>
<td><strong>class</strong></td>
<td><em><empty></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><empty></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>
<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><empty></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>
<h3id="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><empty></em></td>
<td>Mandatory reference t' th' plank.</td>
</tr>
<tr>
<td><strong>area</strong></td>
<td><em><empty></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>
<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><empty></em></td>
<td>Arbitrary text fer title, displayed 'n th' tooltip.</td>
<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>
<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>
<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><empty></em></td>
<td>Mandatory reference t' th' plank.</td>
</tr>
<tr>
<td><strong>onempty</strong></td>
<td><em><varying></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><varying></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>
<p>Built with <ahref="https://github.com/McShelby/hugo-theme-relearn"title="love"><iclass="fas fa-heart"></i></a> by <ahref="https://gohugo.io/">Hugo</a></p>
<script>
function githubButtonsScheme(){
var scheme = 'light';
var colorPropertyValue = window.getComputedStyle( document.querySelector( '#sidebar' ) ).getPropertyValue( 'background-color' );
var colorValues = colorPropertyValue.match( /\d+/g ).map( function( e ){ return parseInt(e,10); });
<aclass="github-button"href="https://github.com/McShelby/hugo-theme-relearn/archive/main.zip"data-color-scheme="${scheme}"data-icon="octicon-cloud-download"aria-label="Download McShelby/hugo-theme-relearn on GitHub">Download</a>
<aclass="github-button"href="https://github.com/McShelby/hugo-theme-relearn"data-color-scheme="${scheme}"data-icon="octicon-star"data-show-count="true"aria-label="Star McShelby/hugo-theme-relearn on GitHub">Star</a>
<aclass="github-button"href="https://github.com/McShelby/hugo-theme-relearn/fork"data-color-scheme="${scheme}"data-icon="octicon-repo-forked"data-show-count="true"aria-label="Fork McShelby/hugo-theme-relearn on GitHub">Fork</a>