#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
.css-triangle(@triangle-size, @triangle-color, @triangle-direction) { | |
border: inset @triangle-size; | |
content: ""; | |
display: block; | |
height: 0; | |
position: absolute; | |
width: 0; | |
& when (@triangle-direction = top) { | |
border-color: transparent transparent @triangle-color transparent; |
.background-cover(@url, @position) { | |
background-image: url(@url); | |
background-position: center @position; | |
-moz-background-size: cover; | |
background-size: cover; | |
background-repeat: no-repeat; | |
} |
.rem-calc(@sizeValue) { | |
@remValue: @sizeValue/10; | |
@pxValue: @sizeValue; | |
font-size: ~"@{pxValue}px"; | |
font-size: ~"@{remValue}rem"; | |
} |
/** | |
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
* | |
* To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
* the height of element `.foo` —which is a full width and height cover image. | |
* | |
* iOS Resolution Quick Reference: http://www.iosres.com/ | |
*/ | |
var gulp = require('gulp'), | |
takana = require('takana'); | |
gulp.task('takana', function() { | |
takana.run({ | |
path: __dirname, | |
includePaths: [] // Optional | |
}); | |
}); |
if(Meteor.isServer()) { | |
Meteor.methods({ | |
postTweet: function() { | |
Twitter = new TwitMaker({ | |
consumer_key: Meteor.settings.twitterKey, | |
consumer_secret: Meteor.settings.twitterSecret, | |
access_token: Meteor.user().services.twitter.accessToken, | |
access_token_secret: Meteor.user().services.twitter.accessTokenSecret |