Procházet zdrojové kódy

Put app title in top bar. Added a little random color effect to the 'Paint' title.

dev-tmpl
Bryan Miller před 6 roky
rodič
revize
5284af0dd5
3 změnil soubory, kde provedl 21 přidání a 1 odebrání
  1. +4
    -0
      app/css/nespaint.css
  2. +13
    -0
      app/js/main.js
  3. +4
    -1
      index.html

+ 4
- 0
app/css/nespaint.css Zobrazit soubor

@@ -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.

+ 13
- 0
app/js/main.js Zobrazit soubor

@@ -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);

+ 4
- 1
index.html Zobrazit soubor

@@ -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">

Načítá se…
Zrušit
Uložit