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
// Playground - noun: a place where people can play | |
// Running in Xcode6-Beta5 | |
import UIKit | |
var delay : NSTimeInterval | |
// best appraoch: use arc4random_uniform (benefit you don't have to seed rand()) | |
delay = NSTimeInterval(arc4random_uniform(900)+100) / 1000 |
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
// Playground - noun: a place where people can play | |
import UIKit | |
// delay is type NSTimeInterval (alias for type 'Double') | |
var delay:NSTimeInterval | |
// random number btween 1.0 and 20.0 | |
delay = NSTimeInterval(arc4random_uniform(20)) |
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
let openAnimationDuration = 0.5 | |
let numberOfSecondsToPresent = 1 | |
let closeAnimationDuration = 0.5 | |
UIView.animateWithDuration(openAnimationDuration, animations: { | |
// do changes to animate showing the popover here... | |
}, completion: { finished in |
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
<template> | |
<div class="cafe-card"> | |
<h2> {{ name }}</h2> | |
<p>Airy neighborhood coffee house with daily roasted espresso & drip coffee, plus bagels & pastries.</p> | |
<h3>Hours</h3> | |
<p>Mon-Fri: 6:30-8</p> | |
<p>Sat-Sun: 8-8</p> | |
<p>{{ address }}</p> | |
</div> | |
</template> |
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
<template> | |
<div class="cafe-card"> | |
<h2> {{ name }}</h2> | |
<p>Airy neighborhood coffee house with daily roasted espresso & drip coffee, plus bagels & pastries.</p> | |
<h3>Hours</h3> | |
<p>Mon-Fri: 6:30-8</p> | |
<p>Sat-Sun: 8-8</p> | |
<p>{{ address }}</p> | |
</div> | |
</template> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Coffee Finder ☕️ New York</title> | |
</head> | |
<body> | |
<nav> | |
<h1>☕️ Coffee Finder <a >New York</a></h1> |
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
<div class="cafe-card"> | |
<h1>Daily Press</h1> | |
<p class="description">Airy neighborhood coffee house with daily roasted espresso & drip coffee, plus bagels & pastries.</p> | |
<dl class="address"> | |
<dt>Address</dt> | |
<dd>505 Franklin Ave, Brooklyn, NY 11238</dd> | |
</dl> | |
<div class="map"></div> | |
</div> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>☕️ Coffee Finder New York</title> | |
</head> | |
<body> | |
<nav> | |
<h1>☕️ Coffee Finder <a href="#">New York</a></h1> |
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
// import Vue framework | |
import Vue from 'vue' | |
// turn on dubugging messages | |
Vue.config.debug = true | |
// import our CafeCard component | |
import CafeCard from './CafeCard.vue' | |
// tell vue that we'll use <cafe-card> as the tag for our component |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Coffee Finder ☕️ New York</title> | |
<link rel="stylesheet" href="default.css"> | |
</head> | |
<body> | |
<nav> |
OlderNewer