forked from trent_larson/crowd-funder-for-time-pwa
allow link to the large version of a project image
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
<template>
|
||||
<div v-html="generateIdenticon()" class="h-full w-full object-contain"></div>
|
||||
<a
|
||||
v-if="linkToFull && imageUrl"
|
||||
:href="imageUrl"
|
||||
target="_blank"
|
||||
class="h-full w-full object-contain"
|
||||
>
|
||||
<div v-html="generateIdenticon()" class="h-full w-full object-contain" />
|
||||
</a>
|
||||
<div
|
||||
v-else
|
||||
v-html="generateIdenticon()"
|
||||
class="h-full w-full object-contain"
|
||||
/>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { toSvg } from "jdenticon";
|
||||
@@ -22,6 +34,7 @@ export default class ProjectIcon extends Vue {
|
||||
@Prop entityId = "";
|
||||
@Prop iconSize = 0;
|
||||
@Prop imageUrl = "";
|
||||
@Prop linkToFull = false;
|
||||
|
||||
generateIdenticon() {
|
||||
if (this.imageUrl) {
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
:entityId="projectId"
|
||||
:iconSize="64"
|
||||
:imageUrl="imageUrl"
|
||||
:linkToFull="true"
|
||||
class="block border border-slate-300 rounded-md max-h-16 max-w-16"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user