small changes
This commit is contained in:
parent
d04fc53849
commit
46c2782e4e
@ -7,8 +7,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
color: white;
|
color: white;
|
||||||
font-family: 'Share Tech';
|
font-family: 'Share Tech';
|
||||||
font-size: 1.05em;
|
font-size: 1.05em;
|
||||||
@ -31,6 +29,11 @@ button {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: lightcyan;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(4, 1fr);
|
grid-template-columns: repeat(4, 1fr);
|
||||||
@ -41,11 +44,7 @@ button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.play {
|
.play {
|
||||||
grid-column: 2 / 4;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none;
|
|
||||||
text-shadow: 2px 1px rgb(153, 145, 175);
|
text-shadow: 2px 1px rgb(153, 145, 175);
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
width: 70%;
|
|
||||||
margin: 40px;
|
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,10 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>WEBTRIS</h1>
|
<h1>WEBTRIS</h1>
|
||||||
<div class="actions">
|
<div class="actions" id="actions">
|
||||||
<script>loadButtons()</script>
|
</div>
|
||||||
<a href="webtris.html" class="play"><b>JOUER</b></a>
|
<div class="play">
|
||||||
|
<a href="webtris.html"><b>JOUER</b></a>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -29,14 +29,10 @@ function getKey(action) {
|
|||||||
return key
|
return key
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadButtons() {
|
window.onload = function() {
|
||||||
document.open()
|
document.getElementById("actions").innerHTML = actionLabel.map(action => `<div>${action.label}</div>
|
||||||
document.write(
|
|
||||||
actionLabel.map(action => `<div>${action.label}</div>
|
|
||||||
<button type="button" onclick="changeKey(this, '${action.name}')">${getKey(action.name)}</button>
|
<button type="button" onclick="changeKey(this, '${action.name}')">${getKey(action.name)}</button>
|
||||||
`).join("\n")
|
`).join("\n")
|
||||||
)
|
|
||||||
document.close()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeKey(button, action) {
|
function changeKey(button, action) {
|
||||||
|
Reference in New Issue
Block a user