Skip to content

Instantly share code, notes, and snippets.

View paltman's full-sized avatar

Patrick Altman paltman

View GitHub Profile
// components/PrettyDate.vue
<template>
<span v-if="date" class="pretty-date" :title="date">{{ formattedDate }}</span>
</template>
<script>
import { format } from 'date-fns';
export default {
name: 'pretty-date',
props: ['date'],
<template>
<div class="setup-form">
<my-editor v-model.trim="model.content" output="html"></my-editor>
<submit-button @click="save">Save</submit-button>
</div>
</template>
<script>
import { mapState } from 'vuex';
import MyEditor from '../../../components/MyEditor.vue';
import SubmitButton from '../../../components/SubmitButton.vue';
<template>
<div class="date-time-picker">
<datepicker v-model="date" :inline="true" />
<vue-timepicker v-model="time" format="hh:mm A" :minute-interval="15" />
</div>
</template>
<script>
import VueTimepicker from 'vue2-timepicker';
import Datepicker from 'vuejs-datepicker';
<template>
<div class="setup-form">
<b-form-group description="The title of your page" label="Page Title" label-for="title">
<b-form-input id="title" v-model.trim="title"></b-form-input>
</b-form-group>
<div class="mt-5">
<b-button variant="primary" :block="true" @click="onUpdate">Update</b-button>
</div>
</div>
</template>
Setup
save -> Content
Content
save -> Time and Place
Time and Place
save -> Events
Events
create event
once finished -> Divisions
Divisions
// Karma configuration
// Generated on Mon Oct 02 2017 17:31:27 GMT-0400 (EDT)
/* globals module */
module.exports = function(config) {
'use strict';
config.set({
plugins: [
'karma-jquery',
"scripts": {
"lint": "eslint src/eldarion-ajax-core.js src/eldarion-ajax-handlers.js tests/specs.js",
"jasmine": "karma start tests/config.js --single-run",
"release": "npm run uglify && npm run add-banner",
"add-banner": "node banner.js",
"uglify": "cat src/eldarion-ajax-core.js src/eldarion-ajax-handlers.js | uglifyjs --compress --mangle --comments \"/Copyright/\" -o dist/eldarion-ajax.min.js",
"test": "npm run lint && npm run jasmine"
}
<div class="dropdown-menu">
{% for v in current_config.views %}
{% if v.menu %}
<a class="dropdown-item" href="{{ v.resolved_path }}">
{{ v.template }}
</a>
{% endif %}
{% endfor %}
</div>
{% for label, config in available_configs.items %}
<option value="{{ label }}"
{% if current_config.label == config.label %}selected{% endif %}>
{{ config.title }}
</option>
{% endfor %}
from django.conf.urls import url
from .configs import CONFIG_MAP
from .views import as_view, set_template_set
urlpatterns = [
url(r"^$", as_view("homepage.html"), name="home"),
url(r"^__set_tmpl/$", set_template_set, name="set_template_set")
]