diff --git a/components/ContentMarkdown.vue b/components/ContentMarkdown.vue deleted file mode 100644 index a33766114c..0000000000 --- a/components/ContentMarkdown.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - - - diff --git a/pages/contribute.vue b/pages/contribute.vue index a5f73b145f..05e41c4bfe 100644 --- a/pages/contribute.vue +++ b/pages/contribute.vue @@ -1,14 +1,32 @@ diff --git a/pages/first-time.vue b/pages/first-time.vue new file mode 100644 index 0000000000..3bdb0611e0 --- /dev/null +++ b/pages/first-time.vue @@ -0,0 +1,32 @@ + + + diff --git a/pages/first_time.vue b/pages/first_time.vue deleted file mode 100644 index a12a33bf23..0000000000 --- a/pages/first_time.vue +++ /dev/null @@ -1,14 +0,0 @@ - - - diff --git a/styles/content-markdown.scss b/styles/content-markdown.scss new file mode 100644 index 0000000000..c2d0def741 --- /dev/null +++ b/styles/content-markdown.scss @@ -0,0 +1,10 @@ +@import '~/node_modules/highlight.js/styles/github-dark.css'; + +.content { + pre, + blockquote { + background-color: black; + border-left: 5px solid #dbdbdb; + padding: 1.25em 1.5em; + } +} diff --git a/utils/highlight.ts b/utils/highlight.ts new file mode 100644 index 0000000000..4072653b22 --- /dev/null +++ b/utils/highlight.ts @@ -0,0 +1,14 @@ +import hljs from 'highlight.js' + +const highlight = function (str, lang) { + if (lang && hljs.getLanguage(lang)) { + try { + return hljs.highlight(str, { language: lang }).value + } catch (__) { + return '' + } + } + return '' +} + +export default highlight