Scripts
googleFont
A mixin for adding google fonts to the K-scaffold generated font import. Note in the examples below that any additional information for the font (such as weight) should be included in the content passed to googleFont. The Google Material Icons and Material Symbols fonts are imported by default.
Example
include k-scaffold
//- As single string
+googleFont('Agbalumo')
//- Multiple fonts and a font with details (e.g. weight)
+googleFont('Roboto:wght@100','Agbalumo')
include k-scaffold
//- As single string
+googleFont('Agbalumo')
//- Multiple fonts and a font with details (e.g. weight)
+googleFont('Roboto:wght@100','Agbalumo')
Output
<button name="act_k-network-call" hidden="" type="action"></button>
<!-- Inserted fonts:"Agbalumo" -->
<!-- Inserted fonts:"Roboto:wght@100|Agbalumo" -->
<button name="act_k-network-call" hidden="" type="action"></button>
<!-- Inserted fonts:"Agbalumo" -->
<!-- Inserted fonts:"Roboto:wght@100|Agbalumo" -->
kscript
Similar to script, but includes the K-scaffold's javascript function library.
- scriptName -
string
-Name to use for the sourceURL comment of the script tag.
Example
include k-scaffold
+kscript
include k-scaffold
+kscript
module
A mixin that works with kscript. It allows you to link your js directly in the pug file that the js is related to. The K-scaffold will then put the js in the final script tag.
Example
include k-scaffold
+module
|// include local js file here
+kscript
|// local js file will be put here
include k-scaffold
+module
|// include local js file here
+kscript
|// local js file will be put here
script
Creates a generic Roll20 script block for use with the sheetworker system.
Example
include k-scaffold
+script
include k-scaffold
+script
Output
<button name="act_k-network-call" hidden="" type="action"></button>
<script type="text/worker"></script>
<button name="act_k-network-call" hidden="" type="action"></button>
<script type="text/worker"></script>
scss
Stores SCSS (or CSS) for later addition to your general scss file. Useful for creating true Single File Components or Single Directory Components. Can be accessed in your scss via the sfc
import. Accessible via @use 'sfc'
and usable in your scss via @include sfc.all
.
- block -
block
-The scss content to be added.
Example
include k-scaffold
+scss
|// include local scss file here or write scss here
+kscript
|// local js file will be put here
include k-scaffold
+scss
|// include local scss file here or write scss here
+kscript
|// local js file will be put here