<!DOCTYPE html> <html lang="en" dir="ltr" itemscope itemtype="http://schema.org/Article" data-r-output-format="print"> <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.145.0"> <meta name="generator" content="Relearn 7.5.0+b89d1e3fb63c72c28f83bda3ef08bdca7723066c"> <meta name="description" content="Show content in a single tab"> <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="Tab :: Hugo Relearn Theme"> <meta name="twitter:description" content="Show content in a single tab"> <meta property="og:url" content="https://mcshelby.github.io/hugo-theme-relearn/shortcodes/tab/index.html"> <meta property="og:site_name" content="Hugo Relearn Theme"> <meta property="og:title" content="Tab :: Hugo Relearn Theme"> <meta property="og:description" content="Show content in a single tab"> <meta property="og:locale" content="en"> <meta property="og:type" content="article"> <meta property="article:section" content="Shortcodes"> <meta property="og:image" content="https://mcshelby.github.io/hugo-theme-relearn/images/hero.png"> <meta itemprop="name" content="Tab :: Hugo Relearn Theme"> <meta itemprop="description" content="Show content in a single tab"> <meta itemprop="wordCount" content="833"> <meta itemprop="image" content="https://mcshelby.github.io/hugo-theme-relearn/images/hero.png"> <meta itemprop="keywords" content="Howto,Reference"> <title>Tab :: Hugo Relearn Theme</title> <link href="https://mcshelby.github.io/hugo-theme-relearn/shortcodes/tab/index.html" rel="alternate" hreflang="x-default"> <link href="https://mcshelby.github.io/hugo-theme-relearn/shortcodes/tab/index.html" rel="alternate" hreflang="en"> <link href="https://mcshelby.github.io/hugo-theme-relearn/pir/shortcodes/tab/index.html" rel="alternate" hreflang="art-x-pir"> <link href="https://mcshelby.github.io/hugo-theme-relearn/shortcodes/tab/index.html" rel="canonical" type="text/html" title="Tab :: Hugo Relearn Theme"> <link href="/hugo-theme-relearn/shortcodes/tab/index.xml" rel="alternate" type="application/rss+xml" title="Tab :: Hugo Relearn Theme"> <link href="/hugo-theme-relearn/images/logo.svg?1742166070" rel="icon" type="image/svg+xml"> <link href="/hugo-theme-relearn/fonts/fontawesome/css/fontawesome-all.min.css?1742166070" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/fonts/fontawesome/css/fontawesome-all.min.css?1742166070" rel="stylesheet"></noscript> <link href="/hugo-theme-relearn/css/perfect-scrollbar/perfect-scrollbar.min.css?1742166070" rel="stylesheet"> <link href="/hugo-theme-relearn/css/theme.min.css?1742166070" rel="stylesheet"> <link href="/hugo-theme-relearn/css/format-print.min.css?1742166070" rel="stylesheet" id="R-format-style"> <link href="/hugo-theme-relearn/css/auto-complete/auto-complete.min.css?1742166070" rel="stylesheet"> <script src="/hugo-theme-relearn/js/auto-complete/auto-complete.min.js?1742166070" defer></script> <script src="/hugo-theme-relearn/js/lunr/lunr.min.js?1742166070" defer></script> <script src="/hugo-theme-relearn/js/lunr/lunr.stemmer.support.min.js?1742166070" defer></script> <script src="/hugo-theme-relearn/js/lunr/lunr.multi.min.js?1742166070" defer></script> <script src="/hugo-theme-relearn/js/lunr/lunr.en.min.js?1742166070" defer></script> <script src="/hugo-theme-relearn/js/search.min.js?1742166070" defer></script> <script> window.relearn = window.relearn || {}; // configuration window.relearn.min = `.min`; window.relearn.relBasePath='..\/..'; window.relearn.relBaseUri='..\/..\/..'; window.relearn.absBaseUri='https:\/\/mcshelby.github.io\/hugo-theme-relearn'; window.relearn.contentLangs=['en']; window.relearn.index_js_url="/hugo-theme-relearn/searchindex.en.js?1742166070"; window.relearn.disableAnchorCopy=false; window.relearn.disableAnchorScrolling=false; window.relearn.disableInlineCopyToClipboard=true; window.relearn.enableBlockCodeWrap=true; // variant stuff window.relearn.themevariants = [ 'relearn-auto', 'relearn-dark', 'relearn-light', 'relearn-bright', 'zen-auto', 'zen-dark', 'zen-light', 'retro-auto', 'neon', 'learn', 'blue', 'green', 'red' ]; window.relearn.customvariantname = "my-custom-variant"; window.relearn.changeVariant = function(variant) { var oldVariant = document.documentElement.dataset.rThemeVariant; window.localStorage.setItem(window.relearn.absBaseUri + "/variant", variant); document.documentElement.dataset.rThemeVariant = variant; if (oldVariant != variant) { document.dispatchEvent( new CustomEvent('themeVariantLoaded', { detail: { variant, oldVariant } }) ); } } window.relearn.markVariant = function() { var variant = window.localStorage.getItem(window.relearn.absBaseUri + "/variant"); var select = document.querySelector("#R-select-variant"); if (select) { select.value = variant; } } window.relearn.initVariant = function() { var variant = window.localStorage.getItem(window.relearn.absBaseUri + "/variant") ?? ""; if( variant == window.relearn.customvariantname ){ }else if( !variant || !window.relearn.themevariants.includes(variant) ){ variant = window.relearn.themevariants[0]; window.localStorage.setItem(window.relearn.absBaseUri + "/variant", variant); } document.documentElement.dataset.rThemeVariant = variant; } window.relearn.initVariant(); window.relearn.markVariant(); // translations window.T_Copy_to_clipboard = `Copy to clipboard`; window.T_Copied_to_clipboard = `Copied to clipboard!`; window.T_Copy_link_to_clipboard = `Copy link to clipboard`; window.T_Link_copied_to_clipboard = `Copied link to clipboard!`; window.T_Reset_view = `Reset view`; window.T_View_reset = `View reset!`; window.T_No_results_found = `No results found for "{0}"`; window.T_N_results_found = `{1} results found for "{0}"`; </script> <script src="/hugo-theme-relearn/js/variant.min.js?1742166070"></script> <style> #R-body img.bg-white { background-color: white; } #R-logo { font-size: 1.875rem; margin-bottom: -.666rem; margin-top: -.666rem; max-width: 100%; width: 14.125rem; } @media only all and (max-width: 59.999rem) { #R-logo { font-size: 1.5625rem; margin-bottom: -.1875rem; margin-top: -.1875rem; } } #R-logo svg { display: inline-block; opacity: .945; vertical-align: middle; width: 29% !important; } @media only all and (max-width: 59.999rem) { #R-logo svg { width: 24.5% !important; } } #R-logo svg * { opacity: .945; } #R-logo .logo-title{ display: inline-block; text-align: left; text-wrap: wrap; overflow-wrap: break-word; vertical-align: middle; width: 4.5em; } </style> </head> <body class="mobile-support print" data-url="/hugo-theme-relearn/shortcodes/tab/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+ALT+n)"><i class="fa-fw fas fa-bars"></i></button> </div> <div class="topbar-button topbar-button-toc" data-content-empty="hide" data-width-s="show" data-width-m="show" data-width-l="show"><button class="topbar-control" onclick="toggleTopbarFlyout(this)" type="button" title="Table of Contents (CTRL+ALT+t)"><i class="fa-fw fas fa-list-alt"></i></button> <div class="topbar-content"> <div class="topbar-content-wrapper"> <nav class="TableOfContents"> <ul> <li><a href="#usage">Usage</a> <ul> <li><a href="#parameter">Parameter</a></li> </ul> </li> <li><a href="#examples">Examples</a> <ul> <li><a href="#single-code-block-with-collapsed-margins">Single Code Block with Collapsed Margins</a></li> <li><a href="#mixed-markdown-content">Mixed Markdown Content</a></li> <li><a href="#understanding-style-and-color-behavior">Understanding <code>style</code> and <code>color</code> Behavior</a></li> </ul> </li> </ul> </nav> </div> </div> </div> </div> <ol class="topbar-breadcrumbs breadcrumbs highlightable" itemscope itemtype="http://schema.org/BreadcrumbList"> <li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement" class="a11y-only"><a itemprop="item" href="/hugo-theme-relearn/index.html"><span itemprop="name">Hugo Relearn Theme</span></a><meta itemprop="position" content="1"> > </li> <li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement" class=""><a itemprop="item" href="/hugo-theme-relearn/shortcodes/index.html"><span itemprop="name">Shortcodes</span></a><meta itemprop="position" content="2"> > </li> <li itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement" class=""><span itemprop="name">Tab</span><meta itemprop="position" content="3"></li> </ol> <div class="topbar-area topbar-area-end" data-area="end"> <div class="topbar-button topbar-button-edit" data-content-empty="disable" data-width-s="area-more" data-width-m="show" data-width-l="show"><a class="topbar-control" href="https://github.com/McShelby/hugo-theme-relearn/edit/main/docs/content/shortcodes/tab.en.md" rel="external" target="_self" title="Edit (CTRL+ALT+w)"><i class="fa-fw fas fa-pen"></i></a> </div> <div class="topbar-button topbar-button-print" data-content-empty="disable" data-width-s="area-more" data-width-m="show" data-width-l="show"><a class="topbar-control" href="/hugo-theme-relearn/shortcodes/tab/index.print.html" title="Print whole chapter (CTRL+ALT+p)"><i class="fa-fw fas fa-print"></i></a> </div> <div class="topbar-button topbar-button-prev" data-content-empty="disable" data-width-s="show" data-width-m="show" data-width-l="show"><a class="topbar-control" href="/hugo-theme-relearn/shortcodes/siteparam/index.html" title="SiteParam (🡐)"><i class="fa-fw fas fa-chevron-left"></i></a> </div> <div class="topbar-button topbar-button-next" data-content-empty="disable" data-width-s="show" data-width-m="show" data-width-l="show"><a class="topbar-control" href="/hugo-theme-relearn/shortcodes/tabs/index.html" title="Tabs (🡒)"><i class="fa-fw fas fa-chevron-right"></i></a> </div> <div class="topbar-button topbar-button-more" data-content-empty="hide" data-width-s="show" data-width-m="show" data-width-l="show"><button class="topbar-control" onclick="toggleTopbarFlyout(this)" type="button" title="More"><i class="fa-fw fas fa-ellipsis-v"></i></button> <div class="topbar-content"> <div class="topbar-content-wrapper"> <div class="topbar-area topbar-area-more" data-area="more"> </div> </div> </div> </div> </div> </div> </nav> <div id="R-main-overlay"></div> <main id="R-body-inner" class="highlightable shortcodes" tabindex="-1"> <div class="flex-block-wrapper"> <article class="default"> <header class="headline"> </header> <h1 id="tab">Tab</h1> <p>You can use a <code>tab</code> shortcode to display a single tab with a title.</p> <div class="tab-panel" data-tab-group="87fdf9e929a1785edb8227f5587dcfb1"> <div class="tab-nav"> <div class="tab-nav-title">​</div> <button data-tab-item="c" class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1" onclick="switchTab('87fdf9e929a1785edb8227f5587dcfb1','c')" > <span class="tab-nav-text">c</span> </button> </div> <div class="tab-content-container"> <div data-tab-item="c" class="tab-content tab-panel-style cstyle initial active"> <div class="tab-content-text"> <div class="highlight wrap-code" dir="auto"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">printf</span><span class="p">(</span><span class="s2">"Hello World!"</span><span class="p">);</span></span></span></code></pre></div> </div> </div> </div> </div> <h2 id="usage">Usage</h2> <div class="tab-panel" data-tab-group="shortcode-parameter"> <div class="tab-nav"> <div class="tab-nav-title">​</div> <button data-tab-item="shortcode" class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1" onclick="switchTab('shortcode-parameter','shortcode')" > <span class="tab-nav-text">shortcode</span> </button> <button data-tab-item="partial" class="tab-nav-button tab-panel-style cstyle initial" onclick="switchTab('shortcode-parameter','partial')" > <span class="tab-nav-text">partial</span> </button> </div> <div class="tab-content-container"> <div data-tab-item="shortcode" class="tab-content tab-panel-style cstyle initial active"> <div class="tab-content-text"> <div class="highlight wrap-code" dir="auto"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">"c"</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="s">```c </span></span></span><span class="line"><span class="cl"><span class="s">printf("Hello World!"); </span></span></span><span class="line"><span class="cl"><span class="s">```</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div> </div> </div> <div data-tab-item="partial" class="tab-content tab-panel-style cstyle initial"> <div class="tab-content-text"> <div class="highlight wrap-code" dir="auto"><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">"shortcodes/tab.html"</span> <span class="p">(</span><span class="nx">dict</span> </span></span><span class="line"><span class="cl"> <span class="s">"page"</span> <span class="p">.</span> </span></span><span class="line"><span class="cl"> <span class="s">"title"</span> <span class="s">"c"</span> </span></span><span class="line"><span class="cl"> <span class="s">"content"</span> <span class="p">(</span><span class="s">"```c\nprintf(\"Hello World!\")\n```"</span> <span class="p">|</span> <span class="p">.</span><span class="nx">RenderString</span><span class="p">)</span> </span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div> </div> </div> </div> </div> <p>If you want multiple tabs grouped together you can wrap your tabs into the <a href="/hugo-theme-relearn/shortcodes/tabs/index.html"><code>tabs</code> shortcode</a>.</p> <p>If you want further options when using a single code tab, you can also use the <a href="/hugo-theme-relearn/shortcodes/highlight/index.html"><code>highlight</code> shortcode</a>.</p> <h3 id="parameter">Parameter</h3> <table> <thead> <tr> <th>Name</th> <th>Default</th> <th>Notes</th> </tr> </thead> <tbody> <tr> <td><strong>style</strong></td> <td>see notes</td> <td>The style scheme used for the tab. If you don’t set a style and you display a single code block inside of the tab, its default styling will adapt to that of a <code>code</code> block. Otherwise <code>default</code> is used.<br><br>- by severity: <code>caution</code>, <code>important</code>, <code>info</code>, <code>note</code>, <code>tip</code>, <code>warning</code><br>- by brand color: <code>primary</code>, <code>secondary</code>, <code>accent</code><br>- by color: <code>blue</code>, <code>cyan</code>, <code>green</code>, <code>grey</code>, <code>magenta</code>, <code>orange</code>, <code>red</code><br>- by special color: <code>default</code>, <code>transparent</code>, <code>code</code><br><br>You can also <a href="/hugo-theme-relearn/shortcodes/notice/index.html#defining-own-styles">define your own styles</a>.</td> </tr> <tr> <td><strong>color</strong></td> <td>see notes</td> <td>The <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value" rel="external" target="_self">CSS color value</a> to be used. If not set, the chosen color depends on the <strong>style</strong>. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching color for the severity<br>- for all other styles: the corresponding color</td> </tr> <tr> <td><strong>title</strong></td> <td>see notes</td> <td>Arbitrary title for the tab. Depending on the <strong>style</strong> there may be a default title. Any given value will overwrite the default.<br><br>- for severity styles: the matching title for the severity<br>- for all other styles: <em><empty></em><br><br>If you want no title for a severity style, you have to set this parameter to <code>" "</code> (a non empty string filled with spaces)</td> </tr> <tr> <td><strong>icon</strong></td> <td>see notes</td> <td><a href="/hugo-theme-relearn/shortcodes/icon/index.html#finding-an-icon">Font Awesome icon name</a> set to the left of the title. Depending on the <strong>style</strong> there may be a default icon. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching icon for the severity<br>- for all other styles: <em><empty></em><br><br>If you want no icon for a severity style, you have to set this parameter to <code>" "</code> (a non empty string filled with spaces)</td> </tr> <tr> <td><em><strong><content></strong></em></td> <td><em><empty></em></td> <td>Arbitrary text to be displayed in the tab.</td> </tr> </tbody> </table> <h2 id="examples">Examples</h2> <h3 id="single-code-block-with-collapsed-margins">Single Code Block with Collapsed Margins</h3> <div class="highlight wrap-code" dir="auto"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Code"</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="s">```python </span></span></span><span class="line"><span class="cl"><span class="s">printf("Hello World!"); </span></span></span><span class="line"><span class="cl"><span class="s">```</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div> <div class="tab-panel" data-tab-group="ffa3d380928e5341d50571206ca0ebec"> <div class="tab-nav"> <div class="tab-nav-title">​</div> <button data-tab-item="code" class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1" onclick="switchTab('ffa3d380928e5341d50571206ca0ebec','code')" > <span class="tab-nav-text">Code</span> </button> </div> <div class="tab-content-container"> <div data-tab-item="code" class="tab-content tab-panel-style cstyle initial active"> <div class="tab-content-text"> <div class="highlight wrap-code" dir="auto"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">printf</span><span class="p">(</span><span class="s2">"Hello World!"</span><span class="p">);</span></span></span></code></pre></div> </div> </div> </div> </div> <h3 id="mixed-markdown-content">Mixed Markdown Content</h3> <div class="highlight wrap-code" dir="auto"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">"_**Mixed**_"</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="nx">tab</span> <span class="nx">can</span> <span class="nx">not</span> <span class="nx">only</span> <span class="nx">contain</span> <span class="nx">code</span> <span class="nx">but</span> <span class="nx">arbitrary</span> <span class="nx">text</span><span class="p">.</span> <span class="nx">In</span> <span class="nx">this</span> <span class="k">case</span> <span class="nx">text</span> <span class="o">**</span><span class="nx">and</span><span class="o">**</span> <span class="nx">code</span> <span class="nx">will</span> <span class="nx">get</span> <span class="nx">a</span> <span class="nx">margin</span><span class="p">.</span> </span></span><span class="line"><span class="cl"><span class="s">```python </span></span></span><span class="line"><span class="cl"><span class="s">printf("Hello World!"); </span></span></span><span class="line"><span class="cl"><span class="s">```</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div> <div class="tab-panel" data-tab-group="1f8e132fe716b507c4d256b52986d2c8"> <div class="tab-nav"> <div class="tab-nav-title">​</div> <button data-tab-item="mixed" class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1" onclick="switchTab('1f8e132fe716b507c4d256b52986d2c8','mixed')" > <span class="tab-nav-text"><em><strong>Mixed</strong></em></span> </button> </div> <div class="tab-content-container"> <div data-tab-item="mixed" class="tab-content tab-panel-style cstyle initial active"> <div class="tab-content-text"> <p>A tab can not only contain code but arbitrary text. In this case text <strong>and</strong> code will get a margin.</p> <div class="highlight wrap-code" dir="auto"><pre tabindex="0" class="chroma"><code class="language-python" data-lang="python"><span class="line"><span class="cl"><span class="n">printf</span><span class="p">(</span><span class="s2">"Hello World!"</span><span class="p">);</span></span></span></code></pre></div> </div> </div> </div> </div> <h3 id="understanding-style-and-color-behavior">Understanding <code>style</code> and <code>color</code> Behavior</h3> <p>The <code>style</code> parameter affects how the <code>color</code> parameter is applied.</p> <div class="highlight wrap-code" dir="auto"><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">tabs</span> <span class="p">>}}</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">"just colored style"</span> <span class="nx">style</span><span class="p">=</span><span class="s">"blue"</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="nx">The</span> <span class="s">`style`</span> <span class="nx">parameter</span> <span class="nx">is</span> <span class="nx">set</span> <span class="nx">to</span> <span class="nx">a</span> <span class="nx">color</span> <span class="nx">style</span><span class="p">.</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">This</span> <span class="nx">will</span> <span class="nx">set</span> <span class="nx">the</span> <span class="nx">background</span> <span class="nx">to</span> <span class="nx">a</span> <span class="nx">lighter</span> <span class="nx">version</span> <span class="nx">of</span> <span class="nx">the</span> <span class="nx">chosen</span> <span class="nx">style</span> <span class="nx">color</span> <span class="nx">as</span> <span class="nx">configured</span> <span class="nx">in</span> <span class="nx">your</span> <span class="nx">theme</span> <span class="nx">variant</span><span class="p">.</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">"just color"</span> <span class="nx">color</span><span class="p">=</span><span class="s">"blue"</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="nx">Only</span> <span class="nx">the</span> <span class="s">`color`</span> <span class="nx">parameter</span> <span class="nx">is</span> <span class="nx">set</span><span class="p">.</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">This</span> <span class="nx">will</span> <span class="nx">set</span> <span class="nx">the</span> <span class="nx">background</span> <span class="nx">to</span> <span class="nx">a</span> <span class="nx">lighter</span> <span class="nx">version</span> <span class="nx">of</span> <span class="nx">the</span> <span class="nx">chosen</span> <span class="nx">CSS</span> <span class="nx">color</span> <span class="nx">value</span><span class="p">.</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">"default style and color"</span> <span class="nx">style</span><span class="p">=</span><span class="s">"default"</span> <span class="nx">color</span><span class="p">=</span><span class="s">"blue"</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="nx">The</span> <span class="s">`style`</span> <span class="nx">parameter</span> <span class="nx">affects</span> <span class="nx">how</span> <span class="nx">the</span> <span class="s">`color`</span> <span class="nx">parameter</span> <span class="nx">is</span> <span class="nx">applied</span><span class="p">.</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">The</span> <span class="s">`default`</span> <span class="nx">style</span> <span class="nx">will</span> <span class="nx">set</span> <span class="nx">the</span> <span class="nx">background</span> <span class="nx">to</span> <span class="nx">your</span> <span class="s">`--MAIN-BG-color`</span> <span class="nx">as</span> <span class="nx">configured</span> <span class="k">for</span> <span class="nx">your</span> <span class="nx">theme</span> <span class="nx">variant</span> <span class="nx">resembling</span> <span class="nx">the</span> <span class="k">default</span> <span class="nx">style</span> <span class="nx">but</span> <span class="nx">with</span> <span class="nx">different</span> <span class="nx">color</span><span class="p">.</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">"just severity style"</span> <span class="nx">style</span><span class="p">=</span><span class="s">"info"</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="nx">The</span> <span class="s">`style`</span> <span class="nx">parameter</span> <span class="nx">is</span> <span class="nx">set</span> <span class="nx">to</span> <span class="nx">a</span> <span class="nx">severity</span> <span class="nx">style</span><span class="p">.</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">This</span> <span class="nx">will</span> <span class="nx">set</span> <span class="nx">the</span> <span class="nx">background</span> <span class="nx">to</span> <span class="nx">a</span> <span class="nx">lighter</span> <span class="nx">version</span> <span class="nx">of</span> <span class="nx">the</span> <span class="nx">chosen</span> <span class="nx">style</span> <span class="nx">color</span> <span class="nx">as</span> <span class="nx">configured</span> <span class="nx">in</span> <span class="nx">your</span> <span class="nx">theme</span> <span class="nx">variant</span> <span class="nx">and</span> <span class="nx">also</span> <span class="nx">affects</span> <span class="nx">the</span> <span class="nx">chosen</span> <span class="nx">icon</span><span class="p">.</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">tab</span> <span class="nx">title</span><span class="p">=</span><span class="s">"severity style and color"</span> <span class="nx">style</span><span class="p">=</span><span class="s">"info"</span> <span class="nx">color</span><span class="p">=</span><span class="s">"blue"</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="nx">The</span> <span class="s">`style`</span> <span class="nx">parameter</span> <span class="nx">affects</span> <span class="nx">how</span> <span class="nx">the</span> <span class="s">`color`</span> <span class="nx">parameter</span> <span class="nx">is</span> <span class="nx">applied</span><span class="p">.</span> </span></span><span class="line"><span class="cl"> </span></span><span class="line"><span class="cl"><span class="nx">This</span> <span class="nx">will</span> <span class="nx">set</span> <span class="nx">the</span> <span class="nx">background</span> <span class="nx">to</span> <span class="nx">a</span> <span class="nx">lighter</span> <span class="nx">version</span> <span class="nx">of</span> <span class="nx">the</span> <span class="nx">chosen</span> <span class="nx">CSS</span> <span class="nx">color</span> <span class="nx">value</span> <span class="nx">and</span> <span class="nx">also</span> <span class="nx">affects</span> <span class="nx">the</span> <span class="nx">chosen</span> <span class="nx">icon</span><span class="p">.</span> </span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">tab</span> <span class="o">%</span><span class="p">}}</span> </span></span><span class="line"><span class="cl"><span class="p">{{<</span> <span class="o">/</span><span class="nx">tabs</span> <span class="p">>}}</span></span></span></code></pre></div> <div class="tab-panel" data-tab-group="212412f7f7b9442ed59401f8c303296e"> <div class="tab-nav"> <div class="tab-nav-title">​</div> <button data-tab-item="just-colored-style" class="tab-nav-button tab-panel-style cstyle blue active" tabindex="-1" onclick="switchTab('212412f7f7b9442ed59401f8c303296e','just-colored-style')" > <span class="tab-nav-text">just colored style</span> </button> <button data-tab-item="just-color" class="tab-nav-button tab-panel-style cstyle filled" style="--VARIABLE-BOX-color: blue;" onclick="switchTab('212412f7f7b9442ed59401f8c303296e','just-color')" > <span class="tab-nav-text">just color</span> </button> <button data-tab-item="default-style-and-color" class="tab-nav-button tab-panel-style cstyle default" style="--VARIABLE-BOX-color: blue;" onclick="switchTab('212412f7f7b9442ed59401f8c303296e','default-style-and-color')" > <span class="tab-nav-text">default style and color</span> </button> <button data-tab-item="just-severity-stylefa-fw-fas-fa-info-circle" class="tab-nav-button tab-panel-style cstyle info" onclick="switchTab('212412f7f7b9442ed59401f8c303296e','just-severity-stylefa-fw-fas-fa-info-circle')" > <span class="tab-nav-text"><i class="fa-fw fas fa-info-circle"></i> just severity style</span> </button> <button data-tab-item="severity-style-and-colorfa-fw-fas-fa-info-circle" class="tab-nav-button tab-panel-style cstyle info" style="--VARIABLE-BOX-color: blue;" onclick="switchTab('212412f7f7b9442ed59401f8c303296e','severity-style-and-colorfa-fw-fas-fa-info-circle')" > <span class="tab-nav-text"><i class="fa-fw fas fa-info-circle"></i> severity style and color</span> </button> </div> <div class="tab-content-container"> <div data-tab-item="just-colored-style" class="tab-content tab-panel-style cstyle blue active"> <div class="tab-content-text"> <p>The <code>style</code> parameter is set to a color style.</p> <p>This will set the background to a lighter version of the chosen style color as configured in your theme variant.</p> </div> </div> <div data-tab-item="just-color" class="tab-content tab-panel-style cstyle filled" style="--VARIABLE-BOX-color: blue;"> <div class="tab-content-text"> <p>Only the <code>color</code> parameter is set.</p> <p>This will set the background to a lighter version of the chosen CSS color value.</p> </div> </div> <div data-tab-item="default-style-and-color" class="tab-content tab-panel-style cstyle default" style="--VARIABLE-BOX-color: blue;"> <div class="tab-content-text"> <p>The <code>style</code> parameter affects how the <code>color</code> parameter is applied.</p> <p>The <code>default</code> style will set the background to your <code>--MAIN-BG-color</code> as configured for your theme variant resembling the default style but with different color.</p> </div> </div> <div data-tab-item="just-severity-stylefa-fw-fas-fa-info-circle" class="tab-content tab-panel-style cstyle info"> <div class="tab-content-text"> <p>The <code>style</code> parameter is set to a severity style.</p> <p>This will set the background to a lighter version of the chosen style color as configured in your theme variant and also affects the chosen icon.</p> </div> </div> <div data-tab-item="severity-style-and-colorfa-fw-fas-fa-info-circle" class="tab-content tab-panel-style cstyle info" style="--VARIABLE-BOX-color: blue;"> <div class="tab-content-text"> <p>The <code>style</code> parameter affects how the <code>color</code> parameter is applied.</p> <p>This will set the background to a lighter version of the chosen CSS color value and also affects the chosen icon.</p> </div> </div> </div> </div> <footer class="footline"> <div class="R-taxonomy taxonomy-categories 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="/hugo-theme-relearn/categories/howto/index.html">Howto</a></li> <li><a class="term-link" href="/hugo-theme-relearn/categories/reference/index.html">Reference</a></li> </ul> </div> </footer> </article> </div> </main> </div> <script src="/hugo-theme-relearn/js/clipboard/clipboard.min.js?1742166070" defer></script> <script src="/hugo-theme-relearn/js/perfect-scrollbar/perfect-scrollbar.min.js?1742166070" defer></script> <script src="/hugo-theme-relearn/js/theme.min.js?1742166070" defer></script> </body> </html>