Skip to content

Commit 8974df5

Browse files
committed
feat(software): Enhance at-a-glance section
Adds icons, styling, and maintainer display to the "at a glance" section.
1 parent 9d58bfe commit 8974df5

File tree

3 files changed

+83
-45
lines changed

3 files changed

+83
-45
lines changed

assets/scss/buttons.scss

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
// assets/scss/buttons.scss
22

3-
// Base .btn style
3+
// Base .btn style - Added 'no-underline' to prevent link styling
44
.btn {
5-
@apply inline-block rounded border border-transparent px-5 py-2 font-semibold capitalize transition;
5+
@apply inline-block rounded border border-transparent px-5 py-2 font-semibold capitalize transition no-underline;
66
}
77

88
// Base .btn-sm style
99
.btn-sm {
1010
@apply rounded-sm px-4 py-1.5 text-sm;
1111
}
1212

13+
// Suppress the global ::after icon for buttons where we use an inline SVG icon instead.
14+
a.btn.has-inline-icon[target='_blank']::after {
15+
content: none !important;
16+
}
17+
1318
// ----- Project-specific & Updated Theme Button Styles -----
1419

1520
// Project's main primary button (gradient) - e.g., for "Join Discord"
@@ -35,6 +40,16 @@
3540
}
3641
}
3742

43+
// Dark mode override for the outline button
44+
.dark .btn-new-outline {
45+
color: var(--color-darkmode-primary);
46+
border-color: var(--color-darkmode-primary);
47+
&:hover {
48+
background-color: var(--color-darkmode-primary);
49+
color: theme('colors.darkmode.theme-dark');
50+
}
51+
}
52+
3853
// Standard .btn-primary (redefined as a solid fill button using new theme colors)
3954
// Used in 404.html ("Back to home")
4055
.btn-primary {

data/used_icons.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ fontawesome_svgs:
1818
- { style: solid, name: envelope }
1919
- { style: solid, name: moon }
2020
- { style: solid, name: sun }
21+
- { style: solid, name: arrow-up-right-from-square }
2122
- { style: brands, name: discord }
2223
- { style: brands, name: github }
2324
- { style: brands, name: twitter }

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

Lines changed: 65 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,14 @@
1313

1414
<h2 class="text-2xl font-bold text-center mb-4">{{ $page.Title }}</h2>
1515

16+
{{/* --- Button Section --- */}}
1617
<div class="grid grid-cols-2 gap-2 mb-4">
17-
<a href="{{ .website }}" target="_blank" rel="noopener" class="btn btn-new-primary text-sm text-center">Website</a>
18-
<a href="{{ .source_code }}" target="_blank" rel="noopener" class="btn btn-new-outline text-sm text-center">Source Code</a>
18+
<a href="{{ .website }}" target="_blank" rel="noopener" class="btn btn-new-primary has-inline-icon !text-sm !py-2 !px-4 flex items-center justify-center">
19+
Website {{ partial "icon.html" (dict "style" "solid" "name" "arrow-up-right-from-square" "class" "ml-1.5") }}
20+
</a>
21+
<a href="{{ .source_code }}" target="_blank" rel="noopener" class="btn btn-new-outline has-inline-icon !text-sm !py-2 !px-4 flex items-center justify-center">
22+
Source Code {{ partial "icon.html" (dict "style" "solid" "name" "arrow-up-right-from-square" "class" "ml-1.5") }}
23+
</a>
1924
</div>
2025

2126
<div class="flex justify-center items-center space-x-2 mb-4">
@@ -27,57 +32,74 @@ <h2 class="text-2xl font-bold text-center mb-4">{{ $page.Title }}</h2>
2732
{{ end }}
2833
</div>
2934

35+
{{/* --- Details List --- */}}
3036
<div class="border-t border-border dark:border-darkmode-border pt-4">
31-
<dl class="text-sm text-text dark:text-darkmode-text">
32-
<div class="flex justify-between py-1">
33-
<dt class="font-semibold">Maintainer(s):</dt>
34-
<dd class="text-right">
35-
{{ with .maintainer }}
37+
<dl class="text-sm text-text dark:text-darkmode-text space-y-2">
38+
39+
{{/* Maintainer(s) Row */}}
40+
{{ 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">
3644
{{ $maintainerList := . }}
37-
{{ if reflect.IsSlice $maintainerList }}
38-
{{ $links := slice }}
39-
{{ range $maintainerList }}
40-
{{ $nameForProcessing := . | replaceRE "[.]" "" | replaceRE "ć" "c" | replaceRE "Ć" "C" }}
41-
{{ $contributorSlug := $nameForProcessing | anchorize }}
42-
{{ $contributorPage := $page.Site.GetPage (printf "contributors/%s" $contributorSlug) }}
43-
{{ if $contributorPage }}
44-
{{ $links = $links | append (printf `<a href="%s" class="text-primary dark:text-darkmode-primary hover:underline">%s</a>` $contributorPage.RelPermalink .) }}
45-
{{ else }}
46-
{{ $links = $links | append . }}
47-
{{ end }}
48-
{{ end }}
49-
{{ delimit $links ", " | safeHTML }}
50-
{{ else }}
51-
{{ $nameForProcessing := . | replaceRE "[.]" "" | replaceRE "ć" "c" | replaceRE "Ć" "C" }}
52-
{{ $contributorSlug := $nameForProcessing | anchorize }}
53-
{{ $contributorPage := $page.Site.GetPage (printf "contributors/%s" $contributorSlug) }}
54-
{{ if $contributorPage }}
55-
<a href="{{ $contributorPage.RelPermalink }}" class="text-primary dark:text-darkmode-primary hover:underline">{{ . }}</a>
56-
{{ else }}
57-
{{ . }}
58-
{{ end }}
59-
{{ end }}
60-
{{ else }}
61-
N/A
62-
{{ end }}
63-
</dd>
64-
</div>
65-
<div class="flex justify-between py-1">
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">
54+
{{ if $contributorPage }}
55+
<a href="{{ $contributorPage.RelPermalink }}" class="text-primary dark:text-darkmode-primary hover:underline">{{ . }}</a>
56+
{{ else }}
57+
{{ . }}
58+
{{ end }}
59+
</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>
80+
</div>
81+
</dd>
82+
</div>
83+
{{ end }}
84+
85+
{{/* Other Details Rows */}}
86+
<div class="flex justify-between">
6687
<dt class="font-semibold">Language:</dt>
67-
<dd class="text-right">{{ .language | default "N/A" }}</dd>
88+
<dd>{{ .language | default "N/A" }}</dd>
6889
</div>
69-
<div class="flex justify-between py-1">
90+
<div class="flex justify-between">
7091
<dt class="font-semibold">License:</dt>
71-
<dd class="text-right">{{ .license | default "N/A" }}</dd>
92+
<dd>{{ .license | default "N/A" }}</dd>
7293
</div>
73-
<div class="flex justify-between py-1">
94+
<div class="flex justify-between">
7495
<dt class="font-semibold">Application:</dt>
75-
<dd class="text-right">{{ .field_of_application | default "N/A" }}</dd>
96+
<dd>{{ .field_of_application | default "N/A" }}</dd>
7697
</div>
77-
<div class="flex justify-between py-1 items-center">
98+
<div class="flex justify-between items-center">
7899
<dt class="font-semibold">Dependencies:</dt>
79-
<dd class="text-right">{{ .dependencies | default "N/A" }}</dd>
100+
<dd>{{ .dependencies | default "N/A" }}</dd>
80101
</div>
102+
81103
</dl>
82104
</div>
83105

0 commit comments

Comments
 (0)