feat: better Controller layout, now responsive

This commit is contained in:
Laureηt 2021-12-13 23:30:28 +01:00
parent ba419485c8
commit b06bef3b26
No known key found for this signature in database
GPG key ID: D88C6B294FD40994

View file

@ -16,36 +16,36 @@
<table class="buttons"> <table class="buttons">
<tr> <tr>
<td colspan="2" style="padding-bottom: 1rem;"> <td colspan="2" id="l">
<button id="l" on:click={sendAction('l')}>L</button> <button on:click={sendAction('l')}>L</button>
</td> </td>
<td /> <td />
<td colspan="2" style="padding-bottom: 1rem; text-align: right;"> <td colspan="2" id="r">
<button id="r" on:click={sendAction('r')}>R</button> <button on:click={sendAction('r')}>R</button>
</td> </td>
</tr> </tr>
<tr> <tr>
<td /> <td />
<td> <td id="up">
<button id="up" on:click={sendAction('up')}> </button> <button on:click={sendAction('up')}> </button>
</td> </td>
<td /> <td />
<td> <td id="select">
<button id="select" on:click={sendAction('select')}> select </button> <button on:click={sendAction('select')}> select </button>
</td> </td>
<td> <td id="start">
<button id="start" on:click={sendAction('start')}> start </button> <button on:click={sendAction('start')}> start </button>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td id="left">
<button id="left" on:click={sendAction('left')}> &lt; </button> <button on:click={sendAction('left')}> &lt; </button>
</td> </td>
<td /> <td />
<td style="padding-right: 20%;"> <td id="right">
<button id="right" on:click={sendAction('right')}> > </button> <button on:click={sendAction('right')}> > </button>
</td> </td>
<td /> <td />
<td /> <td />
@ -53,15 +53,15 @@
<tr> <tr>
<td /> <td />
<td> <td id="down">
<button id="down" on:click={sendAction('down')}> </button> <button on:click={sendAction('down')}> </button>
</td> </td>
<td /> <td />
<td> <td id="a">
<button id="a" on:click={sendAction('a')}>A</button> <button on:click={sendAction('a')}>A</button>
</td> </td>
<td> <td id="b">
<button id="b" on:click={sendAction('b')}>B</button> <button on:click={sendAction('b')}>B</button>
</td> </td>
</tr> </tr>
</table> </table>
@ -69,32 +69,47 @@
<style lang="scss"> <style lang="scss">
td { td {
text-align: center; text-align: center;
}
button { button {
width: 100%; width: 10vw;
height: 100%; height: 10vw;
}
} }
#a, #a,
#b { #b {
button {
border-radius: 50%; border-radius: 50%;
} }
}
#left, #left,
#right, #right,
#up, #up,
#down { #down {
width: 10%; button {
height: 10%;
border-radius: 10%; border-radius: 10%;
} }
}
#start, #start,
#select, #select,
#l, #l,
#r { #r {
width: 20%; button {
width: 20vw;
border-radius: 25%; border-radius: 25%;
} }
}
#r,
#l {
padding-bottom: 10vw;
}
#r {
text-align: right;
}
#right {
padding-right: 15vw;
}
</style> </style>