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