noisey buttons

This commit is contained in:
ntr 2019-12-29 16:33:45 +10:00
parent 868257825f
commit 029a93c684
7 changed files with 30 additions and 29 deletions

View File

@ -5,7 +5,7 @@
@white: #f5f5f5; // whitesmoke @white: #f5f5f5; // whitesmoke
@purple: #9355b5; // 6lack - that far cover @purple: #9355b5; // 6lack - that far cover
@yellow: #ffa100; @yellow: #ffa100;
@silver: #c0c0c0; @silver: #2c2c2c;
@black: black; @black: black;
@gray: #222; @gray: #222;

View File

@ -54,11 +54,7 @@
button { button {
&.highlight { &.highlight {
color: black;
background: @silver; background: @silver;
// border: 1px solid @white; (this bangs around the vbox)
// overwrite the classes on white svg elements
svg { svg {
stroke-width: 0.75em; stroke-width: 0.75em;
} }

View File

@ -151,14 +151,16 @@ button, input {
&:hover { &:hover {
color: whitesmoke; color: whitesmoke;
border-color: @gray-hover; border-color: @gray-hover;
// filter: url("#noiseFilter");
} }
&:focus { &:focus {
/*colour necesary to bash skellington*/ /*colour necesary to bash skellington*/
outline: 0; outline: 0;
} }
&:active {
filter: url("#noiseFilter");
}
} }
a { a {
@ -291,6 +293,7 @@ li {
.logo { .logo {
height: 4em; height: 4em;
filter: url("#noiseFilter");
background-image: url("../../assets/mnml.logo.text.svg"); background-image: url("../../assets/mnml.logo.text.svg");
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -361,4 +364,12 @@ header {
} }
} }
#noise {
height: 0;
}
@import 'styles.mobile.less'; @import 'styles.mobile.less';
.highlight {
filter: url("#noiseFilter");
}

View File

@ -147,16 +147,11 @@
} }
&.highlight { &.highlight {
color: black;
background: @silver; background: @silver;
// overwrite the classes on white svg elements // overwrite the classes on white svg elements
svg { svg {
stroke-width: 0.75em; stroke-width: 0.75em;
} }
.white {
stroke: black;
}
} }
} }

View File

@ -8,7 +8,6 @@ const actions = require('./../actions');
const VERSION = process.env.npm_package_version; const VERSION = process.env.npm_package_version;
const Welcome = require('./welcome'); const Welcome = require('./welcome');
const NoiseLogo = require('./noise.logo');
const addState = connect( const addState = connect(
function receiveState(state) { function receiveState(state) {
@ -72,7 +71,7 @@ function Play(args) {
return ( return (
<main> <main>
<NoiseLogo /> <div class="logo"/>
<hr /> <hr />
{list()} {list()}
<hr /> <hr />

View File

@ -5,7 +5,7 @@ const Main = require('./main');
// const Nav = require('./nav'); // const Nav = require('./nav');
const Controls = require('./controls'); const Controls = require('./controls');
const FrontPage = require('./front.page'); const FrontPage = require('./front.page');
const NoiseLogo = require('./noise.logo'); const Noise = require('./noise');
const addState = connect( const addState = connect(
({ game, instance, authenticated }) => ({ game, instance, authenticated }) ({ game, instance, authenticated }) => ({ game, instance, authenticated })
@ -24,6 +24,7 @@ function Mnml(args) {
if (!authenticated && !instance && !game) return ( if (!authenticated && !instance && !game) return (
<div id="mnml" class='front-page'> <div id="mnml" class='front-page'>
<Noise />
<FrontPage /> <FrontPage />
<div id="rotate" class={rotateClass} ></div> <div id="rotate" class={rotateClass} ></div>
</div> </div>
@ -33,6 +34,7 @@ function Mnml(args) {
<div id="mnml"> <div id="mnml">
<Main /> <Main />
<Controls /> <Controls />
<Noise />
<div id="rotate" class={rotateClass} ></div> <div id="rotate" class={rotateClass} ></div>
</div> </div>
); );

View File

@ -2,7 +2,7 @@ const preact = require('preact');
const { Component } = require('preact'); const { Component } = require('preact');
const anime = require('animejs').default; const anime = require('animejs').default;
class Logo extends Component { class Noise extends Component {
constructor() { constructor() {
super(); super();
this.animations = []; this.animations = [];
@ -10,10 +10,9 @@ class Logo extends Component {
render() { render() {
return ( return (
<div class='logo' style={{ filter: 'url("#noiseFilter")' }}>
<svg <svg
version="1.1" version="1.1"
id="logo" id="noise"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 400 400"> viewBox="0 0 400 400">
<filter id='noiseFilter'> <filter id='noiseFilter'>
@ -21,7 +20,6 @@ class Logo extends Component {
<feDisplacementMap in2="turbulence" in="SourceGraphic" scale="2" xChannelSelector="R" yChannelSelector="G"></feDisplacementMap> <feDisplacementMap in2="turbulence" in="SourceGraphic" scale="2" xChannelSelector="R" yChannelSelector="G"></feDisplacementMap>
</filter> </filter>
</svg> </svg>
</div>
); );
} }
@ -74,4 +72,4 @@ class Logo extends Component {
} }
} }
module.exports = Logo; module.exports = Noise;