Add publishers & contributor maps #66

Merged
aadil merged 39 commits from feature/leaflet-map into main 2023-09-11 09:50:48 +00:00
4 changed files with 59 additions and 30 deletions
Showing only changes of commit 798e30ad46 - Show all commits

View File

@ -2,3 +2,5 @@
draft: false draft: false
--- ---
<h1>Lumbung of Publishers</h1> <h1>Lumbung of Publishers</h1>
{{< map geoJson="data/lumbung-publishers-members.json">}}

View File

@ -1,26 +1,46 @@
<div class='publishers card {{ .Params.feed_name }}'> <div class='publishers social card' data-section="{{ .Section }}">
<article class="h-entry publishers"> <article class="h-entry social">
{{ $postPermalink := .Permalink}} <header>
<a href="{{ .Permalink }}" class="link-wrapper"> {{ $postPermalink := .Permalink}}
<header> <h2 class="p-name"><a href="{{ .Permalink }}" class="u-url">
<h2 class="p-name">
{{ .Title }} {{ .Title }}
</h2> </a></h2>
</header> </header>
<div class="p-summary">
<div class="summary-text">
{{ .Summary }}...
</div>
</div>
<footer class='post-footer'> {{ with (index (.Resources.ByType "video") 0) }}
<svg width="11" height="11" viewBox="0 0 11 11" xmlns="http://www.w3.org/2000/svg"> {{/* TODO this current logic does not suport video & image mixed */}}
<path d="M10.2172 3.892C9.86979 3.02585 9.33722 2.34509 8.61023 1.77874C8.23826 1.49028 7.72957 1.04191 7.21547 0.839212C7.21382 0.703503 7.14487 0.575079 6.97767 0.503871C5.42624 -0.162284 3.69503 0.311299 2.52647 1.51482C1.94635 2.11223 1.51951 2.8478 1.21108 3.62501C0.914861 4.3676 0.507572 5.32483 0.948415 6.07996C1.00646 6.17836 1.09356 6.24193 1.1908 6.27306C1.2735 7.35573 1.57765 8.46801 2.37847 9.21874C3.2325 10.0162 4.43613 10.3053 5.5673 10.1773C6.72371 10.0468 7.96432 9.57061 8.8816 8.82474C9.01086 8.71974 9.1274 8.60844 9.23337 8.49296C9.27968 8.4924 9.32805 8.4875 9.37839 8.4718C11.3643 7.82491 10.8101 5.37347 10.2172 3.892Z" /> <div class="p-summary">
</svg> <video controls width="540px" preload="none" poster="{{ $postPermalink }}/thumbnail.png">
<time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}"> <source src="{{.Permalink}}" type="video/mp4">
{{ .Date.Format "Jan 02, 2006" }} </video>
</time> {{ else}}
</footer> {{ with (index (.Resources.ByType "image") 0) }}
</a> {{ $height := add .Height 0.0}}
{{ $ratio := div $height .Width}}
{{ $thumb := .Fit "540x540 q80 webp"}}
<div class="p-summary{{if gt $ratio 1 }} portrait {{else}} landscape {{end}}">
<div class="summary-image {{if gt $ratio 1 }} portrait {{else}} landscape {{end}}">
<a href="{{ $postPermalink }}"><img src="{{ $thumb.Permalink }}" alt="{{ .Title }}"> </a>
</div>
{{ else }}
<div class="p-summary">
{{ end }}
{{ end }}
<div class="summary-text">
{{ .Summary }}
</div>
</div>
<div class="social-source"></div>
<footer class='post-footer'>
<div class='footer-metadata'>
<span class="from p-author">{{ if .Params.contributors }}From {{range .Params.contributors}}<b> <a href='{{ "/contributors/" | relLangURL }}{{ . | urlize }}/'> {{ . }}</a> {{end}}</b> on{{ end }}</span>
<time class="dt-published" datetime="{{ .Date.Format `Jan 02 2006` }}">{{ .Date.Format "Jan 02, 2006" }}</time>
</div>
{{ if .Truncated }}
<div class="footer-filler" style="border-color: transparent" ></div>
<div class='read-more'><a href="{{ .RelPermalink }}">Read More…</a></div>
{{ end }}
</footer>
</article> </article>
</div> </div>

View File

@ -1,16 +1,13 @@
{{ define "main" }} {{ define "main" }}
<main class="publishers-page"> <main class="publishers-page">
{{.Content}} {{.Content}}
<section class='entries'> <section class='entries'>
<div class="h-feed"> <div class="h-feed">
{{ range where (.Paginator 13).Pages "Params.hidden" "ne" "true" }} {{ range where site.RegularPages "Type" "publishers" }}
{{- partial "publishers_post_card.html" . -}} <div class="post">
{{ partial "partials/publishers_post_card.html" . -}}
</div>
{{ end }} {{ end }}
</div> </div>
<nav class="pagination">
{{ template "_internal/pagination.html" . }}
</nav>
</main> </main>
{{ end }} {{ end }}

View File

@ -1011,6 +1011,16 @@ label:hover {
text-align: center; text-align: center;
} }
/* publishers card */
.publishers.card {
display: flex;
}
/* publishers map */
#map {
margin-bottom: 4rem;
}
/* Paginator */ /* Paginator */