bad fix for responsive instance container

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2023-04-06 21:55:31 +00:00
parent c1ca182d10
commit 389a548d00
3 changed files with 40 additions and 17 deletions

View File

@ -10,9 +10,10 @@
<script src="scripts/index.js" type="module"></script> <script src="scripts/index.js" type="module"></script>
<script src="scripts/instance.js" type="module"></script> <script src="scripts/instance.js" type="module"></script>
<style> <style>
@media screen and (min-width: 1000px) {
#instance-container { #instance-container {
display: grid; display: grid;
grid-template-columns: auto auto auto auto auto auto 1fr auto; grid-template-columns: auto auto auto auto auto 1fr auto;
column-gap: 2.5em; column-gap: 2.5em;
align-items: center; align-items: center;
} }
@ -27,6 +28,30 @@
border-bottom: 1px solid var(--content-txt-color); border-bottom: 1px solid var(--content-txt-color);
grid-column: 1 / span 8; grid-column: 1 / span 8;
} }
}
@media screen and (max-width: 1000px) {
#instance-container {
display: flex;
flex-direction: column;
}
#instance-container-header * {
display: none;
}
instance-obj {
display: grid;
grid-template-columns: auto auto auto 1fr;
gap: 20px;
padding-top: 20px;
padding-bottom: 20px;
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;
}
}
</style> </style>
</head> </head>
<body> <body>

View File

@ -41,7 +41,6 @@ async function populateInstances () {
<p>VM Status</p> <p>VM Status</p>
<p>Host Name</p> <p>Host Name</p>
<p>Host Status</p> <p>Host Status</p>
<div class="hidden"></div>
<p>Actions</p> <p>Actions</p>
</div> </div>
`; `;

View File

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