Skip to content

Commit 75a65ec

Browse files
committed
reverting main and adjusting mobile styles
1 parent 7c31815 commit 75a65ec

File tree

5 files changed

+60
-63
lines changed

5 files changed

+60
-63
lines changed

_data/river-poem.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323
sections:
2424

2525
- id: "line-2"
26-
scroll_position: 2000
27-
scroll_position_mobile: 3000
26+
scroll_position: 2500
27+
scroll_position_mobile: 3200
2828
side: "middle"
2929
content: "you are silt"
3030
padding_left:
3131
font_size: 19
3232

3333
- id: "line-3"
3434
scroll_position: 2750
35-
scroll_position_mobile: 3300
35+
scroll_position_mobile: 3400
3636
side: "middle"
3737
content: "you may be embedded in the strata"
3838
max_width: 420
@@ -111,7 +111,7 @@ sections:
111111

112112
- id: "line-12"
113113
scroll_position: 5500
114-
scroll_position_mobile: 5700
114+
scroll_position_mobile: 5570
115115
side: "middle"
116116
content: "or the river might cut you from your bed and carry you away"
117117
max_width: 500
@@ -120,7 +120,7 @@ sections:
120120

121121
- id: "line-13"
122122
scroll_position: 5800
123-
scroll_position_mobile: 6000
123+
scroll_position_mobile: 5800
124124
side: "left"
125125
content: "the water takes you fast or slow all the way to the ocean"
126126
padding_left: 300
@@ -129,7 +129,7 @@ sections:
129129

130130
- id: "line-14"
131131
scroll_position: 6100
132-
scroll_position_mobile: 6300
132+
scroll_position_mobile: 6100
133133
side: "middle"
134134
content: "perhaps you wash up on a beach"
135135
max_width: 500
@@ -138,7 +138,7 @@ sections:
138138

139139
- id: "line-15"
140140
scroll_position: 6750
141-
scroll_position_mobile: 6600
141+
scroll_position_mobile: 6400
142142
side: "middle"
143143
content: "there is so much of you you tune the water's temperature"
144144
max_width: 500
@@ -147,23 +147,23 @@ sections:
147147

148148
- id: "line-16"
149149
scroll_position: 7350
150-
scroll_position_mobile: 6900
150+
scroll_position_mobile: 6600
151151
side: "middle"
152152
content: "algae blossoms in your nooks"
153153
icon: "microbes"
154154
trib: "biota"
155155

156156
- id: "line-17"
157157
scroll_position: 7600
158-
scroll_position_mobile: 7200
158+
scroll_position_mobile: 6900
159159
side: "middle"
160160
content: "endemic fish proliferate"
161161
icon: "biota"
162162
trib: "biota"
163163

164164
- id: "line-18"
165165
scroll_position: 7850
166-
scroll_position_mobile: 7500
166+
scroll_position_mobile: 7200
167167
side: "middle"
168168
content: "you hold magnesium, potassium, and calcium"
169169
max_width: 500
@@ -173,7 +173,7 @@ sections:
173173

174174
- id: "line-19"
175175
scroll_position: 8100
176-
scroll_position_mobile: 7800
176+
scroll_position_mobile: 7500
177177
side: "middle"
178178
content: "plants take root in your fertile shores"
179179
icon: "vegetation"
@@ -182,7 +182,7 @@ sections:
182182

183183
- id: "line-21"
184184
scroll_position: 8500
185-
scroll_position_mobile: 8100
185+
scroll_position_mobile: 7800
186186
side: "right"
187187
content: "when enough of you gathers you alter the river's course"
188188
max_width: 500
@@ -192,7 +192,7 @@ sections:
192192

193193
- id: "line-22"
194194
scroll_position: 8900
195-
scroll_position_mobile: 8400
195+
scroll_position_mobile: 8100
196196
side: "middle"
197197
content: "some of you stream over an abandoned uranium mine"
198198
padding_right: 80
@@ -203,7 +203,7 @@ sections:
203203
-
204204
- id: "line-23"
205205
scroll_position: 9200
206-
scroll_position_mobile: 8700
206+
scroll_position_mobile: 8300
207207
side: "right"
208208
content: "you are radioactive"
209209
padding_right: 100
@@ -213,7 +213,7 @@ sections:
213213

214214
- id: "line-24"
215215
scroll_position: 9600
216-
scroll_position_mobile: 9000
216+
scroll_position_mobile: 8600
217217
side: "middle"
218218
content: "humans gather you in handfuls to make art and homes"
219219
max_width: 500
@@ -222,7 +222,7 @@ sections:
222222

223223
- id: "line-25"
224224
scroll_position: 9850
225-
scroll_position_mobile: 9300
225+
scroll_position_mobile: 8900
226226
side: "right"
227227
content: "much of you heaps up behind concrete dams"
228228
padding_right: 100
@@ -232,15 +232,15 @@ sections:
232232

