-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetails.html
53 lines (50 loc) · 2.01 KB
/
details.html
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Detail Page</title>
<link rel="stylesheet" href="styles.css"> <!-- Link to your CSS file -->
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script> <!-- Font Awesome for icons -->
</head>
<body>
<div id="detail-container">
<!-- Content will be dynamically loaded here -->
</div>
<script>
// Get the photo ID from the URL parameters
const urlParams = new URLSearchParams(window.location.search);
const photo = urlParams.get('photo');
// Load the content based on the photo ID
let detailContent = '';
switch (photo) {
case 'work_1':
detailContent = `
<h2>Detail for Photo 3</h2>
<img src="./images/work_1.jpeg" alt="Photo 3" style="width: 100%; max-width: 400px;">
<p>Description and additional details about this photo.</p>
`;
break;
case 'photo_2':
detailContent = `
<h2>Detail for Photo 2</h2>
<img src="./images/photo_2.png" alt="Photo 2" style="width: 100%; max-width: 400px;">
<p>Description and additional details about this photo.</p>
`;
break;
case 'photo_1':
detailContent = `
<h2>Detail for Photo 1</h2>
<img src="./images/photo_1.png" alt="Photo 1" style="width: 100%; max-width: 400px;">
<p>Description and additional details about this photo.</p>
`;
break;
default:
detailContent = `<p>No details available.</p>`;
break;
}
// Display the detail content
document.getElementById('detail-container').innerHTML = detailContent;
</script>
</body>
</html>