Downloaded theme
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
{{/* props: Page (post page) */}}
|
||||
{{- $p := .Page -}}
|
||||
{{- $icon := $p.Params.icon | default "fa-regular fa-file-lines" -}}
|
||||
{{- $category := $p.Params.category | default "Article" -}}
|
||||
|
||||
<article class="card card-pad card-home card-home--post group">
|
||||
<a href="{{ $p.RelPermalink }}" class="card-home-body">
|
||||
<div class="card-home-header">
|
||||
<div class="card-home-icon card-home-icon--post">
|
||||
<i class="{{ $icon }}"></i>
|
||||
</div>
|
||||
|
||||
<div class="min-w-0">
|
||||
<div class="flex items-start justify-between gap-2">
|
||||
<div class="min-w-0">
|
||||
<h3 class="truncate text-sm font-semibold tracking-tight group-hover:text-accent">
|
||||
{{ $p.Title }}
|
||||
</h3>
|
||||
|
||||
<div class="mt-0.5 flex flex-wrap items-center gap-2 text-[0.68rem] text-muted">
|
||||
{{ with $p.Date }}
|
||||
<span>{{ .Format "02 Jan 2006" }}</span>
|
||||
{{ end }}
|
||||
{{ with $p.ReadingTime }}
|
||||
<span>• {{ . }} min read</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ with $category }}
|
||||
<span class="card-badge card-badge--soft">
|
||||
{{ . }}
|
||||
</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ with $p.Params.description }}
|
||||
<p class="mt-2 text-xs text-muted">
|
||||
{{ . }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $p.Params.tags }}
|
||||
<div class="mt-3 card-tag-row">
|
||||
{{ range first 3 . }}
|
||||
<span class="card-tag-pill">{{ . }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</a>
|
||||
</article>
|
||||
@@ -0,0 +1,87 @@
|
||||
{{/* props: Page (project page) */}}
|
||||
{{- $p := .Page -}}
|
||||
|
||||
{{- $icon := $p.Params.icon | default "fa-solid fa-folder-tree" -}}
|
||||
{{- $badge := cond ($p.Params.featured) "Featured" "" -}}
|
||||
|
||||
{{- $repo := $p.Params.repo -}}
|
||||
{{- $repoIcon := $p.Params.repoIcon | default "fa-brands fa-github" -}}
|
||||
{{- $repoLabel := $p.Params.repoLabel | default "Repo" -}}
|
||||
|
||||
{{- $demo := $p.Params.demo -}}
|
||||
{{- $demoIcon := $p.Params.demoIcon | default "fa-solid fa-play" -}}
|
||||
{{- $demoLabel := $p.Params.demoLabel | default "Demo" -}}
|
||||
|
||||
{{- $website := $p.Params.website -}}
|
||||
{{- $websiteIcon := $p.Params.websiteIcon | default "fa-solid fa-globe" -}}
|
||||
{{- $websiteLabel := $p.Params.websiteLabel | default "Website" -}}
|
||||
|
||||
<article class="card card-pad card-home card-home--project group">
|
||||
<!-- Entire main body is clickable -->
|
||||
<a href="{{ $p.RelPermalink }}" class="card-home-body">
|
||||
<div class="card-home-header">
|
||||
<div class="card-home-icon">
|
||||
<i class="{{ $icon }}"></i>
|
||||
</div>
|
||||
|
||||
<div class="min-w-0">
|
||||
<div class="inline-flex items-center gap-1">
|
||||
<h3 class="truncate text-sm font-semibold tracking-tight group-hover:text-accent">
|
||||
{{ $p.Title }}
|
||||
</h3>
|
||||
{{ with $badge }}
|
||||
<span class="card-badge">{{ . }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ with $p.Params.subtitle }}
|
||||
<p class="mt-0.5 truncate text-[0.7rem] text-muted">
|
||||
{{ . }}
|
||||
</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ with $p.Params.description }}
|
||||
<p class="mt-2 text-xs text-muted">
|
||||
{{ . }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $p.Params.stack }}
|
||||
<div class="mt-3 card-tag-row">
|
||||
{{ range . }}
|
||||
<span class="card-tag-pill">{{ . }}</span>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</a>
|
||||
|
||||
<!-- Footer buttons: repo, demo, website -->
|
||||
<div class="card-home-footer card-home-footer--buttons">
|
||||
<div class="flex items-center gap-2">
|
||||
|
||||
{{ with $repo }}
|
||||
<a href="{{ . }}" class="card-cta-btn" target="_blank" rel="noopener noreferrer">
|
||||
<i class="{{ $repoIcon }} text-[0.75rem]"></i>
|
||||
<span>{{ $repoLabel }}</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ with $demo }}
|
||||
<a href="{{ . }}" class="card-cta-btn" target="_blank" rel="noopener noreferrer">
|
||||
<i class="{{ $demoIcon }} text-[0.75rem]"></i>
|
||||
<span>{{ $demoLabel }}</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ with $website }}
|
||||
<a href="{{ . }}" class="card-cta-btn" target="_blank" rel="noopener noreferrer">
|
||||
<i class="{{ $websiteIcon }} text-[0.75rem]"></i>
|
||||
<span>{{ $websiteLabel }}</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
@@ -0,0 +1,12 @@
|
||||
{{/* props: Title, Url, Small (bool) */}} {{- $title := .Title | default
|
||||
"Section" -}} {{- $url := .Url -}} {{- $small := .Small | default false -}}
|
||||
|
||||
<div class="flex items-baseline justify-between gap-2">
|
||||
<h2 class="heading-section">{{ $title }}</h2>
|
||||
|
||||
{{ with $url }}
|
||||
<a href="{{ . | relURL }}" class="link-underline text-[0.72rem] text-muted">
|
||||
{{ if $small }}All{{ else }}View all{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user