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
<html> | |
<head></head> | |
<body> | |
<input type="file" id="upload" /> | |
<script> | |
const FIELD_NAME = 'image'; | |
const MUTATION = 'createArticle'; | |
const ENDPOINT = 'https:{ENDPOINT}/{DOMAIN}/api'; |
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
{ | |
"validations": [ | |
{ | |
"expression": "data.title != ''", | |
"message": "Title is required", | |
"path": "title" | |
}, | |
{ | |
"expression": "data.company_name != '' OR (data.firstname != '' AND data.lastname != '')", | |
"message": "Either company name or firstname and Lastname must be filled out." |
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
{ | |
"condition": "event == 'update' AND data.status = 'published'", | |
"query": "query { type, id, text }", | |
"url": "http://example.com/hooks/update" | |
} |
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> | |
<section> | |
<article> | |
<div class="block"> | |
<a href="#" class="back" v-on:click="navigateBack()">Go Back</a> | |
<div v-html="WebsiteSetting.about_text"></div> | |
</div> | |
</article> | |
</section> | |
</template> |
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
# imports ... | |
// Install vue plugins | |
Vue.use(VueApollo); | |
Vue.use(VueMoment); | |
Vue.use(VueRouter); | |
// init graphql endpoint | |
const httpLink = new HttpLink({ uri: process.env.VUE_APP_UNITE_API_ENDPOINT }); |
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
## Install vue cli on your machine | |
yarn global add @vue/cli | |
## Create a new vue project | |
vue create unite-blog | |
cd unite-blog | |
## Install vue-router | |
yarn add @vue-router |
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
query { | |
findArticles(sort: { field: "created", order: "DESC"}) { | |
total, | |
result { | |
id, | |
created | |
headline, | |
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
{ | |
"title": "Blog", | |
"identifier": "blog", | |
"content_types": [ | |
{ | |
"title": "Articles", | |
"identifier": "articles", | |
"content_label": "{headline}", | |
"fields": [ | |
{ |
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
#!/bin/sh | |
sketchtool export artboards icons.sketch --formats=svg --output=./icons | |
svg-sprite --symbol ./icons/*.svg | |
sed 's/#000/currentColor/g; s/#000000/currentColor/g' ./symbol/svg/sprite.css.svg > icons.svg | |
rm -rf ./icons | |
rm -rf ./symbol |