Skip to content

Commit 75bbdf9

Browse files
committed
Update
1 parent e1e3a59 commit 75bbdf9

File tree

8 files changed

+249
-653
lines changed

8 files changed

+249
-653
lines changed

sourcecode/App.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
</script>
77

88
<div>
9+
<!-- <Test /> -->
910
<IntroCard />
1011
<SearchBox />
1112
<Gallery />
12-
<!-- <Test /> -->
1313
</div>

sourcecode/Gallery.svelte

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,16 @@
9494
imageEntriesData.sort((a, b) => b.date - a.date);
9595
imageEntries = [...imageEntriesData]; // Update the reactive variable.
9696
} catch (error) {
97-
console.error("Error fetching images:", error);
97+
// console.error("Error fetching images:", error);
98+
// let errormessage;
99+
// if errormessage = "TypeError: NetworkError when attempting to fetch resource."{
100+
imageEntries = [];
101+
imageEntries.push({
102+
thumb: `/error.jpg`,
103+
full: `/error.jpg`,
104+
//date: dateObj,
105+
});
106+
//}
98107
}
99108
}
100109

sourcecode/IntroCard.svelte

Lines changed: 100 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,120 @@
33
export let description =
44
"I'm KarMukil, this page exclusively showcases my AI art.<br>All wallpapers are free to download";
55
// 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];
621
</script>
722

823
<div class="card">
924
<!-- <img class="image" src={imageUrl} alt={title} /> -->
10-
<div class="content">
25+
<!-- <div class="content">
1126
<div class="title">{title}</div>
1227
<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" />
1335
</div>
36+
<div class="count">Total Images : {imagecount}</div>
1437
</div>
1538

1639
<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+
1774
.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 {
18115
border-radius: 12px;
19116
overflow: hidden;
20117
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
21118
transition: transform 0.3s ease-in-out;
22-
/* background: linear-gradient(135deg, #db7fff, #f5d2ed); */
119+
background: linear-gradient(135deg, #db7fff, #f5d2ed);
23120
background-image: linear-gradient(
24121
125deg,
25122
#ce9ffc,
@@ -69,5 +166,5 @@
69166
100% {
70167
background-position: 0% 50%;
71168
}
72-
}
169+
} */
73170
</style>

sourcecode/public/bundle.css

Lines changed: 2 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)