mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 09:43:06 +00:00
797 lines
64 KiB
HTML
797 lines
64 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en" dir="ltr" itemscope itemtype="http://schema.org/Article">
|
||
<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.135.0">
|
||
<meta name="generator" content="Relearn 7.0.0+72a36ea6e73e5941fb92069356655d9913bfb4b4">
|
||
<meta name="description" content="Disclaimers to help you structure your page">
|
||
<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="Notice :: Hugo Relearn Theme">
|
||
<meta name="twitter:description" content="Disclaimers to help you structure your page">
|
||
<meta property="og:url" content="https://mcshelby.github.io/hugo-theme-relearn/shortcodes/notice/index.html">
|
||
<meta property="og:site_name" content="Hugo Relearn Theme">
|
||
<meta property="og:title" content="Notice :: Hugo Relearn Theme">
|
||
<meta property="og:description" content="Disclaimers to help you structure your page">
|
||
<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="Notice :: Hugo Relearn Theme">
|
||
<meta itemprop="description" content="Disclaimers to help you structure your page">
|
||
<meta itemprop="wordCount" content="1490">
|
||
<meta itemprop="image" content="https://mcshelby.github.io/hugo-theme-relearn/images/hero.png">
|
||
<meta itemprop="keywords" content="Howto,Reference,BoxStyle">
|
||
<title>Notice :: Hugo Relearn Theme</title>
|
||
<link href="https://mcshelby.github.io/hugo-theme-relearn/shortcodes/notice/index.html" rel="alternate" hreflang="x-default">
|
||
<link href="https://mcshelby.github.io/hugo-theme-relearn/shortcodes/notice/index.html" rel="alternate" hreflang="en">
|
||
<link href="https://mcshelby.github.io/hugo-theme-relearn/pir/shortcodes/notice/index.html" rel="alternate" hreflang="art-x-pir">
|
||
<link href="https://mcshelby.github.io/hugo-theme-relearn/shortcodes/notice/index.html" rel="canonical" type="text/html" title="Notice :: Hugo Relearn Theme">
|
||
<link href="/hugo-theme-relearn/shortcodes/notice/index.xml" rel="alternate" type="application/rss+xml" title="Notice :: Hugo Relearn Theme">
|
||
<link href="/hugo-theme-relearn/images/logo.svg?1728832963" rel="icon" type="image/svg+xml">
|
||
<link href="/hugo-theme-relearn/css/fontawesome-all.min.css?1728832963" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/fontawesome-all.min.css?1728832963" rel="stylesheet"></noscript>
|
||
<link href="/hugo-theme-relearn/css/nucleus.css?1728832963" rel="stylesheet">
|
||
<link href="/hugo-theme-relearn/css/auto-complete.css?1728832963" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/auto-complete.css?1728832963" rel="stylesheet"></noscript>
|
||
<link href="/hugo-theme-relearn/css/perfect-scrollbar.min.css?1728832963" rel="stylesheet">
|
||
<link href="/hugo-theme-relearn/css/fonts.css?1728832963" rel="stylesheet" media="print" onload="this.media='all';this.onload=null;"><noscript><link href="/hugo-theme-relearn/css/fonts.css?1728832963" rel="stylesheet"></noscript>
|
||
<link href="/hugo-theme-relearn/css/theme.css?1728832963" rel="stylesheet">
|
||
<link href="/hugo-theme-relearn/css/theme-relearn-auto.css?1728832963" rel="stylesheet" id="R-variant-style">
|
||
<link href="/hugo-theme-relearn/css/chroma-relearn-auto.css?1728832963" rel="stylesheet" id="R-variant-chroma-style">
|
||
<link href="/hugo-theme-relearn/css/print.css?1728832963" rel="stylesheet" media="print">
|
||
<link href="/hugo-theme-relearn/css/format-print.css?1728832963" rel="stylesheet">
|
||
<script src="/hugo-theme-relearn/js/variant.js?1728832963"></script>
|
||
<script>
|
||
window.relearn = window.relearn || {};
|
||
window.relearn.relBasePath='..\/..';
|
||
window.relearn.relBaseUri='..\/..\/..';
|
||
window.relearn.absBaseUri='https:\/\/mcshelby.github.io\/hugo-theme-relearn';
|
||
window.relearn.disableAnchorCopy=false;
|
||
window.relearn.disableAnchorScrolling=false;
|
||
// variant stuff
|
||
window.variants && variants.init( [ 'relearn-auto', 'relearn-light', 'relearn-dark', 'relearn-bright', 'zen-auto', 'zen-light', 'zen-dark', 'retro-auto', 'neon', 'learn', 'blue', 'green', 'red' ] );
|
||
// 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>
|
||
<style>
|
||
#R-body img.bg-white {
|
||
background-color: white;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body class="mobile-support print disableInlineCopyToClipboard" data-url="/hugo-theme-relearn/shortcodes/notice/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="#settings">Settings</a>
|
||
<ul>
|
||
<li><a href="#defining-own-styles">Defining own Styles</a></li>
|
||
</ul>
|
||
</li>
|
||
<li><a href="#examples">Examples</a>
|
||
<ul>
|
||
<li><a href="#by-severity-using-callout-syntax">By Severity Using Callout Syntax</a></li>
|
||
<li><a href="#by-brand-colors-with-title-and-icon-variantion">By Brand Colors with Title and Icon Variantion</a></li>
|
||
<li><a href="#by-color">By Color</a></li>
|
||
<li><a href="#by-special-color">By Special Color</a></li>
|
||
<li><a href="#various-features">Various Features</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"><a itemprop="item" href="/hugo-theme-relearn/shortcodes/index.html"><span itemprop="name">Shortcodes</span></a><meta itemprop="position" content="1"> > </li><li
|
||
itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement"><span itemprop="name">Notice</span><meta itemprop="position" content="2"></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/exampleSite/content/shortcodes/notice.en.md" 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/notice/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/mermaid/index.html" title="Mermaid (🡐)"><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/openapi/index.html" title="OpenAPI (🡒)"><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="notice">Notice</h1>
|
||
|
||
<p>The <code>notice</code> shortcode shows various types of disclaimers with adjustable color, title and icon to help you structure your page.</p>
|
||
<div class="box notices cstyle primary">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-skull-crossbones"></i> There may be pirates
|
||
</div>
|
||
<div class="box-content">
|
||
<p>It is all about the boxes.</p>
|
||
</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="callout"
|
||
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
|
||
onclick="switchTab('shortcode-parameter','callout')"
|
||
>
|
||
<span class="tab-nav-text">callout</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="shortcode"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('shortcode-parameter','shortcode')"
|
||
>
|
||
<span class="tab-nav-text">shortcode</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="shortcode-positional"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('shortcode-parameter','shortcode-positional')"
|
||
>
|
||
<span class="tab-nav-text">shortcode (positional)</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="callout"
|
||
class="tab-content tab-panel-style cstyle initial active">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="k">> </span><span class="ge">[!primary] There may be pirates
|
||
</span></span></span><span class="line"><span class="cl"><span class="ge"></span>> It is all about the boxes.</span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="shortcode"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><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">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"primary"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"There may be pirates"</span> <span class="nx">icon</span><span class="p">=</span><span class="s">"skull-crossbones"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">It</span> <span class="nx">is</span> <span class="nx">all</span> <span class="nx">about</span> <span class="nx">the</span> <span class="nx">boxes</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">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="shortcode-positional"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><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">notice</span> <span class="nx">primary</span> <span class="s">"There may be pirates"</span> <span class="s">"skull-crossbones"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">It</span> <span class="nx">is</span> <span class="nx">all</span> <span class="nx">about</span> <span class="nx">the</span> <span class="nx">boxes</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">notice</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"><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/notice.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">"style"</span> <span class="s">"primary"</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s">"title"</span> <span class="s">"There may be pirates"</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s">"icon"</span> <span class="s">"skull-crossbones"</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="s">"content"</span> <span class="s">"It is all about the boxes."</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">)}}</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<p>Callout syntax has limited features as it does not provide all of the below parameter. Nevertheless, it is widely available in other Markdown parsers like with <a href="https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts" rel="external" target="_self">GitHub alerts</a> or <a href="https://help.obsidian.md/Editing+and+formatting/Callouts#Change+the+title" rel="external" target="_self">Obsidian callouts</a> and therefore is the recommend syntax for generating portable Markdown.</p>
|
||
<p>If you want to display a transparent expandable box without any border, you can also use the <a href="/hugo-theme-relearn/shortcodes/expand/index.html"><code>expand</code> shortcode</a>.</p>
|
||
<h3 id="parameter">Parameter</h3>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th style="text-align: left">Name</th>
|
||
<th style="text-align: left">Position</th>
|
||
<th style="text-align: left">Default</th>
|
||
<th style="text-align: left">Notes</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align: left"><strong>style</strong></td>
|
||
<td style="text-align: left">1</td>
|
||
<td style="text-align: left"><code>default</code></td>
|
||
<td style="text-align: left">The style scheme used for the box.<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 style="text-align: left"><strong>color</strong></td>
|
||
<td style="text-align: left"></td>
|
||
<td style="text-align: left">see notes</td>
|
||
<td style="text-align: left">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<br><br>This is not available using callout syntax.</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: left"><strong>title</strong></td>
|
||
<td style="text-align: left">2</td>
|
||
<td style="text-align: left">see notes</td>
|
||
<td style="text-align: left">Arbitrary text for the box title. 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 style="text-align: left"><strong>icon</strong></td>
|
||
<td style="text-align: left">3</td>
|
||
<td style="text-align: left">see notes</td>
|
||
<td style="text-align: left"><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)<br><br>This is not available using callout syntax.</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: left"><strong>expanded</strong></td>
|
||
<td style="text-align: left"></td>
|
||
<td style="text-align: left"><em><empty></em></td>
|
||
<td style="text-align: left">Whether to draw an expander and how the content is displayed.<br><br>- <em><empty></em>: no expander is drawn and the content is permanently shown<br>- <code>true</code>: the expander is drawn and the content is initially shown<br>- <code>false</code>: the expander is drawn and the content is initially hidden</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: left"><em><strong><content></strong></em></td>
|
||
<td style="text-align: left"></td>
|
||
<td style="text-align: left"><em><empty></em></td>
|
||
<td style="text-align: left">Arbitrary text to be displayed in box.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<h2 id="settings">Settings</h2>
|
||
<h3 id="defining-own-styles">Defining own Styles</h3>
|
||
<p><span class="badge cstyle cyan badge-with-title"><span class="badge-title"><i class="fa-fw fas fa-gears"></i></span><span class="badge-content">Option</span></span> Besides the predefined <code>style</code> values <a href="/hugo-theme-relearn/shortcodes/notice/index.html#parameter">from above</a>, you are able to define your own.</p>
|
||
<div class="tab-panel" data-tab-group="config-code">
|
||
<div class="tab-nav">
|
||
<div class="tab-nav-title">hugo.</div>
|
||
<button
|
||
data-tab-item="toml"
|
||
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
|
||
onclick="switchTab('config-code','toml')"
|
||
>
|
||
<span class="tab-nav-text">toml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="yaml"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','yaml')"
|
||
>
|
||
<span class="tab-nav-text">yaml</span>
|
||
</button>
|
||
<button
|
||
data-tab-item="json"
|
||
class="tab-nav-button tab-panel-style cstyle initial"
|
||
onclick="switchTab('config-code','json')"
|
||
>
|
||
<span class="tab-nav-text">json</span>
|
||
</button>
|
||
</div>
|
||
<div class="tab-content-container">
|
||
<div
|
||
data-tab-item="toml"
|
||
class="tab-content tab-panel-style cstyle initial active">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><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">boxStyle</span><span class="p">]]</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">color</span> <span class="p">=</span> <span class="s1">'gold'</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">i18n</span> <span class="p">=</span> <span class="s1">''</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">icon</span> <span class="p">=</span> <span class="s1">'rainbow'</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">identifier</span> <span class="p">=</span> <span class="s1">'magic'</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nx">title</span> <span class="p">=</span> <span class="s1">'Magic'</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="yaml"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nt">params</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">boxStyle</span><span class="p">:</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span>- <span class="nt">color</span><span class="p">:</span><span class="w"> </span><span class="l">gold</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">i18n</span><span class="p">:</span><span class="w"> </span><span class="s2">""</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">icon</span><span class="p">:</span><span class="w"> </span><span class="l">rainbow</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">identifier</span><span class="p">:</span><span class="w"> </span><span class="l">magic</span><span class="w">
|
||
</span></span></span><span class="line"><span class="cl"><span class="w"> </span><span class="nt">title</span><span class="p">:</span><span class="w"> </span><span class="l">Magic</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div
|
||
data-tab-item="json"
|
||
class="tab-content tab-panel-style cstyle initial">
|
||
<div class="tab-content-text">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-json" data-lang="json"><span class="line"><span class="cl"><span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"params"</span><span class="p">:</span> <span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"boxStyle"</span><span class="p">:</span> <span class="p">[</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="p">{</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"color"</span><span class="p">:</span> <span class="s2">"gold"</span><span class="p">,</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"i18n"</span><span class="p">:</span> <span class="s2">""</span><span class="p">,</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"icon"</span><span class="p">:</span> <span class="s2">"rainbow"</span><span class="p">,</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"identifier"</span><span class="p">:</span> <span class="s2">"magic"</span><span class="p">,</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="nt">"title"</span><span class="p">:</span> <span class="s2">"Magic"</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
|
||
</span></span><span class="line"><span class="cl"> <span class="p">]</span>
|
||
</span></span><span class="line"><span class="cl"> <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>The <code>style</code> parameter used in a shortcode must match the <code>identifier</code> in the configuration. The title for the style will be determined from the configured <code>title</code>. If no <code>title</code> but a <code>i18n</code> is set, the title will be taken from the translation files by that key. The <code>title</code> may be empty in which case, the box does not contain a default title. <code>icon</code> and <code>color</code> are working similar.</p>
|
||
<p>You can also redefine the predefined styles if you’re not satisfied with the default values.</p>
|
||
<p>Below is a <a href="/hugo-theme-relearn/shortcodes/notice/index.html#user-defined-style">usage example</a>.</p>
|
||
<h2 id="examples">Examples</h2>
|
||
<h3 id="by-severity-using-callout-syntax">By Severity Using Callout Syntax</h3>
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-md" data-lang="md"><span class="line"><span class="cl"><span class="k">> </span><span class="ge">[!CAUTION]
|
||
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">> </span><span class="ge">Advises about risks or negative outcomes of certain actions.
|
||
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">
|
||
</span></span></span><span class="line"><span class="cl"><span class="k">> </span><span class="ge">[!IMPORTANT]
|
||
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">> </span><span class="ge">Key information users need to know to achieve their goal.
|
||
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">
|
||
</span></span></span><span class="line"><span class="cl"><span class="k">> </span><span class="ge">[!INFO]
|
||
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">> </span><span class="ge">Information that users <ins>_might_</ins> find interesting.
|
||
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">
|
||
</span></span></span><span class="line"><span class="cl"><span class="k">> </span><span class="ge">[!NOTE]
|
||
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">> </span><span class="ge">Useful information that users should know, even when skimming content.
|
||
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">
|
||
</span></span></span><span class="line"><span class="cl"><span class="k">> </span><span class="ge">[!TIP]
|
||
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">> </span><span class="ge">Helpful advice for doing things better or more easily.
|
||
</span></span></span><span class="line"><span class="cl"><span class="ge"></span><span class="k">
|
||
</span></span></span><span class="line"><span class="cl"><span class="k">> </span><span class="ge">[!WARNING]
|
||
</span></span></span><span class="line"><span class="cl"><span class="ge"></span>> Urgent info that needs immediate user attention to avoid problems.</span></span></code></pre></div>
|
||
<div class="box notices cstyle caution">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-hand"></i> Caution
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Advises about risks or negative outcomes of certain actions.</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle important">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-bolt"></i> Important
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Key information users need to know to achieve their goal.</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle info">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-info-circle"></i> Info
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Information that users <ins><em>might</em></ins> find interesting.</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle note">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-exclamation-circle"></i> Note
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Useful information that users should know, even when skimming content.</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle tip">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-lightbulb"></i> Tip
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Helpful advice for doing things better or more easily.</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle warning">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-exclamation-triangle"></i> Warning
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Urgent info that needs immediate user attention to avoid problems.</p>
|
||
</div>
|
||
</div>
|
||
<h3 id="by-brand-colors-with-title-and-icon-variantion">By Brand Colors with Title and Icon Variantion</h3>
|
||
<div class="highlight wrap-code"><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">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"primary"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Primary"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">primary</span><span class="o">**</span> <span class="nx">disclaimer</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"secondary"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Secondary"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">secondary</span><span class="o">**</span> <span class="nx">disclaimer</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"accent"</span> <span class="nx">icon</span><span class="p">=</span><span class="s">"stopwatch"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">An</span> <span class="o">**</span><span class="nx">accent</span><span class="o">**</span> <span class="nx">disclaimer</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
|
||
<div class="box notices cstyle primary">
|
||
<div class="box-label">
|
||
Primary
|
||
</div>
|
||
<div class="box-content">
|
||
<p>A <strong>primary</strong> disclaimer</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle secondary">
|
||
<div class="box-label">
|
||
Secondary
|
||
</div>
|
||
<div class="box-content">
|
||
<p>A <strong>secondary</strong> disclaimer</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle accent">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-stopwatch"></i>
|
||
</div>
|
||
<div class="box-content">
|
||
<p>An <strong>accent</strong> disclaimer</p>
|
||
</div>
|
||
</div>
|
||
<h3 id="by-color">By Color</h3>
|
||
<div class="highlight wrap-code"><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">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"blue"</span> <span class="nx">title</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">A</span> <span class="o">**</span><span class="nx">blue</span><span class="o">**</span> <span class="nx">disclaimer</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"cyan"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Cyan"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">cyan</span><span class="o">**</span> <span class="nx">disclaimer</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"green"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Green"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">green</span><span class="o">**</span> <span class="nx">disclaimer</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"grey"</span> <span class="nx">icon</span><span class="p">=</span><span class="s">"bug"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">grey</span><span class="o">**</span> <span class="nx">disclaimer</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"magenta"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Magenta"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">magenta</span><span class="o">**</span> <span class="nx">disclaimer</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"orange"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Orange"</span> <span class="nx">icon</span><span class="p">=</span><span class="s">"bug"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">orange</span><span class="o">**</span> <span class="nx">disclaimer</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"red"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Red"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">A</span> <span class="o">**</span><span class="nx">red</span><span class="o">**</span> <span class="nx">disclaimer</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
|
||
<div class="box notices cstyle blue">
|
||
<div class="box-label">
|
||
Blue
|
||
</div>
|
||
<div class="box-content">
|
||
<p>A <strong>blue</strong> disclaimer</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle cyan">
|
||
<div class="box-label">
|
||
Cyan
|
||
</div>
|
||
<div class="box-content">
|
||
<p>A <strong>cyan</strong> disclaimer</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle green">
|
||
<div class="box-label">
|
||
Green
|
||
</div>
|
||
<div class="box-content">
|
||
<p>A <strong>green</strong> disclaimer</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle grey">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-bug"></i>
|
||
</div>
|
||
<div class="box-content">
|
||
<p>A <strong>grey</strong> disclaimer</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle magenta">
|
||
<div class="box-label">
|
||
Magenta
|
||
</div>
|
||
<div class="box-content">
|
||
<p>A <strong>magenta</strong> disclaimer</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle orange">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-bug"></i> Orange
|
||
</div>
|
||
<div class="box-content">
|
||
<p>A <strong>orange</strong> disclaimer</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle red">
|
||
<div class="box-label">
|
||
Red
|
||
</div>
|
||
<div class="box-content">
|
||
<p>A <strong>red</strong> disclaimer</p>
|
||
</div>
|
||
</div>
|
||
<h3 id="by-special-color">By Special Color</h3>
|
||
<div class="highlight wrap-code"><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">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"default"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Default"</span> <span class="nx">icon</span><span class="p">=</span><span class="s">"skull-crossbones"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">Just</span> <span class="nx">some</span> <span class="nx">grey</span> <span class="k">default</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">notice</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"code"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Code"</span> <span class="nx">icon</span><span class="p">=</span><span class="s">"skull-crossbones"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">Colored</span> <span class="nx">like</span> <span class="nx">a</span> <span class="nx">code</span> <span class="nx">fence</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">notice</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"transparent"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Transparent"</span> <span class="nx">icon</span><span class="p">=</span><span class="s">"skull-crossbones"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">No</span> <span class="nx">visible</span> <span class="nx">borders</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">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
|
||
<div class="box notices cstyle default">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-skull-crossbones"></i> Default
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Just some grey default color.</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle code">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-skull-crossbones"></i> Code
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Colored like a code fence.</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle transparent">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-skull-crossbones"></i> Transparent
|
||
</div>
|
||
<div class="box-content">
|
||
<p>No visible borders.</p>
|
||
</div>
|
||
</div>
|
||
<h3 id="various-features">Various Features</h3>
|
||
<h4 id="with-user-defined-color-font-awesome-brand-icon-and-markdown-in-title-and-content">With User-Defined Color, Font Awesome Brand Icon and Markdown in Title and Content</h4>
|
||
<div class="highlight wrap-code"><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">notice</span> <span class="nx">color</span><span class="p">=</span><span class="s">"fuchsia"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"**Hugo** is _awesome_"</span> <span class="nx">icon</span><span class="p">=</span><span class="s">"fa-fw fab fa-hackerrank"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">You</span> <span class="nx">can</span> <span class="nx">add</span> <span class="nx">standard</span> <span class="nx">markdown</span> <span class="nx">syntax</span><span class="p">:</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="nx">multiple</span> <span class="nx">paragraphs</span>
|
||
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="nx">bullet</span> <span class="nx">point</span> <span class="nx">lists</span>
|
||
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="nx">_emphasized_</span><span class="p">,</span> <span class="o">**</span><span class="nx">bold</span><span class="o">**</span> <span class="nx">and</span> <span class="nx">even</span> <span class="o">**</span><span class="nx">_bold</span> <span class="nx">emphasized_</span><span class="o">**</span> <span class="nx">text</span>
|
||
</span></span><span class="line"><span class="cl"><span class="o">-</span> <span class="p">[</span><span class="nx">links</span><span class="p">](</span><span class="nx">https</span><span class="p">:</span><span class="c1">//example.com)
|
||
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="o">-</span> <span class="nx">etc</span><span class="p">.[^</span><span class="nx">etc</span><span class="p">]</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">[^</span><span class="nx">etc</span><span class="p">]:</span> <span class="nx">Et</span> <span class="nf">Cetera</span> <span class="p">(</span><span class="nx">English</span><span class="p">:</span> <span class="o">/</span><span class="nx">ɛtˈsɛtərə</span><span class="o">/</span><span class="p">),</span> <span class="nx">abbreviated</span> <span class="nx">to</span> <span class="nx">etc</span><span class="p">.,</span> <span class="nx">etc</span><span class="p">,</span> <span class="nx">et</span> <span class="nx">cet</span><span class="p">.,</span> <span class="nx">is</span> <span class="nx">a</span> <span class="nx">Latin</span> <span class="nx">expression</span> <span class="nx">that</span> <span class="nx">is</span> <span class="nx">used</span> <span class="nx">in</span> <span class="nx">English</span> <span class="nx">to</span> <span class="nx">mean</span> <span class="s">"and other similar things"</span><span class="p">,</span> <span class="nx">or</span> <span class="s">"and so forth"</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="s">```plaintext
|
||
</span></span></span><span class="line"><span class="cl"><span class="s">...and even source code
|
||
</span></span></span><span class="line"><span class="cl"><span class="s">```</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">></span> <span class="nx">the</span> <span class="nx">possibilities</span> <span class="nx">are</span> <span class="nf">endless</span> <span class="p">(</span><span class="nx">almost</span> <span class="o">-</span> <span class="nx">including</span> <span class="nx">other</span> <span class="nx">shortcodes</span> <span class="nx">may</span> <span class="nx">or</span> <span class="nx">may</span> <span class="nx">not</span> <span class="nx">work</span><span class="p">)</span> <span class="p">(</span><span class="nx">almost</span> <span class="o">-</span> <span class="nx">including</span> <span class="nx">other</span> <span class="nx">shortcodes</span> <span class="nx">may</span> <span class="nx">or</span> <span class="nx">may</span> <span class="nx">not</span> <span class="nx">work</span><span class="p">)</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
|
||
<div class="box notices cstyle default" style="--VARIABLE-BOX-color: fuchsia;">
|
||
<div class="box-label">
|
||
<i class="fa-fw fab fa-hackerrank"></i> <strong>Hugo</strong> is <em>awesome</em>
|
||
</div>
|
||
<div class="box-content">
|
||
<p>You can add standard markdown syntax:</p>
|
||
<ul>
|
||
<li>multiple paragraphs</li>
|
||
<li>bullet point lists</li>
|
||
<li><em>emphasized</em>, <strong>bold</strong> and even <strong><em>bold emphasized</em></strong> text</li>
|
||
<li><a href="https://example.com" rel="external" target="_self">links</a></li>
|
||
<li>etc.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></li>
|
||
</ul>
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-plaintext" data-lang="plaintext"><span class="line"><span class="cl">...and even source code</span></span></code></pre></div>
|
||
<blockquote>
|
||
<p>the possibilities are endless (almost - including other shortcodes may or may not work) (almost - including other shortcodes may or may not work)</p>
|
||
</blockquote>
|
||
<div class="footnotes" role="doc-endnotes">
|
||
<hr>
|
||
<ol>
|
||
<li id="fn:1">
|
||
<p>Et Cetera (English: /ɛtˈsɛtərə/), abbreviated to etc., etc, et cet., is a Latin expression that is used in English to mean “and other similar things”, or “and so forth” <a href="#fnref:1" class="footnote-backref" role="doc-backlink">↩︎</a></p>
|
||
</li>
|
||
</ol>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<h4 id="expandable-content-area">Expandable Content Area</h4>
|
||
<div class="highlight wrap-code"><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">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"green"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Expand me..."</span> <span class="nx">expanded</span><span class="p">=</span><span class="s">"true"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">No</span> <span class="nx">need</span> <span class="nx">to</span> <span class="nx">press</span> <span class="nx">you</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">notice</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"red"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Expand me..."</span> <span class="nx">expanded</span><span class="p">=</span><span class="s">"false"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">Thank</span> <span class="nx">you</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">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
|
||
<div class="expand box notices cstyle green">
|
||
<input type="checkbox" id="R-expand-b34246365ab1828db7719db3c29455eb" aria-controls="R-expandcontent-b34246365ab1828db7719db3c29455eb" checked>
|
||
<label class="expand-label box-label" for="R-expand-b34246365ab1828db7719db3c29455eb">
|
||
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
|
||
<i class="expander-icon fa-fw fas fa-chevron-right"></i> Expand me…
|
||
</label>
|
||
<div class="box-spacer"></div>
|
||
<div id="R-expandcontent-b34246365ab1828db7719db3c29455eb" class="box-content expand-content">
|
||
<p>No need to press you!</p>
|
||
</div>
|
||
</div>
|
||
<div class="expand box notices cstyle red">
|
||
<input type="checkbox" id="R-expand-b0689763bdeca53dd10e938a033edcbf" aria-controls="R-expandcontent-b0689763bdeca53dd10e938a033edcbf">
|
||
<label class="expand-label box-label" for="R-expand-b0689763bdeca53dd10e938a033edcbf">
|
||
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
|
||
<i class="expander-icon fa-fw fas fa-chevron-right"></i> Expand me…
|
||
</label>
|
||
<div class="box-spacer"></div>
|
||
<div id="R-expandcontent-b0689763bdeca53dd10e938a033edcbf" class="box-content expand-content">
|
||
<p>Thank you!</p>
|
||
</div>
|
||
</div>
|
||
<h4 id="no-content-or-no-title">No Content or No Title</h4>
|
||
<div class="highlight wrap-code"><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">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"accent"</span> <span class="nx">title</span><span class="p">=</span><span class="s">"Just a bar"</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="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="nx">notice</span> <span class="nx">style</span><span class="p">=</span><span class="s">"accent"</span> <span class="o">%</span><span class="p">}}</span>
|
||
</span></span><span class="line"><span class="cl"><span class="nx">Just</span> <span class="nx">a</span> <span class="nx">box</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">{{</span><span class="o">%</span> <span class="o">/</span><span class="nx">notice</span> <span class="o">%</span><span class="p">}}</span></span></span></code></pre></div>
|
||
<div class="box notices cstyle accent">
|
||
<div class="box-label">
|
||
Just a bar
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle accent">
|
||
<div class="box-content">
|
||
<p>Just a box</p>
|
||
</div>
|
||
</div>
|
||
<h4 id="various-callouts">Various Callouts</h4>
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="p">></span> <span class="p">[!</span><span class="nx">caution</span><span class="p">]</span> <span class="nx">Callouts</span> <span class="nx">can</span> <span class="nx">have</span> <span class="nx">custom</span> <span class="nx">titles</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">></span> <span class="nx">Like</span> <span class="nx">this</span> <span class="nx">one</span><span class="p">.</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">></span> <span class="p">[!</span><span class="nx">caution</span><span class="p">]</span> <span class="nx">Title</span><span class="o">-</span><span class="nx">only</span> <span class="nx">callout</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">></span> <span class="p">[!</span><span class="nx">note</span><span class="p">]</span><span class="o">-</span> <span class="nx">Are</span> <span class="nx">callouts</span> <span class="nx">foldable</span><span class="err">?</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">></span> <span class="nx">Yes</span><span class="p">!</span> <span class="nx">In</span> <span class="nx">a</span> <span class="nx">foldable</span> <span class="nx">callout</span><span class="p">,</span> <span class="nx">the</span> <span class="nx">contents</span> <span class="nx">are</span> <span class="nx">hidden</span> <span class="nx">when</span> <span class="nx">the</span> <span class="nx">callout</span> <span class="nx">is</span> <span class="nx">collapsed</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">></span> <span class="p">[!</span><span class="nx">note</span><span class="p">]</span><span class="o">+</span> <span class="nx">Are</span> <span class="nx">callouts</span> <span class="nx">foldable</span><span class="err">?</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">></span> <span class="nx">Yes</span><span class="p">!</span> <span class="nx">In</span> <span class="nx">a</span> <span class="nx">foldable</span> <span class="nx">callout</span><span class="p">,</span> <span class="nx">the</span> <span class="nx">contents</span> <span class="nx">are</span> <span class="nx">hidden</span> <span class="nx">when</span> <span class="nx">the</span> <span class="nx">callout</span> <span class="nx">is</span> <span class="nx">collapsed</span>
|
||
</span></span><span class="line"><span class="cl">
|
||
</span></span><span class="line"><span class="cl"><span class="p">></span> <span class="p">[!</span><span class="nx">info</span><span class="p">]</span> <span class="nx">Can</span> <span class="nx">callouts</span> <span class="nx">be</span> <span class="nx">nested</span><span class="err">?</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">></span> <span class="p">></span> <span class="p">[!</span><span class="nx">important</span><span class="p">]</span> <span class="nx">Yes</span><span class="p">!,</span> <span class="nx">they</span> <span class="nx">can</span><span class="p">.</span>
|
||
</span></span><span class="line"><span class="cl"><span class="p">></span> <span class="p">></span> <span class="p">></span> <span class="p">[!</span><span class="nx">tip</span><span class="p">]</span> <span class="nx">You</span> <span class="nx">can</span> <span class="nx">even</span> <span class="nx">use</span> <span class="nx">multiple</span> <span class="nx">layers</span> <span class="nx">of</span> <span class="nx">nesting</span><span class="p">.</span></span></span></code></pre></div>
|
||
<div class="box notices cstyle caution">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-hand"></i> Callouts can have custom titles
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Like this one.</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle caution">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-hand"></i> Title-only callout
|
||
</div>
|
||
</div>
|
||
<div class="expand box notices cstyle note">
|
||
<input type="checkbox" id="R-expand-9a99adcecb03124afe0e9e4bdc32ee28" aria-controls="R-expandcontent-9a99adcecb03124afe0e9e4bdc32ee28">
|
||
<label class="expand-label box-label" for="R-expand-9a99adcecb03124afe0e9e4bdc32ee28">
|
||
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
|
||
<i class="expander-icon fa-fw fas fa-chevron-right"></i> <i class="fa-fw fas fa-exclamation-circle"></i> Are callouts foldable?
|
||
</label>
|
||
<div class="box-spacer"></div>
|
||
<div id="R-expandcontent-9a99adcecb03124afe0e9e4bdc32ee28" class="box-content expand-content">
|
||
<p>Yes! In a foldable callout, the contents are hidden when the callout is collapsed</p>
|
||
</div>
|
||
</div>
|
||
<div class="expand box notices cstyle note">
|
||
<input type="checkbox" id="R-expand-5193734d4d3ee1ed0bece6a4d7f54c89" aria-controls="R-expandcontent-5193734d4d3ee1ed0bece6a4d7f54c89" checked>
|
||
<label class="expand-label box-label" for="R-expand-5193734d4d3ee1ed0bece6a4d7f54c89">
|
||
<i class="expander-icon fa-fw fas fa-chevron-down"></i>
|
||
<i class="expander-icon fa-fw fas fa-chevron-right"></i> <i class="fa-fw fas fa-exclamation-circle"></i> Are callouts foldable?
|
||
</label>
|
||
<div class="box-spacer"></div>
|
||
<div id="R-expandcontent-5193734d4d3ee1ed0bece6a4d7f54c89" class="box-content expand-content">
|
||
<p>Yes! In a foldable callout, the contents are hidden when the callout is collapsed</p>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle info">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-info-circle"></i> Can callouts be nested?
|
||
</div>
|
||
<div class="box-content">
|
||
<p><div class="box notices cstyle important">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-bolt"></i> Yes!, they can.
|
||
</div>
|
||
<div class="box-content">
|
||
<p><div class="box notices cstyle tip">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-lightbulb"></i> You can even use multiple layers of nesting.
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<h4 id="code-with-collapsed-colored-borders">Code with Collapsed Colored Borders</h4>
|
||
<div class="highlight wrap-code"><pre tabindex="0"><code>> [!secondary]
|
||
> ```c
|
||
> // With colored border in Markdown syntax
|
||
> printf("Hello World!");
|
||
> ```
|
||
|
||
{{% notice style="red" %}}
|
||
```c
|
||
// With colored border in Shortcode syntax
|
||
printf("Hello World!");
|
||
```
|
||
{{% /notice %}}</code></pre></div>
|
||
<div class="box notices cstyle secondary">
|
||
<div class="box-content">
|
||
<p><div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="c1">// With colored border in Markdown syntax
|
||
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="nf">printf</span><span class="p">(</span><span class="s">"Hello World!"</span><span class="p">);</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<div class="box notices cstyle red">
|
||
<div class="box-content">
|
||
<div class="highlight wrap-code"><pre tabindex="0" class="chroma"><code class="language-c" data-lang="c"><span class="line"><span class="cl"><span class="c1">// With colored border in Shortcode syntax
|
||
</span></span></span><span class="line"><span class="cl"><span class="c1"></span><span class="nf">printf</span><span class="p">(</span><span class="s">"Hello World!"</span><span class="p">);</span></span></span></code></pre></div>
|
||
</div>
|
||
</div>
|
||
<h4 id="user-defined-style">User-defined Style</h4>
|
||
<p>Self-defined styles can be <a href="/hugo-theme-relearn/shortcodes/notice/index.html#defining-own-styles">configured</a> in your <code>hugo.toml</code> and used for every shortcode, that accepts a <code>style</code> parameter.</p>
|
||
<div class="highlight wrap-code"><pre tabindex="0"><code>> [!magic]
|
||
> Maaagic!</code></pre></div>
|
||
<div class="box notices cstyle magic">
|
||
<div class="box-label">
|
||
<i class="fa-fw fas fa-rainbow"></i> Magic
|
||
</div>
|
||
<div class="box-content">
|
||
<p>Maaagic!</p>
|
||
</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.min.js?1728832963" defer></script>
|
||
<script src="/hugo-theme-relearn/js/perfect-scrollbar.min.js?1728832963" defer></script>
|
||
<script src="/hugo-theme-relearn/js/theme.js?1728832963" defer></script>
|
||
</body>
|
||
</html>
|