Open gutenberg links in the same tab.
This commit is contained in:
parent
91346de697
commit
2982520e17
|
@ -70,8 +70,7 @@ export default function ({ attributes, setAttributes, className, isSelected, cli
|
||||||
}
|
}
|
||||||
<a
|
<a
|
||||||
id={ isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id }
|
id={ isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id }
|
||||||
href={ collection.url }
|
href={ collection.url }>
|
||||||
target="_blank">
|
|
||||||
{ !showCollectionThumbnail ?
|
{ !showCollectionThumbnail ?
|
||||||
<div class="collection-items-grid">
|
<div class="collection-items-grid">
|
||||||
<img
|
<img
|
||||||
|
|
|
@ -19,8 +19,7 @@
|
||||||
<a
|
<a
|
||||||
v-if="showCollectionThumbnail"
|
v-if="showCollectionThumbnail"
|
||||||
:id="isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id"
|
:id="isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id"
|
||||||
:href="collection.url"
|
:href="collection.url">
|
||||||
target="_blank">
|
|
||||||
<img
|
<img
|
||||||
:src="
|
:src="
|
||||||
collection.thumbnail && collection.thumbnail[maxCollectionsPerScreen > 4 ? (!cropImagesToSquare ? 'tainacan-medium-full' : 'tainacan-medium') : 'full'][0] && collection.thumbnail[maxCollectionsPerScreen > 4 ? (!cropImagesToSquare ? 'tainacan-medium-full' : 'tainacan-medium') : 'full'][0]
|
collection.thumbnail && collection.thumbnail[maxCollectionsPerScreen > 4 ? (!cropImagesToSquare ? 'tainacan-medium-full' : 'tainacan-medium') : 'full'][0] && collection.thumbnail[maxCollectionsPerScreen > 4 ? (!cropImagesToSquare ? 'tainacan-medium-full' : 'tainacan-medium') : 'full'][0]
|
||||||
|
@ -54,8 +53,7 @@
|
||||||
<a
|
<a
|
||||||
v-else
|
v-else
|
||||||
:id="isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id"
|
:id="isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id"
|
||||||
:href="collection.url"
|
:href="collection.url">
|
||||||
target="_blank">
|
|
||||||
<div class="collection-items-grid">
|
<div class="collection-items-grid">
|
||||||
<blur-hash-image
|
<blur-hash-image
|
||||||
:height="collectionItems[collection.id][0] ? $thumbHelper.getHeight(collectionItems[collection.id][0]['thumbnail'], 'tainacan-medium') : 275"
|
:height="collectionItems[collection.id][0] ? $thumbHelper.getHeight(collectionItems[collection.id][0]['thumbnail'], 'tainacan-medium') : 275"
|
||||||
|
|
|
@ -81,8 +81,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
||||||
}
|
}
|
||||||
<a
|
<a
|
||||||
id={ isNaN(item.id) ? item.id : 'item-id-' + item.id }
|
id={ isNaN(item.id) ? item.id : 'item-id-' + item.id }
|
||||||
href={ item.url }
|
href={ item.url }>
|
||||||
target="_blank">
|
|
||||||
<div class="items-list-item--image-wrap">
|
<div class="items-list-item--image-wrap">
|
||||||
<img
|
<img
|
||||||
src={ thumbHelper.getSrc(item['thumbnail'], (maxItemsPerScreen > 4 ? (!cropImagesToSquare ? 'tainacan-medium-full' : 'tainacan-medium') : 'large'), item['document_mimetype']) }
|
src={ thumbHelper.getSrc(item['thumbnail'], (maxItemsPerScreen > 4 ? (!cropImagesToSquare ? 'tainacan-medium-full' : 'tainacan-medium') : 'large'), item['document_mimetype']) }
|
||||||
|
@ -569,7 +568,6 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
||||||
:
|
:
|
||||||
<a
|
<a
|
||||||
href={ collection.url ? collection.url : '' }
|
href={ collection.url ? collection.url : '' }
|
||||||
target="_blank"
|
|
||||||
class="carousel-items-collection-header">
|
class="carousel-items-collection-header">
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
:style="{ height: '165px' }"/>
|
:style="{ height: '165px' }"/>
|
||||||
<a
|
<a
|
||||||
v-else
|
v-else
|
||||||
target="_blank"
|
|
||||||
:href="collection.url ? collection.url : ''"
|
:href="collection.url ? collection.url : ''"
|
||||||
class="carousel-items-collection-header">
|
class="carousel-items-collection-header">
|
||||||
<div
|
<div
|
||||||
|
@ -69,8 +68,7 @@
|
||||||
:class="{ 'is-forced-square': cropImagesToSquare }">
|
:class="{ 'is-forced-square': cropImagesToSquare }">
|
||||||
<a
|
<a
|
||||||
:id="isNaN(item.id) ? item.id : 'item-id-' + item.id"
|
:id="isNaN(item.id) ? item.id : 'item-id-' + item.id"
|
||||||
:href="item.url"
|
:href="item.url">
|
||||||
target="_blank">
|
|
||||||
<blur-hash-image
|
<blur-hash-image
|
||||||
:height="$thumbHelper.getHeight(item['thumbnail'], (maxItemsPerScreen > 4 ? (!cropImagesToSquare ? 'tainacan-medium-full' : 'tainacan-medium') : 'large'))"
|
:height="$thumbHelper.getHeight(item['thumbnail'], (maxItemsPerScreen > 4 ? (!cropImagesToSquare ? 'tainacan-medium-full' : 'tainacan-medium') : 'large'))"
|
||||||
:width="$thumbHelper.getWidth(item['thumbnail'], (maxItemsPerScreen > 4 ? (!cropImagesToSquare ? 'tainacan-medium-full' : 'tainacan-medium') : 'large'))"
|
:width="$thumbHelper.getWidth(item['thumbnail'], (maxItemsPerScreen > 4 ? (!cropImagesToSquare ? 'tainacan-medium-full' : 'tainacan-medium') : 'large'))"
|
||||||
|
|
|
@ -66,8 +66,7 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
||||||
}
|
}
|
||||||
<a
|
<a
|
||||||
id={ isNaN(term.id) ? term.id : 'term-id-' + term.id }
|
id={ isNaN(term.id) ? term.id : 'term-id-' + term.id }
|
||||||
href={ term.url }
|
href={ term.url }>
|
||||||
target="_blank">
|
|
||||||
{ !showTermThumbnail ?
|
{ !showTermThumbnail ?
|
||||||
<div class="term-items-grid">
|
<div class="term-items-grid">
|
||||||
<img
|
<img
|
||||||
|
|
|
@ -19,8 +19,7 @@
|
||||||
<a
|
<a
|
||||||
v-if="showTermThumbnail"
|
v-if="showTermThumbnail"
|
||||||
:id="isNaN(term.id) ? term.id : 'term-id-' + term.id"
|
:id="isNaN(term.id) ? term.id : 'term-id-' + term.id"
|
||||||
:href="term.url"
|
:href="term.url">
|
||||||
target="_blank">
|
|
||||||
<img
|
<img
|
||||||
:src="term.header_image ? term.header_image : `${tainacanBaseUrl}/assets/images/placeholder_square.png`"
|
:src="term.header_image ? term.header_image : `${tainacanBaseUrl}/assets/images/placeholder_square.png`"
|
||||||
:alt="term.name ? term.name : $root.__('Thumbnail', 'tainacan')" >
|
:alt="term.name ? term.name : $root.__('Thumbnail', 'tainacan')" >
|
||||||
|
@ -29,8 +28,7 @@
|
||||||
<a
|
<a
|
||||||
v-else
|
v-else
|
||||||
:id="isNaN(term.id) ? term.id : 'term-id-' + term.id"
|
:id="isNaN(term.id) ? term.id : 'term-id-' + term.id"
|
||||||
:href="term.url"
|
:href="term.url">
|
||||||
target="_blank">
|
|
||||||
<div class="term-items-grid">
|
<div class="term-items-grid">
|
||||||
<blur-hash-image
|
<blur-hash-image
|
||||||
:height="termItems[term.id][2] ? $thumbHelper.getHeight(termItems[term.id][0]['thumbnail'], 'tainacan-medium') : 275"
|
:height="termItems[term.id][2] ? $thumbHelper.getHeight(termItems[term.id][0]['thumbnail'], 'tainacan-medium') : 275"
|
||||||
|
|
|
@ -44,7 +44,6 @@ export default function({ attributes, setAttributes, className, isSelected }) {
|
||||||
<a
|
<a
|
||||||
id={ isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id }
|
id={ isNaN(collection.id) ? collection.id : 'collection-id-' + collection.id }
|
||||||
href={ collection.url }
|
href={ collection.url }
|
||||||
target="_blank"
|
|
||||||
className={ (!showName ? 'collection-without-name' : '') + ' ' + (!showImage ? 'collection-without-image' : '') }>
|
className={ (!showName ? 'collection-without-name' : '') + ' ' + (!showImage ? 'collection-without-image' : '') }>
|
||||||
<img
|
<img
|
||||||
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_blocks.base_url}/assets/images/placeholder_square.png`}
|
src={ collection.thumbnail && collection.thumbnail[0] && collection.thumbnail[0].src ? collection.thumbnail[0].src : `${tainacan_blocks.base_url}/assets/images/placeholder_square.png`}
|
||||||
|
|
|
@ -95,13 +95,14 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
||||||
id={ isNaN(item.id) ? item.id : 'item-id-' + item.id }
|
id={ isNaN(item.id) ? item.id : 'item-id-' + item.id }
|
||||||
href={ item.url }
|
href={ item.url }
|
||||||
onClick={ (event) => event.preventDefault() }
|
onClick={ (event) => event.preventDefault() }
|
||||||
target="_blank"
|
|
||||||
className={ (!showName ? 'item-without-title' : '') + ' ' + (!showImage ? 'item-without-image' : '') }>
|
className={ (!showName ? 'item-without-title' : '') + ' ' + (!showImage ? 'item-without-image' : '') }>
|
||||||
<img
|
<img
|
||||||
src={ thumbHelper.getSrc(item['thumbnail'], ( (layout == 'list' || cropImagesToSquare) ? 'tainacan-medium' : 'tainacan-medium-full'), item['document_mimetype']) }
|
src={ thumbHelper.getSrc(item['thumbnail'], ( (layout == 'list' || cropImagesToSquare) ? 'tainacan-medium' : 'tainacan-medium-full'), item['document_mimetype']) }
|
||||||
srcSet={ thumbHelper.getSrcSet(item['thumbnail'], ( (layout == 'list' || cropImagesToSquare) ? 'tainacan-medium' : 'tainacan-medium-full'), item['document_mimetype']) }
|
srcSet={ thumbHelper.getSrcSet(item['thumbnail'], ( (layout == 'list' || cropImagesToSquare) ? 'tainacan-medium' : 'tainacan-medium-full'), item['document_mimetype']) }
|
||||||
alt={ item.thumbnail_alt ? item.thumbnail_alt : (item && item.title ? item.title : __( 'Thumbnail', 'tainacan' )) }/>
|
alt={ item.thumbnail_alt ? item.thumbnail_alt : (item && item.title ? item.title : __( 'Thumbnail', 'tainacan' )) }/>
|
||||||
<span>{ item.title ? item.title : '' }</span>
|
{ item.title ?
|
||||||
|
<span>{ item.title }</span>
|
||||||
|
: null }
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
@ -848,7 +849,6 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
||||||
:
|
:
|
||||||
<a
|
<a
|
||||||
href={ collection.url ? collection.url : '' }
|
href={ collection.url ? collection.url : '' }
|
||||||
target="_blank"
|
|
||||||
class="dynamic-items-collection-header">
|
class="dynamic-items-collection-header">
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
:style="{ height: '165px' }"/>
|
:style="{ height: '165px' }"/>
|
||||||
<a
|
<a
|
||||||
v-else
|
v-else
|
||||||
target="_blank"
|
|
||||||
:href="collection.url ? collection.url : ''"
|
:href="collection.url ? collection.url : ''"
|
||||||
class="dynamic-items-collection-header">
|
class="dynamic-items-collection-header">
|
||||||
<div
|
<div
|
||||||
|
@ -204,7 +203,6 @@
|
||||||
<a
|
<a
|
||||||
:id="isNaN(item.id) ? item.id : 'item-id-' + item.id"
|
:id="isNaN(item.id) ? item.id : 'item-id-' + item.id"
|
||||||
:href="item.url"
|
:href="item.url"
|
||||||
target="_blank"
|
|
||||||
:class="(!showName ? 'item-without-title' : '') + ' ' + (!showImage ? 'item-without-image' : '')">
|
:class="(!showName ? 'item-without-title' : '') + ' ' + (!showImage ? 'item-without-image' : '')">
|
||||||
<blur-hash-image
|
<blur-hash-image
|
||||||
v-if="showImage"
|
v-if="showImage"
|
||||||
|
@ -215,7 +213,7 @@
|
||||||
:hash="$thumbHelper.getBlurhashString(item['thumbnail'], ( layout == 'list' || cropImagesToSquare ? 'tainacan-medium' : 'tainacan-medium-full' ))"
|
:hash="$thumbHelper.getBlurhashString(item['thumbnail'], ( layout == 'list' || cropImagesToSquare ? 'tainacan-medium' : 'tainacan-medium-full' ))"
|
||||||
:alt="item.thumbnail_alt ? item.thumbnail_alt : (item && item.name ? item.name : $root.__( 'Thumbnail', 'tainacan' ))"
|
:alt="item.thumbnail_alt ? item.thumbnail_alt : (item && item.name ? item.name : $root.__( 'Thumbnail', 'tainacan' ))"
|
||||||
:transition-duration="500" />
|
:transition-duration="500" />
|
||||||
<span>{{ item.title ? item.title : '' }}</span>
|
<span v-if="item.title">{{ item.title }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -252,7 +250,6 @@
|
||||||
<a
|
<a
|
||||||
:id="isNaN(item.id) ? item.id : 'item-id-' + item.id"
|
:id="isNaN(item.id) ? item.id : 'item-id-' + item.id"
|
||||||
:href="item.url"
|
:href="item.url"
|
||||||
target="_blank"
|
|
||||||
:class="(!showName ? 'item-without-title' : '') + ' ' + (!showImage ? 'item-without-image' : '')">
|
:class="(!showName ? 'item-without-title' : '') + ' ' + (!showImage ? 'item-without-image' : '')">
|
||||||
<blur-hash-image
|
<blur-hash-image
|
||||||
:height="$thumbHelper.getHeight(item['thumbnail'], ( layout == 'list' || cropImagesToSquare ? 'tainacan-medium' : 'tainacan-medium-full' ))"
|
:height="$thumbHelper.getHeight(item['thumbnail'], ( layout == 'list' || cropImagesToSquare ? 'tainacan-medium' : 'tainacan-medium-full' ))"
|
||||||
|
@ -262,7 +259,7 @@
|
||||||
:hash="$thumbHelper.getBlurhashString(item['thumbnail'], ( layout == 'list' || cropImagesToSquare ? 'tainacan-medium' : 'tainacan-medium-full' ))"
|
:hash="$thumbHelper.getBlurhashString(item['thumbnail'], ( layout == 'list' || cropImagesToSquare ? 'tainacan-medium' : 'tainacan-medium-full' ))"
|
||||||
:alt="item.thumbnail_alt ? item.thumbnail_alt : (item && item.name ? item.name : $root.__( 'Thumbnail', 'tainacan' ))"
|
:alt="item.thumbnail_alt ? item.thumbnail_alt : (item && item.name ? item.name : $root.__( 'Thumbnail', 'tainacan' ))"
|
||||||
:transition-duration="500" />
|
:transition-duration="500" />
|
||||||
<span>{{ item.title ? item.title : '' }}</span>
|
<span v-if="item.title">{{ item.title }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -99,7 +99,6 @@ export default function({ attributes, setAttributes, className, isSelected, clie
|
||||||
id={ isNaN(facetId) ? facetId : 'facet-id-' + facetId }
|
id={ isNaN(facetId) ? facetId : 'facet-id-' + facetId }
|
||||||
href={ !appendChildTerms ? ((linkTermFacetsToTermPage && isMetadatumTypeTaxonomy(metadatumType)) ? facet.term_url : facet.url) : (facet.total_children > 0 ? null : (linkTermFacetsToTermPage ? facet.term_url : facet.url)) }
|
href={ !appendChildTerms ? ((linkTermFacetsToTermPage && isMetadatumTypeTaxonomy(metadatumType)) ? facet.term_url : facet.url) : (facet.total_children > 0 ? null : (linkTermFacetsToTermPage ? facet.term_url : facet.url)) }
|
||||||
onClick={ () => { (appendChildTerms && facet.total_children > 0) ? displayChildTerms(facetId) : null } }
|
onClick={ () => { (appendChildTerms && facet.total_children > 0) ? displayChildTerms(facetId) : null } }
|
||||||
target="_blank"
|
|
||||||
style={{ fontSize: layout == 'cloud' && facet.total_items ? + (1 + (cloudRate/4) * Math.log(facet.total_items)) + 'em' : ''}}>
|
style={{ fontSize: layout == 'cloud' && facet.total_items ? + (1 + (cloudRate/4) * Math.log(facet.total_items)) + 'em' : ''}}>
|
||||||
{ isMetadatumTypeTaxonomy(metadatumType) ?
|
{ isMetadatumTypeTaxonomy(metadatumType) ?
|
||||||
<img
|
<img
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
:id="isNaN(facetId) ? facetId : 'facet-id-' + facetId"
|
:id="isNaN(facetId) ? facetId : 'facet-id-' + facetId"
|
||||||
:href="(appendChildTerms && facet.total_children > 0) ? null : ((linkTermFacetsToTermPage && isMetadatumTypeTaxonomy) ? facet.term_url : facet.url)"
|
:href="(appendChildTerms && facet.total_children > 0) ? null : ((linkTermFacetsToTermPage && isMetadatumTypeTaxonomy) ? facet.term_url : facet.url)"
|
||||||
@click="() => { (appendChildTerms && facet.total_children > 0) ? displayChildTerms(facetId) : null }"
|
@click="() => { (appendChildTerms && facet.total_children > 0) ? displayChildTerms(facetId) : null }"
|
||||||
target="_blank"
|
|
||||||
:style="{ fontSize: layout == 'cloud' && facet.total_items ? + (1 + (cloudRate/4) * Math.log(facet.total_items)) + 'em' : ''}">
|
:style="{ fontSize: layout == 'cloud' && facet.total_items ? + (1 + (cloudRate/4) * Math.log(facet.total_items)) + 'em' : ''}">
|
||||||
<img
|
<img
|
||||||
v-if="isMetadatumTypeTaxonomy"
|
v-if="isMetadatumTypeTaxonomy"
|
||||||
|
|
|
@ -44,7 +44,6 @@ export default function({ attributes, setAttributes, className, isSelected }) {
|
||||||
<a
|
<a
|
||||||
id={ isNaN(item.id) ? item.id : 'item-id-' + item.id }
|
id={ isNaN(item.id) ? item.id : 'item-id-' + item.id }
|
||||||
href={ item.url }
|
href={ item.url }
|
||||||
target="_blank"
|
|
||||||
className={ (!showName ? 'item-without-title' : '') + ' ' + (!showImage ? 'item-without-image' : '') }>
|
className={ (!showName ? 'item-without-title' : '') + ' ' + (!showImage ? 'item-without-image' : '') }>
|
||||||
<img
|
<img
|
||||||
src={ item.thumbnail && item.thumbnail[0] && item.thumbnail[0].src ? item.thumbnail[0].src : `${tainacan_blocks.base_url}/assets/images/placeholder_square.png`}
|
src={ item.thumbnail && item.thumbnail[0] && item.thumbnail[0].src ? item.thumbnail[0].src : `${tainacan_blocks.base_url}/assets/images/placeholder_square.png`}
|
||||||
|
|
|
@ -42,7 +42,6 @@ export default function({ attributes, setAttributes, className, isSelected }){
|
||||||
<a
|
<a
|
||||||
id={ isNaN(term.id) ? term.id : 'term-id-' + term.id }
|
id={ isNaN(term.id) ? term.id : 'term-id-' + term.id }
|
||||||
href={ term.url }
|
href={ term.url }
|
||||||
target="_blank"
|
|
||||||
className={ (!showName ? 'term-without-name' : '') + ' ' + (!showImage ? 'term-without-image' : '') }>
|
className={ (!showName ? 'term-without-name' : '') + ' ' + (!showImage ? 'term-without-image' : '') }>
|
||||||
<img
|
<img
|
||||||
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_blocks.base_url}/assets/images/placeholder_square.png`}
|
src={ term.header_image && term.header_image[0] && term.header_image[0].src ? term.header_image[0].src : `${tainacan_blocks.base_url}/assets/images/placeholder_square.png`}
|
||||||
|
|
Loading…
Reference in New Issue