Skip to content

Instantly share code, notes, and snippets.

View jakerb's full-sized avatar
🏠
Working from home

Jake Bown jakerb

🏠
Working from home
View GitHub Profile
@jakerb
jakerb / blog_posts.php
Created September 14, 2018 13:16
MyAppuccino Blog Post template with links to article
<!-- Include the header file -->
<div ng-include="app.app.base_url + 'partials/header.html'"></div>
<!-- Include the header file -->
<div class="page-has-header page-has-footer">
<div uk-slider="center: true">
<div class="uk-position-relative uk-visible-toggle uk-light">
<ul class="uk-slider-items uk-child-width-1-1 uk-grid">
@jakerb
jakerb / blog_article.php
Created September 14, 2018 12:56
A blog article page in a MyAppuccino template.
<!-- Include the header file -->
<div ng-include="app.app.base_url + 'partials/header.html'"></div>
<!-- Include the header file -->
<div class="page-has-header page-has-footer">
<h2>You are reading article <span ng-bind="params.pid"></span></h2>
</div>
@jakerb
jakerb / script.js
Created September 14, 2018 12:53
Pass parameters as params into the scope.
(function() {
if (typeof $appuccino !== 'undefined') {
/*
* application/controller
* @info Fired when the application controller is ready.
*
* Read more about hooks in App Docs.
* @link https://dashboard.myappuccino.com/documentation/app/
@jakerb
jakerb / blog_posts.php
Created September 14, 2018 10:36
List blog posts as cards in MyAppuccino app.
<!-- Include the header file -->
<div ng-include="app.app.base_url + 'partials/header.html'"></div>
<!-- Include the header file -->
<div class="page-has-header page-has-footer">
<div uk-slider="center: true">
<div class="uk-position-relative uk-visible-toggle uk-light">
<ul class="uk-slider-items uk-child-width-1-1 uk-grid">
@jakerb
jakerb / functions.php
Last active September 14, 2018 10:16
Add posts to MyAppuccino response.
<?php
function mya_response_blog_posts($response) {
/*
* Get 10 posts with the type 'post'
* that are set as published.
*/
$posts = get_posts(array(
'post_type' => 'post',
'post_status' => 'publish',
@jakerb
jakerb / uikit-queries.js
Last active February 12, 2018 22:49
A simple UIkit component for toggling classes at breakpoints.
/*
* UIkit Queries
* Requires jQuery.
* Built by @jakebown1
* -------------------------------
* UIkit.component('hello', __caller(<min-width>, <max-width>);
* -------------------------------
* <div uk-hello="my_class"></div>
*/
@jakerb
jakerb / example.html
Created July 5, 2017 08:12
Required in Input
<input type="text" name="query" required required="required" placeholder="Search..">
<input name="query" required required="required">
@jakerb
jakerb / example.html
Created July 5, 2017 08:10
Required field
<input name="query" required requiree="required">
@jakerb
jakerb / until.js
Last active November 10, 2016 11:02
Until width.
var setWidth = 768;
var ranOnce = false;
function onWidth(func) {
if($(window).width() <= setWidth && !ranOnce) {
ranOnce = true;
func();
}
}