This file contains hidden or 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
{ | |
"meta": { | |
"request_ref": "get.competitions.5f842b59dac02", | |
"num_notices": 0, | |
"num_data_lines": 3, | |
"num_warnings": 0, | |
"num_errors": 0, | |
"time_taken": 0.30497, | |
"org_id": 1 | |
}, |
This file contains hidden or 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
const OFF = 0; | |
const WARN = 1; | |
const ERROR = 2; | |
module.exports = { | |
root: true, | |
env: { | |
browser :true, | |
es6: true |
This file contains hidden or 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
<!-- | |
Pagination for product listing | |
Expects array of objects from endpoint: | |
{ | |
"items": { | |
"pages": [{ | |
"value": 1, | |
"text": "1", | |
"selected": true |
This file contains hidden or 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
<!-- | |
Switch client-side view from 3 to 4 column grid | |
--> | |
<!-- Start Grid Size --> | |
<amp-bind-macro | |
id="activeButtonStyle" | |
arguments="attr, val" | |
expression="filtering[attr] == val ? 'p-1 border bg-black text-white cursor-pointer' : 'p-1 border cursor-pointer'"></amp-bind-macro> |
This file contains hidden or 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
<!-- | |
Expect back-end src to respond with a results_per_page array of objects | |
{ | |
"items": { | |
"results_per_page" :[{ | |
"value": "10", | |
"text": "10", | |
"selected": true | |
},{ |
This file contains hidden or 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
const map = new mapboxgl.Map(/* ... */); | |
map.on('load', () => { | |
// Data | |
map.addSource(/* ... */); | |
// Layers | |
map.addLayer(/* ... */); | |
map.addLayer(/* ... */); | |
This file contains hidden or 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> | |
<ul> | |
<NavBarRoutes :routes="persistentNavRoutes /> | |
<NavBarRoutes | |
v-if="loggedIn" | |
:routes="loggedInNavRoutes" /> | |
<NavBarRoutes | |
v-else |
This file contains hidden or 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
<script> | |
export default { | |
inheritAttrs: false | |
} | |
</script> | |
<BaseInput placeholders="What's your name" @focus="doSomething" /> |
This file contains hidden or 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
/* | |
Add a key to router view. This tells Vue to re-render the view from scratch. | |
While this has negligibly worse performance from route to route it does simplify the | |
component as you no longer need to reset starting variables, etc within the component. | |
*/ | |
<router-view :key="$route.fullPath"></router-path> |
This file contains hidden or 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
// Typical module registration attaches all modules immediately to the Vuex store | |
import auth from './modules/auth'; | |
import posts from './modules/posts'; | |
import comments from './modules/comments'; | |
// ... | |
export default new Vuex.Store({ | |
modules: { | |
auth, | |
posts, |
NewerOlder