Browse Source

changes to handle prefetching

pull/1/head
wes 7 years ago
parent
commit
075f611c6f
  1. 3
      package.json
  2. 2
      src/scripts/app.tag
  3. 3
      src/scripts/riotblog.js
  4. 1
      src/templates/index.html
  5. 8
      src/website.py
  6. 6
      yarn.lock

3
package.json

@ -30,7 +30,8 @@
},
"dependencies": {
"animate.css": "^3.5.2",
"axios": "^0.16.1",
"axios": "^0.16.2",
"es6-promise": "^4.1.1",
"font-awesome": "^4.7.0",
"immutable": "^3.8.1",
"jquery": "^3.2.1",

2
src/scripts/app.tag

@ -53,6 +53,8 @@ this.R = R;
this.route = route;
this.riot = riot;
this.route.base('#!')
this.state = {
"_id" : false,
"projects" : Z.empty,

3
src/scripts/riotblog.js

@ -6,6 +6,9 @@ import './editor.tag';
import './projects.tag';
import './app.tag';
import './grid.js';
import { default as promise } from 'es6-promise';
promise.Promise.polyfill()
riot.mount("app");
riot.mount("editor");

1
src/templates/index.html

@ -4,6 +4,7 @@
<link rel="stylesheet" href="/styles/primop.me.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="fragment" content="!">
</head>
<html>
<body>

8
src/website.py

@ -74,6 +74,8 @@ def NeverWhere(configfile=None):
@app.route("/blog/", methods=("GET", "POST"))
def index():
print("matched index")
if request.args.get("_escaped_fragment_", False):
abort(404)
return render_template("index.html")
@app.route("/blog/scripts/<filename>", methods=("GET", "POST"))
@ -147,12 +149,6 @@ def NeverWhere(configfile=None):
return posts.savepost(**post)
# default, not found error
@app.route("/<path:path>")
def page_not_found(path):
return "Oops, couldn't find that :/"
return app
app = NeverWhere()

6
yarn.lock

@ -109,7 +109,7 @@ aws4@^1.2.1:
version "1.6.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e"
axios@^0.16.1:
axios@^0.16.2:
version "0.16.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.16.2.tgz#ba4f92f17167dfbab40983785454b9ac149c3c6d"
dependencies:
@ -303,6 +303,10 @@ error-ex@^1.2.0:
dependencies:
is-arrayish "^0.2.1"
es6-promise@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.1.1.tgz#8811e90915d9a0dba36274f0b242dbda78f9c92a"
escape-string-regexp@^1.0.2:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"

Loading…
Cancel
Save