From 371f5e25bc31302c0dd7a15ad8376c75b5d5d4fc Mon Sep 17 00:00:00 2001 From: oitsjustjose Date: Wed, 2 Dec 2020 20:19:31 -0600 Subject: [PATCH] Fixes for the cards.... sort of. --- forgeserv.css | 22 ++++++++++++++++++++++ forgeserv.js | 9 ++++----- index copy.html | 23 ----------------------- index.html | 2 +- 4 files changed, 27 insertions(+), 29 deletions(-) delete mode 100644 index copy.html diff --git a/forgeserv.css b/forgeserv.css index 71b634c..f4667b2 100644 --- a/forgeserv.css +++ b/forgeserv.css @@ -70,4 +70,26 @@ img.blurred { .outline-text { 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); +} + +.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; } \ No newline at end of file diff --git a/forgeserv.js b/forgeserv.js index ebf52a6..a24c683 100644 --- a/forgeserv.js +++ b/forgeserv.js @@ -19,22 +19,21 @@ const update = async () => { const renderServer = async (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 card = document.createElement('div'); card.className = 'card'; const img = document.createElement('img'); - // img.className ='blurred card-img-top'; - img.className = 'card-img-overlay'; - img.src = `/Resources/servers/${id}cover.png`; + img.className ='blurred card-img-top'; + img.src = `/Resources/servers/${id}/cover.png`; const icn = document.createElement('img'); icn.className = 'icn'; 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.innerText = name; diff --git a/index copy.html b/index copy.html deleted file mode 100644 index 7309e6b..0000000 --- a/index copy.html +++ /dev/null @@ -1,23 +0,0 @@ -
-

Suggested Resource Pack

-

- 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 here! -

-
- - - - - \ No newline at end of file diff --git a/index.html b/index.html index 6167cf0..bc1664a 100644 --- a/index.html +++ b/index.html @@ -57,7 +57,7 @@ real-time, though the player count is cached server-side for 5 minutes so there may be delay:

-
+