Skip to content

Instantly share code, notes, and snippets.

View mathewsanders's full-sized avatar

Mathew Sanders mathewsanders

View GitHub Profile
@mathewsanders
mathewsanders / main.js
Created February 20, 2016 17:49
Design in the browser, activity 8: update main.js
// import Vue framework
import Vue from 'vue'
// turn on dubugging messages
Vue.config.debug = true
// import our component
import CafeGridView from './CafeGridView.vue'
import CafeCard from './CafeCard.vue'
import GoogleMap from './GoogleMap.vue'
@mathewsanders
mathewsanders / CafeGridView.vue
Last active February 20, 2016 18:14
Design in the browser, activity 8: create CafeCard.vue
<!-- template code -->
<template>
<nav>
<h1>☕️ Coffee Finder <a >New York</a></h1>
<ul id="sort">
<li><a href="#">Nearby</a></li>
<li><a href="#">Name</a></li>
</ul>
</nav>
@mathewsanders
mathewsanders / CafeCard.vue
Created February 20, 2016 17:44
Design in the browser, activity 6: update CafeCard.vue
<!-- template code -->
<template>
<div class="cafe-card">
<h1>{{ cafe.name }}</h1>
<p class="description">{{ cafe.description }}</p>
<dl class="hours">
<dt>Hours</dt>
<dd>{{ cafe.hours }}</dd>
</dl>
<dl class="address">
@mathewsanders
mathewsanders / index.html
Created February 20, 2016 17:43
Design in the browser, activity 6: update index.html
<!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>
@mathewsanders
mathewsanders / main.js
Created February 20, 2016 17:42
Design in the browser, activity 6: update main.js
// 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
@mathewsanders
mathewsanders / cafe-grumpy.json
Last active February 20, 2016 18:23
Design in the browser, activity 6: JSON structure for information about a cafe
{
"name": "Cafe Grumpy",
"address": "224 W 20th St, New York, NY 10011",
"hours": "7am — 8pm",
"description": "Hip local coffeehouse chain serving a range of house-roasted brews in a relaxed setting."
}
@mathewsanders
mathewsanders / main.js
Created February 20, 2016 17:37
Design in the browser, activity 5: update main.js
// 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
@mathewsanders
mathewsanders / index.html
Last active February 20, 2016 17:46
Design in the browser, activity 5: loop over cafe cards
<cafe-card
v-for="cafeName in cafeNames"
:name="cafeName">
<cafe-card>
@mathewsanders
mathewsanders / CafeCard.vue
Created February 20, 2016 17:35
Design in the browser, activity 4: update CafeCard.vue
<!-- template code -->
<template>
<div class="cafe-card">
<h1>{{ name }}</h1>
<p class="description">Hip local coffeehouse chain serving a range of house-roasted brews in a relaxed setting.</p>
<dl class="address">
<dt>Address</dt>
<dd>224 W 20th St, New York, NY 10011</dd>
</dl>
<div class="map"></div>
@mathewsanders
mathewsanders / index.html
Last active February 20, 2016 17:46
Design in the browser, activity 4: pass cafe name as property
<cafe-card name="Daily Press"><cafe-card>
<cafe-card name="Cafe Grumpy"><cafe-card>
<cafe-card name="Stumptown"><cafe-card>
<cafe-card name="Third Rail"><cafe-card>
<cafe-card name="Gimmie! Coffee"><cafe-card>