-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
252 lines (228 loc) · 8.74 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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SingleTok 🌷📱🎥</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.nav {
position: fixed;
top: 0;
left: 0;
right: 0;
padding: 15px 10px;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 3;
}
@media (min-width: 768px) {
.nav {
padding: 20px 25px;
}
}
.logo {
color: white;
font-size: 24px;
font-weight: bold;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.social {
display: flex;
gap: 8px;
}
@media (min-width: 768px) {
.social {
gap: 12px;
}
}
.social a {
color: white;
text-decoration: none;
background-color: rgba(0, 0, 0, 0.3);
padding: 8px 16px;
border-radius: 16px;
backdrop-filter: blur(10px);
transition: background-color 0.3s;
display: flex;
align-items: center;
gap: 8px;
}
.social a:hover {
background-color: rgba(0, 0, 0, 0.4);
}
.social a span {
display: none;
}
@media (min-width: 768px) {
.social a span {
display: inline;
}
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
overflow: hidden;
}
.container {
height: 100vh;
scroll-snap-type: y mandatory;
overflow-y: scroll;
position: relative;
}
.entry {
height: 100vh;
scroll-snap-align: start;
scroll-snap-stop: always;
position: relative;
background-color: #000;
color: white;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 20px;
}
.entry img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 1;
}
.content {
position: relative;
z-index: 2;
background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.7));
padding: 20px;
margin: -10px;
margin-bottom: 50px;
border-radius: 20px;
}
.title {
font-size: 24px;
font-weight: bold;
margin-bottom: 8px;
}
.description {
white-space: pre-wrap;
font-size: 16px;
margin-bottom: 16px;
opacity: 0.9;
}
.link {
display: inline-block;
color: #fff;
text-decoration: none;
background-color: rgba(255, 255, 255, 0.2);
padding: 8px 16px;
border-radius: 20px;
backdrop-filter: blur(10px);
transition: background-color 0.3s;
}
.link:hover {
background-color: rgba(255, 255, 255, 0.3);
}
@media (min-width: 768px) {
.content {
max-width: 600px;
margin-left: auto;
margin-right: auto;
}
}
</style>
</head>
<body>
<nav class="nav">
<h1 class="logo">SingleTok</h1>
<div class="social">
<a href="https://github.com/nataliemarleny/SingleTok">
<svg
width="22"
height="22"
viewBox="0 0 98 96"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"
fill="#fff"
/>
</svg>
<span>View code</span>
</a>
<a href="https://x.com/nataliemarleny">
<svg
width="19"
height="18"
viewBox="0 0 300 271"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="m236 0h46l-101 115 118 156h-92.6l-72.5-94.8-83 94.8h-46l107-123-113-148h94.9l65.5 86.6zm-16.1 244h25.5l-165-218h-27.4z"
fill="#fff"
/>
</svg>
<span>Follow me</span>
</a>
</div>
</nav>
<div class="container"></div>
<script>
const entries = [
{
title: "Tulipa turkestanica",
description: "Tulipa turkestanica is a herbaceous, bulbous perennial growing 10 cm to 15 cm tall, with 2–4 thin glaucous leaves up to 15 cm long on each stem. The margins and tips have a pinkish colour. The leathery bulb is bright reddish-brown and has a hairy tunic. Each plant produces between one and twelve star-shaped flowers, grouped in a raceme. The flowers are ivory white to pinkish red, with a yellow to orange basal blotch, which extends to about a third of the flower.",
imageUrl: "https://upload.wikimedia.org/wikipedia/commons/8/84/Tulipa_turkestanica.jpg",
link: "https://en.wikipedia.org/wiki/Tulipa_turkestanica",
},
{
title: "Tulipa orphanidea",
description: "Tulipa orphanidea is a bulbous perennial reaching 10–20 cm in height. Bulbs measure 20–47 x 8–22 mm. The stem is glabrous or hairy, and the leaves which vary from 2–7 reach a size of about 20x2 cm, and are green, often with a tinge of red along their edges. The stem bears 1–4 globular to star-shaped flowers with copper-red, rarely yellow and red tepals, arranged in two whorls of three. The tepals bear a black, sometimes yellow, basal blotch interiorly. The outer tepals measure 3–6 × 1–1.8 cm and the inner tepal 3–6 × 1.2–2.1 cm. The six stamens are a dark olive colour, 7–12 mm in length. The chromosome number is 2n = 36, rarely 24 or 48",
imageUrl: "https://upload.wikimedia.org/wikipedia/commons/c/c4/Tulipa_orphanidea_060506.jpg",
link: "https://en.wikipedia.org/wiki/Tulipa_orphanidea",
},
{
title: "Tulipa hungarica",
description: "Tulipa hungarica, the Danube tulip, Banat tulip or Rhodope tulip, is a species of flowering plant in the family Liliaceae. It is also in the subgenus Tulipa. It is found on the rocky mountainsides of Bulgaria, Romania, Hungary and Slovenia, especially along the gorges of the river Danube. It has small bright yellow flowers in spring and blue-grey leaves.",
imageUrl: "https://upload.wikimedia.org/wikipedia/commons/d/d5/Tulipa-hungarica-Djerdapska-lala.jpg",
link: "https://en.wikipedia.org/wiki/Tulipa_hungarica",
},
{
title: "Gitlip",
description: "The collaborative coding platform for the AI era.\n\nGitlip enables real-time collaborative coding with Git integration and instant global deployment, streamlining your team's workflow from idea to production.",
imageUrl: "https://nataliemarleny.github.io/SingleTok/gitlip.png",
link: "https://gitlip.com",
}
];
function addEntry(entry) {
const entryElement = document.createElement("div");
entryElement.className = "entry";
entryElement.innerHTML = `
<img src="${entry.imageUrl}" alt="${entry.title}">
<div class="content">
<div class="title">${entry.title}</div>
<div class="description">${entry.description}</div>
<a href="${entry.link}" class="link">Learn More</a>
</div>
`;
const container = document.querySelector(".container");
container.appendChild(entryElement);
}
window.addEventListener("DOMContentLoaded", () => {
entries.forEach((entry) => addEntry(entry));
});
document.querySelector(".container").addEventListener("scroll", (e) => {
const container = e.target;
const scrollPosition = container.scrollTop + container.clientHeight;
const totalHeight = container.scrollHeight;
});
</script>
</body>
</html>