###Setting up a Google Cloud Git Repo
// now with SourceTree bonus!
*Note: this guide is relavent only to repos natively hosted on Google Cloud
**Prereq:** - OSX - SourceTree - git - A Google App Engine / Cloud project
// ImageMagick - Convert SVG to PNG w/ transparency | |
// | |
// - open terminal | |
// | |
// - confirm you have imagemagick installed | |
// --- type: convert -v | |
// | |
// - cd to folder | |
// | |
// - single file |
###Setting up a Google Cloud Git Repo
// now with SourceTree bonus!
*Note: this guide is relavent only to repos natively hosted on Google Cloud
var someFn = function() { | |
$('<style></style>').appendTo($(document.body)).remove(); // force safari redraw | |
}; |
// >> Horizontal Touch Scroll Simulator >>>>>>>>>>>>>>> | |
// prereq: skrollr.js: https://github.com/Prinzhorn/skrollr | |
function fakeHorzScroll(){ | |
var tStartX, tStopY, touch, mXPos, xPro; | |
$(window).bind('touchstart', function(e) { | |
tStartX = e.originalEvent.touches[0].pageX; | |
e.preventDefault(); |
const main = {}; | |
const updateScroll = () => { | |
main.winScroll = $(window).scrollTop(); | |
}; | |
const parallaxLoad = () => { | |
const $someEl = $('.someEl'); | |
$someEl.each((i,el) => { | |
let $el = $(el); |
const main = {}; | |
const inViewport = ($el) => { | |
let winTop = main.winScroll; | |
let winBtm = winTop + main.winHeight; | |
let $elTop = $el.offset().top; | |
let $elBtm = $elTop + $el.outerHeight(); | |
return $elBtm > winTop && $elTop < winBtm; | |
} | |
if (inViewport($el) === true) { |
const main = {}; | |
const updateScroll = () => { | |
main.winScroll = $(window).scrollTop(); | |
if (!main.winScrollMem) { | |
main.winScrollMem = 0; | |
} | |
if (main.winScroll > main.winScrollMem) { | |
main.winScrollDir = 'down'; | |
} else { | |
main.winScrollDir = 'up'; |
<!doctype html> | |
<html ng-app="myApp"> | |
<head>...</head> | |
<body ng-controller="myController" ng-class="(toggleClass1 ? 'class-1' : '')+' '+(toggleClass2 ? 'class-2' : '')"> | |
<div> | |
stuff... | |
<div class="button1" ng-click="$toggleClass1 = !$toggleClass1"></div> | |
stuff... | |
<div class="button2" ng-click="$toggleClass2 = !$toggleClass2"></div> | |
</div> |
// Stock Android Browser Check >>>>>>>>>>>>>>>> | |
var ua = navigator.userAgent.toLowerCase(); | |
var isAndroid = ua.indexOf("android") > -1 && ua.indexOf("mobile") && ua.indexOf("chrome")==-1 | |
if(isAndroid) { | |
// stuff | |
} |
Ok I finally have this figured out.
First off, if you aren't familiar with the way GAE handles templating... it's a bit different than you would expect, but a pillar of getting this to work correctly.
This is what you want at the bottom of your app.yaml
- url: /
static_files: dist/index.html
upload: dist/index.html
expiration: "15m"