-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
214 lines (187 loc) · 7.03 KB
/
index.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bootstrap Grid with JSON Data</title>
<!-- Bootstrap CDN -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<!-- Font Awesome for icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
<link href="https://fonts.googleapis.com/css2?family=Lobster&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Audiowide">
<!-- Favicon -->
<link rel="icon" href="https://www.youtube.com/s/desktop/1fbbfaed/img/favicon.ico" type="image/x-icon">
<style>
/* Fullscreen Responsive Background Iframe */
.background-iframe {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1; /* Places it behind all other content */
pointer-events: none; /* Prevents interaction */
object-fit: cover; /* Ensures the content fills the viewport while maintaining aspect ratio */
object-position: center; /* Centers the iframe content */
}
/* General Styles */
body {
margin: 0;
overflow-y: auto; /* Enable scrolling */
background-color: #121212;
color: white;
display: flex;
flex-direction: column;
min-height: 100vh; /* Ensures footer stays at the bottom */
}
h1 {
font-family: "Audiowide", sans-serif;
text-align: center;
margin-bottom: 20px;
}
/* Navigation bar styles */
nav {
font-family: "Audiowide", sans-serif;
margin-bottom: 30px;
}
.navbar {
justify-content: space-between; /* Aligns title and links */
}
.navbar-nav .nav-link {
color: white;
font-size: 1.2rem;
transition: color 0.3s ease;
}
.navbar-nav .nav-link:hover {
color: #0d6efd; /* Bootstrap primary color */
}
/* Transparent Navbar */
.navbar.bg-transparent {
background-color: transparent !important;
}
/* Grid image styles */
.grid-item img {
width: 100%;
height: 200px;
object-fit: cover;
border-radius: 10px;
transition: transform 0.2s ease-in-out;
}
.grid-item img:hover {
transform: scale(1.05);
}
/* Footer styles */
footer {
padding: 15px 0;
text-align: center;
margin-top: auto; /* Push footer to the bottom */
width: 100%; /* Make sure footer takes the full width */
}
footer .nav-link {
color: white;
font-size: 1.1rem;
margin: 0 10px;
transition: color 0.3s ease;
}
footer .nav-link:hover {
color: #0d6efd;
}
/* Custom text in footer */
footer .custom-text {
color: white;
font-size: 1.1rem;
}
/* Custom icon styling */
footer .custom-text i {
font-size: 20px;
margin-right: 15px;
}
</style>
</head>
<body>
<!-- Fullscreen Background iframe -->
<iframe
class="background-iframe"
src="https://ordinals.com/content/af030674ee65b6bd72e71b92ddb4edbeafbc47768e2e412b7ff2415097447a2ci0"
frameborder="0">
</iframe>
<!-- Navigation Bar -->
<nav class="navbar navbar-expand-lg navbar-dark bg-transparent">
<div class="container-fluid">
<!-- Site Title -->
<a class="navbar-brand" href="#">WebGL Ordinals</a>
<!-- Toggle Button for Mobile -->
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Links on the Right -->
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<!-- <li class="nav-item">
<a class="nav-link" href="#gallery">about</a>
</li> -->
<!-- <li class="nav-item">
<a class="nav-link" href="#contact">Contact</a>
</li> -->
</ul>
</div>
</div>
</nav>
<!-- Content Container -->
<div class="container my-5">
<!-- <h1>WebGL Ordinals</h1> -->
<!-- Responsive Grid -->
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-5 row-cols-lg-5 g-3" id="grid">
<!-- Dynamic content will be injected here -->
</div>
</div>
<!-- Footer -->
<footer>
<nav>
<span class="custom-text">
<i class="fab fa-youtube"></i>
<a href="https://www.youtube.com" target="_blank" class="nav-link d-inline"></a>
<i class="fab fa-github"></i>
<a href="https://github.com" target="_blank" class="nav-link d-inline"></a>
<i class="fab fa-instagram"></i>
<a href="https://www.instagram.com" target="_blank" class="nav-link d-inline"></a>
</span>
</nav>
</footer>
<script>
// Function to load JSON data
async function loadJsonData() {
try {
const response = await fetch('data.json'); // JSON file path
if (!response.ok) {
throw new Error(`Failed to load JSON data: ${response.statusText}`);
}
return await response.json();
} catch (error) {
console.error(error);
return []; // Return an empty array on error
}
}
// Generate grid items dynamically
async function createGrid() {
const data = await loadJsonData(); // Load JSON data
const gridContainer = document.getElementById('grid');
data.forEach((item, index) => {
const colDiv = document.createElement('div');
colDiv.className = 'col grid-item';
// Each grid item has an image linked to a URL
colDiv.innerHTML = `
<a href="${item.url}" target="_blank" rel="noopener noreferrer">
<img src="${item.image}" alt="Image ${index + 1}">
</a>
`;
gridContainer.appendChild(colDiv);
});
}
// Initialize grid
createGrid();
</script>
</body>
</html>