fixed code files to match editorconfig rules
This commit is contained in:
parent
fb928898d9
commit
af6c61bec5
18
css/main.css
18
css/main.css
@ -3,6 +3,7 @@ body {
|
||||
overflow: hidden;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.debug {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -13,6 +14,7 @@ body {
|
||||
line-height: 80px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.no-gamepad {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
@ -21,6 +23,7 @@ body {
|
||||
line-height: 2em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.gamepad {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@ -30,6 +33,7 @@ body {
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
.help {
|
||||
background: whitesmoke;
|
||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||
@ -44,16 +48,20 @@ body {
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.help.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.help h2 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1.5em;
|
||||
}
|
||||
|
||||
.help h3 {
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
.help p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@ -69,7 +77,8 @@ body {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.help th, .help td {
|
||||
.help th,
|
||||
.help td {
|
||||
border-top: 1px solid #ddd;
|
||||
line-height: 1.42857143;
|
||||
padding: 8px;
|
||||
@ -100,11 +109,14 @@ kbd {
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
kbd[title], .key[title] {
|
||||
|
||||
kbd[title],
|
||||
.key[title] {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
kbd, kbd.dark {
|
||||
kbd,
|
||||
kbd.dark {
|
||||
background: rgb(80, 80, 80);
|
||||
background: -moz-linear-gradient(top, rgb(60, 60, 60), rgb(80, 80, 80));
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(rgb(60, 60, 60)), to(rgb(80, 80, 80)));
|
||||
|
@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
@ -11,6 +12,7 @@
|
||||
<link rel="stylesheet" href="css/normalize.css">
|
||||
<link rel="stylesheet" href="css/main.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="no-gamepad">No active gamepad detected. Press <kbd>H</kbd> to read instructions.</div>
|
||||
<div class="gamepad"></div>
|
||||
@ -66,4 +68,5 @@
|
||||
<script src="js/gamepad.js"></script>
|
||||
<script src="js/app.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -479,16 +479,13 @@ class Gamepad {
|
||||
if ('0' === zoomLevel) {
|
||||
// "0" means a zoom reset
|
||||
this.activeGamepadZoomLevel = 1;
|
||||
}
|
||||
else if ('+' === zoomLevel && this.activeGamepadZoomLevel < 2) {
|
||||
} else if ('+' === zoomLevel && this.activeGamepadZoomLevel < 2) {
|
||||
// "+" means a zoom in if we still can
|
||||
this.activeGamepadZoomLevel += 0.1;
|
||||
}
|
||||
else if ('-' === zoomLevel && this.activeGamepadZoomLevel > 0.2) {
|
||||
} else if ('-' === zoomLevel && this.activeGamepadZoomLevel > 0.2) {
|
||||
// "-" means a zoom out if we still can
|
||||
this.activeGamepadZoomLevel -= 0.1;
|
||||
}
|
||||
else if (!isNaN(zoomLevel = parseFloat(zoomLevel))) {
|
||||
} else if (!isNaN(zoomLevel = parseFloat(zoomLevel))) {
|
||||
// an integer value means a value-based zoom
|
||||
this.activeGamepadZoomLevel = zoomLevel;
|
||||
}
|
||||
|
@ -12,18 +12,22 @@
|
||||
line-height: 1;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.box.small {
|
||||
width: 12.5%;
|
||||
min-width: 50px;
|
||||
}
|
||||
|
||||
.box.medium {
|
||||
width: 25%;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
.box.large {
|
||||
width: 50%;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.box.extra-large {
|
||||
width: 100%;
|
||||
min-width: 400px;
|
||||
|
@ -112,14 +112,16 @@
|
||||
left: 227px;
|
||||
}
|
||||
|
||||
.gamepad .select, .gamepad .start {
|
||||
.gamepad .select,
|
||||
.gamepad .start {
|
||||
background: url(start.svg);
|
||||
width: 28px;
|
||||
height: 46px;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.gamepad .select[data-pressed="true"], .gamepad .start[data-pressed="true"] {
|
||||
.gamepad .select[data-pressed="true"],
|
||||
.gamepad .start[data-pressed="true"] {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@ -219,12 +221,14 @@
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.gamepad .face.up, .gamepad .face.down {
|
||||
.gamepad .face.up,
|
||||
.gamepad .face.down {
|
||||
width: 36px;
|
||||
height: 52px;
|
||||
}
|
||||
|
||||
.gamepad .face.left, .gamepad .face.right {
|
||||
.gamepad .face.left,
|
||||
.gamepad .face.right {
|
||||
width: 52px;
|
||||
height: 36px;
|
||||
}
|
||||
|
@ -101,14 +101,16 @@
|
||||
left: 306px;
|
||||
}
|
||||
|
||||
.gamepad .select, .gamepad .start {
|
||||
.gamepad .select,
|
||||
.gamepad .start {
|
||||
background: url(start-select.svg);
|
||||
width: 33px;
|
||||
height: 33px;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.gamepad .select[data-pressed="true"], .gamepad .start[data-pressed="true"] {
|
||||
.gamepad .select[data-pressed="true"],
|
||||
.gamepad .start[data-pressed="true"] {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user