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
/** | |
* Execute a cURL. | |
* | |
* @param $url | |
* @param array $header An array of headers. | |
* @param string $mode Mode for the execution (PUT/GET/POST). | |
* @param string $variables Variables/body to send in execution. String or json. | |
* @return mixed Returns decoded json of return from execution. | |
*/ |
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 | |
namespace Apex\Core; | |
class clCURLold { | |
public $oRequest; | |
public $iLastHTTPStatus; | |
public $aOptions = array(); |
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
$row = 1; | |
$keys = []; | |
$array = []; | |
if (($handle = fopen("themes/fritidsfabriken/docs/feature_value_export_CZ_en.csv", "r")) !== FALSE) { | |
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { | |
$num = count($data); | |
//echo "<p> $num fields in line $row: <br /></p>\n"; | |
$value = []; | |
for ($c=0; $c < $num; $c++) { | |
//echo $data[$c] . "<br />\n"; |
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 regex = /(?<start><img)(?<middle>.*?)(?<end>\/>)/ig; | |
const newText = col.RichText.replaceAll(regex, (match, p1, p2, p3, offset, string, namedGroups) => { | |
return `${namedGroups.start} loading="lazy" ${namedGroups.middle} ${namedGroups.end}`; | |
}); |
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
import axios from "axios"; | |
import StoryblokClient from "storyblok-js-client"; | |
import TurndownService from "turndown"; | |
import markdownConverter from "storyblok-markdown-richtext"; | |
// rember to remove | |
const spaceId = {{INSERT STORYBLOK SPACE ID HERE}}; | |
let Storyblok = new StoryblokClient({ | |
// Remmber to remove | |
oauthToken: "{{INSERT STORYBLOK MANAGEMENT API TOKEN HERE}}", |
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 = { | |
template: ` | |
<div> | |
<div class="image__wrap uk-margin-small-bottom"> | |
<input type="datetime-local" id="date" name="date" v-model="model.date"> | |
</div> | |
</div> | |
`, | |
mixins: [window.Storyblok.plugin], | |
methods: { |
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
<script setup lang="ts"> | |
const props = defineProps({ | |
gistId: { | |
type: String, | |
required: true, | |
}, | |
file: { | |
type: String, | |
required: false, | |
default: '', |
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
<script setup lang="ts"> | |
import { Richtext } from 'storyblok-js-client'; | |
const props = defineProps({ blok: Object }); | |
const nuxtApp = useNuxtApp(); | |
const textObject = { ...props.blok.text }; | |
const nodes = []; | |
// Proof of concept for custom handling of inline blok nodes. | |
Object.entries(textObject.content).forEach(([key, node]) => { | |
if (node.type === 'blok') { |
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
<script setup lang="ts"> | |
import { StoryData } from '@storyblok/vue/dist'; | |
const route = useRoute(); | |
const isPreview = !!(route.query._storyblok && route.query._storyblok !== ''); | |
const version = isPreview ? 'draft' : 'published'; | |
const story = ref({} as StoryData); |
OlderNewer