non-mandatory imgae in tick v3

pull/2/head
dev sp 2024-01-02 15:53:25 +00:00
parent d3b4088a43
commit 5f2138b742
2 changed files with 37 additions and 35 deletions

View File

@ -189,40 +189,40 @@ import Layout from "../../layouts/Layout.astro";
<style> <style>
@import url('https://fonts.googleapis.com/css2?family=Lobster&family=Quicksand:wght@500;700&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Lobster&family=Quicksand:wght@500;700&display=swap');
input[type="checkbox"]{ input[type="checkbox"]{
-webkit-appearance: initial; -webkit-appearance: initial;
appearance: initial; appearance: initial;
border: 1px solid gray; border: 1px solid gray;
border-radius: 5px; border-radius: 5px;
/* background: gray; */ /* background: gray; */
width: 40px; width: 40px;
height: 40px; height: 40px;
position: relative; position: relative;
} }
input[type="checkbox"]:checked { input[type="checkbox"]:checked {
background: blue; background: blue;
} }
input[type="checkbox"]:checked:after { input[type="checkbox"]:checked:after {
content: "X"; content: "X";
color: #fff; color: #fff;
border: none; border: none;
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 50%; top: 50%;
-webkit-transform: translate(-50%,-50%); -webkit-transform: translate(-50%,-50%);
-moz-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%); -ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%); transform: translate(-50%,-50%);
/* /*
* If you want to fully change the check appearance, use the following: * If you want to fully change the check appearance, use the following:
* content: " "; * content: " ";
* width: 100%; * width: 100%;
* height: 100%; * height: 100%;
* background: blue; * background: blue;
* top: 0; * top: 0;
* left: 0; * left: 0;
*/ */
} }
body{ body{
font-family: Quicksand; font-family: Quicksand;
} }

View File

@ -89,7 +89,9 @@ import Layout from "../../layouts/Layout.astro";
document.getElementById('descImage').src = assetsURL + gameData.descript_img; document.getElementById('descImage').src = assetsURL + gameData.descript_img;
for (let i = 1; i <= 3; i++) { for (let i = 1; i <= 3; i++) {
const imageId = `image${i}`; const imageId = `image${i}`;
document.getElementById(imageId).src = assetsURL + gameData[imageId]; if(gameData[imageId]){
document.getElementById(imageId).src = assetsURL + gameData[imageId];
}
} }
}); });