From 82c6bf98ff3ae3ef1c24495eb87260f148e17155 Mon Sep 17 00:00:00 2001 From: William Toohey Date: Fri, 22 Jan 2016 22:12:37 +1000 Subject: [PATCH] Neaten CSS --- css/hues-h.css | 4 +--- css/hues-m.css | 6 +----- css/hues-r.css | 6 +----- css/hues-res.css | 36 ------------------------------------ css/hues-x.css | 4 +--- css/style.css | 39 +++++++++++++++++++++++++++++++++++++-- js/ResourceManager.js | 16 ++++++++-------- 7 files changed, 49 insertions(+), 62 deletions(-) diff --git a/css/hues-h.css b/css/hues-h.css index 63db997..b930e13 100644 --- a/css/hues-h.css +++ b/css/hues-h.css @@ -1,6 +1,4 @@ -.HalloweenUI { - font-family: 'PetMe64Web'; -} +/* HalloweenUI */ .hues-h-text { color: #ff3300; diff --git a/css/hues-m.css b/css/hues-m.css index cd004db..d7c7c48 100644 --- a/css/hues-m.css +++ b/css/hues-m.css @@ -1,9 +1,5 @@ -/* Heavily based on Kepstin's wonderful CSS work +/* ModernUI, heavily based on Kepstin's wonderful CSS work https://github.com/kepstin/0x40hues-html5/blob/master/hues-m.css */ - -.ModernUI { - font-family: 'PetMe64Web'; -} .hues-m-beatbar, .hues-m-beatcenter{ transform: translateY(0px); diff --git a/css/hues-r.css b/css/hues-r.css index b31de30..f0199be 100644 --- a/css/hues-r.css +++ b/css/hues-r.css @@ -1,8 +1,4 @@ -/* TODO: Fix scrollbar */ - -.RetroUI { - font-family: 'PetMe64Web'; -} +/* RetroUI */ .hues-r-container { position: absolute; diff --git a/css/hues-res.css b/css/hues-res.css index 070da9a..0c9dd70 100644 --- a/css/hues-res.css +++ b/css/hues-res.css @@ -151,42 +151,6 @@ display: none; } -.res-button { - font-size: 10px; - margin: 3px 2px; - padding: 3px; - background: rgba(127,127,127, 0.5); - border-color: rgb(0,0,0); - border-width: 1px; - border-style: solid; - cursor: pointer; - /* Don't want double click to select */ - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.res-button.hidden { - display: none; -} - -.res-button.loaded { - background-color: rgba(0,127,0,0.5); - cursor: auto; -} - -.res-button:hover { - background: rgba(255,255,255, 0.5); -} - -.res-button.loaded:hover { - background-color: rgba(0,127,0,0.5); - cursor: default; -} - #res-countscontainer { position: absolute; bottom: 0; diff --git a/css/hues-x.css b/css/hues-x.css index d281c5d..9f72e50 100644 --- a/css/hues-x.css +++ b/css/hues-x.css @@ -1,6 +1,4 @@ -.XmasUI { - font-family: 'PetMe64Web'; -} +/* XmasUI */ .hues-m-controls.hues-x-controls { height: 50px; diff --git a/css/style.css b/css/style.css index ae13f28..1258895 100644 --- a/css/style.css +++ b/css/style.css @@ -38,6 +38,7 @@ html, body { height: 100%; margin: 0; padding: 0; overflow: hidden; + font-family: 'PetMe64Web'; } h1 { @@ -132,7 +133,6 @@ h1, h2, h3 { align-items:center; -webkit-flex-direction: column; flex-direction: column; - font-family: 'PetMe64Web'; font-size: 25pt; position: absolute; @@ -215,7 +215,6 @@ input.tab-input[type="radio"]:checked + label { border-color: "black"; border-width: 2px; border-style: solid; - font-family: 'PetMe64Web'; } #huesSettings { @@ -294,4 +293,40 @@ label.settings-label:hover { #huesSettings input[type="radio"]:checked + label { background: rgba(255,255,255, 0.5); +} + +.hues-button { + font-size: 10px; + margin: 3px 2px; + padding: 3px; + background: rgba(127,127,127, 0.5); + border-color: rgb(0,0,0); + border-width: 1px; + border-style: solid; + cursor: pointer; + /* Don't want double click to select */ + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.hues-button.hidden { + display: none; +} + +.hues-button.loaded { + background-color: rgba(0,127,0,0.5); + cursor: auto; +} + +.hues-button:hover { + background: rgba(255,255,255, 0.5); +} + +.hues-button.loaded:hover { + background-color: rgba(0,127,0,0.5); + cursor: default; } \ No newline at end of file diff --git a/js/ResourceManager.js b/js/ResourceManager.js index 11969c8..e2b95d9 100644 --- a/js/ResourceManager.js +++ b/js/ResourceManager.js @@ -310,11 +310,11 @@ Resources.prototype.initUI = function() { var buttons = document.createElement("div"); buttons.className = "res-buttons"; var loadRemote = document.createElement("div"); - loadRemote.className = "res-button hidden"; + loadRemote.className = "hues-button hidden"; loadRemote.textContent = "LOAD REMOTE"; loadRemote.onclick = function() {this.loadCurrentRemote();}.bind(this); var loadLocal = document.createElement("div"); - loadLocal.className = "res-button"; + loadLocal.className = "hues-button"; loadLocal.textContent = "LOAD ZIPS"; loadLocal.onclick = function() {this.fileInput.click();}.bind(this); buttons.appendChild(loadLocal); @@ -430,15 +430,15 @@ Resources.prototype.initUI = function() { packButtons.id = "res-packbuttons"; var enableAll = document.createElement("div"); enableAll.textContent = "ENABLE ALL"; - enableAll.className = "res-button"; + enableAll.className = "hues-button"; enableAll.onclick = function() {this.enableAll();}.bind(this); var invert = document.createElement("div"); invert.textContent = "INVERT"; - invert.className = "res-button"; + invert.className = "hues-button"; invert.onclick = function() {this.invert();}.bind(this); var disableAll = document.createElement("div"); disableAll.textContent = "DISABLE ALL"; - disableAll.className = "res-button"; + disableAll.className = "hues-button"; disableAll.onclick = function() {this.disableAll();}.bind(this); packButtons.appendChild(enableAll); packButtons.appendChild(invert); @@ -545,7 +545,7 @@ Resources.prototype.selectPack = function(id) { this.packView.pack = pack; this.packView.packButtons.className = "res-buttons"; - this.packsView.loadRemote.className = "res-button hidden"; + this.packsView.loadRemote.className = "hues-button hidden"; this.packView.name.textContent = pack.name; this.packView.creator.textContent = pack.author; @@ -724,7 +724,7 @@ Resources.prototype.selectRemotePack = function(id) { this.packView.pack = pack; this.packView.packButtons.className = "res-buttons hidden"; - this.packsView.loadRemote.className = "res-button"; + this.packsView.loadRemote.className = "hues-button"; if(pack.loaded) { this.packsView.loadRemote.className += " loaded"; this.packsView.loadRemote.textContent = "LOADED"; @@ -793,7 +793,7 @@ Resources.prototype.loadCurrentRemote = function() { // TODO Error checking on failure pack.loaded = true; - this.packsView.loadRemote.className = "res-button loaded"; + this.packsView.loadRemote.className = "hues-button loaded"; this.packsView.loadRemote.textContent = "LOADING"; this.addAll([pack.url], function() { this.remoteComplete();