icons now responsive and changed to flexbox div

This commit is contained in:
neon443
2024-04-13 10:50:46 +01:00
parent c051009149
commit f074cf7f1f
2 changed files with 57 additions and 40 deletions

View File

@@ -41,23 +41,32 @@
<b>├─</b><a href="https://neon443.github.io/sandspiel/">Sandspiel</a><br> <b>├─</b><a href="https://neon443.github.io/sandspiel/">Sandspiel</a><br>
<b>└─</b><a href="https://neon443.github.io/sandboxels/">Sandboxels</a><br><br> <b>└─</b><a href="https://neon443.github.io/sandboxels/">Sandboxels</a><br><br>
</p> </p>
<table> <div class="homescreen">
<tr> <!-- 16 app icons -->
<td class="icn"><a href="https://neon443.github.io/eaglercraft152"><img src="images/minecraft/1.5.png" alt=""></a></td> <a href="https://neon443.github.io/eaglercraft152" class="app">
<td class="icn"><a href="https://neon443.github.io/eaglercraftX188"><img src="images/minecraft/1.8.png" alt=""></a></td> <img src="./images/minecraft/1.5.png" alt="App Icon">
<td class="icn"><a href="https://neon443.github.io/webEPK"><img src="images/webEPK/icon.png" alt=""></a></td> <span class="label">Minecraft 1.5.2</span>
<td class="icn"><a href="https://neon443.github.io/2048"><img src="images/2048/icon.png" alt=""></a></td> </a>
<td class="icn"><a href="https://neon443.github.io/fancade"><img src="images/fancade/icon.png" alt=""></a></td> <a href="https://neon443.github.io/eaglercraftX188" class="app">
<td class="icn"><a href="https://neon443.github.io/fancade/drive.html"><img src="images/fancade/drive.png" alt=""></a></td> <img src="./images/minecraft/1.8.png" alt="App Icon">
</tr> <span class="label">Minecraft 1.8.8</span>
<tr> </a>
<td class="label"><p>Minecraft 1.5.2</p></td> <a href="https://neon443.github.io/webEPK" class="app">
<td class="label"><p>Minecraft 1.8.8 u27</p></td> <img src="./images/webEPK/icon.png" alt="App Icon">
<td class="label"><p>webEPK</p></td> <span class="label">WebEPK</span>
<td class="label"><p>2048</p></td> </a>
<td class="label"><p>Fancade</p></td> <a href="https://neon443.github.io/2048" class="app">
<td class="label"><p>Drive Mad</p></td> <img src="./images/icon.png" alt="App Icon">
</tr> <span class="label">2048</span>
</table><br> </a>
<a href="https://neon443.github.io/fancade" class="app">
<img src="./images/fancade/icon.png" alt="App Icon">
<span class="label">Fancade</span>
</a>
<a href="https://neon443.github.io/fancade/drive" class="app">
<img src="./images/fancade/drive.png" alt="App Icon">
<span class="label">Drive Mad</span>
</a>
</div>
</body> </body>
</html> </html>

View File

@@ -27,6 +27,7 @@
font-family: system-ui; font-family: system-ui;
transition: 0.2s; transition: 0.2s;
color: #222; color: #222;
box-sizing: border-box;
} }
b { b {
color: #ff6200; color: #ff6200;
@@ -117,33 +118,35 @@ h3 {
} }
/* Bar styling */ /* Bar styling */
table { .homescreen {
table-layout: fixed; display: grid;
width: 100%; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Responsive grid */
gap: 20px;
padding: 20px;
justify-content: center;
} }
td { .app {
padding: 0px; display: flex;
margin: 0px; flex-direction: column;
} align-items: center;
td p {
text-align: center; text-align: center;
font-size: 15px; text-decoration: none;
}
td img{
height: 150px;
display: block;
margin-left: auto;
margin-right: auto;
transform: scale(0.9, 0.9);
border-radius: 10px;
transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
position: relative;
} }
td img:hover { .app img {
transform: scale(1, 1); width: auto;
height: 100px;
border-radius: 5px;
transition: transform 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.app:hover img {
transform: scale(1.1); /* Grow effect */
}
.label {
margin-top: 5px;
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
@@ -176,4 +179,9 @@ td img:hover {
} }
@media screen and (max-width: 600px) { @media screen and (max-width: 600px) {
.app img {
width: auto;
height: 80px;
border-radius: 20px;
}
} }