Better part of speech display

This commit is contained in:
Elnu 2023-07-24 13:25:23 -07:00
parent 8421aca007
commit 33ecd1a539
4 changed files with 86 additions and 14 deletions

View file

@ -6,17 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ block "title" . }}{{ template "sitetitle" . }}{{ end }}</title>
<link rel="stylesheet" href="https://unpkg.com/missing.css@1.0.9/dist/missing.min.css">
<style>
li {
margin-top: 0.75em;
}
#results .box h3 a {
color: inherit;
}
#results .box h3 a:not(:hover) {
text-decoration: none;
}
</style>
<link rel="stylesheet" href="/overrides.css">
<script src="https://unpkg.com/htmx.org@1.9.3"></script>
</head>
<body hx-boost="true">

View file

@ -1,3 +1,3 @@
{{- define "definition" -}}
{{ if .PartOfSpeech }}<small><chip>{{ .PartOfSpeech }}</chip></small><br>{{ end }}{{ highlight .Definition -}}
{{ if .PartOfSpeech }}<small>{{ range .PartOfSpeech }}<chip class="{{ .Type }}">{{ .Description }}</chip> {{ end }}</small><br>{{ end }}{{ highlight .Definition -}}
{{ end }}