publication-detail: make external links section collapsible
This commit is contained in:
@@ -443,19 +443,38 @@
|
||||
}
|
||||
|
||||
@if (externalLinks().length) {
|
||||
<section class="card">
|
||||
<div class="section-title">
|
||||
<section class="card accordion-card">
|
||||
<button
|
||||
type="button"
|
||||
class="accordion-header"
|
||||
(click)="linksExpanded = !linksExpanded"
|
||||
[attr.aria-expanded]="linksExpanded">
|
||||
<mat-icon>link</mat-icon>
|
||||
<h2>Externe Links</h2>
|
||||
</div>
|
||||
<div class="link-list">
|
||||
@for (link of externalLinks(); track link.url) {
|
||||
<a [href]="link.url" target="_blank" rel="noopener">
|
||||
<span>{{ link.label }}</span>
|
||||
<mat-icon>north_east</mat-icon>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
<span class="accordion-title">Externe Links</span>
|
||||
<mat-icon
|
||||
class="info-icon"
|
||||
matTooltip="Externe Links zur Publikation, z. B. DOI oder Open-Access-Version. Klicke auf einen Link, um ihn in einem neuen Tab zu öffnen."
|
||||
matTooltipPosition="above"
|
||||
(click)="$event.stopPropagation()"
|
||||
>info_outline</mat-icon
|
||||
>
|
||||
<span class="count-badge">{{ externalLinks().length }}</span>
|
||||
<mat-icon class="chevron" [class.rotated]="!linksExpanded"
|
||||
>expand_more</mat-icon
|
||||
>
|
||||
</button>
|
||||
@if (linksExpanded) {
|
||||
<div class="accordion-body">
|
||||
<div class="link-list">
|
||||
@for (link of externalLinks(); track link.url) {
|
||||
<a [href]="link.url" target="_blank" rel="noopener">
|
||||
<span>{{ link.label }}</span>
|
||||
<mat-icon>north_east</mat-icon>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</section>
|
||||
}
|
||||
</aside>
|
||||
|
||||
@@ -63,6 +63,7 @@ export class PublicationDetailComponent implements OnInit {
|
||||
institutionsExpanded = false;
|
||||
sourcesExpanded = false;
|
||||
fundingExpanded = false;
|
||||
linksExpanded = false;
|
||||
|
||||
ngOnInit(): void {
|
||||
this.loading = true;
|
||||
|
||||
Reference in New Issue
Block a user