From 67979211967a01ec5df00422bcfea2e2099ffa17 Mon Sep 17 00:00:00 2001 From: Andreas Rasmussen Date: Fri, 3 Feb 2017 16:40:38 +0100 Subject: [PATCH] Installed marked to get markdown functionality + adjustments --- package.json | 1 + src/routes/article.vue | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 40a70cd..1193392 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "dependencies": { "firebase": "^3.6.3", "firebaseui": "^1.0.0", + "marked": "^0.3.6", "moment": "^2.17.1", "particles.js": "^2.0.0", "vue": "^2.1.0", diff --git a/src/routes/article.vue b/src/routes/article.vue index 54e15c3..e4d38fc 100644 --- a/src/routes/article.vue +++ b/src/routes/article.vue @@ -64,14 +64,14 @@

Reading guide

- +
+
+

Hold øje med

+
+
+
-

Concepts

+

Concepts

  • {{ item.name }} @@ -136,6 +136,7 @@ import ArticleFinished from 'components/ArticleFinished' import { toggleArticleFinished } from 'utils/toggleArticleFinished' import { fetchDataRelatedToData } from 'utils/fetchDataRelatedToData' + import marked from 'marked' export default { name: 'ArticleRoute', components: { @@ -211,7 +212,8 @@ this.articleCourses = this.fetchDataRelatedToData('courses', this.article.courses) this.articleConcepts = this.fetchDataRelatedToData('concepts', this.article.concepts) this.dataLoaded = true - } + }, + markdown(text) { return marked(text) } } } @@ -242,7 +244,7 @@ } &_upper { - padding: $scale-7-1 $scale-8-1 $scale-4-1 !important; + padding: $scale-6-1 $scale-8-1 $scale-4-1 !important; @include breakpoint('desktop') { padding: $scale-4-1 $scale-4-1 $scale-2-1 !important; @@ -252,6 +254,9 @@ font-size: 16px !important; line-height: 1.6; max-width: 55ch; // 1ch = width of glyph '0', so this is approx. the wished for 65 chars per line + margin-bottom: $scale-2-1; + + &:last-child { margin-bottom: 0; } @include breakpoint('desktop') { font-size: 14px !important;