-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
35 lines (32 loc) · 728 Bytes
/
app.js
File metadata and controls
35 lines (32 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const destinations = [
{
name: "Panambur Beach",
img: "beach.jpg",
desc: "Golden sands, clean shoreline, and great for sunsets."
},
{
name: "Kudroli Temple",
img: "temple.jpg",
desc: "One of Mangalore’s most iconic temples."
},
{
name: "St. Mary's Island",
img: "island.webp",
desc: "Known for its unique basalt rock formations."
}
];
const container = document.getElementById("destinations-grid");
function loadDestinations() {
container.innerHTML = destinations
.map(
(d) => `
<div class="card">
<img src="${d.img}" alt="${d.name}">
<h3>${d.name}</h3>
<p>${d.desc}</p>
</div>
`
)
.join("");
}
loadDestinations();