better responsive handling

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2023-04-06 22:08:11 +00:00
parent 15f14215d1
commit 3ec4edab24
3 changed files with 37 additions and 20 deletions

View File

@ -1,8 +1,26 @@
div {
display: flex;
flex-direction: row;
align-items: center;
column-gap: 10px;
@media screen and (min-width: 1000px) {
div {
display: flex;
flex-direction: row;
align-items: center;
column-gap: 10px;
}
}
@media screen and (max-width: 1000px) {
* {
}
#instance-status {
display: none;
}
#instance-type {
display: none;
}
#node-name {
display: none;
}
#node-status-div {
display: none;
}
}
.btn-group {

View File

@ -31,25 +31,24 @@
}
@media screen and (max-width: 1000px) {
#instance-container {
display: flex;
flex-direction: column;
display: grid;
grid-template-columns: auto auto 1fr auto;
column-gap: 2.5em;
align-items: center;
}
#instance-container {
margin: 0px;
}
#instance-container-header * {
display: none;
}
instance-obj {
display: grid;
grid-template-columns: auto auto auto 1fr;
gap: 20px;
padding-top: 20px;
padding-bottom: 20px;
display: contents;
}
instance-obj:after, instance-obj:first-of-type:before {
content: " ";
border-bottom: 1px solid var(--content-txt-color);
}
instance-obj:first-of-type {
border-top: 1px solid var(--content-txt-color);
}
.btn-group {
grid-column: 3 / span 2;
grid-column: 1 / span 8;
}
}
</style>

View File

@ -13,9 +13,9 @@ export class Instance extends HTMLElement {
<p id="instance-id"></p>
<p id="instance-name"></p>
<p id="instance-type"></p>
<div><img id="instance-status-icon"><p id="instance-status"></p></div>
<div id="instance-status-div"><img id="instance-status-icon"><p id="instance-status"></p></div>
<p id="node-name"></p>
<div><img id="node-status-icon"><p id="node-status"></p></div>
<div id="node-status-div"><img id="node-status-icon"><p id="node-status"></p></div>
<div class="btn-group">
<img id="power-btn" class="clickable">
<img id="console-btn" class="clickable">