Merge pull request #4242 from mslourens/add_url_to_templates

Adds a url to the templates
This commit is contained in:
Martin McKeaveney 2022-01-31 16:37:46 +00:00 committed by GitHub
commit 42660969c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 0 deletions

View File

@ -337,6 +337,14 @@
}} }}
class="template-card" class="template-card"
> >
<a
href={item.url}
target="_blank"
class="external-link"
on:click|stopPropagation
>
<Icon name="LinkOut" size="S" />
</a>
<div class="card-body"> <div class="card-body">
<div style="color: {item.background}" class="iconAlign"> <div style="color: {item.background}" class="iconAlign">
<svg <svg
@ -518,6 +526,7 @@
border: 1px solid var(--spectrum-global-color-gray-300); border: 1px solid var(--spectrum-global-color-gray-300);
cursor: pointer; cursor: pointer;
display: flex; display: flex;
position: relative;
} }
.template-card:hover { .template-card:hover {
@ -528,6 +537,18 @@
align-items: center; align-items: center;
padding: 12px; padding: 12px;
} }
.external-link {
position: absolute;
top: 5px;
right: 5px;
color: var(--spectrum-global-color-gray-300);
z-index: 99;
}
.external-link:hover {
color: var(--spectrum-global-color-gray-500);
}
.iconAlign { .iconAlign {
padding: 0 0 0 var(--spacing-m); padding: 0 0 0 var(--spacing-m);
display: inline-block; display: inline-block;