Browse Source

Incremented copyright date

Stephen Starkey 1 year ago
parent
commit
b144227fee
2 changed files with 35 additions and 32 deletions
  1. 1
    1
      README.md
  2. 34
    31
      src/xp_assessment/core.clj

+ 1
- 1
README.md View File

@@ -23,7 +23,7 @@ any variables are required but are not set, they should be marked with `*REQUIRE
23 23
 
24 24
 ## License
25 25
 
26
-Copyright © 2018 Stephen Starkey
26
+Copyright © 2019 Stephen Starkey
27 27
 
28 28
 This program is free software: you can redistribute it and/or modify
29 29
 it under the terms of the GNU Affero General Public License as published by

+ 34
- 31
src/xp_assessment/core.clj View File

@@ -26,7 +26,9 @@
26 26
             [ring.middleware.reload :refer [wrap-reload]]
27 27
             [ring.middleware.params :refer [wrap-params]]
28 28
             [taoensso.timbre :as log])
29
-  (:gen-class))
29
+  (:gen-class)
30
+  (:import (java.util Date)
31
+           (java.time LocalDate)))
30 32
 
31 33
 ;;todo Aspirations:
32 34
 ;;todo Allow a whole team to take the assessment and aggregate the results
@@ -148,36 +150,37 @@
148 150
 (defn- link [url desc] [:a {:href url :target "_blank"} desc])
149 151
 
150 152
 (defmacro render-page [& body]
151
-  `(html [:head
152
-          [:title "XP Self-Assessment"]
153
-          [:style form-style]
154
-          (include-js chartcjs)]
155
-         [:body
156
-          [:h1 "Extreme Programming Self-Assessment"]
157
-          [:div {:class "citation"}
158
-           ;; This block must remain prominent and at the top to maintain
159
-           ;; permission from James Shore to publish publicly.
160
-           "Derived from Shore, James. "
161
-           [:em "The Art of Agile Software Development. "]
162
-           "1st ed. O'Reilly Media, 2007."
163
-           [:span {:class "citation-link"} [:a {:href "#footer"} "1"]]]
164
-          [:div {:class "main-body"} [:hr] ~@body]
165
-          [:div {:class "footer"}
166
-           [:a {:name "footer"}]
167
-           "Survey questions, scores, topics, and practices "
168
-           "Copyright © 2002-2018 "
169
-           (link
170
-             "https://www.jamesshore.com/Agile-Book/assess_your_agility.html"
171
-             "Titanium I.T. LLC") ". Used with permission."
172
-           [:br]
173
-           "The rest is Copyright © 2018 "
174
-           (link "https://calmabiding.me" "Stephen Starkey")
175
-           [:br]
176
-           (link (str "https://git.calmabiding.me/scstarkey/xp-assessment/"
177
-                      "src/branch/master/LICENSE") "license")
178
-           " "
179
-           (link "https://git.calmabiding.me/scstarkey/xp-assessment"
180
-                 "source code")]]))
153
+  `(let [current-year# (.getYear (LocalDate/now))]
154
+     (html [:head
155
+            [:title "XP Self-Assessment"]
156
+            [:style form-style]
157
+            (include-js chartcjs)]
158
+           [:body
159
+            [:h1 "Extreme Programming Self-Assessment"]
160
+            [:div {:class "citation"}
161
+             ;; This block must remain prominent and at the top to maintain
162
+             ;; permission from James Shore to publish publicly.
163
+             "Derived from Shore, James. "
164
+             [:em "The Art of Agile Software Development. "]
165
+             "1st ed. O'Reilly Media, 2007."
166
+             [:span {:class "citation-link"} [:a {:href "#footer"} "1"]]]
167
+            [:div {:class "main-body"} [:hr] ~@body]
168
+            [:div {:class "footer"}
169
+             [:a {:name "footer"}]
170
+             "Survey questions, scores, topics, and practices "
171
+             (str "Copyright © 2002-" current-year# " ")
172
+             (link
173
+               "https://www.jamesshore.com/Agile-Book/assess_your_agility.html"
174
+               "Titanium I.T. LLC") ". Used with permission."
175
+             [:br]
176
+             (str "The rest is Copyright © " current-year# " ")
177
+             (link "https://calmabiding.me" "Stephen Starkey")
178
+             [:br]
179
+             (link (str "https://git.calmabiding.me/scstarkey/xp-assessment/"
180
+                        "src/branch/master/LICENSE") "license")
181
+             " "
182
+             (link "https://git.calmabiding.me/scstarkey/xp-assessment"
183
+                   "source code")]])))
181 184
 
182 185
 (defn- render-form
183 186
   ([req]