Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Turned things into fns instead of defs to make possibly dynamic

  • Loading branch information...
commit 6a7c16b5481664e85ff7ba813a15468400223f26 1 parent c234f37
Matt Furden authored
8 src/andrew_site/models/db.clj
@@ -22,10 +22,10 @@
22 22
23 23 (maybe-init)
24 24
25   -(def major-skills
  25 +(defn major-skills []
26 26 (map #(:skill %) (fetch :skills :where {:level "major"})))
27 27
28   -(def lesser-skills
  28 +(defn lesser-skills []
29 29 (map #(:skill %) (fetch :skills :where {:level "lesser"})))
30 30
31 31 (defn add-major-skill [skill]
@@ -37,8 +37,8 @@
37 37 (defn add-job [{:keys [name start-year end-year url description]}]
38 38 (insert! :jobs {:name name :start-year start-year :end-year end-year :url url :description description}))
39 39
40   -(def jobs
  40 +(defn jobs []
41 41 (fetch :jobs))
42 42
43   -(def certifications
  43 +(defn certifications []
44 44 (fetch :certifications))
8 src/andrew_site/views/resume.clj
@@ -49,14 +49,14 @@
49 49 [:p profile]]
50 50 [:div#education.sidebarPanel
51 51 [:h4 "Certifications"]
52   - (cert-list db/certifications)]
  52 + (cert-list (db/certifications))]
53 53 [:div#skills.sidebarPanel
54 54 [:div.grid_4.alpha
55 55 [:h4 "Major"]
56   - [:ul (for [skill db/major-skills] [:li skill])]]
  56 + [:ul (for [skill (db/major-skills)] [:li skill])]]
57 57 [:div.grid_4.omega
58 58 [:h4 "Lesser"]
59   - [:ul (for [skill db/lesser-skills] [:li skill])]]]]])
  59 + [:ul (for [skill (db/lesser-skills)] [:li skill])]]]]])
60 60
61 61 (defpartial job-item [{:keys [name start-year end-year url description]}]
62 62 [:div.yearPanel {:id (str "y" start-year)}
@@ -75,7 +75,7 @@
75 75
76 76 (defpartial main-body []
77 77 [:div#wrapContent.container_24
78   - (jobs-list db/jobs)
  78 + (jobs-list (db/jobs))
79 79 (sidebar)])
80 80
81 81 (defpage "/" []

0 comments on commit 6a7c16b

Please sign in to comment.
Something went wrong with that request. Please try again.