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 class="text-center"> | |
<div class="panel panel-default"> | |
<div class="panel-heading"> | |
<h4>Recent Views</h4> | |
</div> | |
<div class="panel-body"> | |
<div v-for="view in recentViews" :key="view.id"> |
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
/* | |
* A page where users ("agents") can edit text on a page template that is filled with model data when displayed for guests. | |
* Uses content tools library: http://getcontenttools.com/ | |
* Agents can enter #variable# to display client model data inside text blocks (e.g. client name, etc.) | |
*/ | |
<template> | |
<div> | |
<div ref="policy" |
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
<?php | |
/** | |
* Store a newly created resource in storage. | |
* | |
* @param Request $request | |
* @return Response | |
*/ | |
public function store(PointCreateRequest $request) |
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
<?php | |
/** | |
* Laravel model for post Category. | |
* Client wanted to set display rank for posts in a category list | |
* Categories have a set minimum display number | |
* $post->number is display rank + $category->post_number_start | |
* i.e. category has number_start = 100, 1st post to display would have $post->number = 101 | |
* These are functions for changing order | |
*/ |
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/components/SolarTime/actions.js | |
* in a Redux app, api only allowed 1 day at a time, this is how I handled multiple days | |
*/ | |
import * as c from './constants'; | |
export const fetchDay = ( lat, lng, date ) => { | |
return function(dispatch){ | |
return $.get(c.SUNTIME_URL + 'lat='+lat+'&lng='+lng+'&date='+date.format('YYYY-MM-DD')) |
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
/** | |
* Store.js | |
* Simple caching for api requests using ES6 Promise | |
* I used jquery for ajax because of Bootstrap | |
* store.fetch(val).then(this.handleResponse); | |
*/ | |
const apiroot = '/api/v1/'; | |
const cache = Object.create(null); |