Skip to content

Commit

Permalink
feat: added direct links to lens.org (resolves #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
CS76 committed Dec 15, 2024
1 parent f030da4 commit 114503e
Showing 1 changed file with 43 additions and 4 deletions.
47 changes: 43 additions & 4 deletions resources/views/livewire/molecule-details.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ class="ml-3 text-base"><b>Class</b>:
class="absolute -inset-px rounded-xl border-2 border-transparent opacity-0 [background:linear-gradient(var(--quick-links-hover-bg,theme(colors.sky.50)),var(--quick-links-hover-bg,theme(colors.sky.50)))_padding-box,linear-gradient(to_top,theme(colors.red.400),theme(colors.cyan.400),theme(colors.sky.500))_border-box] group-hover:opacity-100">
</div>
<div
class="relative overflow-hidden rounded-xl p-6">
class="relative rounded-xl p-6">
<svg aria-hidden="true"
viewBox="0 0 32 32" fill="none"
class="h-8 w-8 [--icon-foreground:theme(colors.slate.900)] [--icon-background:theme(colors.white)]">
Expand Down Expand Up @@ -615,24 +615,63 @@ class="mt-2 font-bold text-base text-gray-900">
<a target="_blank"
href="https://doi.org/{{ $citation->doi }}">
<span
class="absolute -inset-px rounded-xl"></span>{{ $citation->title }}
class="rounded-xl"></span>{{ $citation->title }}
</a>
</h2>
<h2
class="mt-2 font-display text-base text-slate-900">
<a target="_blank"
href="https://doi.org/{{ $citation->doi }}">
<span
class="absolute -inset-px rounded-xl"></span>{{ $citation->authors }}
class="rounded-xl"></span>{{ $citation->authors }}
</a>
</h2>
<h2
class="mt-2 font-display text-base text-slate-900">
<a target="_blank"
href="https://doi.org/{{ $citation->doi }}">
<span
class="absolute -inset-px rounded-xl"></span>{{ $citation->doi }}
class="rounded-xl"></span>DOI: {{ $citation->doi }}
</a>
<span class="ml-3 mr-4">
<livewire:copy-button
text-to-copy="{{ $citation->doi }}" />
</span>
</h2>
<h2
class="mt-2 font-display text-base text-slate-900">
<a target="_blank"
href="https://www.lens.org/lens/search/scholar/list?q=ids.doi:{{ $citation->doi }}">
<span
class="rounded-xl"></span>Lens.org <svg xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="size-4 inline">
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25">
</path>
</svg>
</a>
<span x-data="{ tooltip: false }"
x-on:mouseover="tooltip = true"
x-on:mouseleave="tooltip = false"
class="h-5 w-5 cursor-pointer inline">
<svg xmlns="http://www.w3.org/2000/svg"
class="h-5 w-5 inline" fill="none"
viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round"
stroke-linejoin="round" stroke-width="2"
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
</svg>
<div x-show="tooltip"
class="text-sm text-white absolute bg-green-400 rounded-lg p-2 transform -translate-y-8 translate-x-8 z-10">
The Lens serves all the patents and scholarly work in the world as a free, open and secure digital public good, with user privacy a paramount focus.
</div>
</span>
</h2>
</div>
</div>
Expand Down

0 comments on commit 114503e

Please sign in to comment.