9 lines
3.6 KiB
JavaScript
9 lines
3.6 KiB
JavaScript
import{_ as s,c as o,o as a,d as n}from"./app.99998402.js";const b=JSON.parse('{"title":"Infoboxes","description":"","frontmatter":{},"headers":[],"relativePath":"public/kronos/docs/infoboxes.md","lastUpdated":null}'),e={name:"public/kronos/docs/infoboxes.md"},t=n(`<h1 id="infoboxes" tabindex="-1">Infoboxes <a class="header-anchor" href="#infoboxes" aria-hidden="true">#</a></h1><p>Infoboxes are good for displaying "lore", or story elements, as well as for explaining complicated things.</p><p>In the default tab layout, the first infobox will be displayed at the very top of the tab.</p><p>Infoboxes are defined like other Big Features:</p><div class="language-js"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki"><code><span class="line"><span style="color:#FFCB6B;">infoboxes</span><span style="color:#89DDFF;">:</span><span style="color:#A6ACCD;"> </span><span style="color:#89DDFF;">{</span></span>
|
|
<span class="line"><span style="color:#F07178;"> </span><span style="color:#FFCB6B;">lore</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">{</span></span>
|
|
<span class="line"><span style="color:#F07178;"> </span><span style="color:#FFCB6B;">title</span><span style="color:#89DDFF;">:</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">"</span><span style="color:#C3E88D;">foo</span><span style="color:#89DDFF;">"</span><span style="color:#89DDFF;">,</span></span>
|
|
<span class="line"><span style="color:#F07178;"> </span><span style="color:#82AAFF;">body</span><span style="color:#F07178;">() </span><span style="color:#89DDFF;">{</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">return</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">"</span><span style="color:#C3E88D;">bar</span><span style="color:#89DDFF;">"</span><span style="color:#F07178;"> </span><span style="color:#89DDFF;">},</span></span>
|
|
<span class="line"><span style="color:#F07178;"> </span><span style="color:#A6ACCD;">etc</span></span>
|
|
<span class="line"><span style="color:#F07178;"> </span><span style="color:#89DDFF;">},</span></span>
|
|
<span class="line"><span style="color:#F07178;"> </span><span style="color:#A6ACCD;">etc</span></span>
|
|
<span class="line"><span style="color:#89DDFF;">}</span></span>
|
|
<span class="line"></span></code></pre></div><p>Features:</p><ul><li><p>title: The text displayed above the main box. Can be a function to be dynamic, and can use basic HTML.</p></li><li><p>body: The text displayed inside the box. Can be a function to be dynamic, and can use basic HTML.</p></li><li><p>style, titleStyle, bodyStyle: <strong>optional</strong>. Apply CSS to the infobox, or to the title button or body of the infobox, in the form of an object where the keys are CSS attributes, and the values are the values for those attributes (both as strings).</p></li><li><p>unlocked(): <strong>optional</strong>. A function returning a bool to determine if the infobox is visible or not. Default is unlocked.</p></li><li><p>layer: <strong>assigned automagically</strong>. It's the same value as the name of this layer, so you can do <code>player[this.layer].points</code> or similar</p></li><li><p>id: <strong>assigned automagically</strong>. It's the "key" which the bar was stored under, for convenient access. The infobox in the example's id is "lore".</p></li></ul>`,7),l=[t];function p(r,i,c,y,d,F){return a(),o("div",null,l)}const h=s(e,[["render",p]]);export{b as __pageData,h as default};
|