Versioned uploads, opengraph data

This commit is contained in:
2018-12-30 10:27:51 -08:00
parent 96ac58c9ec
commit ce00e4366d
3 changed files with 24 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ export class Root extends React.PureComponent<Props, State> {
componentDidMount() {
window
.fetch(Model.URL)
.fetch(Model.dataUrl())
.then(data => data.json())
.then(json => this.setState({ data: json }))
.then(this._loadHash)

View File

@@ -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[];

17
template.html Normal file
View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Skiing - Aaron Gutierrez</title>
<link rel="stylesheet" href="{0}">
<meta charshet="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="Aaron Gutierrez's Ski Pictures">
<meta property="og:type" content="website">
<meta property="og:url" content="https://ski.aarongutierrez.com">
<meta property="og:image" content="https://ski.aarongutierrez.com/img/1600/112873ef54777a15bd9e5cd03362d5a5.jpg">
</head>
<body>
<div id="mount"><noscript>I don't like javascript, either.</noscript></div>
<script type="text/javascript" src="{1}"></script>
</body>
</html>