add ButtonUrl component & misc fixes
This commit is contained in:
@@ -32,7 +32,7 @@ export default {
|
|||||||
border: 0;
|
border: 0;
|
||||||
transition: 100ms;
|
transition: 100ms;
|
||||||
|
|
||||||
@include media-breakpoint-up($size-bp) {
|
@media (orientation: landscape) {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
height: 250px;
|
height: 250px;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<b-button
|
||||||
|
v-on="$listeners"
|
||||||
|
v-bind="$attrs"
|
||||||
|
variant="link"
|
||||||
|
class="btn-url"
|
||||||
|
:href="link.url"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
<span class="sr-only">{{ link.title }}</span>
|
||||||
|
<svg aria-hiden="true" viewBox="0 0 39 39">
|
||||||
|
<path d="M 18,6 h-12 v27 h27 v-12" />
|
||||||
|
<path d="M 24,6 h9 v9" />
|
||||||
|
<path d="M 33,6 13.5,25.5" />
|
||||||
|
</svg>
|
||||||
|
</b-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'ButtonUrl',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
link: { type: Object, required: true }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.btn-url {
|
||||||
|
padding: 0;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border: 0;
|
||||||
|
line-height: 0;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
top: -3px;
|
||||||
|
|
||||||
|
@include media-breakpoint-up($size-bp) {
|
||||||
|
top: -5px;
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
path {
|
||||||
|
stroke: $black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
pointer-events: none;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
path {
|
||||||
|
fill: none;
|
||||||
|
stroke: lighten($black, 15%);
|
||||||
|
stroke-width: 4px;
|
||||||
|
stroke-linecap: round;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -137,7 +137,9 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
display: block;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
max-height: 80vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
font: {
|
font: {
|
||||||
|
|||||||
@@ -10,22 +10,23 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<figcaption class="mt-3">
|
<figcaption class="mt-3">
|
||||||
<p class="m-0">
|
<node-view-title :node="node" tag="p" class="m-0" />
|
||||||
<strong>{{ toCommaList(node.authors) }}</strong>,
|
|
||||||
<em v-html="' ' + trim(node.title)" />
|
|
||||||
<br class="d-none d-md-inline">
|
|
||||||
{{ node.date.start }}
|
|
||||||
</p>
|
|
||||||
</figcaption>
|
</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { trim, toCommaList } from '@/helpers/common'
|
import { trim, toCommaList } from '@/helpers/common'
|
||||||
|
import { NodeViewTitle } from '@/components/nodes'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NodeViewFigure',
|
name: 'NodeViewFigure',
|
||||||
|
|
||||||
|
components: {
|
||||||
|
NodeViewTitle
|
||||||
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
node: { type: Object, required: true }
|
node: { type: Object, required: true }
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<node-view-title
|
<node-view-title
|
||||||
:node="node" tag="h4"
|
:node="node" tag="h4"
|
||||||
block edition
|
block edition url
|
||||||
class="mr-auto"
|
class="mr-auto"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,7 +10,10 @@
|
|||||||
class="node-view-title-container"
|
class="node-view-title-container"
|
||||||
>
|
>
|
||||||
<slot name="default" />
|
<slot name="default" />
|
||||||
<span><strong>{{ toCommaList(node.authors) }}</strong>,</span>
|
<span>
|
||||||
|
<strong>{{ toCommaList(node.authors) }}</strong>,
|
||||||
|
<button-url v-if="url && node.piece" :link="node.piece" />
|
||||||
|
</span>
|
||||||
<span>
|
<span>
|
||||||
<span v-if="node.preTitle" v-html="' ' + trim(node.preTitle) + ','" />
|
<span v-if="node.preTitle" v-html="' ' + trim(node.preTitle) + ','" />
|
||||||
<em v-html="' ' + trim(node.italTitle || node.title) || 'pas de titre ital'" />
|
<em v-html="' ' + trim(node.italTitle || node.title) || 'pas de titre ital'" />
|
||||||
@@ -39,7 +42,8 @@ export default {
|
|||||||
link: { type: Boolean, default: false },
|
link: { type: Boolean, default: false },
|
||||||
block: { type: Boolean, default: false },
|
block: { type: Boolean, default: false },
|
||||||
edition: { type: Boolean, default: false },
|
edition: { type: Boolean, default: false },
|
||||||
noDate: { type: Boolean, default: false }
|
noDate: { type: Boolean, default: false },
|
||||||
|
url: { type: Boolean, default: false }
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: 100%;
|
height: calc(100% - 4rem);
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
||||||
width: calc(100% - 4rem);
|
width: calc(100% - 4rem);
|
||||||
@@ -115,7 +115,7 @@ export default {
|
|||||||
width: calc(100% - 270px);
|
width: calc(100% - 270px);
|
||||||
|
|
||||||
@include media-breakpoint-up($size-bp) {
|
@include media-breakpoint-up($size-bp) {
|
||||||
width: calc(100% - 450px);
|
width: calc(100% - 500px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user