-
Notifications
You must be signed in to change notification settings - Fork 0
Title Box
Simon Tharby edited this page Sep 28, 2020
·
6 revisions
hasAction
and fontSize
will default to false
and 35
(px) respectively, if not included in args.
fontSize
applies to title only, subtitle / strap-line will always be <p>
size.
Format:
addTitle(title, strapline, parent, hasAction, fontSize)
Example usage (see uiLayout.js for more examples):
let parent = document.getElementById("ui-container");
addTitle("Modular_UI", "Procedurally_Generated", parent, true);
Example of generated HTML:
<div id="Modular_UI" class="title-box">
<h1 class="title-text" id="Modular_UI-text" style="font-size: 35px;">Modular UI</h1>
<p class="strapline-text" id="Procedurally_Generated">Procedurally Generated</p>
</div>