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> | |
<router-view/> | |
<h1>Cocktails</h1> | |
<ul> | |
<li v-for="cocktail in cocktails" :key="cocktail.url_slug"> | |
<router-link :to="`/${level}/${cocktail.url_slug}`">{{ cocktail.name }}</router-link> | |
</li> | |
</ul> |
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 { ref, onMounted } from 'vue'; | |
import simpleCocktails from '../data/simple_cocktails.json'; | |
import intermediateCocktails from '../data/intermediate_cocktails.json'; | |
import advancedCocktails from '../data/advanced_cocktails.json'; | |
export default function useCocktails(level) { | |
const cocktails = ref([]); | |
onMounted(() => { | |
switch(level) { |
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
{ | |
"cocktails": [ | |
{ | |
"name": "Classic Margarita", | |
"ingredients": ["2 oz Tequila", "1 oz Triple sec", "1 oz Lime juice"], | |
"instructions": "Shake all ingredients with ice and strain into a salt-rimmed glass.", | |
"characteristics": ["Tangy", "Citrusy", "Refreshing"] | |
}, | |
{ | |
"name": "Mojito", |
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
[ | |
{ | |
"title": "Joe's Vacation", | |
"start": "2022-06-15", | |
"end": "2022-06-29" | |
}, | |
{ | |
"title": "Sam's Vacation", | |
"start": "2022-06-20", | |
"end": "2022-07-05" |
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
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
function getUrlVars(url) { | |
var vars = {}; | |
var parts = url.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { | |
vars[key] = value; | |
}); | |
return vars; |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"state": "AL", | |
"city": "Abanda CDP", | |
"latitude": 33.091627, | |
"longitude": -85.527029 | |
}, | |
{ | |
"state": "AL", | |
"city": "Abbeville city", |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"zip": 601, | |
"latitude": 18.180555, | |
"longitude": -66.749961 | |
}, | |
{ | |
"zip": 602, | |
"latitude": 18.361945, | |
"longitude": -67.175597 |
We can't make this file beautiful and searchable because it's too large.
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
zip,latitude,longitude | |
601,18.180555,-66.749961 | |
602,18.361945,-67.175597 | |
603,18.458497,-67.123906 | |
606,18.158327,-66.932928 | |
610,18.294032,-67.127156 | |
611,18.276316,-66.807165 | |
612,18.416727,-66.70009 | |
616,18.420412,-66.671979 | |
617,18.446889,-66.561154 |
We can't make this file beautiful and searchable because it's too large.
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
state,city,latitude,longitude | |
AL,Abanda CDP,33.091627,-85.527029 | |
AL,Abbeville city,31.564724,-85.259123 | |
AL,Adamsville city,33.602315,-86.971527 | |
AL,Addison town,34.202681,-87.178004 | |
AL,Akron town,32.879066,-87.740899 | |
AL,Alabaster city,33.244399,-86.847372 | |
AL,Albertville city,34.26313,-86.21066 | |
AL,Alexander City city,32.92724,-85.937122 | |
AL,Alexandria CDP,33.760819,-85.872008 |
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
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
function getUrlVars(url) { | |
var vars = {}; | |
var parts = url.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) { | |
vars[key] = value; | |
}); | |
return vars; |