@@ -16,6 +16,10 @@ body{ | |||
} | |||
span.color-NES-06{ | |||
color:#A80020; | |||
} | |||
/* NOTE: Modal styles were borrowed from | |||
* https://www.w3schools.com/howto/howto_css_modals.asp | |||
* and modified. |
@@ -19,7 +19,20 @@ function handle_emitted(){ | |||
console.log("EMITTED EVENT!"); | |||
} | |||
function TitlePainter(pal){ | |||
var elist = document.querySelectorAll(".color-NES-random"); | |||
if (elist){ | |||
elist.forEach(function(el){ | |||
var ca = Math.floor(Math.random() * 11) + 1; | |||
var cb = Math.floor(Math.random() * 3); | |||
var index = (cb*16)+ca; | |||
el.style.color = pal[index]; | |||
}); | |||
} | |||
} | |||
function initialize(DOC){ | |||
TitlePainter(NESPalette.SystemColor); | |||
EmitterElements.initialize(); | |||
//EventWindow.enable_emitter_attributes(); | |||
GlobalEvents.listen("emitted-event", handle_emitted); |
@@ -20,7 +20,10 @@ | |||
<div class="header"> | |||
<div class="home-menu pure-menu pure-menu-horizontal"> | |||
<a class="pure-menu-heading" href="">Your Site</a> | |||
<a class="pure-menu-heading" href=""> | |||
<span class="color-NES-06">NES </span> | |||
<span class="color-NES-random">P</span><span class="color-NES-random">a</span><span class="color-NES-random">i</span><span class="color-NES-random">n</span><span class="color-NES-random">t</span> | |||
</a> | |||
<ul class="pure-menu-list"> | |||
<li class="pure-menu-item pure-menu-selected"> | |||
<button emit="modal-open" emit-args='{"id":"Welcome"}' class="pure-button"> |