Permalink
Browse files

Turned things into fns instead of defs to make possibly dynamic

  • Loading branch information...
1 parent c234f37 commit 6a7c16b5481664e85ff7ba813a15468400223f26 @zolrath committed Sep 16, 2011
Showing with 8 additions and 8 deletions.
  1. +4 −4 src/andrew_site/models/db.clj
  2. +4 −4 src/andrew_site/views/resume.clj
View
8 src/andrew_site/models/db.clj
@@ -22,10 +22,10 @@
(maybe-init)
-(def major-skills
+(defn major-skills []
(map #(:skill %) (fetch :skills :where {:level "major"})))
-(def lesser-skills
+(defn lesser-skills []
(map #(:skill %) (fetch :skills :where {:level "lesser"})))
(defn add-major-skill [skill]
@@ -37,8 +37,8 @@
(defn add-job [{:keys [name start-year end-year url description]}]
(insert! :jobs {:name name :start-year start-year :end-year end-year :url url :description description}))
-(def jobs
+(defn jobs []
(fetch :jobs))
-(def certifications
+(defn certifications []
(fetch :certifications))
View
8 src/andrew_site/views/resume.clj
@@ -49,14 +49,14 @@
[:p profile]]
[:div#education.sidebarPanel
[:h4 "Certifications"]
- (cert-list db/certifications)]
+ (cert-list (db/certifications))]
[:div#skills.sidebarPanel
[:div.grid_4.alpha
[:h4 "Major"]
- [:ul (for [skill db/major-skills] [:li skill])]]
+ [:ul (for [skill (db/major-skills)] [:li skill])]]
[:div.grid_4.omega
[:h4 "Lesser"]
- [:ul (for [skill db/lesser-skills] [:li skill])]]]]])
+ [:ul (for [skill (db/lesser-skills)] [:li skill])]]]]])
(defpartial job-item [{:keys [name start-year end-year url description]}]
[:div.yearPanel {:id (str "y" start-year)}
@@ -75,7 +75,7 @@
(defpartial main-body []
[:div#wrapContent.container_24
- (jobs-list db/jobs)
+ (jobs-list (db/jobs))
(sidebar)])
(defpage "/" []

0 comments on commit 6a7c16b

Please sign in to comment.