Compare commits

...

4 Commits

Author SHA1 Message Date
852a2a8187 Fix broken tr link 2025-06-12 14:49:52 -06:00
67a0e1c6bb Improve section table 2025-06-12 14:48:05 -06:00
514102f456 Clean up section page 2025-06-12 14:28:17 -06:00
b91f892f55 Improve Organization 2025-06-12 14:25:48 -06:00
3 changed files with 81 additions and 27 deletions

View File

@@ -13,7 +13,8 @@
{{ $pages := shuffle (where site.RegularPages "Section" "tools") | first 20 }} {{ $pages := shuffle (where site.RegularPages "Section" "tools") | first 20 }}
<section> <section>
<h2>Featured Tools</h2> <h2>Try Something New</h2>
<p>This list shows a selection of 20 random tools, refreshed every time this site is updated.</p>
{{ range $pages }} {{ range $pages }}
<article class="tool-card"> <article class="tool-card">
<h3> <h3>

View File

@@ -24,7 +24,7 @@
</thead> </thead>
<tbody> <tbody>
{{ range .Pages }} {{ range .Pages }}
<tr onclick="window.location='{{ .RelPermalink }}'" style="cursor:pointer;"></tr> <tr onclick="window.location='{{ .RelPermalink }}'" style="cursor:pointer;">
<td class="tool"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></td> <td class="tool"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></td>
<td class="description">{{ .Content | plainify | truncate 100 }}</td> <td class="description">{{ .Content | plainify | truncate 100 }}</td>
<!-- <td> <!-- <td>

View File

@@ -1,59 +1,112 @@
{{ define "main" }} {{ define "main" }}
{{ $allPages := slice }}
{{ $sections := slice }}
{{ range .Pages }}
{{ if .IsSection }}
{{ $sections = $sections | append . }}
{{ range .Pages }}
{{ $allPages = $allPages | append . }}
{{ end }}
{{ else }}
{{ $allPages = $allPages | append . }}
{{ end }}
{{ end }}
{{ $sortedSections := sort $sections "LinkTitle" }}
{{ $sortedPages := sort $allPages "LinkTitle" }}
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
{{ .Content }} {{ .Content }}
<section id="tools-list"> <section id="tools-list">
{{ if gt (len $sortedSections) 0 }}
<!-- <h2>Sections</h2> -->
<!-- <p>This list shows all sections, sorted alphabetically.</p> -->
<div id="link-list" style="align-items: left; justify-content: left;">
<ul>
{{ range $sortedSections }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{ end }}
</ul>
</div>
{{ end }}
{{ if eq (len $sortedPages) 0 }}
<div style="display: flex; align-items: center; gap: 8px; margin: 1rem 0;">
<span style="display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: rgb(225, 82, 225);"></span>
<span style="color: rgb(225, 82, 225); font-size: 1rem;">No Tools Found</span>
</div>
{{ end }}
<table id="taxonomy-table"> <table id="taxonomy-table">
<thead> <thead>
<tr> <tr>
<th>Tool</th> <th>Tool</th>
<!-- <th>License</th> -->
<th>Applications</th> <th>Applications</th>
<th>Developers</th> <th>License</th>
<!-- <th>Developers</th> -->
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{ range .Pages }} {{ range $sortedPages }}
<tr onclick="window.location='{{ .RelPermalink }}'" style="cursor:pointer;"></tr> <tr onclick="window.location='{{ .RelPermalink }}'" style="cursor:pointer;">
<td><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></td>
<td> <td>
{{ $sep := "" }} {{ if .Params.maintenance }}
{{ range $key, $vals := .Params }} {{ if in .Params.maintenance "Not Maintained" }}
{{ if (in (slice "applications") $key) }} <div style="display: flex; align-items: center; gap: 8px;">
{{ $sep }} <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ range $i, $val := $vals }} <span style="display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: rgb(10,10,10); border: 1px solid rgb(80, 80, 80);"></span>
{{ partial "term-link.html" (dict "name" $val "taxonomy" $key) }} </div>
{{ end }} {{ else }}
{{ $sep = "; " }} <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ end }} {{ end }}
{{ end }} {{ end }}
</td> </td>
<td> <td>
{{ $sep := "" }} {{ $sep := "" }}
{{ range $key, $vals := .Params }} {{ range $key, $vals := .Params }}
{{ if (in (slice "developers") $key) }} {{ if (in (slice "applications") $key) }}
{{ $sep }} {{ $sep }}
{{ range $i, $val := $vals }} {{ range $i, $val := $vals }}
{{ partial "term-link.html" (dict "name" $val "taxonomy" $key) }} {{ partial "term-link.html" (dict "name" $val "taxonomy" $key) }}
{{ end }} {{ end }}
{{ $sep = "; " }} {{ $sep = "; " }}
{{ end }}
{{ end }}
</td>
<td>
{{ $sep := "" }}
{{ range $key, $vals := .Params }}
{{ if (in (slice "licenses") $key) }}
{{ $sep }}
{{ range $i, $val := $vals }}
{{ partial "term-link.html" (dict "name" $val "taxonomy" $key) }}
{{ end }}
{{ $sep = "; " }}
{{ end }} {{ end }}
{{ end }} {{ end }}
</td> </td>
<!-- <td> <!-- <td>
{{ $sep := "" }} {{ $sep := "" }}
{{ range $key, $vals := .Params }} {{ range $key, $vals := .Params }}
{{ if (in (slice "licenses") $key) }} {{ if (in (slice "developers") $key) }}
{{ $sep }} {{ $sep }}
{{ range $i, $val := $vals }} {{ range $i, $val := $vals }}
{{ partial "term-link.html" (dict "name" $val "taxonomy" $key) }} {{ partial "term-link.html" (dict "name" $val "taxonomy" $key) }}
{{ end }} {{ end }}
{{ $sep = "; " }} {{ $sep = "; " }}
{{ end }} {{ end }}
{{ end }} {{ end }}
</td> --> </td> -->
</tr> </tr>
{{ end }} {{ end }}
</tbody> </tbody>
</table> </table>
<div style="display: flex; align-items: center; gap: 8px; margin: .5rem 0;">
<span style="display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: rgb(0,0,0); border: 1px solid rgb(80, 80, 80);"></span>
<span style="color: rgb(150, 150, 150); font-size: 1rem;">Black dot indicates tool has not been maintained recently</span>
</div>
{{ end }} {{ end }}