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
| require('isomorphic-fetch') | |
| // your graph.cool project id | |
| const projectId = 'stammesprak' | |
| module.exports = (context, cb) => { | |
| const text = context.body.text.split(';') | |
| const definition = text[1] | |
| const word = text[0] | |
| /* |
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
| {% set title = title is defined ? title : '' %} | |
| {% set excerpt = excerpt is defined ? excerpt : '' %} | |
| {% set noPaddingTop = noPaddingTop is defined ? noPaddingTop : false %} | |
| {% set visuallyHideTitle = visuallyHideTitle is defined ? visuallyHideTitle : false %} | |
| <header class="c-page__header {% if noPaddingTop %}u-p-none{% endif %}"> | |
| <h1 class="c-page__title {% if visuallyHideTitle %}u-visually-hidden{% endif %}">{{ title }}</h1> | |
| {% if excerpt | length %} | |
| <p class="c-page__intro">{{ excerpt }}</p> | |
| {% endif %} |
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
| {% set title = title is defined ? title : '' %} | |
| {% set excerpt = excerpt is defined ? excerpt : '' %} | |
| {% set noPaddingTop = noPaddingTop is defined ? noPaddingTop : false %} | |
| {% set visuallyHideTitle = visuallyHideTitle is defined ? visuallyHideTitle : false %} | |
| <header class="c-page__header {% if noPaddingTop %}u-p-none{% endif %}"> | |
| <h1 class="c-page__title {% if visuallyHideTitle %}u-visually-hidden{% endif %}">{{ title }}</h1> | |
| {% if excerpt | length %} | |
| <p class="c-page__intro">{{ excerpt }}</p> | |
| {% endif %} |
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
| <style lang="scss"> | |
| a.button { | |
| text-decoration: none; | |
| display: inline-block; | |
| } | |
| .blurb, .quote > * { | |
| padding-bottom: 1rem; | |
| @media(min-width: 800px) { | |
| padding-bottom: 0; |
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
| export default { | |
| name: 'fullfillments', | |
| title: 'Fullfillments', | |
| description: 'Short texts that represent this content as chatbot fullfillments', | |
| type: 'array', | |
| of: [ | |
| { | |
| type: 'string' | |
| } | |
| ] |
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
| /** | |
| * @param context {WebtaskContext} | |
| */ | |
| /* | |
| * Set up your Sanity client with an project id, and the | |
| * name of your dataset. If you have set custom permissions | |
| * you'll also need to set it up with a access token, which | |
| * can be placed in webtask’s secrets. Note that in that case | |
| * you should also add some authentication to incoming requests. |
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
| /* eslint-disable no-console */ | |
| /** | |
| * Generate a markdown document in a dev.to format. | |
| * This runs from the studio folder and requires additional | |
| * dependencies: | |
| * - @sanity/block-content-to-markdown | |
| * - minimist | |
| * | |
| * Run this with $ sanity exec markdown.js -- --id=<document 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
| <template> | |
| <div class="content"> | |
| <div v-html="renderHtml(indexedContent)"></div> | |
| </div> | |
| </template> | |
| <script> | |
| /** | |
| *** Run block content from Sanity through serializers | |
| **/ |
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
| !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.Dropzone=t(require("react"),require("prop-types")):e.Dropzone=t(e.React,e.PropTypes)}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r |
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
| require('babel-polyfill'); | |
| const SanityClient = require('@sanity/client'); | |
| const axios = require('axios'); | |
| const client = SanityClient({ | |
| projectId: 'anokeucs', | |
| dataset: 'sanitycsstricks', | |
| useCdn: false | |
| }) | |
| /** | |
| * @param context {WebtaskContext} |