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

207 lines
19 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.120.4">
<meta name="generator" content="Relearn 5.23.2+tip">
<meta name="description" content="Documentation for Hugo Relearn Theme">
<meta name="author" content="Sören Weber">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://McShelby.github.io/hugo-theme-relearn/images/hero.png">
<meta name="twitter:title" content="Brrrand&#39;n :: Cap&#39;n Hugo Relearrrn Theme">
<meta name="twitter:description" content="Documentation for Hugo Relearn Theme">
<meta property="og:title" content="Brrrand&#39;n :: Cap&#39;n Hugo Relearrrn Theme">
<meta property="og:description" content="Documentation for Hugo Relearn Theme">
<meta property="og:type" content="website">
<meta property="og:url" content="https://McShelby.github.io/hugo-theme-relearn/pir/basics/branding/index.html">
<meta property="og:image" content="https://McShelby.github.io/hugo-theme-relearn/images/hero.png">
<meta property="og:site_name" content="Cap&#39;n Hugo Relearrrn Theme">
<title>Brrrand&#39;n :: Cap&#39;n Hugo Relearrrn Theme</title>
<link href="https://McShelby.github.io/hugo-theme-relearn/basics/branding/index.html" rel="alternate" hreflang="x-default">
<link href="https://McShelby.github.io/hugo-theme-relearn/basics/branding/index.html" rel="alternate" hreflang="en">
<link href="https://McShelby.github.io/hugo-theme-relearn/pir/basics/branding/index.html" rel="alternate" hreflang="pir">
<link href="https://McShelby.github.io/hugo-theme-relearn/pir/basics/branding/index.html" rel="canonical" type="text/html" title="Brrrand&#39;n :: Cap&#39;n Hugo Relearrrn Theme">
<link href="../../../pir/basics/branding/index.xml" rel="alternate" type="application/rss+xml" title="Brrrand&#39;n :: Cap&#39;n Hugo Relearrrn Theme">
<link href="../../../images/logo.svg?1700525733" 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?1700525735" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../../css/fontawesome-all.min.css?1700525735" rel="stylesheet"></noscript>
<link href="../../../css/nucleus.css?1700525735" rel="stylesheet">
<link href="../../../css/auto-complete.css?1700525735" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../../css/auto-complete.css?1700525735" rel="stylesheet"></noscript>
<link href="../../../css/perfect-scrollbar.min.css?1700525735" rel="stylesheet">
<link href="../../../css/fonts.css?1700525735" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="../../../css/fonts.css?1700525735" rel="stylesheet"></noscript>
<link href="../../../css/theme.css?1700525735" rel="stylesheet">
<link href="../../../css/theme-auto.css?1700525735" rel="stylesheet" id="R-variant-style">
<link href="../../../css/variant.css?1700525735" rel="stylesheet">
<link href="../../../css/print.css?1700525735" rel="stylesheet" media="print">
<link href="../../../css/format-print.css?1700525735" rel="stylesheet">
<link href="../../../css/ie.css?1700525735" rel="stylesheet">
<script src="../../../js/url.js?1700525735"></script>
<script src="../../../js/variant.js?1700525735"></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(/\/$/, '');
window.relearn = window.relearn || {};
window.relearn.baseUriFull='https:\/\/McShelby.github.io\/hugo-theme-relearn/';
// variant stuff
window.variants && variants.init( [ 'auto', 'relearn-light', 'relearn-dark', 'zen-light', 'zen-dark', 'neon', 'learn', 'blue', 'green', 'red' ] );
// translations
window.T_Copy_to_clipboard = `Copy t' clipboard`;
window.T_Copied_to_clipboard = `Copied t' clipboard!`;
window.T_Copy_link_to_clipboard = `Copy link t' clipboard`;
window.T_Link_copied_to_clipboard = `Copied link t' clipboard!`;
window.T_Reset_view = `Rrreset view`;
window.T_View_reset = `View rrreset!`;
window.T_No_results_found = `No rrresults found fer "{0}"`;
window.T_N_results_found = `{1} rrresults found fer "{0}"`;
</script>
<style>
#R-body img.bg-white {
background-color: white;
}
</style>
</head>
<body class="mobile-support print disableInlineCopyToClipboard" data-url="../../../pir/basics/branding/index.html">
<div id="R-body" class="default-animation">
<div id="R-body-overlay"></div>
<nav id="R-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 breadcrumbs highlightable" itemscope itemtype="http://schema.org/BreadcrumbList"><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="1">&nbsp;>&nbsp;</li><li
itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><span itemprop="name">Brrrand&#39;n</span><meta itemprop="position" content="2"></li>
</ol>
<div class="topbar-area topbar-area-end" data-area="end">
</div>
</div>
</nav>
<div id="R-main-overlay"></div>
<main id="R-body-inner" class="highlightable default" tabindex="-1">
<div class="flex-block-wrapper">
<article class="default">
<header class="headline">
</header>
<h1 id="brrrandn">Brrrand&#39;n</h1>
<p>Th' Relearrrn theme provides configurat'n opt'ns t' change yer your site&rsquo;s colors, favicon an' logo. This allows ye t' easily align yer ship visuals t' yer desired style. Most o' these opt'ns be exposed thru so called color variants.</p>
<p>A color variant lets ye cust'mize various visual effects o' yer ship like almost any color, used fonts, color schemes o' print, rules highligtn'n, Merrrmaid an' th' OpenAPI shortcode, etc. It contains o' a CSS file an' optional configurat'n opt'ns 'n yer <code>config.toml</code>.</p>
<p>Th' Relearrrn theme ships wit' a wide set o' different color variants. Ye can use them as-is, copy them over an' use them as a start'n point fer yer customizat'ns or just create completely new variants unique t' yer ship. Th' <a href="../../../basics/generator/index.html">interactive variant generator</a> may help ye wit' this task.</p>
<p>Once configured 'n yer <code>config.toml</code>, ye can select them wit' th' variant selector at th' bottom o' th' menu.</p>
<h2 id="theme-variant">Change th' Variant (Simple)</h2>
<h3 id="single-variant">Single Variant</h3>
<p>Set th' <code>themeVariant</code> value t' th' name o' yer theme file. That&rsquo;s it! Yer ship will be displayed 'n this variant only.</p>
<div class="wrap-code highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">themeVariant</span> <span class="p">=</span> <span class="s2">&#34;relearn-light&#34;</span></span></span></code></pre></div>
<div class="box notices cstyle note">
<div class="box-label"><i class="fa-fw fas fa-exclamation-circle"></i> Avast</div>
<div class="box-content">
<p>Yer theme variant file must reside 'n yer site&rsquo;s <code>static/css</code> directory or 'n th' theme&rsquo;s <code>static/css</code> directory an' th' file name must start wit' <code>theme-</code> an' end wit <code>.css</code>. In th' above example, th' path o' yer theme file must be <code>static/css/theme-relearn-light.css</code>.</p>
<p>If ye want t' make changes t' a shipped color variant, create a copy 'n yer site&rsquo;s <code>static/css</code> directory. Don&rsquo;t edit th' file 'n th' theme&rsquo;s directory!</p>
</div>
</div>
<h3 id="multiple-variants">Multiple Variants</h3>
<p>Ye can also set multiple variants. In this case, th' first variant be th' default chosen on first view an' a variant selector will be shown 'n th' menu footer if th' array contains more than one entry.</p>
<div class="wrap-code highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">themeVariant</span> <span class="p">=</span> <span class="p">[</span> <span class="s2">&#34;relearn-light&#34;</span><span class="p">,</span> <span class="s2">&#34;relearn-dark&#34;</span> <span class="p">]</span></span></span></code></pre></div>
<div class="box notices cstyle tip">
<div class="box-label"><i class="fa-fw fas fa-lightbulb"></i> Smarrrt Arrrse</div>
<div class="box-content">
<p>Th' theme provides an advanced configurat'n mode, combin'n th' functionality fer multiple variants wit' th' below possibilities o' adjust'n t' yer OS sett'ns, logo an' rules highlightn'n an' even more!</p>
<p>Although all opt'ns documented here be still work'n, th' advanced configurat'n opt'ns be th' recommended way t' configure yer color variants. <a href="#theme-variant-advanced">See below</a>.</p>
</div>
</div>
<h2 id="adjust-to-os-settings">Adjust t' OS Sett'ns</h2>
<p>Ye can also cause th' ship t' adjust t' yer OS sett'ns fer light/dark mode. Just set th' <code>themeVariant</code> t' <code>auto</code>. That&rsquo;s it.</p>
<p>Ye can use th' <code>auto</code> value wit' th' single or multiple variants opt'n. If ye be us'n multiple variants, ye can drop <code>auto</code> at any posit'n 'n th' option&rsquo;s array, but usually it makes sense t' set it 'n th' first posit'n an' make it th' default.</p>
<div class="wrap-code highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">themeVariant</span> <span class="p">=</span> <span class="p">[</span> <span class="s2">&#34;auto&#34;</span><span class="p">,</span> <span class="s2">&#34;red&#34;</span> <span class="p">]</span></span></span></code></pre></div><p>If ye don&rsquo;t configure anyth'n else, th' theme will default t' use <code>relearn-light</code> fer light mode an' <code>relearn-dark</code> fer dark mode. These defaults be overwritten by th' first two non-auto opt'ns o' yer <code>themeVariant</code> opt'n if present.</p>
<p>In th' above example, ye would end wit' <code>red</code> fer light mode an' th' default o' <code>relearn-dark</code> fer dark mode.</p>
<p>If ye don&rsquo;t like that behavior, ye can explicitly set <code>themeVariantAuto</code>. Th' first entry 'n th' array be th' color variant fer light mode, th' second fer dark mode.</p>
<div class="wrap-code highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">themeVariantAuto</span> <span class="p">=</span> <span class="p">[</span> <span class="s2">&#34;learn&#34;</span><span class="p">,</span> <span class="s2">&#34;neon&#34;</span> <span class="p">]</span></span></span></code></pre></div><h2 id="change-the-favicon">Change th' Favicon</h2>
<p>If yer favicon be a SVG, PNG or ICO, just drop yer image 'n yer site&rsquo;s <code>static/images/</code> directory an' name it <code>favicon.svg</code>, <code>favicon.png</code> or <code>favicon.ico</code> respectively.</p>
<p>If ye want t' adjust yer favicon accord'n t' yer OS sett'ns fer light/dark mode, add th' image files <code>static/images/favicon-light.svg</code> an' <code>static/images/favicon-dark.svg</code> t' yer site&rsquo;s directory, respectively, correspond'n t' yer file format. In case some o' th' files be miss'n, th' theme falls back t' <code>favicon.svg</code> fer each miss'n file. All supplied favicons must be o' th' same file format.</p>
<p>If no favicon file be found, th' theme will lookup th' alternative filename <code>logo</code> 'n th' same locat'n an' will repeat th' search fer th' list o' supported file types.</p>
<p>If ye need t' change this default behavior, create a new file <code>layouts/partials/favicon.html</code> 'n yer site&rsquo;s directory an' write someth'n like this:</p>
<div class="wrap-code highlight"><pre tabindex="0" class="chroma"><code class="language-html" data-lang="html"><span class="line"><span class="cl"><span class="p">&lt;</span><span class="nt">link</span> <span class="na">rel</span><span class="o">=</span><span class="s">&#34;icon&#34;</span> <span class="na">href</span><span class="o">=</span><span class="s">&#34;/images/favicon.bmp&#34;</span> <span class="na">type</span><span class="o">=</span><span class="s">&#34;image/bmp&#34;</span><span class="p">&gt;</span></span></span></code></pre></div><h2 id="change-the-logo">Change th' Logo</h2>
<p>Create a new file 'n <code>layouts/partials/logo.html</code> o' yer ship. Then write any HTML ye want. Ye could use an <code>img</code> HTML tag an' reference an image created under th' <em>static</em> folder, or ye could paste a SVG definit'n!</p>
<div class="box notices cstyle note">
<div class="box-label"><i class="fa-fw fas fa-exclamation-circle"></i> Avast</div>
<div class="box-content">
<p>Th' size o' th' logo will adapt automatically.</p>
</div>
</div>
<h2 id="syntax-highlightning">Rules highlightn'n</h2>
<p>If ye want t' switch th' rules highlight'n theme together wit' yer color variant, generate a rules highlight'n stylesheet an' configure yer installat'n <a href="https://gohugo.io/content-management/syntax-highlighting/" target="_blank">accord'n t' Hugo&rsquo;s documentat'n</a>. Then, <code>@import</code> th' rules highlightn'n stylesheet 'n yer color variant stylesheet.</p>
<p>For an example, take a look into <code>theme-relearn-light.css</code> an' <code>config.toml</code> o' th' exampleSite.</p>
<p>If ye want t' reconfigure just th' rules highlight'n o' an exist'n color variant, ye need t' copy th' file t' yer site&rsquo;s directory an' adjust it accordingly.</p>
<h2 id="theme-variant-advanced">Change th' Variant (Advanced)</h2>
<p>Th' theme offers a new way t' configure theme variants an' all o' th' aspects above inside o' a single configurat'n item. This comes wit' some features previously unsupported.</p>
<p>Like wit' th' <a href="#multiple-variants">multiple variants</a> opt'n, ye be defin'n yer theme variants 'n an array but now <em>not by simple str'ns</em> <strong>but 'n a t'ble wit' subopt'ns</strong>.</p>
<p>Again, 'n this case, th' first variant be th' default chosen on first view an' a variant selector will be shown 'n th' menu footer if th' array contains more than one entry.</p>
<div class="wrap-code highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">themeVariant</span> <span class="p">=</span> <span class="p">[</span> <span class="s2">&#34;relearn-light&#34;</span><span class="p">,</span> <span class="s2">&#34;relearn-dark&#34;</span> <span class="p">]</span></span></span></code></pre></div><p>ye now write it that way:</p>
<div class="wrap-code highlight"><pre tabindex="0" class="chroma"><code class="language-toml" data-lang="toml"><span class="line"><span class="cl"><span class="p">[</span><span class="nx">params</span><span class="p">]</span>
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">themeVariant</span><span class="p">]]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;relearn-light&#34;</span>
</span></span><span class="line"><span class="cl"> <span class="p">[[</span><span class="nx">params</span><span class="p">.</span><span class="nx">themeVariant</span><span class="p">]]</span>
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s2">&#34;relearn-dark&#34;</span></span></span></code></pre></div><p>Th' <code>identifier</code> opt'n be mandatory an' equivalent t' th' str'n 'n th' first example. Further opt'ns can be configured, see th' t'ble below.</p>
<h3 id="parameter">Parameter</h3>
<table>
<thead>
<tr>
<th>Name</th>
<th>Default</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>identifier</td>
<td><em>&lt;empty&gt;</em></td>
<td>Must correspond t' th' name o' a color variant either 'n yer site&rsquo;s or th' theme&rsquo;s directory 'n th' form <code>static/css/theme-&lt;IDENTIFIER&gt;.css</code>.</td>
</tr>
<tr>
<td>name</td>
<td>see notes</td>
<td>Th' name t' be displayed 'n th' variant selector. If not set, th' identifier be used 'n a human read'ble form.</td>
</tr>
</tbody>
</table>
<footer class="footline">
<div class=" taxonomy-categories term-list cstyle " title="Categories" style="--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);">
<i class="fa-fw fas fa-layer-group"></i>
<ul>
<li><a class="term-link" href="../../../pir/categories/custom/index.html">custom</a></li>
<li><a class="term-link" href="../../../pir/categories/theming/index.html">theming</a></li>
</ul>
</div>
</footer>
</article>
</div>
</main>
</div>
<script src="../../../js/clipboard.min.js?1700525735" defer></script>
<script src="../../../js/perfect-scrollbar.min.js?1700525735" defer></script>
<script src="../../../js/theme.js?1700525735" defer></script>
</body>
</html>