diff --git a/.gitignore b/.gitignore
index 4397179..acf5709 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,5 @@ pom.xml
/.env
/*.log
/.settings
+/.idea
+/*.iml
\ No newline at end of file
diff --git a/project.clj b/project.clj
index 50969ac..783afe7 100644
--- a/project.clj
+++ b/project.clj
@@ -5,7 +5,7 @@
[lib-noir "0.6.0"]
[compojure "1.1.5"]
[ring-server "0.2.8"]
- [clabango "0.5"]
+ [selmer "0.2.1"]
[com.taoensso/timbre "1.6.0"]
[com.postspectacular/rotor "0.1.0"]
[com.taoensso/tower "1.5.1"]
@@ -26,4 +26,4 @@
:auto-reload? false}}
:dev {:dependencies [[ring-mock "0.1.3"]
[ring/ring-devel "1.1.8"]]}}
- :min-lein-version "2.0.0")
\ No newline at end of file
+ :min-lein-version "2.0.0")
diff --git a/src/blarg/views/layout.clj b/src/blarg/views/layout.clj
index bfa7e88..f015e69 100644
--- a/src/blarg/views/layout.clj
+++ b/src/blarg/views/layout.clj
@@ -1,9 +1,8 @@
(ns blarg.views.layout
(:use noir.request)
- (:require [clabango.parser :as parser]
+ (:require [selmer.parser :as parser]
[noir.session :as session]
- [blarg.views.viewfilters]
- [blarg.views.tags]))
+ [blarg.views.viewfilters]))
(def template-path "blarg/views/templates/")
diff --git a/src/blarg/views/tags.clj b/src/blarg/views/tags.clj
deleted file mode 100644
index d66bb72..0000000
--- a/src/blarg/views/tags.clj
+++ /dev/null
@@ -1,19 +0,0 @@
-(ns blarg.views.tags
- (:use [clabango.tags])
- (:require [clabango.filters :refer [context-lookup]]))
-
-(deftemplatetag "ifempty" "endifempty" [[if-node & nodes] context]
- (let [args (:args if-node)
- body-nodes (butlast nodes)
- [flip decision] (cond (= 1 (count args))
- [empty? (first args)]
-
- (and (= 2 (count args))
- (= "not" (first args)))
- [not-empty (second args)]
-
- :default (throw (Exception. (str "Syntax error: "
- if-node))))]
- {:nodes (if (flip (context-lookup context decision))
- (take-while #(not= "else" (:tag-name %)) body-nodes)
- (rest (drop-while #(not= "else" (:tag-name %)) body-nodes)))}))
\ No newline at end of file
diff --git a/src/blarg/views/templates/base.html b/src/blarg/views/templates/base.html
index d54d2e1..5f8f123 100644
--- a/src/blarg/views/templates/base.html
+++ b/src/blarg/views/templates/base.html
@@ -3,7 +3,7 @@
- blarg.ca{{html-title|default:}}
+ blarg.ca{{html-title|default:""}}
diff --git a/src/blarg/views/templates/files/list.html b/src/blarg/views/templates/files/list.html
index 937ce6f..46ab0dc 100644
--- a/src/blarg/views/templates/files/list.html
+++ b/src/blarg/views/templates/files/list.html
@@ -32,7 +32,7 @@
- {% ifempty not files %}
+ {% if files %}
{% else %}
No files found.
- {% endifempty %}
+ {% endif %}
diff --git a/src/blarg/views/templates/posts/list.html b/src/blarg/views/templates/posts/list.html
index c486235..471af7a 100644
--- a/src/blarg/views/templates/posts/list.html
+++ b/src/blarg/views/templates/posts/list.html
@@ -1,7 +1,7 @@
{% extends "blarg/views/templates/base.html" %}
{% block content %}
-{% ifempty posts %}
+{% if not posts %}
@@ -26,5 +26,5 @@
{% include "blarg/views/templates/posts/publishmodal.html" %}
{% include "blarg/views/templates/posts/deletemodal.html" %}
-{% endifempty %}
+{% endif %}
{% endblock %}
diff --git a/src/blarg/views/viewfilters.clj b/src/blarg/views/viewfilters.clj
index 13f9167..903f832 100644
--- a/src/blarg/views/viewfilters.clj
+++ b/src/blarg/views/viewfilters.clj
@@ -1,32 +1,32 @@
(ns blarg.views.viewfilters
(:use [blarg.datetime]
[blarg.routes.helpers])
- (:require [clabango.filters :refer [deftemplatefilter]]
+ (:require [selmer.filters :refer [add-filter!]]
[markdown.core :as md]
[clj-time.core]
[clj-time.format]))
-(deftemplatefilter "is_false" [node body arg]
- (if body
- false
- true))
+(add-filter!
+ :md-to-html
+ (fn [s]
+ (md/md-to-html-string s)))
-(deftemplatefilter "default" [node body arg]
- (if body
- body
- arg))
+(add-filter!
+ :post-url
+ (fn [post]
+ (get-post-url post)))
-(deftemplatefilter "md-to-html" [node body arg]
- (md/md-to-html-string body))
+(add-filter!
+ :to_relative
+ (fn [date]
+ (->relative-timestamp date)))
-(deftemplatefilter "post-url" [node body arg]
- (get-post-url body))
+(add-filter!
+ :to_month-day
+ (fn [date]
+ (->month-day-str date)))
-(deftemplatefilter "to_relative" [node body arg]
- (->relative-timestamp body))
-
-(deftemplatefilter "to_month-day" [node body arg]
- (->month-day-str body))
-
-(deftemplatefilter "to_fulltime" [node body arg]
- (clj-time.local/format-local-time body :rfc822))
+(add-filter!
+ :to_fulltime
+ (fn [date]
+ (clj-time.local/format-local-time date :rfc822)))