now supporting html in hero copy
Nichlas W. Andersen
committed Aug 10, 2018
commit 069b6bc18ee71824c6661a8b9dde15d4e4ede873
Showing 2
changed files with
9 additions
and 5 deletions
portfolio/.vuepress/components/Hero.vue
+7
-3
| @@ | @@ -1,11 +1,15 @@ |
| <template> | |
| - | <h1 class="title"> |
| - | <slot></slot> |
| - | </h1> |
| + | <h1 v-if="text" class="title" v-html="text" /> |
| </template> | |
| <script> | |
| export default { | |
| + | props: { |
| + | text: { |
| + | type: String, |
| + | required: false |
| + | } |
| + | } |
| } | |
| </script> | |
portfolio/index.md
+2
-2
| @@ | @@ -4,5 +4,5 @@ hero_text: "<strong>We're Acme</strong>, we work for brands. But most importantl |
| we work for fun." | |
| --- | |
| - | <Hero>{{ $page.frontmatter.hero_text }}</Hero> |
| - | <WorksList /> |
| \ No newline at end of file | |
| + | <Hero :text="$page.frontmatter.hero_text" /> |
| + | <WorksList /> |