|
1 | 1 | <app-page-layout [showSidebar]="false" [showBreadcrumb]="false"> |
2 | 2 | @if (loading()) { |
3 | | - <div class="loading-container"> |
4 | | - <mat-spinner diameter="48"></mat-spinner> |
5 | | - </div> |
| 3 | + <div class="loading-container"> |
| 4 | + <mat-spinner diameter="48"></mat-spinner> |
| 5 | + </div> |
6 | 6 | } @else if (error()) { |
7 | | - <div class="error-container"> |
8 | | - <h2>Icon not found</h2> |
9 | | - <p>The requested icon could not be found.</p> |
10 | | - </div> |
| 7 | + <div class="error-container"> |
| 8 | + <h2>Icon not found</h2> |
| 9 | + <p>The requested icon could not be found.</p> |
| 10 | + </div> |
11 | 11 | } @else if (icon()) { |
12 | | - <div class="icon-detail"> |
13 | | - <app-tile variant="light"> |
14 | | - <div class="icon-header"> |
15 | | - <div class="icon-info"> |
16 | | - <h1>{{ icon()!.name }}</h1> |
| 12 | + <div class="icon-detail"> |
| 13 | + <app-tile variant="light"> |
| 14 | + <div class="icon-summary"> |
| 15 | + <h1>{{ icon()!.name }}</h1> |
| 16 | + <dl class="summary-fields"> |
| 17 | + <div class="summary-row"> |
| 18 | + <dt>Preview</dt> |
| 19 | + <dd> |
| 20 | + <a class="download-link" [href]="getPngUrl()" download="{{ icon()!.name }}.png" title="Click to download PNG"> |
| 21 | + <span class="material-symbols-rounded">download</span> |
| 22 | + PNG |
| 23 | + </a> |
| 24 | + <a class="download-link" [href]="getSvgUrl()" download="{{ icon()!.name }}.svg" title="Click to download SVG"> |
| 25 | + <span class="material-symbols-rounded">download</span> |
| 26 | + SVG |
| 27 | + </a> |
| 28 | + </dd> |
| 29 | + <div class="icon-preview"> |
| 30 | + <img [src]="getSvgUrl()" [alt]="icon()!.name" /> |
| 31 | + </div> |
| 32 | + </div> |
| 33 | + <div class="summary-row"> |
17 | 34 | @if (icon()!.iconCategories?.length) { |
18 | | - <div class="icon-categories"> |
19 | | - @for (cat of icon()!.iconCategories; track cat) { |
20 | | - <span class="category-tag">{{ cat }}</span> |
21 | | - } |
22 | | - </div> |
| 35 | + <dt>Categories</dt> |
| 36 | + <dd> |
| 37 | + @for (cat of icon()!.iconCategories; track cat) { |
| 38 | + <span>{{ cat }}</span> |
| 39 | + } |
| 40 | + </dd> |
23 | 41 | } |
24 | 42 | </div> |
25 | | - <div class="icon-preview"> |
26 | | - <img [src]="getSvgUrl()" [alt]="icon()!.name" /> |
| 43 | + <div class="summary-row"> |
| 44 | + @if (icon()!.summation) { |
| 45 | + <dt>Description</dt> |
| 46 | + <dd [innerHTML]="icon()!.summation"></dd> |
| 47 | + } |
27 | 48 | </div> |
28 | | - </div> |
29 | | - </app-tile> |
30 | | - |
31 | | - @if (icon()!.summation) { |
32 | | - <app-tile variant="light"> |
33 | | - <h2>Description</h2> |
34 | | - <p [innerHTML]="icon()!.summation"></p> |
35 | | - </app-tile> |
36 | | - } |
37 | | - |
38 | | - @if (icon()!.iconCuratorName || icon()!.iconDesignerName) { |
39 | | - <app-tile variant="light"> |
40 | | - <h2>Credits</h2> |
41 | | - <div class="credits"> |
| 49 | + <div class="summary-row"> |
42 | 50 | @if (icon()!.iconCuratorName) { |
43 | | - <div class="credit-item"> |
44 | | - <span class="credit-label">Curator:</span> |
45 | | - @if (icon()!.iconCuratorOrcidId) { |
46 | | - <a [href]="'https://orcid.org/' + icon()!.iconCuratorOrcidId" target="_blank" rel="noopener"> |
47 | | - {{ icon()!.iconCuratorName }} |
48 | | - <span class="material-symbols-rounded">open_in_new</span> |
49 | | - </a> |
50 | | - } @else { |
51 | | - <span>{{ icon()!.iconCuratorName }}</span> |
52 | | - } |
53 | | - </div> |
| 51 | + <div class="credit-item"> |
| 52 | + <span class="credit-label">Curator</span> |
| 53 | + @if (icon()!.iconCuratorOrcidId) { |
| 54 | + <a |
| 55 | + [href]="'https://orcid.org/' + icon()!.iconCuratorOrcidId" |
| 56 | + target="_blank" |
| 57 | + rel="noopener" |
| 58 | + > |
| 59 | + {{ icon()!.iconCuratorName }} |
| 60 | + <span class="material-symbols-rounded">open_in_new</span> |
| 61 | + </a> |
| 62 | + } @else { |
| 63 | + <span>{{ icon()!.iconCuratorName }}</span> |
| 64 | + } |
| 65 | + </div> |
54 | 66 | } |
| 67 | + </div> |
| 68 | + <div class="summary-row"> |
55 | 69 | @if (icon()!.iconDesignerName) { |
56 | | - <div class="credit-item"> |
57 | | - <span class="credit-label">Designer:</span> |
58 | | - @if (icon()!.iconDesignerUrl) { |
59 | | - <a [href]="icon()!.iconDesignerUrl" target="_blank" rel="noopener"> |
60 | | - {{ icon()!.iconDesignerName }} |
61 | | - <span class="material-symbols-rounded">open_in_new</span> |
62 | | - </a> |
63 | | - } @else { |
64 | | - <span>{{ icon()!.iconDesignerName }}</span> |
65 | | - } |
66 | | - </div> |
| 70 | + <div class="credit-item"> |
| 71 | + <span class="credit-label">Designer</span> |
| 72 | + @if (icon()!.iconDesignerUrl) { |
| 73 | + <a |
| 74 | + [href]="icon()!.iconDesignerUrl" |
| 75 | + target="_blank" |
| 76 | + rel="noopener" |
| 77 | + > |
| 78 | + {{ icon()!.iconDesignerName }} |
| 79 | + <span class="material-symbols-rounded">open_in_new</span> |
| 80 | + </a> |
| 81 | + } @else { |
| 82 | + <span>{{ icon()!.iconDesignerName }}</span> |
| 83 | + } |
| 84 | + </div> |
67 | 85 | } |
68 | 86 | </div> |
69 | | - </app-tile> |
70 | | - } |
71 | | - |
72 | | - @if (getUniProtReferences().length) { |
73 | | - <app-tile variant="light"> |
74 | | - <h2>External References</h2> |
75 | | - <div class="references"> |
76 | | - @for (ref of getUniProtReferences(); track ref) { |
77 | | - <a [href]="'https://www.uniprot.org/uniprot/' + ref" target="_blank" rel="noopener" class="ref-link"> |
| 87 | + <div class="summary-row"> |
| 88 | + @if (getUniProtReferences().length) { |
| 89 | + <dt>External References</dt> |
| 90 | + <div class="references"> |
| 91 | + @for (ref of getUniProtReferences(); track ref) { |
| 92 | + <a |
| 93 | + [href]="'https://www.uniprot.org/uniprot/' + ref" |
| 94 | + target="_blank" |
| 95 | + rel="noopener" |
| 96 | + class="ref-link" |
| 97 | + > |
78 | 98 | UniProt: {{ ref }} |
79 | 99 | <span class="material-symbols-rounded">open_in_new</span> |
80 | 100 | </a> |
| 101 | + } |
| 102 | + </div> |
81 | 103 | } |
82 | 104 | </div> |
83 | | - </app-tile> |
84 | | - } |
85 | | - |
86 | | - @if (icon()!.iconPhysicalEntities?.length) { |
87 | | - <app-tile variant="light"> |
88 | | - <h2>Physical Entities ({{ icon()!.iconPhysicalEntities.length }})</h2> |
89 | | - <div class="table-wrapper"> |
90 | | - <table class="entities-table"> |
91 | | - <thead> |
92 | | - <tr> |
93 | | - <th>Name</th> |
94 | | - <th>Identifier</th> |
95 | | - <th>Type</th> |
96 | | - <th>Compartment</th> |
97 | | - </tr> |
98 | | - </thead> |
99 | | - <tbody> |
100 | | - @for (entity of icon()!.iconPhysicalEntities; track entity.stId) { |
| 105 | + <div class="summary-row"> |
| 106 | + @if (icon()!.iconPhysicalEntities?.length) { |
| 107 | + <dt> |
| 108 | + Physical Entities ({{ icon()!.iconPhysicalEntities.length }}) |
| 109 | + </dt> |
| 110 | + <div class="table-wrapper"> |
| 111 | + <table class="entities-table"> |
| 112 | + <thead> |
| 113 | + <tr> |
| 114 | + <th>Name</th> |
| 115 | + <th>Identifier</th> |
| 116 | + <th>Type</th> |
| 117 | + <th>Compartment</th> |
| 118 | + </tr> |
| 119 | + </thead> |
| 120 | + <tbody> |
| 121 | + @for (entity of icon()!.iconPhysicalEntities; track |
| 122 | + entity.stId) { |
101 | 123 | <tr> |
102 | 124 | <td> |
103 | | - <a [routerLink]="'/content/detail/' + entity.stId">{{ entity.displayName || entity.name }}</a> |
| 125 | + <a [routerLink]="'/content/detail/' + entity.stId">{{ |
| 126 | + entity.displayName || entity.name |
| 127 | + }}</a> |
104 | 128 | </td> |
105 | 129 | <td>{{ entity.stId }}</td> |
106 | 130 | <td>{{ entity.type }}</td> |
107 | 131 | <td>{{ entity.compartments }}</td> |
108 | 132 | </tr> |
109 | | - } |
110 | | - </tbody> |
111 | | - </table> |
| 133 | + } |
| 134 | + </tbody> |
| 135 | + </table> |
| 136 | + </div> |
| 137 | + } |
112 | 138 | </div> |
113 | | - </app-tile> |
114 | | - } |
115 | | - </div> |
| 139 | + </dl> |
| 140 | + </div> |
| 141 | + </app-tile> |
| 142 | + </div> |
116 | 143 | } |
117 | 144 | </app-page-layout> |
0 commit comments