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 imageModule = require("ui/image"); | |
var absoluteLayoutModule = require("ui/layouts/absolute-layout"); | |
var page; | |
var id; | |
var timer = require("timer"); | |
var timestart = 1000*60*3; | |
var timerlabel; | |
var face; |
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 | |
/** | |
* User submits url which converts to WebSitesCPT | |
*/ | |
if ( ! class_exists( 'Website_Submit' ) ) { | |
class Website_Submit { | |
const POST_TYPE = 'user-websites'; | |
public $return_message = ''; |
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 viewModule = require("ui/core/view"); | |
var page; | |
var gradients = require("~/grad-bg.js") | |
exports.loaded = function(args) { | |
page = args.object; | |
gradients.linearGradient(page, "support-btn", ['#ef706d', '#934544']); | |
}; |
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
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" | |
} | |
}) |