From 107e9e49dba1c33e59f82e424a1e2c36a7ef8cd8 Mon Sep 17 00:00:00 2001
From: nleanba <25827850+nleanba@users.noreply.github.com>
Date: Sat, 4 Jan 2025 19:18:01 +0100
Subject: [PATCH] added icons to justification, improved details for AuthName
---
src/components/Icons.ts | 36 ++-----------------
src/components/SynoName.ts | 73 ++++++++++++++++++++++++++++----------
src/components/Timeline.ts | 5 +--
3 files changed, 58 insertions(+), 56 deletions(-)
diff --git a/src/components/Icons.ts b/src/components/Icons.ts
index 0bd33e0..4c4e3d2 100644
--- a/src/components/Icons.ts
+++ b/src/components/Icons.ts
@@ -19,9 +19,9 @@ const icon = {
// TODO
vernacular:
- '',
+ '',
justification:
- '',
+ '',
def_dpr:
`
@@ -87,35 +87,3 @@ export class Icon extends LitElement {
}`;
}
}
-
-export const icons = {
- def:
- ``,
- aug:
- ``,
- dpr:
- ``,
- cite:
- ``,
- unknown:
- ``,
-
- col_aug:
- ``,
- col_dpr:
- ``,
-
- link:
- ``,
-
- expand:
- ``,
- collapse:
- ``,
-
- east:
- ``,
- west:
- ``,
- empty: ``,
-};
diff --git a/src/components/SynoName.ts b/src/components/SynoName.ts
index bac97e8..cb62acf 100644
--- a/src/components/SynoName.ts
+++ b/src/components/SynoName.ts
@@ -27,6 +27,9 @@ export class SynoAuthName extends LitElement {
@property({ attribute: false })
accessor authorizedName: AuthorizedName | null = null;
+ @state()
+ accessor open = false;
+
override render() {
if (!this.synoGroup || !this.authorizedName) return nothing;
@@ -56,25 +59,57 @@ export class SynoAuthName extends LitElement {
authorities.delete(this.authorizedName.authority);
return html`
-
- ${this.authorizedName.displayName}
- ${this.authorizedName.authority}
- ${
- authorities.size > 0
- ? html`Authority also given as “${
- [...authorities].join("”, “")
- }”`
- : nothing
- }
- ${
+
+
+ ${
this.authorizedName.taxonConceptURIs.map((tc) =>
- html`
${
- shortUrl(tc)
- }`
+ html`
+
`
)
+ }${
+ authorities.size > 0
+ ? html`
+
+
+ Authority also given as: “${[...authorities].join("”, “")}”
+
+
`
+ : nothing
}
-
-
+
${
this.authorizedName.colURI
? html``
@@ -141,7 +176,9 @@ export class SynoName extends LitElement {
+ }}>
@@ -195,7 +232,7 @@ export class SynoName extends LitElement {
-
Justification: ${
+
Justification: ${
until(
justify(this.name.name).then((just) => `This ${just}`),
"Justification loading...",
diff --git a/src/components/Timeline.ts b/src/components/Timeline.ts
index e1b5068..5118395 100644
--- a/src/components/Timeline.ts
+++ b/src/components/Timeline.ts
@@ -23,14 +23,11 @@ export class TimelineTreatment extends LitElement {
border-radius: 12px;
display: grid;
padding: 0 .25rem;
+ min-height: 100%;
min-width: .5rem;
font-size: 0.8rem;
text-decoration: none;
- &:empty {
- min-height: 100%;
- }
-
&:hover {
background-color: light-dark(rgb(167, 218, 255), rgb(23, 78, 117));
}