diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-01-25 22:32:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-25 22:32:16 +0100 |
commit | 5305c18b05803bf0d032027e645c71ac59627621 (patch) | |
tree | 9d4597e72912c9fe2b4c38b519d8fc3a09948fd5 /pages | |
parent | 1b74216fc4afa740991dcc9986eb6843c5b07a59 (diff) | |
parent | 32adaba2ded83ab0d69ebeb4d1d839476d94c476 (diff) | |
download | puszcza-5305c18b05803bf0d032027e645c71ac59627621.tar.gz puszcza-5305c18b05803bf0d032027e645c71ac59627621.zip |
Merge pull request #23 from 19pdh/post-image
Post image
Diffstat (limited to 'pages')
-rw-r--r-- | pages/kronika/_year/_month/_day/_title/index.vue | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/pages/kronika/_year/_month/_day/_title/index.vue b/pages/kronika/_year/_month/_day/_title/index.vue index 9fab1d0..331ed7a 100644 --- a/pages/kronika/_year/_month/_day/_title/index.vue +++ b/pages/kronika/_year/_month/_day/_title/index.vue @@ -5,6 +5,12 @@ <p>Nie znaleziono wpisu</p> </div> <section v-else class="article"> + <img + v-if="attributes.image" + :src="attributes.image" + :alt="attributes.title" + :title="attributes.title" + /> <article class="content" v-html="content"></article> </section> </div> @@ -22,19 +28,24 @@ export default { { hid: 'og:title', property: 'og:title', - content: this.attributes.title + content: this.attributes.title, }, { hid: 'og:type', property: 'og:type', - content: 'article' + content: 'article', }, { hid: 'og:article:author', property: 'og:article:author', - content: this.attributes.author - } - ] + content: this.attributes.author, + }, + { + hid: 'og:image', + property: 'og:image', + content: this.attributes.image, + }, + ], } }, async asyncData({ params }) { @@ -46,14 +57,14 @@ export default { return { params, attributes: post.content.meta, - content: post.content.html + content: post.content.html, } }, data() { return { - notFound: false + notFound: false, } - } + }, } </script> @@ -69,7 +80,8 @@ export default { } .article img { width: 100%; - border-radius: 5px; + /*border-radius: 5px;*/ + box-shadow: inset 0px 0px 100px rgba(0, 0, 0, 0.25); } .article h1 { |