Skip to content

Commit 3d3145c

Browse files
committed
Use different thumbnails based on the device
1 parent d07f364 commit 3d3145c

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

main/static/main/css/style.css

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ nav .nav-link:hover::after {
229229
border-radius: 20px;
230230
box-shadow: -5px 10px 10px rgba(0, 0, 0, 0.3);
231231
}
232+
.mobile-thumbnail-img {
233+
display: none;
234+
}
232235

233236
.div-5 {
234237
min-height: 30vh;
@@ -245,17 +248,29 @@ nav .nav-link:hover::after {
245248
.div-3 {
246249
height: 100vh;
247250
margin-right: 0!important;
248-
margin-top: 60vh;
251+
margin-top: 50vh;
249252
width: 100%;
250253
height: 100%;
251254
left: 0;
252255
transform: none;
253256
overflow:hidden;
254257
}
258+
.thumbnail-img {
259+
display: none;
260+
}
255261
.div-3 img {
256-
left: 50%;
257-
transform: translateX(10%); /* Center align horizontally */
258-
margin: 4px;
262+
width: auto;
263+
height: auto;
264+
border-radius: 7px;
265+
}
266+
#thumbnail.div-3 {
267+
display: flex;
268+
justify-content: center;
269+
}
270+
.mobile-thumbnail-img {
271+
display: block;
272+
max-width: 90vw;
273+
max-height: 70vh;
259274
}
260275
.div-4 h2 {
261276
text-align: center;

main/static/main/img/thumbnail.png

2.89 KB
Loading
220 KB
Loading

main/templates/main/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ <h1 class="text-white fade-in" id="main-title">
8383

8484
<div class="div-3 fade-in-2" id="thumbnail">
8585
<img src={% static 'main/img/thumbnail.png' %} alt="" class="thumbnail-img" draggable="false">
86+
<img src={% static 'main/img/thumbnail2.png' %} alt="" class="mobile-thumbnail-img" draggable="false">
8687
</div>
8788

8889
<div class="div-4 m-2 mb-4 p-2">

0 commit comments

Comments
 (0)