Photos page styles
- Create items in the grid for the month and year - Use child selectors where possible - fix the layout
This commit is contained in:
parent
660a1a79b5
commit
1e8b80481e
2 changed files with 56 additions and 24 deletions
|
@ -23,41 +23,72 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.photos.list {
|
.photos.list {
|
||||||
display: inline-block;
|
box-sizing: border-box;
|
||||||
max-width: none;
|
max-width: none;
|
||||||
margin: var(--body-item-spacing) 0;
|
|
||||||
padding: 0 var(--body-item-spacing);
|
padding: 0 var(--body-item-spacing);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.photos.list > .grid {
|
.photos.list {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||||||
gap: 0.8rem;
|
gap: 4px;
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
@media (max-width: 415px) {
|
|
||||||
.photos > .grid {
|
|
||||||
grid-template-columns: repeat(2, 1fr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.photos.page > nav {
|
.photos.page > nav {
|
||||||
margin-block-end: var(--body-item-spacing);
|
margin-block-end: var(--body-item-spacing);
|
||||||
}
|
}
|
||||||
|
|
||||||
.photos > .grid > li {
|
.photos.list > a {
|
||||||
line-height: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.photos > .grid > li > a {
|
|
||||||
display: block;
|
display: block;
|
||||||
|
line-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.photos > .grid > li img {
|
.photos.list > a > img {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
image-orientation: from-image;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photos.list > div {
|
||||||
|
background-color: #333;
|
||||||
|
border-radius: 3px;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photos.list > div > h6 {
|
||||||
|
display: block;
|
||||||
|
font-size: 5rem;
|
||||||
|
margin: 0 auto;
|
||||||
|
letter-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photos.list > div > h6 > span {
|
||||||
|
text-align: end;
|
||||||
|
width: min-content;
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
padding-inline-end: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photos.list > div > h6 > span::after {
|
||||||
|
top: 6px;
|
||||||
|
right: 0px;
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
content: "⏵︎";
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
@media (max-width: calc(24px + 400px + 4px)) {
|
||||||
|
.photos.list > div > h6 > span {
|
||||||
|
width: max-content;
|
||||||
|
padding-block: calc(0.25 * var(--body-item-spacing));
|
||||||
|
}
|
||||||
|
.photos.list > div > h6 > span::after {
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.photo-params {
|
.photo-params {
|
||||||
|
|
|
@ -4,13 +4,14 @@
|
||||||
|
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{- $pages := (.Paginate (first 50 (.Pages.GroupByDate "January 2006"))).PageGroups -}}
|
{{- $pages := (.Paginate (first 50 (.Pages.GroupByDate "January 2006"))).PageGroups -}}
|
||||||
|
{{ $pages := .Pages.ByDate.GroupByDate "Jan 2006" }}
|
||||||
{{- range $pages -}}
|
{{- range $pages -}}
|
||||||
<h6>{{ .Key | title }}</h6>
|
<div>
|
||||||
<ul class="grid">
|
<h6><span>{{ .Key | title }}</span></h6>
|
||||||
|
</div>
|
||||||
{{- range .Pages -}}
|
{{- range .Pages -}}
|
||||||
{{- .Render "li_thumbnail_in_grid" -}}
|
{{- .Render "li_thumbnail_in_grid" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</ul>
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue