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
| // thanks johnny for this awesome package <3 |
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
| <?php | |
| namespace App\Repositories; | |
| use A17\Twill\Repositories\Behaviors\HandleBlocks; | |
| use A17\Twill\Repositories\Behaviors\HandleSlugs; | |
| use A17\Twill\Repositories\ModuleRepository; | |
| use App\Models\Client; | |
| use A17\Twill\Repositories\BlockRepository; |
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/Models/Page.php | |
| <?php | |
| namespace App\Models; | |
| use A17\Twill\Models\Behaviors\HasBlocks; | |
| use A17\Twill\Models\Behaviors\HasSlug; | |
| use A17\Twill\Models\Behaviors\HasMedias; | |
| use A17\Twill\Models\Behaviors\HasRevisions; |
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
| //source https://gridsome.org/docs/taxonomies | |
| api.loadSource(store => { | |
| const posts = store.addContentType('Post') | |
| const tags = store.addContentType('Tag') | |
| // makes all ids in the `tags` field reference a `Tag` | |
| posts.addReference('tags', 'Tag') | |
| tags.addNode({ | |
| id: '1', |
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
| //hugo |
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
| /* | |
| /src/pages/Testing.vue | |
| */ | |
| <template> | |
| <DefaultLayout> | |
| <ul> | |
| <li | |
| v-for="edge in $page.records.edges" | |
| :key="edge.node.id" | |
| > |
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
| // /content/entries/entry1.md | |
| --- | |
| title: First Post | |
| excerpt: First Post | |
| date: 2020-01-14T21:53:14.578Z | |
| localImage: ./sumit-saharkar-d3_ssraccV8-unsplash.jpg | |
| remoteImage: https://images.unsplash.com/photo-1580451998921-c1e6e1ababe0?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2850&q=80 | |
| --- |
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
| <?php | |
| function loadCss() { | |
| wp_enqueue_style('bootstrap', 'https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css'); | |
| } | |
| function loadJavascript() { | |
| wp_deregister_script('jquery'); | |
| wp_enqueue_script('jquery', 'https://code.jquery.com/jquery-3.5.1.slim.min.js', array(), null, true); | |
| wp_enqueue_script('popperjs', 'https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js', array('jquery'), false, true); |
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
| . | |
| |-src | |
| | |-components | |
| | |-layouts | |
| | |-templates | |
| | |-assets | |
| | | |-remoteImages | |
| | | | |- image.png ( <-- my example image which is used in the code below ) | |
| | |-pages | |
| |-packages |
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
| // /src/pages/Calendar.vue | |
| // --> http://localhost:8080/calendar | |
| <template> | |
| <div> | |
| <datetime v-model="date"></datetime> | |
| <ul> | |
| <li v-for="event in filteredList" :key="event.id"> | |
| {{ event.node.summary }} |