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
const Fieldtype = { | |
mixins: [window.Storyblok.plugin], | |
template: ` | |
<div> | |
<input | |
class="uk-width-1-1" | |
type="number" | |
@input="validate" | |
:step="options.step || 1" | |
ref="input" |
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
const StoryblokClient = require('storyblok-js-client') | |
const Storyblok = new StoryblokClient({ | |
oauthToken: 'TOKEN' | |
}) | |
const spaceId = SPACE_ID | |
const Sync = { | |
dimensions: [], |
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
import React from 'react' | |
import Components from './components.js'; | |
import { StaticQuery, graphql } from "gatsby" | |
class Navi extends React.Component { | |
constructor(props) { | |
super(props) | |
const nest = (items, id = 0) => items | |
.filter(item => item.parent_id === 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
const StoryblokClient = require('storyblok-js-client') | |
const Storyblok = new StoryblokClient({ | |
token: 'TOKEN' | |
}) | |
const Sync = { | |
getAll(page) { | |
return Storyblok.get(`stories`, { | |
per_page: 25, |
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
const Fieldtype = { | |
mixins: [window.Storyblok.plugin], | |
template: ` | |
<div> | |
<input | |
class="uk-width-1-1" | |
type="number" | |
@input="validate" | |
:step="1" | |
ref="input" |
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
const Fieldtype = { | |
template: ` | |
<div v-if="model.urlList"> | |
<div class="uk-flex uk-flex-middle" v-for="(locale, key) in options" :key="locale"> | |
<div v-html="locale" /> | |
<input type="text" class="form-control" id="basic-url" aria-describedby="basic-addon3" :value="model.urlList[key]" @input="validate($event, key)"> | |
<div>/</div> | |
<div v-if="showError[key]">!!! Url invalid</div> | |
</div> | |
</div> |
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
const Fieldtype = { | |
mixins: [window.Storyblok.plugin], | |
template: `<div><textarea v-model="model.content" id="mytextarea"></textarea></div>`, | |
methods: { | |
initWith() { | |
return { | |
plugin: 'wysiwyg-tinymce', | |
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
const Fieldtype = { | |
mixins: [window.Storyblok.plugin], | |
data() { | |
return { | |
advancedOpen: false | |
} | |
}, | |
template: `<div> | |
<div class="uk-margin-small-bottom"> | |
Google preview |
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
pluginCreated() { | |
this.$sb.getScript('https://cdnjs.cloudflare.com/ajax/libs/uikit/3.1.7/js/uikit-core.min.js'); | |
this.$nextTick(() => { | |
this.padding = this.model.padding; | |
this.margin = this.model.margin; | |
}) | |
}, |
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
class PagesController < ApplicationController | |
def index | |
response.headers['X-FRAME-OPTIONS'] = 'ALLOWALL' | |
client = Storyblok::Client.new( | |
logger: logger, | |
cache_version: Time.now.to_i, | |
token: 'Dv2ok3DqODzzb8QUuN2XCgtt', | |
version: 'draft' | |
) |