Fixes for the cards.... sort of.
This commit is contained in:
parent
b513dd8859
commit
371f5e25bc
4 changed files with 27 additions and 29 deletions
|
|
@ -71,3 +71,25 @@ img.blurred {
|
||||||
color: white;
|
color: white;
|
||||||
text-shadow: -1px 0 rgba(0, 0, 0, .5), 0 1px rgba(0, 0, 0, .5), 1px 0 rgba(0, 0, 0, .5), 0 -1px rgba(0, 0, 0, .5);
|
text-shadow: -1px 0 rgba(0, 0, 0, .5), 0 1px rgba(0, 0, 0, .5), 1px 0 rgba(0, 0, 0, .5), 0 -1px rgba(0, 0, 0, .5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cards.grid {
|
||||||
|
display: grid;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(auto, 1fr));
|
||||||
|
grid-auto-rows: 1fr;
|
||||||
|
grid-gap: 2rem;
|
||||||
|
grid-auto-flow: dense;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Force a 2-column grid on larger displays */
|
||||||
|
|
||||||
|
@media(min-width: 512px) {
|
||||||
|
.cards.grid {
|
||||||
|
grid-template-columns: repeat(2, minmax(256px, 1fr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background-color: #323232 !important;
|
||||||
|
}
|
||||||
|
|
@ -19,22 +19,21 @@ const update = async () => {
|
||||||
const renderServer = async (server) => {
|
const renderServer = async (server) => {
|
||||||
const { name, id, port, hasPackVer, dynmapUrl } = server;
|
const { name, id, port, hasPackVer, dynmapUrl } = server;
|
||||||
|
|
||||||
const resp = await fetch(`https://mcapi.us/server/status?ip=forgeserv.net&port=${port}`);
|
const resp = await fetch(`http://mcapi.us/server/status?ip=forgeserv.net&port=${port}`);
|
||||||
const data = await resp.json();
|
const data = await resp.json();
|
||||||
|
|
||||||
const card = document.createElement('div');
|
const card = document.createElement('div');
|
||||||
card.className = 'card';
|
card.className = 'card';
|
||||||
|
|
||||||
const img = document.createElement('img');
|
const img = document.createElement('img');
|
||||||
// img.className ='blurred card-img-top';
|
img.className ='blurred card-img-top';
|
||||||
img.className = 'card-img-overlay';
|
img.src = `/Resources/servers/${id}/cover.png`;
|
||||||
img.src = `/Resources/servers/${id}cover.png`;
|
|
||||||
|
|
||||||
const icn = document.createElement('img');
|
const icn = document.createElement('img');
|
||||||
icn.className = 'icn';
|
icn.className = 'icn';
|
||||||
icn.src = data.favicon ? data.favicon : '/Resources/default-icon.png';
|
icn.src = data.favicon ? data.favicon : '/Resources/default-icon.png';
|
||||||
|
|
||||||
const title = document.createElement('h5');
|
const title = document.createElement('h3');
|
||||||
title.className = 'card-title';
|
title.className = 'card-title';
|
||||||
title.innerText = name;
|
title.innerText = name;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
<div class="container">
|
|
||||||
<h1><i class="fas fa-file-archive"></i> Suggested Resource Pack</h1>
|
|
||||||
<p>
|
|
||||||
I have been working on a custom resource pack for modded Minecraft that implement's a few of the
|
|
||||||
best 16x16 textures (including most if not all of Jappa's new 1.14.x textures) into a pack I've
|
|
||||||
called "Voidpack". I have made a few textures, but by no means to I claim ownership of them all. You
|
|
||||||
can check it out and download it <span class="voidpack" for-modal="voidpack">here!</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal" id="voidpack">
|
|
||||||
<div class="modal-content">
|
|
||||||
<span class="close">
|
|
||||||
<i class="fas fa-times"></i>
|
|
||||||
</span>
|
|
||||||
<div class="embed">
|
|
||||||
<iframe src="https://voidpack.forgeserv.net"></iframe>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
real-time, though the player count is cached server-side for 5 minutes so there may be delay:
|
real-time, though the player count is cached server-side for 5 minutes so there may be delay:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="cards" id="servers">
|
<div class="cards grid" id="servers">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue