Make photo page responsive
This commit is contained in:
parent
5e1612774a
commit
753390f728
@ -24,5 +24,5 @@ The data model is simply the list of all `.jpg` files in `IMAGE_DIR` and its sub
|
|||||||
- [x] Write a faster `./extract-metadata.py` alternative
|
- [x] Write a faster `./extract-metadata.py` alternative
|
||||||
- [x] Make a pretty index page
|
- [x] Make a pretty index page
|
||||||
- [x] Generate .webp thumbnails for index page
|
- [x] Generate .webp thumbnails for index page
|
||||||
|
- [x] Make a mobile page
|
||||||
- [ ] Make `make clean-dist` remove only unused photos (i.e. all photos in dist setminus photos that are supposed to be in dist)
|
- [ ] Make `make clean-dist` remove only unused photos (i.e. all photos in dist setminus photos that are supposed to be in dist)
|
||||||
- [ ] Make a mobile page
|
|
||||||
|
@ -18,9 +18,17 @@ body {
|
|||||||
.picture-frame {
|
.picture-frame {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
background-color: #555;
|
background-color: #555;
|
||||||
|
/* for some reason this is required to make the img fit in the box */
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.picture-frame img {
|
.picture-frame img {
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
@ -36,3 +44,10 @@ h1 {
|
|||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-aspect-ratio: 16/9) {
|
||||||
|
.my-epic-layout {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
grid-template-rows: 1fr auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -9,9 +9,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="my-epic-layout">
|
<div class="my-epic-layout">
|
||||||
<div class="picture-frame">
|
<div class="picture-frame"><img src="./{{ path.relativeToRoot }}" alt="{{ path.name }}"></div>
|
||||||
<img src="./{{ path.relativeToRoot }}" alt="{{ path.name }}">
|
|
||||||
</div>
|
|
||||||
<div class="text-frame">
|
<div class="text-frame">
|
||||||
<h1>{{ path.name }}</h2>
|
<h1>{{ path.name }}</h2>
|
||||||
<p><a href="./{{ navigation.previous }}">prev</a> · <a href="./{{ navigation.next }}">next</a> · <a href=".">up</a></p>
|
<p><a href="./{{ navigation.previous }}">prev</a> · <a href="./{{ navigation.next }}">next</a> · <a href=".">up</a></p>
|
||||||
@ -20,7 +18,7 @@
|
|||||||
exposure time <strong>{{ exif.ExposureTime.num }}⁄{{ exif.ExposureTime.denom }}</strong> s<br>
|
exposure time <strong>{{ exif.ExposureTime.num }}⁄{{ exif.ExposureTime.denom }}</strong> s<br>
|
||||||
aperture <strong>f{{ exif.FNumber.f64 }}</strong><br>
|
aperture <strong>f{{ exif.FNumber.f64 }}</strong><br>
|
||||||
iso <strong>{{ exif.PhotographicSensitivity }}</strong><br>
|
iso <strong>{{ exif.PhotographicSensitivity }}</strong><br>
|
||||||
resolution <strong>{{ exif.PixelXDimension }}x{{ exif.PixelYDimension }}</strong>
|
resolution <strong>{{ exif.PixelXDimension }}×{{ exif.PixelYDimension }}</strong>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user