6 Commits

Author SHA1 Message Date
rra
d0fd3f018e found the culprit 2024-11-25 18:10:12 +01:00
rra
86c9df0c66 use first image in content as featured image using regex, hugo forum topic 52527 2024-11-25 17:04:52 +01:00
rra
5fe7cacea3 enable CJK language flag to properly trim summaries in asian scripts 2024-11-25 16:57:41 +01:00
rra
f68fc86ca3 fix pen cards / broken liks
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-25 10:11:17 +01:00
rra
a722904938 page resources are returned in reverse, so get the last image rather than the first
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-24 12:03:07 +01:00
rra
856ff9851e minor changes to single pages, centering and showing metadata 2024-11-24 11:40:39 +01:00
19 changed files with 115 additions and 12 deletions

View File

@ -4,6 +4,7 @@ title = "lumbung.space"
theme = "lumbung-theme" theme = "lumbung-theme"
pluralizeListTitles = "false" pluralizeListTitles = "false"
paginate = 20 paginate = 20
hasCJKlanguage = "true"
[params] [params]
logo = "/img/logo.svg" logo = "/img/logo.svg"

View File

@ -0,0 +1,17 @@
---
title: "Harvesting: Majelis in Casco Art Institute 15th & 16th March 24"
date: "2024-04-18 07:39:51+00:00" #2021-06-10T10:46:33+02:00
draft: false
summary: ""
contributors: ["aline_crater"]
original_link: "https://pen.lumbung.space/2024/04/18/harvesting-majelis-in-casco-art-institute-15th-16th-march-24/"
feed_name: "pen.lumbung.space"
card_type: "pen"
sources: ["pen.lumbung.space"]
tags: ['majelis', 'documentafifteen', 'lumbung', 'lumbungdotspace', 'lumbungkios']
---
<figure class="wp-block-image size-large"><img alt="" class="wp-image-2165" height="724" src="diagrama_2-1024x724.jpg" width="1024"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-2167" height="724" src="diagrama_3-1024x724.jpg" width="1024"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-2168" height="724" src="diagrama_1-1-1024x724.jpg" width="1024"/></figure>

View File

@ -0,0 +1,20 @@
---
title: "Harvesting: Majelis in Nieuwe Instituut 8th March 24"
date: "2024-03-08 00:08:37+00:00" #2021-06-10T10:46:33+02:00
draft: false
summary: ""
contributors: ["dianoninoo"]
original_link: "https://pen.lumbung.space/2024/03/08/harvesting-majelis-in-nieuwe-instituut-8th-march-24/"
feed_name: "pen.lumbung.space"
card_type: "pen"
sources: ["pen.lumbung.space"]
tags: ['majelis', 'documentafifteen']
---
<figure class="wp-block-image size-large"><img alt="" class="wp-image-2148" height="701" src="1_diana-cantarey_harvesting-rotterdam-1024x701.png" width="1024"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-2149" height="1024" src="2_diana-cantarey_harvesting-rotterdam-768x1024.png" width="768"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-2152" height="1024" src="3_diana-cantarey_harvesting-rotterdam-768x1024.png" width="768"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-2150" height="706" src="4_diana-cantarey_harvesting-rotterdam-1024x706.png" width="1024"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-2153" height="768" src="5_diana-cantarey_harvesting-rotterdam-1024x768.png" width="1024"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-2151" height="1024" src="6_diana-cantarey_harvesting-rotterdam-768x1024.png" width="768"/></figure>

Binary file not shown.

View File

@ -0,0 +1,25 @@
---
title: "test-post"
date: "2024-11-24" #2021-06-10T10:46:33+02:00
draft: false
summary: ""
contributors: ["cem"]
original_link: "https://pen.lumbung.space/timeline/majelis-akbar-harvest-by-community-immunity-january-2022/"
feed_name: "pen.lumbung.space"
sources: ["timeline", "pen.lumbung.space"]
timelines: ['Community Immunity', 'drawing', 'Majelis Akbar']
hidden: true
---
<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-12 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><img alt="" class="wp-image-1130" src="doc15Jan26-1.tiff"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-1134" src="doc15Jan26-2.tiff"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-1133" src="doc15Jan26-3.tiff"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-1132" src="doc15Jan26-4.tiff"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-1137" src="doc15Jan26-5.tiff"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-1136" src="doc15Jan26-6.tiff"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-1135" src="doc15Jan26-7.tiff"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-1138" src="doc15Jan26-8.tiff"/></figure>
<figure class="wp-block-image size-large"><img alt="" class="wp-image-1131" src="doc15Jan26-9.tiff"/></figure>
</figure>
<p></p>

View File

@ -22,6 +22,9 @@
{{- partial "partials/shout_card.html" . -}} {{- partial "partials/shout_card.html" . -}}
{{ end }} {{ end }}
{{ else if in .Params.sources "pen.lumbung.space" }}
{{- partial "partials/pen_card.html" . -}}
{{ else if eq .Section "social" }} {{ else if eq .Section "social" }}
{{- partial "partials/social_card.html" . -}} {{- partial "partials/social_card.html" . -}}

View File

