-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: enable text selection in author and Citation
formatting citation card
- Loading branch information
1 parent
fc2ee96
commit f1c1eb3
Showing
5 changed files
with
83 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<template> | ||
<div | ||
v-for="citation in citations" | ||
:key="citation.id" | ||
class="relative rounded-lg border border-gray-300 bg-white px-6 py-5 shadow-sm flex items-top space-x-3 hover:border-gray-400 focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-teal-500" | ||
> | ||
<div class="flex-1 min-w-0"> | ||
<a | ||
class="focus:outline-none cursor-pointer select-text" | ||
:href="getCitationLink(citation.doi)" | ||
:target="getTarget(citation.doi)" | ||
> | ||
<p class="text-sm font-medium text-gray-900"> | ||
{{ citation.title }} | ||
</p> | ||
<p class="text-sm text-teal-500"> | ||
{{ citation.authors }} | ||
</p> | ||
<p class="text-sm text-gray-500"> | ||
{{ citation.citation_text }} | ||
</p> | ||
<p v-if="citation.doi" class="text-sm font-sm text-gray-500"> | ||
DOI - | ||
<a :href="citation.doi" class="text-teal-900">{{ | ||
citation.doi | ||
}}</a> | ||
</p> | ||
<div | ||
class="text-sm text-gray-500 truncate line-clamp-2 ..." | ||
v-html="citation.abstract" | ||
></div> | ||
</a> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
components: {}, | ||
props: ["citations"], | ||
methods: { | ||
getCitationLink(doi) { | ||
var link = "#"; | ||
if (doi) { | ||
link = "https://doi.org/" + doi; | ||
} | ||
return link; | ||
}, | ||
getTarget(id) { | ||
var target = null; | ||
if (id) { | ||
target = "_blank"; | ||
} | ||
return target; | ||
}, | ||
}, | ||
}; | ||
</script> | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters