Skip to content

Instantly share code, notes, and snippets.

View fmw's full-sized avatar

Filip de Waard fmw

View GitHub Profile
@fmw
fmw / feed.cljs
Created August 6, 2011 03:02
doseq problem
(ns vix.views.feed
(:require [vix.core :as core]
[vix.document :as document]
[vix.util :as util]
[soy :as soy]
[vix.templates.feed :as tpl]
[goog.events :as events]
[goog.dom :as dom]))
(defn display-document-list [main-el xhr e]
@fmw
fmw / routes.cljs
Created August 5, 2011 00:46
vix routes function
(def h (atom nil))
(defn routes [uri-path]
(compare-and-set! h nil (new goog.history.Html5History))
(cond
(re-matches #"^/admin/[^/]+/new$" uri-path) (editor/start :new uri-path)
(re-matches #"^/admin/[^/]+/edit.+" uri-path) (editor/start :edit uri-path)
(re-matches #"^/admin/[^/]+/overview$" uri-path) (feed/list-documents uri-path)))