233233
- id: "line-26"
234234
scroll_position: 10100
235-
scroll_position_mobile: 9600
235+
scroll_position_mobile: 9200
236236
side: "middle"
237237
content: "not so much of you flows to the sea now"
238238
icon: "water"
239239
trib: "water"
240240

241241
- id: "line-27"
242242
scroll_position: 10350
243-
scroll_position_mobile: 9900
243+
scroll_position_mobile: 9500
244244
side: "right"
245245
content: "there is not so much room left for the water anymore"
246246
padding_right: 200
@@ -250,7 +250,7 @@ sections:
250250

251251
- id: "line-28"
252252
scroll_position: 11400
253-
scroll_position_mobile: 11200
253+
scroll_position_mobile: 9800
254254
side: "middle"
255255
content: "still, maybe you are embedded in the rock strata maybe you are deep underground or clinging to the outer dermis of a canyon wall or maybe you arrived recently, from somewhere else, delivered by bird wing, on shoe, from mountain or through fish gut you might stay here for another day, century, millennia, or billion years or the river might cut you from your bed and carry you away"
256256
max_width: 1000

_includes/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="row gx-0 intro-tight"><div class="col-md pe-0">
55

66
<div class="intro-tight-image">
7-
{% include feature/image-gallery.html objectid="sediment212" caption=false width="75" %}
7+
{% include feature/image.html objectid="sediment212" caption=false width="75" %}
88
</div>
99

1010
</div><div class="col-md ps-0 ps-md-1 pe-5 pe-md-5" style="padding-right: 3.75rem;">

_includes/navigation-cards.html

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,25 @@ <h3>COLLECTION</h3>
333333

334334
/* Responsive */
335335
@media (max-width: 768px) {
336+
.navigation-cards-container {
337+
max-width: 100%;
338+
overflow-x: hidden;
339+
}
340+
336341
.navigation-cards {
337342
grid-template-columns: 1fr;
338343
grid-template-rows: auto;
339344
gap: 30px;
340345
}
341346

347+
.nav-card {
348+
box-sizing: border-box;
349+
max-width: 100%;
350+
overflow: hidden;
351+
word-wrap: break-word;
352+
overflow-wrap: break-word;
353+
}
354+
342355
.tributary-card,
343356
.map-card,
344357
.eddies-card,
@@ -348,16 +361,22 @@ <h3>COLLECTION</h3>
348361
grid-row: span 1;
349362
}
350363

364+
.tributary-select {
365+
box-sizing: border-box;
366+
max-width: 100%;
367+
}
368+
369+
#nav-mini-map {
370+
height: 200px;
371+
max-width: 100%;
372+
}
373+
351374
.scroll-card {
352375
border-right: none;
353376
border-top: 4px solid #DEB887;
354377
padding-right: 0;
355378
padding-top: 15px;
356379
}
357-
358-
#nav-mini-map {
359-
height: 200px;
360-
}
361380
}
362381
</style>
363382

_includes/river-poem.html

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,18 @@
8080
}
8181

8282
.poem-content-box {
83-
background: transparent;
84-
box-shadow: none;
8583
border: none;
8684
}
8785

8886
/* Responsive adjustments */
8987
@media (max-width: 768px) {
9088
.poem-section {
9189
/* Keep absolute positioning but center horizontally */
92-
left: calc(50% + 100px) !important;
90+
left: 50% !important;
9391
right: auto !important;
9492
transform: translateX(-50%);
95-
width: 92%;
96-
max-width: 380px;
93+
width: 90%;
94+
max-width: 320px;
9795
}
9896

9997
.poem-content-wrapper {
@@ -104,8 +102,6 @@
104102
.poem-content-box {
105103
max-width: 100% !important;
106104
padding: 15px !important;
107-
background: transparent !important;
108-
padding: 14px;
109105
}
110106

111107
.poem-text {

main.html

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: default
3-
title: "Sedimentation"
3+
title: "The Colorado River Journey"
44
river_path: "M190,-10 Q105,0 100,0 T65,15 50,23 Q45,25 30,35 Q20,45 19,65 Q42,75 50,85 Q53,95 67,105 Q80,115 93,125 Q92,135 80,145 Q74,155 60,165 Q57,175 59,185 Q52,195 50,205 Q47,215 49,225 Q42,235 40,245 Q47,255 59,265 Q72,275 70,285 Q67,295 59,305 Q52,310 50,320 Q47,330 39,340 Q32,350 30,360 Q35,370 45,380 Q55,390 65,400 Q75,410 85,420 Q95,430 98,440 Q92,450 85,460 Q78,470 75,480 Q72,490 78,500 Q84,510 90,520 Q96,530 98,540 Q95,550 88,560 Q81,570 75,580 Q69,590 72,600 Q75,610 82,620 Q89,630 95,640 Q98,650 95,660 Q92,670 85,680 Q78,690 72,700 Q66,710 70,720 Q74,730 82,740 Q90,750 96,760 Q98,770 94,780 Q90,790 83,800 Q76,810 70,820 Q64,830 68,840 Q72,850 80,860 Q88,870 94,880 Q98,890 95,900"
55
---
66

@@ -99,6 +99,8 @@ <h3>{{ tributary.title }}</h3>
9999
width: 85%;
100100
background: rgb(255 255 255 / 92%);
101101
padding: 30px;
102+
box-sizing: border-box;
103+
overflow-x: hidden;
102104
z-index: 200;
103105
animation: fadeInUp 1s cubic-bezier(0.23, 1, 0.32, 1);
104106
}
@@ -161,12 +163,9 @@ <h3>{{ tributary.title }}</h3>
161163
to { opacity: 1; }
162164
}
163165
}
164-
.poem-content-box {
165-
background: transparent !important;
166-
box-shadow: none !important;
167-
border: none !important;
168-
padding: 14px;
169-
}
166+
.poem-content-box{
167+
background: rgb(255 255 255 / 65%);
168+
padding: 14px;}
170169

