Skip to content

Commit 8ecc0e3

Browse files
committed
refactor: software at-a-glance layout
Improved maintainer display and general layout.
1 parent 0c86ec4 commit 8ecc0e3

File tree

1 file changed

+61
-61
lines changed

1 file changed

+61
-61
lines changed

layouts/partials/software/at-a-glance.html

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
{{ with $page.Params }}
33
<div class="p-6 rounded-lg bg-theme-light dark:bg-darkmode-theme-light shadow-lg">
44
{{ with .logo }}
5-
{{ $logoRes := $page.Resources.GetMatch . }}
6-
{{ if $logoRes }}
7-
{{ $thumb := $logoRes.Fit "200x200" }}
8-
<div class="p-2 bg-white dark:bg-gray-800 rounded-lg mb-4 flex justify-center">
9-
<img src="{{ $thumb.RelPermalink }}" alt="{{ $page.Title }} logo" class="max-h-24 w-auto">
10-
</div>
11-
{{ end }}
5+
{{ $logoRes := $page.Resources.GetMatch . }}
6+
{{ if $logoRes }}
7+
{{ $thumb := $logoRes.Fit "200x200" }}
8+
<div class="p-2 bg-white dark:bg-gray-800 rounded-lg mb-4 flex justify-center">
9+
<img src="{{ $thumb.RelPermalink }}" alt="{{ $page.Title }} logo" class="max-h-24 w-auto">
10+
</div>
11+
{{ end }}
1212
{{ end }}
1313

1414
<h2 class="text-2xl font-bold text-center mb-4">{{ $page.Title }}</h2>
@@ -25,91 +25,91 @@ <h2 class="text-2xl font-bold text-center mb-4">{{ $page.Title }}</h2>
2525

2626
<div class="flex justify-center items-center space-x-2 mb-4">
2727
{{ with .version_widget_url }}
28-
<img src="{{ . }}" alt="Version Badge" class="inline-block h-5">
28+
<img src="{{ . }}" alt="Version Badge" class="inline-block h-5">
2929
{{ end }}
3030
{{ with .stars_widget_url }}
31-
<img src="{{ . }}" alt="GitHub Stars" class="inline-block h-5">
31+
<img src="{{ . }}" alt="GitHub Stars" class="inline-block h-5">
3232
{{ end }}
3333
</div>
3434

