diff --git a/src/components/root.tsx b/src/components/root.tsx index 901bb04..4626934 100644 --- a/src/components/root.tsx +++ b/src/components/root.tsx @@ -36,7 +36,7 @@ export class Root extends React.PureComponent { componentDidMount() { window - .fetch(Model.URL) + .fetch(Model.dataUrl()) .then(data => data.json()) .then(json => this.setState({ data: json })) .then(this._loadHash) diff --git a/src/model.ts b/src/model.ts index 5134342..0770f9b 100644 --- a/src/model.ts +++ b/src/model.ts @@ -1,5 +1,10 @@ export const SIZES = [1600, 1200, 800, 600, 400, 200]; -export const URL = "img/data.json"; + +export function dataUrl() { + return (window.location.host === "ski.aarongutierrez.com") + ? "https://s3-us-west-2.amazonaws.com/ski.aarongutierrez.com/img/data.json" + : "img/data.json"; +} export interface Data { sets: ImageSet[]; diff --git a/template.html b/template.html new file mode 100644 index 0000000..afc6dcf --- /dev/null +++ b/template.html @@ -0,0 +1,17 @@ + + + + Skiing - Aaron Gutierrez + + + + + + + + + +
+ + +