171170
.tributary-scroll-container {
172171
position: relative;
@@ -301,14 +300,14 @@ <h3>{{ tributary.title }}</h3>
301300
/* Responsive adjustments */
302301
@media (max-width: 768px) {
303302
.river-container {
304-
min-height: 12000px; /* Keep mobile page long enough for spread-out poem sections */
303+
min-height: 12000px; /* Increased height for mobile to accommodate spread-out poem sections */
305304
}
306305

307306
.intro-content-box {
308307
position: relative;
309308
top: 40px;
310309
right: auto;
311-
width: calc(100% - 30px);
310+
width: calc(100% - 40px);
312311
margin: 20px;
313312
background: white;
314313
border-radius: 15px;
@@ -356,7 +355,7 @@ <h3>{{ tributary.title }}</h3>
356355
// Set up canvas responsively
357356
function resizeCanvas() {
358357
canvas.width = window.innerWidth;
359-
canvas.height = 5500;
358+
canvas.height = 7300;
360359
}
361360

362361
resizeCanvas();
@@ -371,38 +370,21 @@ <h3>{{ tributary.title }}</h3>
371370

372371
// Original SVG bounds
373372
const originalBounds = { minX: 0, maxX: 200, minY: -10, maxY: 400 };
374-
const minRiverX = canvas.width * 0.08;
375-
const maxRiverX = canvas.width * 0.35;
376373
const mapRiverX = (xVal, yVal) => {
377-
const channelCenterX = (minRiverX + maxRiverX) / 2;
378-
const channelHalfWidth = (maxRiverX - minRiverX) / 2;
379-
const xNorm = (xVal / originalBounds.maxX) * 2 - 1;
374+
// Natural full-width mapping
375+
let scaledX = (xVal / originalBounds.maxX) * canvas.width;
380376
const yNorm = (yVal - originalBounds.minY) / (originalBounds.maxY - originalBounds.minY);
381377

382-
// Blend original bends with two y-driven wave components for extra twists.
383-
let bend = xNorm * 0.95;
384-
bend += Math.sin(yNorm * Math.PI * 6) * 0.18;
385-
bend += Math.sin(yNorm * Math.PI * 13 + 0.7) * 0.08;
386-
387-
// Hard clamp: never exceed configured channel bounds.
388-
bend = Math.max(-1, Math.min(1, bend));
389-
390-
let dynamicCenterX = channelCenterX;
391-
392378
// Near the end, arc smoothly right and exit the screen.
393379
if (yNorm > 0.82) {
394380
const t = (yNorm - 0.82) / 0.18;
395381
const clampedT = Math.max(0, Math.min(1, t));
396382
const ease = clampedT * clampedT * clampedT * (clampedT * (clampedT * 6 - 15) + 10);
397-
const controlCenterX = canvas.width * 0.46;
398-
const exitCenterX = canvas.width * 1.08;
399-
const oneMinus = 1 - ease;
400-
dynamicCenterX = oneMinus * oneMinus * channelCenterX + 2 * oneMinus * ease * controlCenterX + ease * ease * exitCenterX;
383+
const exitX = canvas.width * 1.08;
384+
scaledX = scaledX * (1 - ease) + exitX * ease;
401385
}
402386

403-
const mappedX = dynamicCenterX + bend * channelHalfWidth;
404-
405-
return mappedX;
387+
return scaledX;
406388
};
407389

408390
commands.forEach(command => {

0 commit comments

Comments
 (0)