1 line
3.7 KiB
JSON
1 line
3.7 KiB
JSON
{"remainingRequest":"/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/vue-loader/lib/index.js??vue-loader-options!/home/theo/Documents/vue-cli-test/md-parser/src/components/PublishedPage.vue?vue&type=style&index=0&id=6abff9d2&scoped=true&lang=css&","dependencies":[{"path":"/home/theo/Documents/vue-cli-test/md-parser/src/components/PublishedPage.vue","mtime":1594991999773},{"path":"/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/css-loader/dist/cjs.js","mtime":499162500000},{"path":"/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/vue-loader/lib/loaders/stylePostLoader.js","mtime":499162500000},{"path":"/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/postcss-loader/src/index.js","mtime":499162500000},{"path":"/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/usr/local/lib/node_modules/@vue/cli-service-global/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKI3B1Ymxpc2hlZC1tZXNzYWdlIHsKICBtYXgtd2lkdGg6IDgwJTsKICBkaXNwbGF5OiBibG9jazsKICB0ZXh0LWFsaWduOiBjZW50ZXI7Cn0KCmhyIHsKICBtYXgtd2lkdGg6IDgwJTsKICBtYXJnaW46IDUwcHg7Cn0KCiNhcnRpY2xlLXRpdGxlOmJlZm9yZSB7CiAgY29udGVudDogIsKrICIKfQoKI2FydGljbGUtdGl0bGU6YWZ0ZXIgewogIGNvbnRlbnQ6ICIgwrsiCn0K"},{"version":3,"sources":["PublishedPage.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA","file":"PublishedPage.vue","sourceRoot":"components","sourcesContent":["<template>\n <div>\n <p class='alert alert-primary' id='published-message'>Your article was published !</p>\n <a @click.prevent.once='generateMDFile' value='Download .md file' class='btn btn-secondary' id='download-button'>Download !</a>\n <br>\n <hr>\n <br>\n <span>{{ author }} wrote </span>on {{ date_created }}:</span>\n <hr>\n <h1 id='article-title'>{{ title}}</h1>\n <vue-markdown :source='articleText'></vue-markdown>\n\n </div>\n</template>\n\n<script>\nimport VueMarkdown from '../../node_modules/vue-markdown/src/VueMarkdown.js'\n\nexport default {\n components: {\n VueMarkdown,\n },\n name: 'PublishedPage',\n props: {\n },\n data: function(){\n return {\n ready: false,\n }\n },\n computed: {\n articleText () {\n return this.$store.state.article.content\n },\n author () {\n return this.$store.state.article.meta.author\n },\n date_created () {\n return this.$store.state.article.meta.date_created\n },\n title () {\n return this.$store.state.article.meta.title\n }\n },\n methods : {\n generateMDFile : function(){\n if(this.ready){\n return\n }\n let file = new Blob(\n [this.articleText],\n {type: 'text/text'}\n )\n let fileURL = URL.createObjectURL(file)\n // create the link\n const linkElement = document.getElementById('download-button')\n\n // add the file url\n linkElement.setAttribute('href', fileURL)\n linkElement.innerHTML = 'Ready !'\n linkElement.setAttribute('download', 'article.md')\n this.ready = true\n },\n }\n}\n</script>\n\n<!-- Add \"scoped\" attribute to limit CSS to this component only -->\n<style scoped>\n#published-message {\n max-width: 80%;\n display: block;\n text-align: center;\n}\n\nhr {\n max-width: 80%;\n margin: 50px;\n}\n\n#article-title:before {\n content: \"« \"\n}\n\n#article-title:after {\n content: \" »\"\n}\n</style>\n"]}]} |