<p><ahref="#image-a99c95d4755b0552e315eec90a3049c3"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-a99c95d4755b0552e315eec90a3049c3"><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, your requirements may differ from this configuration. Luckily the theme got you covered as the themebar, its buttons and the functionality behind these buttons is fully configurable by you.</p>
<h2id="areas">Areas</h2>
<p>The default configuration comes with three predefined areas that may contain an arbitrary set of buttons.</p>
<p><ahref="#image-7978c7feaf77e09992eda5e4e1e3334a"class="lightbox-link"><imgsrc="../../basics/topbar/topbar-areas.png"alt="Topbar with default areas marked"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-7978c7feaf77e09992eda5e4e1e3334a"><imgsrc="../../basics/topbar/topbar-areas.png"alt="Topbar with default areas marked"class="lightbox-image bg-white border lightbox noshadow"loading="lazy"></a></p>
<li><strong>start</strong>: shown between menu and breadcrumb</li>
<li><strong>end</strong>: shown on the opposite breadcrumb side in comparison to the <em>start</em> area</li>
<li><strong>more</strong>: shown when pressing the
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-ellipsis-v"></i>
</button>
</span><em>more</em> button in the topbar</li>
</ul>
<p>While you can not add additional areas in the topbar, you are free to configure addtional buttons that behave like the <em>more</em> button, providing further user defined areas.</p>
<h2id="buttons">Buttons</h2>
<p>The theme ships with the following predefined buttons (from left to right in the screenshot)</p>
<ul>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-bars"></i>
</button>
</span><strong>sidebar</strong>: opens the sidebar flyout if in mobile layout</li>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-list-alt"></i>
</button>
</span><strong>toc</strong>: opens the table of contents in an overlay</li>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-pen"></i>
</button>
</span><strong>edit</strong>: browses to the editable page if the <code>editURL</code><ahref="../../basics/configuration/#global-site-parameters">parameter is set</a></li>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-print"></i>
</button>
</span><strong>print</strong>: browses to the chapters printable page 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 to the previous page if there is one</li>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-chevron-right"></i>
</button>
</span><strong>next</strong>: browses to the next page if there is one</li>
<li>
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-ellipsis-v"></i>
</button>
</span><strong>more</strong>: opens the overlay for the <em>more</em> area</li>
</ul>
<p>Not all buttons are displayed at every given time. This is configurable (see below if interested).</p>
<h2id="redefining-areas">Redefining Areas</h2>
<p>Each predefined area and button comes in their own file. By that it is easy for you to overwrite an area file in your installation reusing only the buttons you like.</p>
<p>Eg. you can redefine the predefined <em>end</em> area by adding the file <code>layouts/partials/topbar/area/end.html</code> in your installtion (not in the theme itself) to remove all but the <em>more</em> button.</p>
</span></span><spanclass="line"><spanclass="cl"><spanclass="p">)}}</span></span></span></code></pre></div><h2id="defining-own-buttons">Defining own Buttons</h2>
<h3id="button-types">Button Types</h3>
<p>The theme distingushies between two types of buttons:</p>
<ul>
<li><strong>button</strong>: a clickable button that either browses to another site or triggers a user defined script</li>
<li><strong>area-button</strong>: the template for the
<spanclass="btn cstyle transparent">
<buttontype="button">
<iclass="fa-fw fas fa-ellipsis-v"></i>
</button>
</span><em>more</em> button, to define your own area overlay buttons</li>
</ul>
<h3id="button-parameter">Button Parameter</h3>
<h4id="screen-widths-and-actions">Screen Widths and Actions</h4>
<p>Depending on the screen width you can configure how the button should behave. Screen width is divided into three classes:</p>
<ul>
<li><strong>s</strong>: (controlled by the <code>onwidths</code> parameter) mobile layout where the menu sidebar is hidden</li>
<li><strong>m</strong>: (controlled by the <code>onwidthm</code> parameter) desktop layout with visible sidebar while the content area width still resizes</li>
<li><strong>l</strong>: (controlled by the <code>onwidthl</code> parameter) desktop layout with visible sidebar once the content area reached its maximum width</li>
</ul>
<p>For each width class, you can configure one of the following actions:</p>
<li><code>show</code>: the button is displayed in its configured area</li>
<li><code>hide</code>: the button is hidden</li>
<li><code>area-XXX</code>: the button is moved from its configured area into the area <code>XXX</code>; eg. this is used to move buttons to the <em>more</em> area in the mobile layout</li>
<h4id="hiding-and-disabling-stuff">Hiding and Disabling Stuff</h4>
<p>While hiding a button dependend on the screen size can be configured with the above described <em>hide</em> action, you may want to hide the button on certain other conditions aswell.</p>
<p>For example, the <em>print</em> button in its default configuration should only be displayed if print support was configured. This is done in your button template by checking the conditions first before displaying the button (see <code>layouts/partials/topbar/button/print.html</code>).</p>
<p>Another prefered condition for hiding a button is, if the displayed overlay is empty. This is the case for the <em>toc</em> (see <code>layouts/partials/topbar/button/toc.html</code>) aswell as the <em>more</em> button (see <code>layouts/partials/topbar/button/more.html</code>) and controlled by the parameter <code>onempty</code>.</p>
<p>This parameter can have one of the following values:</p>
<p>If you want to disable a button containing <em>no overlay</em>, this can be achieved by an empty <code>href</code> parameter. An example can be seen in the <em>prev</em> button (see <code>layouts/partials/topbar/button/prev.html</code>) where the URL for the previous site may be empty.</p>
<h2id="reference">Reference</h2>
<h3id="button">Button</h3>
<p>Contains the basic button functionality and is used as a base implementation for all other buttons (<code>layouts/partials/topbar/func/button.html</code>). Call this from your own button templates if you want to implement a button with <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>page</strong></td>
<td><em><empty></em></td>
<td>Mandatory reference to the page.</td>
</tr>
<tr>
<td><strong>class</strong></td>
<td><em><empty></em></td>
<td>Mandatory unique class name for this button. Displaying two buttons with the same value for <strong>class</strong> is undefined.</td>
</tr>
<tr>
<td><strong>href</strong></td>
<td><em><empty></em></td>
<td>Either the destination URL for the button or JavaScript code to be executed on click.<br><br>- if starting with <code>javascript:</code> all following text will be executed in your browser<br>- every other string will be interpreted as URL<br><br>If this parameter is not set, the button will be displayed<br><br>- as disabled if no <strong>content</strong> is specified<br>- according to <strong>onempty</strong> if any <strong>content</strong> is given.</td>
<td>Defines what to do with the button if its content overlay is empty:<br><br>- <code>disable</code>: The button is displayed in disabled state.<br>- <code>hide</code>: The button is not displayed. The next button will move into the gap.</td>
</tr>
<tr>
<td><strong>onwidths</strong></td>
<td><code>show</code></td>
<td>The action, that should be executed if the site is displayed in the given width:<br><br>- <code>show</code>: The button is displayed in its configured area<br>- <code>hide</code>: The button is hidden.<br>- <code>area-XXX</code>: The button is moved from its configured area into the 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 for title, displayed in the tooltip.</td>
</tr>
<tr>
<td><strong>content</strong></td>
<td>see notes</td>
<td>Arbitrary HTML to put into the content 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 the basic functionality to display area overlay buttons (<code>layouts/partials/topbar/func/area-button.html</code>). Call this from your own button templates if you want to implement a button with an overlay area like the <em>more</em> button.</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>page</strong></td>
<td><em><empty></em></td>
<td>Mandatory reference to the page.</td>
</tr>
<tr>
<td><strong>area</strong></td>
<td><em><empty></em></td>
<td>Mandatory unique area name for this area. Displaying two areas with the same value for <strong>area</strong> is undefined.</td>
<td>Defines what to do with the button if its content overlay is empty:<br><br>- <code>disable</code>: The button is displayed in disabled state.<br>- <code>hide</code>: The button is not displayed. The next button will move into the gap.</td>
</tr>
<tr>
<td><strong>onwidths</strong></td>
<td><code>show</code></td>
<td>The action, that should be executed if the site is displayed in the given width:<br><br>- <code>show</code>: The button is displayed in its configured area<br>- <code>hide</code>: The button is hidden.<br>- <code>area-XXX</code>: The button is moved from its configured area into the 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 for title, displayed in the tooltip.</td>
<p>The predefined buttons by the theme (all other buttons besides the <em>more</em> and <em>toc</em> button in <code>layouts/partials/topbar/button</code>). Call these from your own redefined area templates if you want to offer some of the default button behavior.</p>
<td>The action, that should be executed if the site is displayed in the given width:<br><br>- <code>show</code>: The button is displayed in its configured area<br>- <code>hide</code>: The button is hidden.<br>- <code>area-XXX</code>: The button is moved from its configured area into the area <code>XXX</code>.</td>
<p>The predefined buttons by the theme that open an overlay (the <em>more</em> and <em>toc</em> button in <code>layouts/partials/topbar/button</code>). Call these from your own redefined area templates if you want to offer some of the default area button behavior.</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>page</strong></td>
<td><em><empty></em></td>
<td>Mandatory reference to the page.</td>
</tr>
<tr>
<td><strong>onempty</strong></td>
<td><em><varying></em></td>
<td>Defines what to do with the button if its content overlay is empty:<br><br>- <code>disable</code>: The button is displayed in disabled state.<br>- <code>hide</code>: The button is not displayed. The next button will move into the gap.</td>
</tr>
<tr>
<td><strong>onwidths</strong></td>
<td><em><varying></em></td>
<td>The action, that should be executed if the site is displayed in the given width:<br><br>- <code>show</code>: The button is displayed in its configured area<br>- <code>hide</code>: The button is hidden.<br>- <code>area-XXX</code>: The button is moved from its configured area into the area <code>XXX</code>.</td>