|
3 | 3 | export let description =
|
4 | 4 | "I'm KarMukil, this page exclusively showcases my AI art.<br>All wallpapers are free to download";
|
5 | 5 | // export let imageUrl = "https://via.placeholder.com/300";
|
| 6 | +
|
| 7 | + let imagecount = 0; |
| 8 | +
|
| 9 | + window.addEventListener("load", () => { |
| 10 | + setTimeout(() => { |
| 11 | + const gallery = document.querySelector(".gallery"); // Select the gallery component |
| 12 | + if (gallery) { |
| 13 | + imagecount = gallery.getElementsByTagName("img").length; |
| 14 | + } |
| 15 | + }, 1000); // Short delay to ensure external images are counted |
| 16 | + }); |
| 17 | + export function homepage() { |
| 18 | + window.location = "https://www.karmukil.in"; |
| 19 | + } |
| 20 | + //imagecount = [...imagecount]; |
6 | 21 | </script>
|
7 | 22 |
|
8 | 23 | <div class="card">
|
9 | 24 | <!-- <img class="image" src={imageUrl} alt={title} /> -->
|
10 |
| - <div class="content"> |
| 25 | + <!-- <div class="content"> |
11 | 26 | <div class="title">{title}</div>
|
12 | 27 | <div class="description">{@html description}</div>
|
| 28 | + </div> --> |
| 29 | + <button class="homebtn" on:click={() => homepage()}> |
| 30 | + <img class="homeimage" src="/home.png" alt="buttonpng" border="0" /> |
| 31 | + </button> |
| 32 | + <!-- <div class="introimage" style="background-image: url('/header.gif');"> --> |
| 33 | + <div class="introimage"> |
| 34 | + <img class="headerimg" src="/header.gif" /> |
13 | 35 | </div>
|
| 36 | + <div class="count">Total Images : {imagecount}</div> |
14 | 37 | </div>
|
15 | 38 |
|
16 | 39 | <style>
|
| 40 | + .count .introimage { |
| 41 | + display: flex; |
| 42 | + justify-content: center; |
| 43 | + align-items: center; |
| 44 | + } |
| 45 | + .count { |
| 46 | + width: 100%; |
| 47 | + font-family: "Lucida Sans", Geneva, Verdana, sans-serif; |
| 48 | + font-size: 1.2rem; |
| 49 | + font-weight: bold; |
| 50 | + padding: 10px; |
| 51 | + text-align: center; |
| 52 | + } |
| 53 | +
|
| 54 | + .introimage { |
| 55 | + max-width: 100%; |
| 56 | + height: auto; |
| 57 | + border-radius: 12px; |
| 58 | + overflow: hidden; |
| 59 | + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); |
| 60 | + padding: 1px; |
| 61 | + transition: transform 0.2s ease-in-out; |
| 62 | + } |
| 63 | + .introimage:hover { |
| 64 | + transform: scale(1.05); |
| 65 | + } |
| 66 | +
|
| 67 | + .headerimg { |
| 68 | + width: 100%; |
| 69 | + max-width: 100%; |
| 70 | + height: auto; |
| 71 | + object-fit: cover; |
| 72 | + } |
| 73 | +
|
17 | 74 | .card {
|
| 75 | + display: grid; |
| 76 | + grid-template-columns: 1fr 2fr 1fr; /* Ensuring exactly 3 columns */ |
| 77 | + justify-content: center; |
| 78 | + align-items: center; |
| 79 | + gap: 20px; |
| 80 | + } |
| 81 | +
|
| 82 | + .homeimage { |
| 83 | + width: 50px; /* Adjust size */ |
| 84 | + height: 50px; |
| 85 | + margin: auto; |
| 86 | + justify-content: center; |
| 87 | + border-radius: 12px; |
| 88 | + background-color: white; |
| 89 | + } |
| 90 | +
|
| 91 | + button:hover { |
| 92 | + transform: scale(1.25); |
| 93 | + } |
| 94 | + .homebtn { |
| 95 | + width: 4.5vw; |
| 96 | + margin-left: auto; |
| 97 | + margin-right: auto; |
| 98 | + height: auto; |
| 99 | + border: none; |
| 100 | + background-color: transparent; |
| 101 | + transition: transform 0.2s ease-in-out; |
| 102 | + } |
| 103 | + /* Responsive adjustments |
| 104 | + @media (max-width: 1024px) { |
| 105 | + .gallery img { |
| 106 | + max-width: calc(33.333% - 10px); |
| 107 | + } |
| 108 | + } |
| 109 | + @media (max-width: 768px) { |
| 110 | + .gallery img { |
| 111 | + max-width: calc(50% - 10px); |
| 112 | + } |
| 113 | + } */ |
| 114 | + /* .card { |
18 | 115 | border-radius: 12px;
|
19 | 116 | overflow: hidden;
|
20 | 117 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
21 | 118 | transition: transform 0.3s ease-in-out;
|
22 |
| - /* background: linear-gradient(135deg, #db7fff, #f5d2ed); */ |
| 119 | + background: linear-gradient(135deg, #db7fff, #f5d2ed); |
23 | 120 | background-image: linear-gradient(
|
24 | 121 | 125deg,
|
25 | 122 | #ce9ffc,
|
|
69 | 166 | 100% {
|
70 | 167 | background-position: 0% 50%;
|
71 | 168 | }
|
72 |
| - } |
| 169 | + } */ |
73 | 170 | </style>
|
0 commit comments