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
<system.serviceModel> | |
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> | |
<services> | |
<service behaviorConfiguration="agilityWebsiteServiceBehavior" name="Agility.Web.AgilityWebsiteService"> | |
<endpoint binding="wsHttpBinding" bindingConfiguration="agilityWebsiteServiceBinding" contract="Agility.Web.IAgilityWebsiteService" /> | |
<endpoint binding="wsHttpBinding" bindingConfiguration="agilityWebsiteServiceBindingSSL" contract="Agility.Web.IAgilityWebsiteService" /> | |
</service> | |
</services> | |
<behaviors> | |
<serviceBehaviors> |
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 React, { Component } from 'react'; | |
import { ContentZone } from '../agility-react' | |
class TwoColumnTemplate extends Component { | |
render() { | |
return ( | |
<div className="two-column-template"> | |
<div className="main-column"> | |
<ContentZone name='MainContentZone' {...this.props} /> |
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 React, { Component } from 'react'; | |
import { ContentZone } from '../agility-react' | |
class OneColumnTemplate extends Component { | |
render() { | |
return ( | |
<div className="one-column-template"> | |
<ContentZone name='MainContentZone' {...this.props} /> | |
</div> |
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
async routePage() { | |
const api = this.props.agility.client; | |
try { | |
//get the sitemap route table | |
let sitemap = await this.getSitemap(api); | |
//get the path from the browser | |
const path = document.location.pathname.toLowerCase(); | |
let pageInSitemap = sitemap[path]; |
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
{ | |
"/home": { | |
"title": "Home", | |
"name": "home", | |
"pageID": 2 | |
}, | |
"/posts": { | |
"title": "Posts", | |
"name": "posts", | |
"pageID": 3 |
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
//Our Agility Modules | |
import RichTextArea from './modules/RichTextArea' | |
import Jumbotron from './modules/Jumbotron' | |
//Our Agility PageTemplates | |
import OneColumnTemplate from './pageTemplates/OneColumnTemplate' | |
export default { | |
guid: '...', //Set your guid here | |
fetchAPIKey: '...', //Set your fetch apikey here |
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 React, { Component } from 'react'; | |
import './Jumbotron.css' | |
class Jumbotron extends Component { | |
render() { | |
return ( | |
<section className="jumbotron"> | |
<h1>{this.props.item.fields.title}</h1> | |
<h2>{this.props.item.fields.subTitle}</h2> |
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 React, { Component } from 'react'; | |
import { Switch, Route } from 'react-router-dom' | |
import './App.css'; | |
//The Agility Router | |
import { PageRouter } from './agility-react' | |
//Shared Components | |
import GlobalHeader from './GlobalHeader' |
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
// script entry point | |
addEventListener("fetch", event => { | |
event.respondWith(handleRequest(event.request)); | |
}); | |
/** | |
* Fetch and return the request body | |
* @param {Request} request | |
*/ | |
async function handleRequest(request) { |