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
Rails.application.routes.draw do | |
namespace :static_pages, path: '/' do | |
get 'about' | |
get 'health_check' | |
end | |
get 'target_pace/calc' | |
root 'target_pace#index' |
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 from 'vue'; | |
import Router from 'vue-router'; | |
import RunbyPace from '@/components/RunbyPace.vue'; | |
import TargetPace from '@/components/TargetPace.vue'; | |
import About from '@/components/About.vue'; | |
Vue.use(Router); | |
export default new Router({ |
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
// src/main.js | |
import router from './router'; | |
... | |
new Vue({ | |
render: h => h(App), | |
router, | |
store, | |
}).$mount('#app'); |
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 id="app" class="container"> | |
... | |
<router-view> | |
... | |
</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
import Vuex from 'vuex'; | |
... | |
// The library I want to share amongst the components | |
import RunbyLib from './runbylib'; | |
... | |
Vue.use(Vuex); | |
const store = new Vuex.Store({ | |
state: { | |
RunbyLib, |
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
new Vue({ | |
render: h => h(App), | |
router, | |
// Provide the store using the "store" option. | |
// this will inject the store instance to all child components. | |
store, | |
}).$mount('#app'); |
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
export default { | |
name: 'RunbyPace', | |
beforeCreate() { | |
this.lib = this.$store.state.RunbyLib; | |
}, | |
... |
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
computed: { | |
// Do this | |
missingRaceTime() { | |
return this.submitted && this.fiveKmRaceTime === ''; | |
}, | |
... |
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
<!-- Add this before </body> --> | |
<script> | |
if (window.netlifyIdentity) { | |
window.netlifyIdentity.on("init", user => { | |
if (!user) { | |
window.netlifyIdentity.on("login", () => { | |
document.location.href = "/admin/"; | |
}); | |
} | |
}); |
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
[FunctionName("SendSms")] | |
public static async Task<IActionResult> Run( | |
// This is an HTTP trigger accepting POST requests. That's why we are able to invoke it using Postman. | |
[HttpTrigger(AuthorizationLevel.Function, "post", Route = "tygerbytes/sygnal")] HttpRequest req, | |
ILogger log, | |
ExecutionContext context) | |
{ | |
// The FuncConfig class encapsulates environment-specific settings like those | |
// TWILIO... environment variables. | |
var funcConfig = new FuncConfig(context); |