Files
personal-website/layouts/partials/card.html
T
hazemKrimi eae27cb10e chore: new blog post and small patches (#3)
* wip: blog post on open source

* wip: initial draft of the blog post

* chore: remove sharing a blog post

* fix: broken style from previous commit

* chore: improve handling keywords
2025-05-15 20:47:14 +01:00

28 lines
1014 B
HTML

<article class="card">
<div>
<h3>{{ .Title }}</h3>
{{ if .InSection ($.Site.GetPage "blog") }}
<b>{{ .Date.Format .Site.Params.dateFormat }}</b>
{{ end }}
<p>{{ .Params.description }}</p>
<div id="links">
<a
class="read-more"
href="{{ if (.InSection ($.Site.GetPage "projects")) }} {{ .Params.source }} {{ else }} {{ .Permalink }} {{ end }}"
target="{{ if (.InSection ($.Site.GetPage "projects")) }}_blank{{ else }}_self{{ end }}"
>
{{ if (.InSection ($.Site.GetPage "projects")) }}
Source code {{ readFile "assets/icons/arrow.svg" | safeHTML }}
{{ else }}
Read this blog post {{ readFile "assets/icons/arrow.svg" | safeHTML }}
{{ end }}
</a>
{{ with (and (.InSection ($.Site.GetPage "projects")) .Params.demo) }}
<a class="demo" href="{{ . }}" target="_blank">
Demo {{ readFile "assets/icons/eye.svg" | safeHTML }}
</a>
{{ end }}
</div>
</div>
</article>