Skip to content

Instantly share code, notes, and snippets.

View rdegges's full-sized avatar

Randall Degges rdegges

View GitHub Profile
@rdegges
rdegges / styles.css
Created July 20, 2017 23:21
Crypto Compare basic styles.
// /static/css/style.css
h1 {
text-align: center;
}
td img {
width: 25px;
}
@rdegges
rdegges / index.html
Created July 20, 2017 23:19
Crypto Compare blank table.
<div id="app">
<table class="table table-hover">
<thead>
<tr>
<td>Rank</td>
<td>Name</td>
<td>Symbol</td>
<td>Price (USD)</td>
<td>1H</td>
<td>1D</td>
@rdegges
rdegges / index.html
Created July 20, 2017 22:12
Crypto Compare Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>CryptoCompare</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://bootswatch.com/simplex/bootstrap.min.css">
@rdegges
rdegges / method-example-vue.html
Created July 20, 2017 21:37
Vue method example.
<html>
<body>
<div id="app">
<p>What's your favorite color?</p>
<input v-model="color" type="text">
<p>Your favorite color is... {{ color }}</p>
<input type="button" v-on:click="capitalizeColor" value="Capitalize">
</div>
<script src="https://unpkg.com/vue"></script>
@rdegges
rdegges / two-way-vue.html
Created July 20, 2017 21:22
Two-way data binding in Vue.js.
<html>
<body>
<div id="app">
<p>What's your favorite color?</p>
<input v-model="color" type="text">
<p>Your favorite color is... {{ color }}</p>
</div>
<script src="https://unpkg.com/vue"></script>
<script>
@rdegges
rdegges / shopping-list-vue.html
Created July 20, 2017 21:07
A simple shopping list in Vue.js.
<html>
<body>
<div id="app">
<p>Shopping list</p>
<ol>
<li v-for="item in shoppingList">{{ item }}</li>
</ol>
</div>
<script src="https://unpkg.com/vue"></script>
@rdegges
rdegges / secret-message.html
Created July 20, 2017 20:56
Display a secret message if the correct variable is set in Vue.
<html>
<body>
<div id="app">
<h1>{{ message }}</h1>
<p v-if="secretMessage">This is a secret HTML element.</p>
<p v-else>Welcome to the website.</p>
</div>
<script src="https://unpkg.com/vue"></script>
<script>
@rdegges
rdegges / modify-vue-variable.js
Created July 20, 2017 20:42
Modifying a Vue.js variable.
app.message = "yo";
@rdegges
rdegges / hello-world-vue.js
Created July 20, 2017 20:36
A simple hello world example in Vue.js.
<html>
<body>
<div id="app">
<h1>{{ message }}</h1>
</div>
<script src="https://unpkg.com/vue"></script>
<script>
let app = new Vue({
el: "#app",
@rdegges
rdegges / basic-vue.html
Last active July 20, 2017 20:29
A basic Vue page.
<html>
<body>
<!-- All that Vue cares about is what is inside this div. -->
<div id="app">
</div>
<script src="https://unpkg.com/vue"></script>
<script>
let app = new Vue({
el: "#app"
});