} | } | ||||
span.color-NES-06{ | |||||
color:#A80020; | |||||
} | |||||
/* NOTE: Modal styles were borrowed from | /* NOTE: Modal styles were borrowed from | ||||
* https://www.w3schools.com/howto/howto_css_modals.asp | * https://www.w3schools.com/howto/howto_css_modals.asp | ||||
* and modified. | * and modified. |
console.log("EMITTED EVENT!"); | 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){ | function initialize(DOC){ | ||||
TitlePainter(NESPalette.SystemColor); | |||||
EmitterElements.initialize(); | EmitterElements.initialize(); | ||||
//EventWindow.enable_emitter_attributes(); | //EventWindow.enable_emitter_attributes(); | ||||
GlobalEvents.listen("emitted-event", handle_emitted); | GlobalEvents.listen("emitted-event", handle_emitted); |
<div class="header"> | <div class="header"> | ||||
<div class="home-menu pure-menu pure-menu-horizontal"> | <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"> | <ul class="pure-menu-list"> | ||||
<li class="pure-menu-item pure-menu-selected"> | <li class="pure-menu-item pure-menu-selected"> | ||||
<button emit="modal-open" emit-args='{"id":"Welcome"}' class="pure-button"> | <button emit="modal-open" emit-args='{"id":"Welcome"}' class="pure-button"> |