A archetypes/pic/index.md => archetypes/pic/index.md +2 -0
M layouts/partials/nav.html => layouts/partials/nav.html +4 -1
@@ 3,7 3,10 @@
<ul class="nav navbar-nav">
{{ range .Site.Menus.main }}
<li>
- <a class="{{- if eq $currentPage.RelPermalink .URL -}}open{{- end -}}"
+ {{ $active := or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}
+ {{ $active = or $active (eq .Name $currentPage.Title) }}
+ {{ $active = or $active (eq .Name $currentPage.Section) }}
+ <a class="{{- if $active -}}open{{- end -}}"
href="{{ .URL }}">
<span>{{ .Name }}</span>
</a>
A layouts/pics/list.html => layouts/pics/list.html +26 -0
@@ 0,0 1,26 @@
+{{ define "main" }}
+<div>
+ {{- partial "language.html" . -}}
+ {{ with .Title }}<h1>{{ . | humanize }}</h1>{{ end }}
+ <hr>
+ {{ with .Content }}<div>{{ . }}</div>{{ end }}
+</div>
+
+{{ $totalPages := len .Pages }}
+{{ if eq $totalPages 0 }}
+{{ i18n "noRecordsFound" }}
+{{ end }}
+{{ range $index, $page := .Pages }}
+ {{ if eq (mod $index 3) 0 }}
+ <div class="gallery--3">
+ {{ end }}
+ <a href="{{ .RelPermalink }}">
+ {{ with index (.Resources) 0 }}
+ <img src="{{ .RelPermalink }}">
+ {{ end }}
+ </a>
+ {{ if or (and (eq (mod $index 4) 0) (ne $index 0)) (eq (sub $totalPages 1) $index) }}
+ </div>
+ {{ end }}
+{{ end }}
+{{ end }}
A layouts/pics/single.html => layouts/pics/single.html +31 -0
@@ 0,0 1,31 @@
+{{ define "main" }}
+<article>
+ {{- partial "language.html" . -}}
+ <h1>{{ .Title }}</h1>
+ <h6>
+ {{ .Params.Subtitle }}
+ </h6>
+ {{- partial "meta.html" . -}}
+ <hr>
+
+ <div>
+ {{ with index (.Resources) 0 }}
+ <img src="{{ .RelPermalink }}"></br>
+ {{ end }}
+ {{ .Description }}
+ {{ .Content }}
+ </div>
+ <hr>
+ {{- partial "hashtags.html" . -}}
+</article>
+
+{{ $related := .Site.RegularPages.Related . | first 5 }}
+{{ with $related }}
+<h3>{{ i18n "related" }}</h3>
+<ul class="small">
+ {{- range . }}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{ end }}
+</ul>
+{{ end }}
+{{ end }}
A layouts/shortcodes/gallery.html => layouts/shortcodes/gallery.html +3 -0
@@ 0,0 1,3 @@
+<div class="gallery--3">
+ {{- .Inner -}}
+</div>
A layouts/shortcodes/img.html => layouts/shortcodes/img.html +1 -0
@@ 0,0 1,1 @@
+<img src="/img/{{ .Page.Slug }}{{.Get "src" }}" alt="">
M static/css/style.css => static/css/style.css +42 -0
@@ 18,6 18,10 @@ body {
line-height: 1.4em;
}
+p {
+ text-align: justify;
+}
+
li {
padding-bottom: 0.2em;
}
@@ 275,6 279,36 @@ img {
font-family: Apple Color Emoji, Segoe UI Emoji, NotoColorEmoji, Segoe UI Symbol, Android Emoji, EmojiSymbols;
}
+.gallery--3 img {
+ width: 32%;
+}
+
+.gallery--2 img {
+ width: 49%;
+ padding-right: 0.2em;
+}
+
+.xps {
+ display: flex;
+ flex-direction: column;
+}
+
+.xp {
+ margin-top: 1em;
+ width: 100%;
+}
+
+.xp-title {
+ background-color: lightgray;
+ font-weight: bold;
+}
+
+.xp-org {
+}
+
+.xp-location {
+}
+
@media only screen and (max-width:632px) {
#content {
flex-direction: column-reverse;
@@ 296,6 330,10 @@ img {
list-style: none;
}
+ ul {
+ padding-left: 1em;
+ }
+
#footer {
position: inherit;
}
@@ 315,4 353,8 @@ img {
.mermaid-container {
overflow-x: auto;
}
+
+ .gallery--2 img {
+ width: 48%;
+ }
}