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
import React from 'react' | |
import Header from './Global/Header' | |
import Footer from './Global/Footer' | |
export const Layout = ({content, classes, page}) => ( | |
<div className="app"> | |
<div> | |
<Header classes={classes} page={page} /> | |
</div> | |
<div className="container"> |
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
import React, { Component } from 'react' | |
import ReactDOM from 'react-dom' | |
import Components from '../modules/renderComponents' | |
class HomeComponent extends Component { | |
constructor(props) { | |
super(props) | |
} | |
render() { |
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
import {Meteor} from 'meteor/meteor' | |
Meteor.publish('pages', function() { | |
return Pages.find() | |
}) |
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
import { composeWithTracker } from 'react-komposer' | |
import HomeComponent from '../components/Pages/Home' | |
import Loading from '../components/Loading' | |
import { Meteor } from 'meteor/meteor' | |
const composer = (params, onData) => { | |
if (Meteor.subscribe('pages').ready()) { | |
const page = Pages.findOne({ slug: 'home-page' }) | |
onData(null, { page }) |
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
import React from 'react' | |
import { mount } from 'react-mounter' | |
import { FlowRouter } from 'meteor/kadira:flow-router-ssr' | |
import { DocHead } from 'meteor/kadira:dochead' | |
import { Layout } from './components/App' | |
import Home from './containers/HomeIndex' | |
const publicRoutes = FlowRouter.group({name: 'public'}) |
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
import { Meteor } from 'meteor/meteor' | |
Meteor.startup(() => { | |
Meteor.call('getCMSContent') | |
SyncedCron.add({ | |
name: 'Scrape WordPress API', | |
schedule: function(parser) { | |
// parser is a later.parse object | |
return parser.text('every 1 hours') |
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
import {Meteor} from 'meteor/meteor' | |
import { HTTP } from 'meteor/http' | |
const futureHTTP = Meteor.wrapAsync( HTTP.get ) | |
Pages = new Mongo.Collection('pages') | |
Pages.allow({ | |
insert: () => false, | |
update: () => false, |
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
{ | |
"status": "ok", | |
"count": 11, | |
"count_total": 27, | |
"pages": 3, | |
"posts": [ | |
{ | |
"id": 270, | |
"type": "post", | |
"slug": "sample-post", |
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
import maquette from 'maquette' | |
import reqwest from 'reqwest' | |
import moment from 'moment' | |
const h = maquette.h | |
const projector = maquette.createProjector() | |
let PAGE = 2; | |
let LoadMore = { | |
dom: { |
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
<div class="news"> | |
<section class="news--module"> | |
<div class="news--grid js-c-grid"> | |
{% for post in posts %} | |
{% include ['tease-news.twig', 'tease.twig'] %} | |
{% endfor %} | |
</div> | |
</section> |