Skip to content

Instantly share code, notes, and snippets.

View Phunky's full-sized avatar

Mark Harwood Phunky

View GitHub Profile
import Vuex from 'vuex'
import Vue from 'vue'
import _ from 'lodash'
import store from 'store'
import auth from './auth'
import config from '../config'
Vue.use(Vuex)
export default new Vuex.Store({
@Phunky
Phunky / ui-chart.vue
Created February 24, 2016 10:43
Example usage of chartist in vuejs
<style lang="sass">
@import '../sass/common';
$ct-series-colors: (
colour('x'),
colour('y'),
colour('a'),
colour('b'),
colour-darken('x', 10),
colour-darken('y', 10),
<style lang="sass" scoped>
@import '../sass/common';
@import '../sass/animatecss';
.ui-modal {
display: flex;
justify-content: center;
position: fixed;
top: 0;
<style lang="sass" scoped>
.app {
position : relative;
width : 100vw;
height : 100vh;
margin : 0 !important;
}
.appbar {
position : absolute;
<style lang="sass" scoped>
.app {
position : relative;
width : 100vw;
height : 100vh;
margin : 0 !important;
}
.appbar {
position : absolute;
@Phunky
Phunky / ui-datepicker.vue
Created January 23, 2016 00:34
VueJS DatePicker
<style>
.ui-datepicker .md-icon {
flex: 0 0 auto;
margin-right: 8px;
width: 18px;
height: 18px;
}
</style>
<style lang="sass" scoped>
@Phunky
Phunky / app.js
Created November 16, 2015 08:53
Error when trying to use scoped styles with vuejs and node-sass
var Vue = require('vue');
var App = require('../../components/app.vue');
new Vue(App).$mount('#app')
@Phunky
Phunky / SassMeister-input-HTML.html
Created October 8, 2015 09:05
Generated by SassMeister.com.
<h1>Example</h1>
<div class="colours"><div class="colour"><div class="base l4">base lighter #4</div><div class="base l3">base lighter #3</div><div class="base l2">base lighter #2</div><div class="base l1">base lighter #1</div><div class="base">base</div><div class="base d1">base darker #1</div><div class="base d2">base darker #2</div><div class="base d3">base darker #3</div><div class="base d4">base darker #4</div></div><div class="colour"><div class="mobilleo l4">mobilleo lighter #4</div><div class="mobilleo l3">mobilleo lighter #3</div><div class="mobilleo l2">mobilleo lighter #2</div><div class="mobilleo l1">mobilleo lighter #1</div><div class="mobilleo">mobilleo</div><div class="mobilleo d1">mobilleo darker #1</div><div class="mobilleo d2">mobilleo darker #2</div><div class="mobilleo d3">mobilleo darker #3</div><div class="mobilleo d4">mobilleo darker #4</div></div><div class="colour"><div class="x l4">x lighter #4</div><div class="x l3">x lighter #3</div><div class="x l2">x lighter #2</div><div class="x
@Phunky
Phunky / slim.php
Last active August 29, 2015 14:27
What is the best way to allow me to pass data down to my views for all routes via middleware
<?php
// Middleware for all requests
$app->add(function ($request, $response, $next) use ($container) {
if ($request->hasHeader('HTTP_X_PJAX')) {
// Here is where I would like to define an arg that can
// be passed down to my views for all requests
}
$response = $next($request, $response);
return $response;
});
@Phunky
Phunky / SassMeister-input-HTML.html
Created May 29, 2015 10:58
Generated by SassMeister.com.
<a class="ui-btn" href="#">Button</a>
<br/><br/>
<div class="ui-btn-group">
<a data-trigger="uiBtnGroupToggle" class="ui-btn"><i class="icon-align-left"></i> Left</a>
<a data-trigger="uiBtnGroupToggle" class="ui-btn"><i class="icon-align-center"></i> Center</a>
<a data-trigger="uiBtnGroupToggle" class="ui-btn"><i class="icon-align-right"></i> Right</a>
</div>