aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/gallery.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/public/gallery.js b/public/gallery.js
index ccacec3..1935220 100644
--- a/public/gallery.js
+++ b/public/gallery.js
@@ -1 +1,33 @@
'use strict'
+
+function call(method, params) {
+ return m.request({
+ method: "POST",
+ url: `/api/{method}`,
+ body: params,
+ })
+}
+
+let Browse = {
+ view: vnode => {
+ return m('')
+ },
+}
+
+let View = {
+ view: vnode => {
+ return m('')
+ },
+}
+
+window.addEventListener('load', () => {
+ m.route(document.body, "/browse/", {
+ "/browse/:path": Browse,
+ "/view/:sha1": View,
+
+ "/similar/:sha1": undefined,
+ "/tags": undefined,
+ "/tags/:space": undefined,
+ "/tags/:space/:tag": undefined,
+ })
+})