3535
{{/* --- Details List --- */}}
3636
<div class="border-t border-border dark:border-darkmode-border pt-4">
3737
<dl class="text-sm text-text dark:text-darkmode-text space-y-2">
38-
38+
3939
{{/* Maintainer(s) Row */}}
4040
{{ with .maintainer }}
41-
<div class="flex justify-between items-start">
42-
<dt class="font-semibold pt-2">Maintainer(s):</dt>
43-
<dd class="text-right">
44-
{{ $maintainerList := . }}
45-
{{ if not (reflect.IsSlice .) }}{{ $maintainerList = slice . }}{{ end }}
46-
47-
<div class="flex items-center justify-end">
48-
<div class="mr-2 text-right">
49-
{{ range $i, $name := $maintainerList }}
50-
{{ $nameForProcessing := . | replaceRE "[.]" "" | replaceRE "ć" "c" | replaceRE "Ć" "C" }}
51-
{{ $contributorSlug := $nameForProcessing | anchorize }}
52-
{{ $contributorPage := $page.Site.GetPage (printf "contributors/%s" $contributorSlug) }}
53-
<span class="block">
41+
<div class="flex justify-between items-start">
42+
<dt class="font-semibold pt-2 shrink-0 pr-2">Maintainer(s):</dt>
43+
<dd>
44+
{{ $maintainerList := . }}
45+
{{ if not (reflect.IsSlice .) }}{{ $maintainerList = slice . }}{{ end }}
46+
47+
<div class="flex items-center justify-end">
48+
<div class="flex-shrink-0 flex -space-x-3">
49+
{{ range $maintainerList }}
50+
{{ $maintainerName := . }}
51+
{{ $nameForProcessing := $maintainerName | replaceRE "[.]" "" | replaceRE "ć" "c" | replaceRE "Ć" "C" }}
52+
{{ $contributorSlug := $nameForProcessing | anchorize }}
53+
{{ $contributorPage := $page.Site.GetPage (printf "contributors/%s" $contributorSlug) }}
54+
{{ if and $contributorPage $contributorPage.Params.image }}
55+
{{ with $contributorPage.Resources.GetMatch $contributorPage.Params.image }}
56+
{{ $thumb := .Fill "32x32 Lanczos" }}
57+
<img src="{{ $thumb.RelPermalink }}" alt="{{ $maintainerName }}" title="{{ $maintainerName }}" class="w-8 h-8 rounded-full object-cover border-2 border-white dark:border-darkmode-theme-light">
58+
{{ end }}
59+
{{ else }}
60+
<div class="w-8 h-8 rounded-full bg-gray-200 dark:bg-darkmode-theme-dark flex items-center justify-center text-gray-400 border-2 border-white dark:border-darkmode-theme-light" title="{{ $maintainerName }}">
61+
{{ partial "icon.html" (dict "style" "solid" "name" "user" "class" "text-base") }}
62+
</div>
63+
{{ end }}
64+
{{ end }}
65+
</div>
66+
<div class="ml-2 text-left">
67+
{{ range $i, $name := $maintainerList }}
68+
{{ $nameForProcessing := . | replaceRE "[.]" "" | replaceRE "ć" "c" | replaceRE "Ć" "C" }}
69+
{{ $contributorSlug := $nameForProcessing | anchorize }}
70+
{{ $contributorPage := $page.Site.GetPage (printf "contributors/%s" $contributorSlug) }}
71+
<span class="block">
5472
{{ if $contributorPage }}
5573
<a href="{{ $contributorPage.RelPermalink }}" class="text-primary dark:text-darkmode-primary hover:underline">{{ . }}</a>
5674
{{ else }}
5775
{{ . }}
5876
{{ end }}
5977
</span>
60-
{{ end }}
61-
</div>
62-
<div class="flex-shrink-0 flex -space-x-3">
63-
{{ range $maintainerList }}
64-
{{ $maintainerName := . }}
65-
{{ $nameForProcessing := $maintainerName | replaceRE "[.]" "" | replaceRE "ć" "c" | replaceRE "Ć" "C" }}
66-
{{ $contributorSlug := $nameForProcessing | anchorize }}
67-
{{ $contributorPage := $page.Site.GetPage (printf "contributors/%s" $contributorSlug) }}
68-
{{ if and $contributorPage $contributorPage.Params.image }}
69-
{{ with $contributorPage.Resources.GetMatch $contributorPage.Params.image }}
70-
{{ $thumb := .Fill "32x32 Lanczos" }}
71-
<img src="{{ $thumb.RelPermalink }}" alt="{{ $maintainerName }}" title="{{ $maintainerName }}" class="w-8 h-8 rounded-full object-cover border-2 border-white dark:border-darkmode-theme-light">
72-
{{ end }}
73-
{{ else }}
74-
<div class="w-8 h-8 rounded-full bg-gray-200 dark:bg-darkmode-theme-dark flex items-center justify-center text-gray-400 border-2 border-white dark:border-darkmode-theme-light" title="{{ $maintainerName }}">
75-
{{ partial "icon.html" (dict "style" "solid" "name" "user" "class" "text-base") }}
76-
</div>
77-
{{ end }}
78-
{{ end }}
79-
</div>
78+
{{ end }}
8079
</div>
81-
</dd>
82-
</div>
80+
</div>
81+
</dd>
82+
</div>
8383
{{ end }}
8484

8585
{{/* Other Details Rows */}}
86-
<div class="flex justify-between">
87-
<dt class="font-semibold">Language:</dt>
88-
<dd>{{ .language | default "N/A" }}</dd>
86+
<div class="flex justify-between items-start">
87+
<dt class="font-semibold shrink-0 pr-2">Language:</dt>
88+
<dd class="text-right">{{ .language | default "N/A" }}</dd>
8989
</div>
90-
<div class="flex justify-between">
91-
<dt class="font-semibold">License:</dt>
92-
<dd>{{ .license | default "N/A" }}</dd>
90+
<div class="flex justify-between items-start">
91+
<dt class="font-semibold shrink-0 pr-2">License:</dt>
92+
<dd class="text-right">{{ .license | default "N/A" }}</dd>
9393
</div>
94-
<div class="flex justify-between">
95-
<dt class="font-semibold">Application:</dt>
96-
<dd>{{ .field_of_application | default "N/A" }}</dd>
94+
<div class="flex justify-between items-start">
95+
<dt class="font-semibold shrink-0 pr-2">Application:</dt>
96+
<dd class="text-right">{{ .field_of_application | default "N/A" }}</dd>
9797
</div>
98-
<div class="flex justify-between items-center">
99-
<dt class="font-semibold">Dependencies:</dt>
100-
<dd>{{ .dependencies | default "N/A" }}</dd>
98+
<div class="flex justify-between items-start">
99+
<dt class="font-semibold shrink-0 pr-2">Dependencies:</dt>
100+
<dd class="text-right">{{ .dependencies | default "N/A" }}</dd>
101101
</div>
102102

103103
</dl>
104104
</div>
105-
105+
106106
<div class="border-t border-border dark:border-darkmode-border pt-4 mt-4 flex flex-wrap gap-2 justify-center">
107107
{{ if .supports_NIR }}
108-
<span class="support-badge">NIR Support</span>
108+
<span class="support-badge">NIR Support</span>
109109
{{ end }}
110110
{{ if .supports_hardware }}
111-
<span class="support-badge">Hardware Support</span>
111+
<span class="support-badge">Hardware Support</span>
112112
{{ end }}
113113
</div>
114114
</div>
115-
{{ end }}
115+
{{ end }}

0 commit comments

Comments
 (0)