tangled
alpha
login
or
join now
ericwood.org
/
photos-site
1
fork
atom
A little app to serve my photography from my personal website
1
fork
atom
overview
issues
pulls
pipelines
mobile version of show page
ericwood.org
4 months ago
996fde45
a594eae7
0/0
Waiting for spindle ...
+31
-13
4 changed files
expand all
collapse all
unified
split
assets
app.js
photos
index.css
show.css
templates
photos
index.jinja
+1
-1
assets/app.js
···
7
7
8
8
const date = new Date(timeStr.value);
9
9
const formatted = new Intl.DateTimeFormat(undefined, {
10
10
-
month: "long",
10
10
+
month: "short",
11
11
day: "numeric",
12
12
year: "numeric"
13
13
}).format(date);
+5
-8
assets/photos/index.css
···
65
65
cursor: pointer;
66
66
}
67
67
68
68
-
.mobile-only {
69
69
-
display: none;
70
70
-
}
71
71
-
72
68
.photos__nav {
73
69
flex-basis: max-content;
74
70
min-width: 200px;
75
71
}
76
72
77
73
.photos__nav .close {
74
74
+
display: none;
78
75
position: fixed;
79
76
top: 30px;
80
77
right: 30px;
···
133
130
}
134
131
135
132
.photos__mobile-nav {
136
136
-
display: flex;
133
133
+
display: none;
137
134
justify-content: space-between;
138
135
align-items: center;
139
136
}
···
169
166
background: white;
170
167
}
171
168
172
172
-
.photos__nav.open {
169
169
+
.photos__nav .close {
173
170
display: block;
174
171
}
175
172
176
176
-
.mobile-only {
177
177
-
display: initial;
173
173
+
.photos__nav.open {
174
174
+
display: block;
178
175
}
179
176
180
177
.photos__mobile-nav {
+23
-2
assets/photos/show.css
···
10
10
11
11
.photo__image img {
12
12
max-width: 100%;
13
13
-
max-height: 90vh;
13
13
+
max-height: 85vh;
14
14
}
15
15
16
16
.photo__sidebar {
17
17
flex-basis: max-content;
18
18
-
max-width: 350px;
18
18
+
/*max-width: 350px;*/
19
19
}
20
20
21
21
.photo__sidebar h2 {
···
45
45
border-bottom: solid black 1px;
46
46
}
47
47
48
48
+
48
49
.photo__metadata li > *:first-child {
49
50
font-size: 10pt;
50
51
text-transform: uppercase;
51
52
font-weight: bold;
52
53
}
53
54
55
55
+
.photo__metadata li > *:last-child {
56
56
+
text-wrap: nowrap;
57
57
+
}
58
58
+
54
59
.photo__tags {
55
60
margin-top: 10px;
56
61
}
···
82
87
color: black;
83
88
text-decoration: none;
84
89
}
90
90
+
91
91
+
@media (max-width: 1024px) {
92
92
+
.photo__container {
93
93
+
flex-direction: column;
94
94
+
}
95
95
+
96
96
+
.photo__sidebar {
97
97
+
width: fit-content;
98
98
+
}
99
99
+
}
100
100
+
101
101
+
@media (max-width: 500px) {
102
102
+
.photo__sidebar {
103
103
+
width: 100%;
104
104
+
}
105
105
+
}
+2
-2
templates/photos/index.jinja
···
3
3
{% block head %}<link rel="stylesheet" href="/assets/photos/index.css" />{% endblock %}
4
4
{% block body %}
5
5
<div class="photos__layout">
6
6
-
<div class="photos__mobile-nav mobile-only">
6
6
+
<div class="photos__mobile-nav">
7
7
<button type="button" class="mobile-nav-toggle">Filter</button>
8
8
<a href="/?{{ sort_link }}" class="sort">
9
9
Sort {% if sort_dir == "asc" -%}↑{% else -%}↓{% endif %}
···
80
80
{% if sort_dir == "asc" -%}↑{% else -%}↓{% endif %}
81
81
</a>
82
82
</p>
83
83
-
<button type="button" class="close mobile-only mobile-nav-toggle">
83
83
+
<button type="button" class="close mobile-nav-toggle">
84
84
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
85
85
<use xlink:href="#close-icon" />
86
86
</svg>