Guest User

Untitled

a guest
Nov 29th, 2018
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <template>
  2.   <div>
  3.     <site-header></site-header>
  4.     <div class="wrapper">
  5.       <side-bar></side-bar>
  6.       <main class="container" v-html="pureContent()" />
  7.     </div>
  8.   </div>
  9. </template>
  10.  
  11. <script>
  12. import SiteHeader from '~/components/presentational/SiteHeader'
  13. import SideBar from '~/components/presentational/SideBar'
  14. import NoteBlock from '~/components/presentational/NoteBlock'
  15.  
  16. export default {
  17.   name: 'SidebarTemplate',
  18.   props: ['breadcrumb', 'attributes', 'content'],
  19.   components: {
  20.     SiteHeader,
  21.     SideBar,
  22.     NoteBlock
  23.   },
  24.   methods: {
  25.     pureContent () {
  26.       const c = this.content.replaced
  27.       const re = new RegExp(`<p>--FML-\\[(\\w+)\\]</p>`, 'g')
  28.       return c.replace(re, ($0, $1) => `<component v-bind:is="${$1.toLowerCase()}"></component>`)
  29.     }
  30.   }
  31. }
  32. </script>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×