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 | |
/** | |
* Plugin Name: User Website CPT | |
* Plugin URI: http://tri.be | |
* Description: Allow users to submit a website URL, Create a CPT that displays only the HTML pulled from that url, use shortcode [WSCPT] to display form | |
* Version: 1.0 | |
* Author: Chris Flannagan | |
* Text Domain: websites-cpt-text-domain | |
* Domain Path: /languages | |
*/ |
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
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="onNavigatingTo"> | |
<StackLayout> | |
<Label text="Tap the button" class="title"/> | |
<Button text="TAP" tap="{{ onTap }}" /> | |
<Label text="{{ message }}" class="message" textWrap="true"/> | |
</StackLayout> | |
</Page> |
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
/** | |
* Created by Chris on 7/29/16. | |
* | |
* Modified code from bfattori & N3ll on github | |
* | |
* function allows gradients to be applied to the background of view elements on Android & iOS | |
* | |
*/ | |
var platform = require("platform"); |
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 page; | |
exports.loaded = function(args) { | |
page = args.object; | |
fetch("https://www.babyquasar.com/wp-json/posts", { | |
method: "GET", | |
body: '', | |
headers: { | |
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" | |
} |
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 ObservableArray = require("data/observable-array").ObservableArray; | |
var Observable = require("data/observable").Observable; | |
var page; | |
exports.loaded = function(args) { | |
var postTitles = new ObservableArray([].map(function(postTitle) { | |
return new Observable({ | |
postName: postTitle | |
}); | |
})); |
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
<Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="loaded"> | |
<StackLayout> | |
<Label text="Our Posts" class="title"/> | |
<ListView height="100%" items="{{ postList }}"> | |
<ListView.itemTemplate> | |
<Label class="post-title" text="{{ postName }}" textWrap="true" horizontalAlignment="left" /> | |
</ListView.itemTemplate> | |
</ListView> | |
</StackLayout> | |
</Page> |
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
posts.forEach(function(post) { | |
console.log(post['title']); | |
}); |
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
fetch("https://www.babyquasar.com/wp-json/posts", { | |
method: "POST", | |
body: "filter[category]=Tutorials&filter[posts_per_page]=5", | |
headers: { | |
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8" | |
} | |
}) |
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
<AbsoluteLayout row="3" id="main-layout" width="100%" | |
backgroundImage="~/images/face.jpg"> | |
<Image id="s1" visibility="{{ c1 ? 'visible' : 'collapsed' }}" width="{{ parentWidth }}" | |
left="0" top="0" class="face-sector" src="~/images/face-sectors/top-right.png"> | |
</Image> | |
<Image id="s2" visibility="{{ c2 ? 'visible' : 'collapsed' }}" width="{{ parentWidth }}" | |
left="0" top="0" class="face-sector" src="~/images/face-sectors/top-left.png"> | |
</Image> | |
<Image id="s3" visibility="{{ c3 ? 'visible' : 'collapsed' }}" width="{{ parentWidth }}" | |
left="0" top="0" class="face-sector" src="~/images/face-sectors/bottom-right.png"> |
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 viewModule = require("ui/core/view"); | |
var gestures = require("ui/gestures"); | |
var observable = require("data/observable"); | |
var pageData = new observable.Observable(); | |
var page; | |
var quad; | |
exports.loaded = function(args) { | |
page = args.object; |