fix taxonomy issues

This commit is contained in:
Landon Taylor 2025-06-06 18:05:19 -06:00
parent 4acfe1d027
commit 900fe7ed06
6 changed files with 101 additions and 71 deletions

View File

@ -39,7 +39,7 @@ header h1, header h1 a
color: $text
text-decoration: none
padding: 0
transition: color 0.4s
transition: color 0.4s ease-in-out
&:hover, &:focus
color: $accent-light
@ -67,9 +67,10 @@ nav ul li a
color: $text
text-decoration: none
font-weight: 500
transition: background 0.4s
transition: background 0.4s ease-in-out
&:hover, &:focus
background: $accent-dark
color: $text
@media (max-width: 600px)
header

View File

@ -1,5 +1,12 @@
/* _text.sass */
a
color: $primary
text-decoration: underline
transition: color 0.3s ease-in-out
&:hover, &:focus
color: $accent
#quick-links
text-align: left
@ -31,6 +38,6 @@
color: $darkest
text-decoration: none
font-weight: 500
transition: background 0.4s
transition: background 0.3s ease-in-out
&:hover, &:focus
background: $accent-light

View File

@ -0,0 +1,13 @@
#publications
ul
list-style: none
margin: 0
padding: 0
display: flex
flex-direction: column
gap: 1em
li
background: $surface
border-radius: 8px
padding: 1em 1.5em

View File

@ -7,62 +7,60 @@ table#taxonomy-table
background: $surface
text-align: left
tr:nth-child(even)
background: darken($surface, 2%)
transition: background 0.4s
tr:nth-child(odd)
background: lighten($surface, 3%)
transition: background 0.4s
tr:hover, tr:focus
background: $border
tr
border-bottom: 3px solid $background
&:nth-child(even)
background: darken($surface, 2%)
transition: background 0.4s ease-in-out
&:nth-child(odd)
background: lighten($surface, 3%)
transition: background 0.4s ease-in-out
&:hover, &:focus
background: $border
#taxonomy-table thead
text-align: left
border: none
background: $darkest
border-radius: $border-radius $border-radius 0 0
thead
text-align: left
border: none
background: $darkest
border-radius: $border-radius $border-radius 0 0
#taxonomy-table th
color: $text
padding: 0.6rem 0.6rem
text-align: left
font-weight: 600
border: none
th
color: $text
padding: 0.6rem 0.6rem
text-align: left
font-weight: 600
border: none
#taxonomy-table td
padding: 0.3rem 0.6rem
text-align: left
font-weight: 600
border: none
td
padding: 0.3rem 0.6rem
text-align: left
font-weight: 600
border: none
#taxonomy-table tr
border-bottom: 3px solid $background
&:hover, &:focus
background: $primary-light
a.term-link
padding: 0.2rem 0.6rem
margin: 0.2rem
display: inline-block
border-radius: $border-radius
text-decoration: none
font-weight: 500
color: $text
transition: color 0.4s ease-in-out, background 0.4s ease-in-out
&:hover, &:focus
color: $darkest !important
background: $text-subtle !important
#taxonomy-table a.term-link
padding: 0.2rem 0.6rem
margin: 0.2rem
display: inline-block
border-radius: $border-radius
text-decoration: none
font-weight: 500
color: $text
transition: color 0.4s
&:hover, &:focus
color: $darkest
#taxonomy-table a.taxonomy-name
padding: 0
margin: 0.2rem
display: inline-block
border-radius: $border-radius
text-decoration: none
font-weight: 500
color: $text
transition: color 0.4s
&:hover, &:focus
color: $accent-light
a.taxonomy-name
padding: 0
margin: 0.2rem
display: inline-block
border-radius: $border-radius
text-decoration: none
font-weight: 500
color: $text
transition: color 0.4s ease-in-out
&:hover, &:focus
color: $accent-light
#taxonomy-page a.term-link
padding: 0.3rem 1.2rem
@ -72,7 +70,7 @@ table#taxonomy-table
text-decoration: none
font-weight: 500
color: $text
transition: color 0.4s
transition: color 0.4s ease-in-out
font-size: 1.2rem
&:hover, &:focus
color: $darkest

View File

@ -2,4 +2,5 @@
@import "colors"
@import "layout"
@import "taxonomy"
@import "links"
@import "links"
@import "publications"

View File

@ -26,19 +26,21 @@
<h2>At a Glance</h2>
<table id="taxonomy-table">
<tbody>
{{ $params := .Params }}
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies }}
{{ with $taxonomy }}
<tr>
<td>
<a
{{ $terms := index $params $taxonomyname }}
{{ if $terms }}
<tr>
<td>
<a
class="taxonomy-name"
href="{{ "/" | relLangURL }}{{ $taxonomyname }}">
{{ $taxonomyname | strings.FirstUpper }}
</a>
</td>
</td>
<td>
{{ range $key, $value := $taxonomy }}
{{ partial "term-link.html" (dict "name" $key "taxonomy" $taxonomyname) }}
{{ range $term := $terms }}
{{ partial "term-link.html" (dict "name" $term "taxonomy" $taxonomyname) }}
{{ end }}
</td>
</tr>
@ -54,21 +56,29 @@
</section>
{{ with .Params.publications}}
<section>
<section id="publications">
<h2>Publications</h2>
<ul>
{{ range $citation, $pub := site.Data.publications }}
{{ range $pub }}
{{ if in $.Params.publications .key }}
<li>
{{ if .year }} <strong>{{ .year }}</strong>: {{ end }}
{{ if .title }} <em>{{ .title }}</em> {{ end }}
{{ if .author }} <br /> by {{ delimit .author " | " | html }} {{ end }}
{{ if .booktitle }} <br />Appears in <em>{{ .booktitle }}</em> {{ end }}
{{ if .journal }} <br />Appears in <em>{{ .journal }}</em> {{ end }}
{{ if .volume }} <strong>{{ .volume }}</strong> {{ end }}
{{ if .title }} <strong>{{ .title }}</strong> {{ end }}
{{ if .year }}
{{ if .month }}
({{ .month }} {{.year }})
{{ else }}
({{ .year }})
{{ end }}
{{ end }}
{{ if .author }} by {{ index .author 0 }}{{ if (gt (len .author) 1) }} et. al. {{ end }}{{ end }}
{{ if .booktitle }} | Appears in <em>{{ .booktitle }}</em> {{ end }}
{{ if .pages }} ({{ .pages }}) {{ end }}
{{ if .doi }} <br /><a href="https://doi.org/{{ . }}" target="_blank" rel="noopener">DOI: {{ .doi }}</a> {{ end }}
{{ if .journal }} | Appears in <em>{{ .journal }}</em> {{ end }}
{{ if .volume }} | Volume {{ .volume }} {{ end }}
{{ if .publisher }} | Published by <em>{{ .publisher }}</em> {{ end }}
{{ if .doi }} <br /><a href="https://doi.org/{{ . }}" target="_blank" rel="noopener">{{ .doi }}</a>
{{ else if .url }} <br /><a href="{{ . }}" target="_blank" rel="noopener">{{ .url }}</a> {{ end }}
</li>
{{ end }}
{{ end }}