Fix styling of blog, photos, term, ruby
So many fixes!
This commit is contained in:
parent
b7070ccfd5
commit
a9cfddec80
21 changed files with 212 additions and 149 deletions
|
@ -1,11 +1,12 @@
|
||||||
/* Eryn Wells <eryn@erynwells.me> */
|
/* Eryn Wells <eryn@erynwells.me> */
|
||||||
|
|
||||||
a:has(> img) {
|
:has(> img) {
|
||||||
grid-column: content-start / content-end;
|
grid-column: content-start / content-end;
|
||||||
|
line-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 639px) {
|
@media (max-width: 639px) {
|
||||||
a:has(> img) {
|
:has(> img) {
|
||||||
grid-column: gutter-start / gutter-end;
|
grid-column: gutter-start / gutter-end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +15,6 @@ main {
|
||||||
gap: var(--body-item-spacing) 0;
|
gap: var(--body-item-spacing) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
main > article > :not(:last-child) {
|
article > :is(h1, h2, h3, h4, h5, h6) {
|
||||||
margin-block-end: var(--body-item-spacing);
|
grid-column: content-start / content-end;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
.photos.list > * {
|
.photos.list > * {
|
||||||
margin-block-end: 0;
|
margin-block-end: 0;
|
||||||
|
grid-column: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.photos.list > a {
|
.photos.list > a {
|
||||||
|
@ -40,13 +41,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.photos.list > a > img {
|
.photos.list > a > img {
|
||||||
border-radius: 3px;
|
|
||||||
image-orientation: from-image;
|
image-orientation: from-image;
|
||||||
}
|
}
|
||||||
|
|
||||||
.photos.list > div {
|
.photos.list > div {
|
||||||
background-color: var(--date-item-background-color);
|
background-color: var(--date-item-background-color);
|
||||||
border-radius: 3px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -80,25 +80,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer root {
|
@layer root {
|
||||||
a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
text-decoration-style: solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.hover-only {
|
|
||||||
color: var(--color);
|
|
||||||
transition: color 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.hover-only:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
transition: color 0.2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote {
|
blockquote {
|
||||||
--line-width: 4px;
|
--line-width: 4px;
|
||||||
|
|
||||||
|
@ -110,9 +91,6 @@
|
||||||
|
|
||||||
code {
|
code {
|
||||||
background-color: var(--body-code-background-color);
|
background-color: var(--body-code-background-color);
|
||||||
border-radius: 0.25rem;
|
|
||||||
display: inline-block;
|
|
||||||
padding-inline: 0.6rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
code.nobg {
|
code.nobg {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
@layer root {
|
:root {
|
||||||
:root {
|
--margin-min-width: var(--body-item-spacing);
|
||||||
--margin-min-width: var(--body-item-spacing);
|
--margin-max-width: 1fr;
|
||||||
--margin-max-width: 1fr;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
@layer root {
|
||||||
main {
|
main {
|
||||||
--content-columns: 5;
|
--content-columns: 5;
|
||||||
--gutter-width: 3rem;
|
--gutter-width: 3rem;
|
||||||
|
@ -17,7 +17,12 @@
|
||||||
[wide-content-left-end gutter-start gutter-left-start]
|
[wide-content-left-end gutter-start gutter-left-start]
|
||||||
var(--gutter-width)
|
var(--gutter-width)
|
||||||
[gutter-left-end content-start]
|
[gutter-left-end content-start]
|
||||||
repeat(var(--content-columns), min(calc((100% - 2 * var(--gutter-width)) / var(--content-columns)), calc(var(--content-width) / var(--content-columns))))
|
repeat(var(--content-columns),
|
||||||
|
min(
|
||||||
|
calc((100% - 2 * var(--gutter-width)) / var(--content-columns)),
|
||||||
|
calc(var(--content-width) / var(--content-columns))
|
||||||
|
)
|
||||||
|
)
|
||||||
[content-end gutter-right-start]
|
[content-end gutter-right-start]
|
||||||
var(--gutter-width)
|
var(--gutter-width)
|
||||||
[gutter-right-end gutter-end wide-content-right-start]
|
[gutter-right-end gutter-end wide-content-right-start]
|
||||||
|
@ -66,7 +71,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
main > :is(header, article, footer) {
|
main > * {
|
||||||
grid-column: gutter-start / gutter-end;
|
grid-column: content-start / content-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
main > figure,
|
||||||
|
main > a.to-photo-post {
|
||||||
|
grid-column: wide-content-start / wide-content-end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
34
assets/styles/root/010_links.css
Normal file
34
assets/styles/root/010_links.css
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
@layer root {
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a[href] {
|
||||||
|
color: var(--a-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
a[href]:visited {
|
||||||
|
color: var(--a-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
a[href]:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
text-decoration-style: solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.hover-only {
|
||||||
|
color: var(--color);
|
||||||
|
transition: color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.hover-only:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
transition: color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.hover-only { color: var(--color); }
|
||||||
|
|
||||||
|
a.hover-only:hover { color: var(--a-color); }
|
||||||
|
|
||||||
|
a rt, a:hover rt { color: var(--a-ruby-color); }
|
||||||
|
}
|
|
@ -8,7 +8,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
grid-column: content-start / content-end;
|
grid-column: gutter-start / gutter-end;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-inline: 0;
|
margin-inline: 0;
|
||||||
min-width: fit-content;
|
min-width: fit-content;
|
||||||
|
@ -42,7 +42,6 @@
|
||||||
figure img {
|
figure img {
|
||||||
display: block;
|
display: block;
|
||||||
height: auto;
|
height: auto;
|
||||||
max-width: var(--content-width);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 414px) {
|
@media (max-width: 414px) {
|
||||||
|
|
|
@ -17,9 +17,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.page > header > time {
|
|
||||||
}
|
|
||||||
|
|
||||||
.page > header,
|
.page > header,
|
||||||
.page > footer {
|
.page > footer {
|
||||||
grid-column: content-start / content-end;
|
grid-column: content-start / content-end;
|
||||||
|
@ -37,8 +34,8 @@
|
||||||
grid-column: gutter-start / gutter-end;
|
grid-column: gutter-start / gutter-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page > article > :not(blockquote, figure.code) {
|
.page > :not(blockquote, figure.code, :has(> img)) {
|
||||||
margin-inline: var(--gutter-width);
|
grid-column: content-start / content-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page > article > :not(:last-child) {
|
.page > article > :not(:last-child) {
|
||||||
|
|
|
@ -1,18 +1,23 @@
|
||||||
|
:root {
|
||||||
|
--list-item-block-gap: var(--body-item-spacing);
|
||||||
|
}
|
||||||
|
|
||||||
@layer section {
|
@layer section {
|
||||||
.blog.list {
|
.list {
|
||||||
gap: 8rem 0;
|
gap: var(--list-item-block-gap) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blog.list > h1.date {
|
.list > h1,
|
||||||
|
.list > header {
|
||||||
grid-column: content-start / content-end;
|
grid-column: content-start / content-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.blog.list > .post {
|
.list > .post {
|
||||||
grid-column: wide-content-start / wide-content-end;
|
grid-column: wide-content-start / wide-content-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@supports (grid-template-columns: subgrid) {
|
@supports (grid-template-columns: subgrid) {
|
||||||
.blog.list > .post {
|
.list > .post {
|
||||||
--body-item-spacing: 2rem;
|
--body-item-spacing: 2rem;
|
||||||
|
|
||||||
display: grid;
|
display: grid;
|
||||||
|
@ -21,32 +26,32 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post header {
|
.list .post header {
|
||||||
grid-column: wide-content-start / content-end;
|
grid-column: wide-content-start / content-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@supports (grid-template-columns: subgrid) {
|
@supports (grid-template-columns: subgrid) {
|
||||||
.post header {
|
.list .post header {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: subgrid;
|
grid-template-columns: subgrid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.post time {
|
.list .post time {
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
grid-column: wide-content-start;
|
grid-column: wide-content-start;
|
||||||
justify-self: end;
|
justify-self: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 960px) {
|
@media (max-width: 960px) {
|
||||||
.post time {
|
.list .post time {
|
||||||
grid-column: content-start / content-end;
|
grid-column: content-start / content-end;
|
||||||
justify-self: start;
|
justify-self: start;
|
||||||
line-height: var(--line-height);
|
line-height: var(--line-height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
article.post {
|
.post {
|
||||||
grid-column: gutter-start / gutter-end;
|
grid-column: gutter-start / gutter-end;
|
||||||
}
|
}
|
||||||
|
|
1
assets/styles/root/050_ruby.css
Normal file
1
assets/styles/root/050_ruby.css
Normal file
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -1,27 +1,33 @@
|
||||||
@layer root {
|
@layer root {
|
||||||
body:has(fieldset#ruby-controls > input[value=NONE]:checked) rt { display: none; }
|
#ruby-controls {
|
||||||
|
align-items: baseline;
|
||||||
|
display: flex;
|
||||||
|
padding: calc(var(--body-item-spacing) / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
body:has(#ruby-controls > input[value=NONE]:checked) rt { display: none; }
|
||||||
|
|
||||||
/* When ruby-controls is set to hidden, hide the ruby base and only show the <rt> */
|
/* When ruby-controls is set to hidden, hide the ruby base and only show the <rt> */
|
||||||
body:has(fieldset#ruby-controls > input[value=HIDDEN]:checked) ruby > span { display: none; }
|
body:has(#ruby-controls > input[value=HIDDEN]:checked) ruby > span { display: none; }
|
||||||
|
|
||||||
body:has(fieldset#ruby-controls > input[value=HIDDEN]:checked) rt {
|
body:has(#ruby-controls > input[value=HIDDEN]:checked) rt {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
display: inline;
|
display: inline;
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
white-space: inherit;
|
white-space: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
body:has(fieldset#ruby-controls > input[value=HIDDEN]:checked) :is(h1, h2, h3, h4, h5, h6) rt {
|
body:has(#ruby-controls > input[value=HIDDEN]:checked) :is(h1, h2, h3, h4, h5, h6) rt {
|
||||||
font-family: var(--font-family-heading);
|
font-family: var(--font-family-heading);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset#ruby-controls input[type=radio] {
|
fieldset#ruby-controls input[type=radio]:not(:last-child) {
|
||||||
margin-inline-end: calc(var(--body-item-spacing) / 6);
|
margin-inline-end: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
fieldset#ruby-controls label {
|
fieldset#ruby-controls label:not(:last-child) {
|
||||||
margin-inline-end: calc(var(--body-item-spacing));
|
margin-inline-end: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
rt { transition: color 0.3s; }
|
rt { transition: color 0.3s; }
|
||||||
|
|
|
@ -18,7 +18,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
header.site h1 > a:hover { text-decoration: none; }
|
header.site a[href],
|
||||||
|
header.site a[href]:hover {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
header.site {
|
header.site {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
@ -1,11 +1,24 @@
|
||||||
.highlight code {
|
@supports (grid-template-columns: subgrid) {
|
||||||
background-color: inherit;
|
figure.code,
|
||||||
margin-block: 0.5em;
|
figure.code > .highlight,
|
||||||
|
figure.code > .highlight > .chroma,
|
||||||
|
figure.code > .highlight > .chroma > code,
|
||||||
|
figure.code > .highlight > .chroma > code > .line {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: subgrid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line > .ln {
|
||||||
|
grid-column: gutter-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line > .cl {
|
||||||
|
grid-column: content-start / content-end;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight .line {
|
.highlight code {
|
||||||
display: grid;
|
background-color: inherit;
|
||||||
grid-template-columns: max-content auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight .ln a {
|
.highlight .ln a {
|
||||||
|
@ -17,4 +30,4 @@
|
||||||
|
|
||||||
.highlight .cl {
|
.highlight .cl {
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
aside#table-of-contents {
|
aside#table-of-contents {
|
||||||
grid-column: wide-content-right / margin-right;
|
grid-column: content-start / content-end;
|
||||||
grid-row: 1 / -1;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,12 +45,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a { color: var(--a-color); }
|
|
||||||
a:visited { color: var(--a-color); }
|
|
||||||
a.hover-only { color: var(--color); }
|
|
||||||
a.hover-only:hover { color: var(--a-color); }
|
|
||||||
a rt, a:hover rt { color: var(--a-ruby-color); }
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-size: var(--font-size);
|
font-size: var(--font-size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,29 +3,26 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<header class="page">
|
<header>
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{{ partial "table_of_contents.html" . }}
|
{{ partial "ruby_controls.html" . }}
|
||||||
{{ partial "ruby_controls.html" . }}
|
|
||||||
|
|
||||||
{{- $hasContent := false -}}
|
{{- $hasContent := false -}}
|
||||||
{{ with .Content }}
|
{{ with .Content }}
|
||||||
{{- $hasContent = true -}}
|
{{- $hasContent = true -}}
|
||||||
{{ . }}
|
{{ . }}
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if .Params.posts | default true }}
|
|
||||||
{{ if and $hasContent }}
|
|
||||||
<h2>Posts</h2>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<ul>
|
{{ if .Params.posts | default true }}
|
||||||
{{- range .Pages -}}
|
{{ if $hasContent }}
|
||||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
<h2>Posts</h2>
|
||||||
{{- end -}}
|
{{ end }}
|
||||||
</ul>
|
|
||||||
|
{{- range .Pages -}}
|
||||||
|
{{ .Render "li_grid_with_date" }}
|
||||||
|
{{- end -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
|
|
@ -3,20 +3,38 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<header class="page">
|
<header class="page">
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
</header>
|
</header>
|
||||||
|
<article>
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
{{ .Content }}
|
{{- range .Data.Terms.Alphabetical -}}
|
||||||
|
<h2>{{ .Name | title }}</h2>
|
||||||
|
|
||||||
{{- range .Data.Terms.Alphabetical -}}
|
{{- range .WeightedPages -}}
|
||||||
<h2>{{ .Name | title }}</h2>
|
<article class="post">
|
||||||
<ul>
|
<header>
|
||||||
{{- range .WeightedPages -}}
|
<time class="nobreak" datetime="{{ .Date | time.Format "2006-01-02" }}">{{ .Date | time.Format "Jan 2, 2006" }}</time>
|
||||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
<h1 class="title"><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
|
||||||
{{- end -}}
|
</header>
|
||||||
</ul>
|
|
||||||
{{- end -}}
|
{{ if .Description }}
|
||||||
|
<p>{{ .Description }}</p>
|
||||||
|
{{ else if lt .WordCount 110 }}
|
||||||
|
{{ .Content }}
|
||||||
|
{{ else }}
|
||||||
|
{{ warnf "Post \"%s\" doesn't have a description or content suitable for the blog list" .Title }}
|
||||||
|
<p>{{ .WordCount }} words</p>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ partial "footer_tags.html" . }}
|
||||||
|
|
||||||
|
{{ partial "development/draft_tag.html" . }}
|
||||||
|
</article>
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "footer" }}
|
{{ define "footer" }}
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{- range .Pages.ByDate.GroupByDate "2006" -}}
|
{{- range .Pages.ByDate.GroupByDate "2006" -}}
|
||||||
<h1 class="date"><a id="{{ .Key }}">{{ .Key | title }}</a></h1>
|
<h1 class="date"><a id="{{ .Key }}">{{ .Key | title }}</a></h1>
|
||||||
|
|
||||||
{{- range .Pages -}}
|
{{- range .Pages -}}
|
||||||
{{- if or (not .Draft) (not hugo.IsProduction) -}}
|
{{- if or (not .Draft) (not hugo.IsProduction) -}}
|
||||||
{{- .Render "li_grid_with_date" -}}
|
{{- .Render "li_grid_with_date" -}}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{{ if .HasShortcode "ruby" -}}
|
{{ if .HasShortcode "ruby" -}}
|
||||||
<aside>
|
<aside>
|
||||||
<fieldset id="ruby-controls">
|
<fieldset id=ruby-controls>
|
||||||
<legend>Ruby</legend>
|
<legend>Ruby</legend>
|
||||||
<input id="none" type="radio" name="ruby-controls" value="NONE">
|
<input id=ruby-controls-none type=radio name=ruby-controls value=NONE>
|
||||||
<label for="none">Japanese Only</label>
|
<label for=ruby-controls-none>Japanese Only</label>
|
||||||
<input id="both" type="radio" name="ruby-controls" value="BOTH" checked>
|
<input id=ruby-controls-both type=radio name=ruby-controls value=BOTH checked>
|
||||||
<label for="both">Both</label>
|
<label for=ruby-controls-both>Both</label>
|
||||||
<input id=hidden type=radio name=ruby-controls value=HIDDEN>
|
<input id=ruby-controls-hidden type=radio name=ruby-controls value=HIDDEN>
|
||||||
<label for=hidden>English Only</label>
|
<label for=ruby-controls-hidden>English Only</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</aside>
|
</aside>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
{{ partial "content_header.html" . }}
|
{{ partial "content_header.html" . }}
|
||||||
|
|
||||||
|
{{ partial "table_of_contents.html" . }}
|
||||||
|
|
||||||
{{- $layout := .Params.layout -}}
|
{{- $layout := .Params.layout -}}
|
||||||
<article{{ with $layout }} class="{{ . }}"{{ end }}>
|
{{- $content := .Content -}}
|
||||||
{{ .Content }}
|
{{ with $layout := .Params.layout }}
|
||||||
</article>
|
<article class="{{ $layout }}">
|
||||||
|
{{ $content }}
|
||||||
|
</article>
|
||||||
|
{{ else }}
|
||||||
|
{{ $content }}
|
||||||
|
{{ end}}
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
{{ partial "footer_tags.html" . }}
|
{{ partial "footer_tags.html" . }}
|
||||||
|
|
|
@ -3,41 +3,42 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{- if .Title -}}
|
{{- $photos := partial "photos/list.html" . -}}
|
||||||
{{ partial "content_header.html" . }}
|
{{ if eq (len $photos) 0 }}
|
||||||
{{- end -}}
|
{{ errorf "Missing photo from photos page %q" .Path }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{- $photos := partial "photos/list.html" . -}}
|
{{ if eq (len $photos) 1 }}
|
||||||
{{ if eq (len $photos) 0 }}
|
{{- $img := index $photos 0 -}}
|
||||||
{{ errorf "Missing photo from photos page %q" .Path }}
|
<figure>
|
||||||
{{ end }}
|
<img src="{{ $img.RelPermalink }}"{{ with $img.Params.alt }} alt="{{ . }}"{{ end }}>
|
||||||
|
</figure>
|
||||||
|
|
||||||
{{ if eq (len $photos) 1 }}
|
<article>
|
||||||
{{- $img := index $photos 0 -}}
|
<h1>{{ .Title }}</h1>
|
||||||
<figure><img src="{{ $img.RelPermalink }}"{{ with $img.Params.alt }} alt="{{ . }}"{{ end }}></figure>
|
{{ .Content }}
|
||||||
|
</article>
|
||||||
|
|
||||||
{{ .Content }}
|
{{- if .Params.photo_details | default true -}}
|
||||||
|
{{- partial "photo_exif_table.html" $img.Exif -}}
|
||||||
|
|
||||||
{{- if .Params.photo_details | default true -}}
|
{{- if in ($.Site.BaseURL | string) "localhost" -}}
|
||||||
{{- partial "photo_exif_table.html" $img.Exif -}}
|
{{- partial "development/photo_exif_table.html" $img.Exif -}}
|
||||||
|
|
||||||
{{- if in ($.Site.BaseURL | string) "localhost" -}}
|
|
||||||
{{- partial "development/photo_exif_table.html" $img.Exif -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
|
||||||
{{ else }}
|
|
||||||
<figure>
|
|
||||||
<ul class="carousel">
|
|
||||||
{{- range $photos -}}
|
|
||||||
<li>{{ . }}</li>
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</ul>
|
{{- end -}}
|
||||||
</figure>
|
{{ else }}
|
||||||
{{ end }}
|
<figure>
|
||||||
|
<ul class="carousel">
|
||||||
|
{{- range $photos -}}
|
||||||
|
<li>{{ . }}</li>
|
||||||
|
{{- end -}}
|
||||||
|
</ul>
|
||||||
|
</figure>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
{{ partial "footer_tags.html" . }}
|
{{ partial "footer_tags.html" . }}
|
||||||
</footer>
|
</footer>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "footer" }}
|
{{ define "footer" }}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{{- with $photoPage := $.Page.GetPage (printf "photos/%s" (.Get 0)) -}}
|
{{- with $photoPage := $.Page.GetPage (printf "photos/%s" (.Get 0)) -}}
|
||||||
{{- $thumbnail := partial "photos/thumbnail.html" (dict "Page" . "Width" 1280 "Height" 1280) -}}
|
{{- $thumbnail := partial "photos/thumbnail.html" (dict "Page" . "Width" 1280 "Height" 1280) -}}
|
||||||
{{- $altText := $thumbnail.Params.alt | default .Title -}}
|
{{- $altText := $thumbnail.Params.alt | default .Title -}}
|
||||||
<a href="{{ .RelPermalink }}" title="{{ .Title }}">
|
<a class="to-photo-post" href="{{ .RelPermalink }}" title="{{ .Title }}">
|
||||||
<img src="{{ $thumbnail.RelPermalink }}"{{ with $altText }} alt="{{ . }}"{{ end }}>
|
<img src="{{ $thumbnail.RelPermalink }}"{{ with $altText }} alt="{{ . }}"{{ end }}>
|
||||||
</a>
|
</a>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue