Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions web/src/components/DLP/MetadataCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,15 @@
cols="9"
class="text-grey-darken-3"
>
<span v-if="item.name || item.identifier || item.id">
{{ item.name || item.identifier || item.id }}
<br>
</span>
<slot
name="itemTitle"
:item="item"
>
<span v-if="item.name || item.identifier || item.id">
{{ item.name || item.identifier || item.id }}
<br>
</span>
</slot>
<slot
name="content"
:item="item"
Expand Down
45 changes: 33 additions & 12 deletions web/src/components/DLP/OverviewTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@
name="Related resources"
icon="mdi-book"
>
<template #itemTitle="slotProps">
<span v-if="slotProps.item.name || slotProps.item.identifier || slotProps.item.id">
<a
v-if="slotProps.item.url"
class="related-resource-link"
:href="slotProps.item.url"
target="_blank"
rel="noopener"
>
{{ slotProps.item.name || slotProps.item.identifier || slotProps.item.id }}
</a>
<template v-else>
{{ slotProps.item.name || slotProps.item.identifier || slotProps.item.id }}
</template>
<br>
</span>
</template>
<template #content="slotProps">
<span
v-if="slotProps.item.identifier"
Expand Down Expand Up @@ -117,18 +134,6 @@
<strong>Relation: </strong>{{ slotProps.item.relation }}
</span>
</template>
<template #links="slotProps">
<v-btn
v-if="slotProps.item.url"
icon
variant="text"
:href="slotProps.item.url"
target="_blank"
rel="noopener"
>
<v-icon>mdi-link</v-icon>
</v-btn>
</template>
</MetadataCard>

<v-card
Expand Down Expand Up @@ -362,3 +367,19 @@ onUnmounted(() => {
});

</script>

<style scoped>
/* Match the link styling used in https://docs.dandiarchive.org/ (Material for
* MkDocs): colored, no underline, with a smooth transition to a lighter blue on
* hover/focus — rather than the default underlined browser link. */
.related-resource-link {
color: #4051b5;
text-decoration: none;
transition: color 125ms;
}

.related-resource-link:hover,
.related-resource-link:focus {
color: #0091eb;
}
</style>
Loading