This file contains 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
{ | |
"results_size": 166, | |
"results": [{ | |
"id": "baf0f820-0fff-456f-9256-0da23bafa481", | |
"image_url": "https://picsum.photos/150/150?v=afa481", | |
"last_update": 1509364426938, | |
"title": "Savannah Mcfadden", | |
"description": "Eiusmod nisi ut ea et duis consectetur in occaecat non culpa. Sit nisi ut velit non id pariatur in esse enim laboris duis sit. Cillum enim elit nulla labore incididunt. Voluptate eu aute velit culpa est et aute do. Lorem id minim commodo et. Voluptate magna tempor sint cillum aute tempor proident cupidatat sint. Mollit officia non nisi id id nulla exercitation et ullamco ut laboris tempor.", | |
"blob": { | |
"field": "field", |
This file contains 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 | |
$blok = array("_editable" => "<!--#storyblok#{\"name\": \"column\", \"space\": \"48408\", \"uid\": \"7c44c5d8-0adb-4c01-a797-12d9b300b99b\", \"id\": \"307934\"}-->"); | |
/** | |
* Manually parse the Storyblok HTML editable comments. Use your templating language to output | |
* keys = values as html attributes without quotes or with single quotes. | |
* | |
* @param array $blok This is your component object | |
* @param boolean $raw Decide if function should return raw array or inline string |
This file contains 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> | |
<div v-show="!modalIsOpen"> | |
Custom field is in sidebar / not in modal | |
<button @click=openModal>Open</button> | |
</div> | |
<div v-if="modalIsOpen"> | |
Custom field is in not in sidebar but in a modal | |
<button @click=closeModal>Close</button> | |
</div> |
This file contains 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
[ { "af":"Afrikaans" }, | |
{ "sq":"Albanian" }, | |
{ "ar":"Arabic" }, | |
{ "ar_dz":"Arabic (Algeria)" }, | |
{ "ar_bh":"Arabic (Bahrain)" }, | |
{ "ar_eg":"Arabic (Egypt)" }, | |
{ "ar_iq":"Arabic (Iraq)" }, | |
{ "ar_jo":"Arabic (Jordan)" }, | |
{ "ar_kw":"Arabic (Kuwait)" }, | |
{ "ar_lb":"Arabic (Lebanon)" }, |
This file contains 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
// # Install Dependencies: --------------------------------------------------------------- | |
// npm install storyblok-js-client | |
// # Execute with: ----------------------------------------------------------------------- | |
// node storyblok-publish-all-in-folder.js | |
// # Configure: -------------------------------------------------------------------------- | |
// ID of space your folder is located in | |
const space_id = 51455 |
This file contains 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
let story = ''; | |
const resolve = (item) => { | |
if (typeof item.component !== 'undefined' && item.component == 'markdown') { | |
if (typeof item.margin_top === 'undefined' || item.margin_top == '') { | |
item.margin_top = 'no-margin-top' | |
} | |
This file contains 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
// You can send a POST request to the Node Application from your client side application | |
// during your submit event with the following three examples | |
// ---------------------------------------------------------------- | |
// Basic XHR Example: | |
// in your submit event: | |
var data = JSON.stringify({ "message": "this is the message from the contact form entered by your customer" } ); | |
var xhr = new XMLHttpRequest(); |
This file contains 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> | |
<div class="uk-grid"> | |
<div class="uk-width-1-5" v-if="has_image"> | |
<img :src="model.src"/> | |
</div> | |
<div :class="{ 'uk-width-4-5': has_image, 'uk-width-1-1': !has_image }" > | |
<input class="uk-width-1-1" placeholder="Your image URL" v-model="model.src" /> |
This file contains 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
var request = require("request"); | |
var options = { method: 'POST', | |
url: 'https://api.storyblok.com/v1/spaces/YOUR_SPACE_ID/stories', | |
headers: | |
{ Authorization: 'YOUR_AUTH_TOKEN', | |
'Content-Type': 'application/json', | |
Accept: 'application/json' }, | |
body: { story: | |
{ name: 'Story 1', |
This file contains 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
var https = require('https') | |
var querystring = require('querystring') | |
var AWS = require('aws-sdk') | |
var responseHeaders = { | |
'Access-Control-Allow-Origin': '*', | |
'Access-Control-Allow-Credentials': true | |
} | |
var storyblokApiRequest = function(inputData, success, error) { | |
var timestamp = Math.floor(Date.now() / 1000) | |
var postData = JSON.stringify({ |