This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div class="post-content" v-html="$parseContent(content)"/> | |
| </template> | |
| <script> | |
| export default { | |
| name: 'post-content', | |
| props: ['content'] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // app.js | |
| ... | |
| import {WordExpressShortcodes, WordExpressHelpers} from 'wordexpress-tools' | |
| import {MyCustomShortcode} from '/path/to/my-custom-shortcode.js' | |
| import WordExpressPlugin from '@/core/plugin' | |
| const shortcodes = { | |
| ...WordExpressShortcodes, | |
| nameOfCustomShortcode: MyCustomShortcode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // app.js | |
| ... | |
| // Import these from an NPM package that I created. | |
| import {WordExpressShortcodes, WordExpressHelpers} from 'wordexpress-tools' | |
| import WordExpressPlugin from '@/core/plugin' | |
| Vue.use(WordExpressPlugin, { | |
| shortcodes: WordExpressShortcodes, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // core/plugins/index.js | |
| const WordExpressPlugin = { | |
| install (Vue, options) { | |
| const {shortcodes, helpers} = options | |
| // creates a instance method that can be used inside of a Vue component | |
| Vue.prototype.$parseContent = function (content) { | |
| return helpers.parseContent(content, shortcodes) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| query Menu($menu: String!) { | |
| menus(name: $menu) { | |
| items { | |
| id | |
| order | |
| post_title | |
| navitem{ | |
| id | |
| post_title | |
| post_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div> | |
| <svg :class="$style.svg" id="svg" ref="svg"> | |
| </svg> | |
| </div> | |
| </template> | |
| <script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onmessage = function (e) { | |
| const data = e.data | |
| const length = data.data.length | |
| const BLOCKSIZE = 5 | |
| const STEPS = 4 | |
| let i = -4 | |
| let count = 0 | |
| let rgb = {r: 0, g: 0, b: 0} |