diff options
author | jaseg <git@jaseg.de> | 2023-03-19 18:57:48 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-03-19 18:57:48 +0100 |
commit | 3c6957467fc401648369905efae98c0a228af752 (patch) | |
tree | 089c356429fdcfc4027c0f7c1ac50f6d1cf9d095 /themes | |
parent | c55e92fe93ebb31ba8d46928313dc1d6a08f448d (diff) | |
download | blog-3c6957467fc401648369905efae98c0a228af752.tar.gz blog-3c6957467fc401648369905efae98c0a228af752.tar.bz2 blog-3c6957467fc401648369905efae98c0a228af752.zip |
Update project link display
Diffstat (limited to 'themes')
-rw-r--r-- | themes/conspiracy/assets/css/style.css | 44 | ||||
-rw-r--r-- | themes/conspiracy/layouts/_default/single.html | 7 | ||||
-rw-r--r-- | themes/conspiracy/layouts/index.html | 17 | ||||
-rw-r--r-- | themes/conspiracy/layouts/partials/card.html | 2 | ||||
-rw-r--r-- | themes/conspiracy/layouts/partials/footer.html | 2 |
5 files changed, 62 insertions, 10 deletions
diff --git a/themes/conspiracy/assets/css/style.css b/themes/conspiracy/assets/css/style.css index f03f4ac..01854ec 100644 --- a/themes/conspiracy/assets/css/style.css +++ b/themes/conspiracy/assets/css/style.css @@ -214,12 +214,36 @@ main.cards { background-color: #1f232a; } +.pagination-links { + width: 100%; + display: flex; + justify-content: center; + align-items: stretch; +} + +.pagination-links > a { + background-color: #272c35; + box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.2); + padding: 10px 20px 10px 20px; +} + +.arrow-right { + display: inline-block; + width: 0; + height: 0; + border-top: .3rem solid transparent; + border-bottom: .3rem solid transparent; + border-left: .3rem solid ; + margin-bottom: .05rem; + margin-left: 5px; +} + .card { background-color: #272c35; box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.2); padding: 30px 20px 30px 20px; margin-top: 50px; - + margin-bottom: 30px; } .card > .links { @@ -239,6 +263,24 @@ main.cards { text-align: center; } +main > .links { + margin: 20px 0px 40px 0px; + border: 0.5px dotted rgba(255, 255, 255, 0.3); + border-left: none; + border-right: none; + width: calc(100%); + max-width: calc(100%); + display: flex; + flex-flow: row wrap; + justify-content: space-around; +} + +main > .links > a { + padding: 10px 10px 10px 10px; + flex-grow: 1; + text-align: center; +} + /* un-mess-up rst2html output */ .card > .summary > .document, .card > .summary > .document > p { display: inline; diff --git a/themes/conspiracy/layouts/_default/single.html b/themes/conspiracy/layouts/_default/single.html index 9f3ff8d..231daf7 100644 --- a/themes/conspiracy/layouts/_default/single.html +++ b/themes/conspiracy/layouts/_default/single.html @@ -7,6 +7,13 @@ </header> {{- end }} <main> + {{- if .Params.external_links }} + <div class="links"> + {{- range .Params.external_links }} + <a href="{{ .url | absURL }}">{{ .name }}</a> + {{- end }} + </div> + {{- end }} {{ .Content }} </main> {{- end }} diff --git a/themes/conspiracy/layouts/index.html b/themes/conspiracy/layouts/index.html index 28b5cc5..ab68f27 100644 --- a/themes/conspiracy/layouts/index.html +++ b/themes/conspiracy/layouts/index.html @@ -9,14 +9,17 @@ </div> {{- end }} - <h2>Recently updated projects</h2> - {{ range first 2 (where site.RegularPages "Section" "==" "projects") }} - {{ partial "card.html" . }} - {{- end }} + {{- range site.Params.homepage_categories }} + <h2>{{ .title }}</h2> + {{- range first .count (where site.RegularPages "Section" "==" .key) }} + {{ partial "card.html" . }} + {{- end }} - <h2>Blog</h2> - {{ range (where site.RegularPages "Section" "==" "blog") }} - {{ partial "card.html" . }} + <div class="pagination-links"> + {{- with site.GetPage (printf "/%s" .key) }} + <a href="{{ .RelPermalink }}">See more<span class="arrow-right"></span></a> + {{- end }} + </div> {{- end }} </main> {{- end }} diff --git a/themes/conspiracy/layouts/partials/card.html b/themes/conspiracy/layouts/partials/card.html index 167a9d5..65ea2e7 100644 --- a/themes/conspiracy/layouts/partials/card.html +++ b/themes/conspiracy/layouts/partials/card.html @@ -10,7 +10,7 @@ {{- if .Params.external_links }} <div class="links"> {{- range .Params.external_links }} - <a href="{{ .url }}">{{ .name }}</a> + <a href="{{ .url | absURL }}">{{ .name }}</a> {{- end }} </div> {{- end }} diff --git a/themes/conspiracy/layouts/partials/footer.html b/themes/conspiracy/layouts/partials/footer.html index 6071d43..adf7aee 100644 --- a/themes/conspiracy/layouts/partials/footer.html +++ b/themes/conspiracy/layouts/partials/footer.html @@ -1,6 +1,6 @@ <footer> Copyright © {{ now.Year }} {{ site.Copyright }} {{- range site.Params.footer_links }} - / <a href="{{.url | absURL }}">{{ .name }}</a> + / <a href="{{.url | relURL }}">{{ .name }}</a> {{- end }} </footer> |