@ -2,13 +2,11 @@
<main class="main single"> <main class="main single">
<article class="h-entry"> <article class="h-entry">
<header> <header>
<h1 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h1> <h1 class="p-name single"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h1>
<p> <div class="metadata"><span class="from p-author">{{ if .Params.contributors }}By <b>{{range .Params.contributors}} <a href='{{ "/contributors/" | relLangURL }}{{ . | urlize }}/'> {{ . }},</a> {{ end }}</b>{{ end }} {{with .Params.original_link }}originally posted on <b><a href="{{ . }}">{{ end }}{{ .Params.feed_name }}</a></b> on <time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time></span></div>
Published by <a class="p-author" href="/about">{{ $.Param "author" }}</a> </header>
on <time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time>
</p>
<div class="e-content"> <div class="e-content">
{{with .Params.featured_image}}<img src="{{.}}"></img>{{end}}
{{ .Content }} {{ .Content }}
</div> </div>
</article> </article>

View File

@ -1,14 +1,14 @@
<div class='pen card {{ .Params.feed_name }} filter-item' data-section="{{ .Section }}" data-sources='{{- partial "data/sources.html" . -}}' data-contributors='{{- partial "data/contributors.html" . -}}' data-tags='{{- partial "data/tags.html" . -}}'> <div class='pen card {{ .Params.feed_name }} filter-item' data-section="{{ .Section }}" data-sources='{{- partial "data/sources.html" . -}}' data-contributors='{{- partial "data/contributors.html" . -}}' data-tags='{{- partial "data/tags.html" . -}}'>
<article class="h-entry pen"> <article class="h-entry pen">
<header> <header>
<div class="pen-source"><span class="from p-author">From {{ if .Params.author }}<b>{{.Params.author}}</b> at {{ end }}<a href="{{ "/categories/" | relLangURL }}{{ .Params.feed_name | urlize }}">{{ .Params.feed_name }}</a></span></div> <div class="pen-source"><span class="from p-author">From {{ if .Params.author }}<b>{{.Params.author}}</b> at {{ end }}<a href="{{ "/sources/" | relLangURL }}{{ .Params.feed_name | urlize }}">{{ .Params.feed_name }}</a></span></div>
{{ $postPermalink := .Permalink}} {{ $postPermalink := .Permalink}}
<time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time> <time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time>
<h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h2> <h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">{{ .Title }}</a></h2>
</header> </header>
{{ with (index (.Resources.ByType "image") 0) }} {{ with (index (.Resources.ByType "image") 0) }}
{{ $height := add .Height 0.0}} {{ $height := add .Height 0.0}}
{{ $ratio := div $height .Width}} {{ $ratio := div $height .Width}}
@ -24,7 +24,19 @@
{{ .Summary }} {{ .Summary }}
</div> </div>
</div> </div>
<small>this should show the first image in the content</small>
{{$first_image := ""}}
{{$matches := findRESubmatch `<img\s.*?src=(?:'|")([^'">]+)(?:'|")` .Content 1 }}
{{range $matches}}{{$first_image = index . 1}}{{end}}
{{with .Resources.Get $first_image}}
{{if .ResourceType}}
{{.ResourceType}}
{{.MediaType}}
<img src="{{ .Permalink }}" alt="">
{{/* uncomment below to crash the build*/}}
{{.Width}}
{{end}}
{{end}}
<footer class='post-footer'> <footer class='post-footer'>
<a href="{{ .RelPermalink }}"> <a href="{{ .RelPermalink }}">
<svg width="11" height="11" viewBox="0 0 11 11" xmlns="http://www.w3.org/2000/svg"> <svg width="11" height="11" viewBox="0 0 11 11" xmlns="http://www.w3.org/2000/svg">

View File

@ -19,7 +19,8 @@
</div> </div>
{{end}} {{end}}
{{ else if (.Resources.ByType "image") }} {{ else if (.Resources.ByType "image") }}
{{ with (index (.Resources.ByType "image") 0) }} {{/* Somehow the image resources are iterated in reverse, so we need to get the last one*/}}
{{ range last 1 (.Resources.ByType "image") }}
{{ $img := . }} {{ $img := . }}
{{ $height := add .Height 0.0}} {{ $height := add .Height 0.0}}
{{ $ratio := div $height .Width}} {{ $ratio := div $height .Width}}

View File

@ -86,6 +86,7 @@ a {
.container .single { .container .single {
max-width: 65ch; max-width: 65ch;
margin: auto;
} }
.card { .card {
@ -558,8 +559,8 @@ footer.post-footer {
flex-direction: column; flex-direction: column;
} }
.shout .p-summary.landscape { .shout .p-summary.landscape
flex-direction: column; { flex-direction: column;
} }
.shout .summary-image > img { .shout .summary-image > img {
@ -1942,6 +1943,10 @@ input:checked + label + .description {
height: auto; height: auto;
} }
.single header{
margin:0;
}
.single .h-entry figure{ .single .h-entry figure{
margin: 0 0 20px; margin: 0 0 20px;
} }
@ -1950,6 +1955,27 @@ input:checked + label + .description {
margin: 0; margin: 0;
} }
.single h1 {
padding: 0.5rem;
background: #fff;
width:100%;
}
.e-content{
padding:1em;
}
.single .metadata{
border: 2px solid #333;
font-size: 14px;
padding: 0.5rem;
align-items: center;
background: #e8e8e8;
position:relative;
width:calc(100% + 2em);
right:1em;
}
/* lumbung radio player widget */ /* lumbung radio player widget */
.lumbung-radio-player { .lumbung-radio-player {
display: flex; display: flex;