Browse Source

Multiple page support

Stephen Starkey 2 weeks ago
parent
commit
42b7e6bf7c
6 changed files with 357 additions and 336 deletions
  1. 3
    2
      build
  2. 2
    0
      project.clj
  3. 120
    0
      resources/public/css/app.css
  4. 139
    331
      resources/public/index.html
  5. 18
    0
      resources/public/meditation.html
  6. 75
    3
      src/calmabiding/core.clj

+ 3
- 2
build View File

@@ -2,6 +2,7 @@
2 2
 
3 3
 TARGET=target/site
4 4
 
5
-rm -rf $TARGET &&
5
+lein do clean, run &&
6 6
   mkdir -p $TARGET &&
7
-  rsync -avg resources/public/ $TARGET/
7
+  rsync -avg target/html-files/ $TARGET/ &&
8
+  rsync -avg resources/public/img/ $TARGET/img/

+ 2
- 0
project.clj View File

@@ -5,6 +5,8 @@
5 5
             :url "http://www.calmabiding.me"}
6 6
   :dependencies [[org.clojure/clojure "1.10.0"]
7 7
                  [compojure "1.6.1"]
8
+                 [garden "1.3.10"]
9
+                 [hiccup "1.0.5"]
8 10
                  [ring/ring-defaults "0.3.2"]
9 11
                  [ring/ring-devel "1.7.1"]
10 12
                  [ring-server "0.5.0"]]

+ 120
- 0
resources/public/css/app.css View File

@@ -0,0 +1,120 @@
1
+body {
2
+    font-family: Cabin, sans-serif;
3
+    font-size: 1.1em;
4
+}
5
+
6
+main {
7
+    line-height: 1.25em;
8
+    margin-top: 95px;
9
+    padding-left: 10px;
10
+}
11
+
12
+header {
13
+    position: fixed;
14
+    top: 0;
15
+    padding-left: 10px;
16
+    padding-bottom: 10px;
17
+    background-color: white;
18
+    width: 100%;
19
+}
20
+
21
+.column {
22
+    margin-right: 10px;
23
+}
24
+
25
+@media only screen and (min-width: 1024px) {
26
+    .column {
27
+        float: left;
28
+        width: 45%;
29
+    }
30
+
31
+    header, main {
32
+        padding-left: 60px;
33
+    }
34
+}
35
+
36
+section {
37
+    margin: 10px 0;
38
+    border: 1px solid lightgray;
39
+}
40
+
41
+footer {
42
+    margin: 30px 0;
43
+    text-align: center;
44
+    clear: left;
45
+}
46
+
47
+h1 {
48
+    margin-top: 20px;
49
+    margin-bottom: 5px;
50
+}
51
+
52
+h2, h3, h4, h5, p {
53
+    margin: 10px 0;
54
+}
55
+
56
+section h4 {
57
+    background-color: lightgray;
58
+    margin: 0;
59
+}
60
+
61
+section h5 {
62
+    font-weight: bold;
63
+    margin: 0 10px -20px 0;
64
+}
65
+
66
+section h4, section h5 {
67
+    padding: 5px 10px;
68
+}
69
+
70
+section img.profile-img {
71
+    float: left;
72
+    margin-right: 10px;
73
+    width: 150px;
74
+}
75
+
76
+section img.folding {
77
+    display: block;
78
+    margin: 10px auto;
79
+    width: 75%;
80
+    max-width: 500px;
81
+}
82
+
83
+section p {
84
+    padding: 5px 10px;
85
+}
86
+
87
+em {
88
+    font-style: italic;
89
+}
90
+
91
+section > em {
92
+    padding: 5px 10px;
93
+}
94
+
95
+section {
96
+    height: 100%;
97
+}
98
+
99
+p em {
100
+    font-size: 0.9em;
101
+}
102
+
103
+strong {
104
+    color: #6d2d2d;
105
+    font-size: 1.1em;
106
+}
107
+
108
+h1 {
109
+    font-size: 2em;
110
+    font-family: Lusitana, serif;
111
+}
112
+
113
+h4 {
114
+    font-weight: bold;
115
+    font-size: 1.2em;
116
+}
117
+
118
+strong {
119
+    font-weight: bold;
120
+}

+ 139
- 331
resources/public/index.html View File

@@ -1,331 +1,139 @@
1
-<!DOCTYPE html>
2
-<html>
3
-<head>
4
-    <meta charset="utf-8">
5
-    <title>Calm Abiding</title>
6
-    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
7
-          name="viewport">
8
-
9
-    <link rel="webmention"
10
-          href="https://webmention.io/www.calmabiding.me/webmention"/>
11
-    <link rel="pingback"
12
-          href="https://webmention.io/www.calmabiding.me/xmlrpc"/>
13
-
14
-    <link href="https://fonts.googleapis.com/css?family=Cabin|Lusitana|Ubuntu+Mono&display=swap"
15
-          rel="stylesheet">
16
-    <link rel="stylesheet"
17
-          href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
18
-          integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay"
19
-          crossorigin="anonymous">
20
-    <link rel="stylesheet"
21
-          href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"/>
22
-
23
-    <style type="text/css">
24
-        body {
25
-            font-family: Cabin, sans-serif;
26
-            font-size: 1.1em;
27
-        }
28
-
29
-        main {
30
-            line-height: 1.25em;
31
-            margin-top: 95px;
32
-            padding-left: 10px;
33
-        }
34
-
35
-        header {
36
-            position: fixed;
37
-            top: 0;
38
-            padding-left: 10px;
39
-            padding-bottom: 10px;
40
-            background-color: white;
41
-            width: 100%;
42
-        }
43
-
44
-        .column {
45
-            margin-right: 10px;
46
-        }
47
-
48
-        @media only screen and (min-width: 1024px) {
49
-            .column {
50
-                float: left;
51
-                width: 45%;
52
-            }
53
-
54
-            header, main {
55
-                padding-left: 60px;
56
-            }
57
-        }
58
-
59
-        section {
60
-            margin: 10px 0;
61
-            border: 1px solid lightgray;
62
-        }
63
-
64
-        footer {
65
-            margin: 30px 0;
66
-            text-align: center;
67
-            clear: left;
68
-        }
69
-
70
-        h1 {
71
-            margin-top: 20px;
72
-            margin-bottom: 5px;
73
-        }
74
-
75
-        h2, h3, h4, h5, p {
76
-            margin: 10px 0;
77
-        }
78
-
79
-        section h4 {
80
-            background-color: lightgray;
81
-            margin: 0;
82
-        }
83
-
84
-        section h5 {
85
-            font-weight: bold;
86
-            margin: 0 10px -20px 0;
87
-        }
88
-
89
-        section h4, section h5 {
90
-            padding: 5px 10px;
91
-        }
92
-
93
-        section img.profile-img {
94
-            float: left;
95
-            margin-right: 10px;
96
-            width: 150px;
97
-        }
98
-
99
-        section img.folding {
100
-            display: block;
101
-            margin: 10px auto;
102
-            width: 75%;
103
-            max-width: 500px;
104
-        }
105
-
106
-        section p {
107
-            padding: 5px 10px;
108
-        }
109
-
110
-        em {
111
-            font-style: italic;
112
-        }
113
-
114
-        section > em {
115
-            padding: 5px 10px;
116
-        }
117
-
118
-        section {
119
-            height: 100%;
120
-        }
121
-
122
-        p em {
123
-            font-size: 0.9em;
124
-        }
125
-
126
-        strong {
127
-            color: #6d2d2d;
128
-            font-size: 1.1em;
129
-        }
130
-
131
-        h1 {
132
-            font-size: 2em;
133
-            font-family: Lusitana, serif;
134
-        }
135
-
136
-        h4 {
137
-            font-weight: bold;
138
-            font-size: 1.2em;
139
-        }
140
-
141
-        strong {
142
-            font-weight: bold;
143
-        }
144
-    </style>
145
-</head>
146
-<body>
147
-<header>
148
-    <h1>Calm Abiding LLC</h1>
149
-    <a href="https://www.linkedin.com/in/sstarkey"
150
-       target="_blank">LinkedIn</a>
151
-    &centerdot;
152
-    <a href="mailto:stephen@calmabiding.me">Hire Me</a>
153
-</header>
154
-
155
-<main>
156
-    <div class="column">
157
-        <section>
158
-            <h4>About Stephen Starkey,
159
-                <a href="https://www.icagile.com/Certification/Verify-Credentials/ctl/UserDetails/mid/697/uid/1ac5b8e2-1f77-44fb-a64b-06262cd4b18a"
160
-                   target="_blank">ICP-ACC</a></h4>
161
-
162
-            <img src="img/profile.png" alt="me" title="me" class="profile-img"/>
163
-
164
-            <p>
165
-                I began my more-than-20-year career in programming, moved towards leadership,
166
-                dabbled in management, and found my sweet spot as <strong>player-coach</strong>.
167
-                I am just as happy swimming in the waters of coders (I keep my coding
168
-                skills sharp) as with software development management folk.
169
-            </p>
170
-
171
-            <p>
172
-                I believe strongly in the power of meditation. Not only does it bring peace
173
-                in-the-moment, but it also has many long-term effects on the brain. The primary
174
-                one is stability.
175
-            </p>
176
-
177
-            <p>
178
-                I've practiced meditation for <strong>over 10 years</strong>. And I can feel the difference.
179
-            </p>
180
-
181
-            <p>
182
-                Also, I have dedicated my computer's spare time to curing Alzheimer's. You could join <a
183
-                    href="https://stats.foldingathome.org/team/234894" target="_blank">our
184
-                team</a> if you want! Visit <a href="https://foldingathome.org/home/" target="_blank">Folding@Home</a>
185
-                to install the software. Here's how my team is doing:
186
-            </p>
187
-
188
-            <img src="https://folding.extremeoverclocking.com/sigs/sigimage.php?u=823609"
189
-                 alt="folding@home"
190
-                 class="folding"/>
191
-        </section>
192
-
193
-        <section>
194
-
195
-            <h4>Enabling high performing software development organizations</h4>
196
-
197
-            <p>
198
-                My favorite thing to do is to join an organization, for however long it takes,
199
-                help it become super high-performing, and move on to another one. I enjoy the
200
-                gratification of seeing people's inspiration grow and, from that powerful
201
-                energy, their creativity and productivity.
202
-            </p>
203
-
204
-            <p>
205
-                It's amazing what can happen when people discover the power of good, strong
206
-                relationships amongst colleagues.
207
-            </p>
208
-        </section>
209
-
210
-        <section>
211
-            <h4>Favorite tools</h4>
212
-            <em>Not an exhaustive list</em>
213
-
214
-            <h5>Teamwork</h5>
215
-            <p>
216
-                <a href="https://liveingreatness.com" target="_blank">Core Protocols</a>
217
-                &centerdot;
218
-                <a href="https://sociocracy30.org" target="_blank">Sociocracy 3.0</a>
219
-                &centerdot;
220
-                <a href="http://extremeprogramming.org" target="_blank">eXtreme Programming</a>
221
-                &centerdot;
222
-                <a href="https://scrumguides.org" target="_blank">Scrum</a>
223
-            </p>
224
-
225
-            <h5>Coding</h5>
226
-            <p>
227
-                <a href="https://www.jetbrains.com/idea/" target="_blank">IntelliJ IDEA</a>
228
-                &centerdot;
229
-                <a href="https://git-scm.com" target="_blank">git</a>
230
-            </p>
231
-
232
-            <h5>Languages / Libraries / Frameworks</h5>
233
-            <p>
234
-                <a href="https://clojure.org" target="_blank">Clojure</a>
235
-                &centerdot;
236
-                <a href="https://github.com/tolitius/mount" target="_blank">Mount</a>
237
-                <em>(still learning)</em>
238
-                &centerdot;
239
-                <a href="https://www.java.com" target="_blank">Java</a>
240
-                &centerdot;
241
-                <a href="https://github.com/google/guice" target="_blank">Guice</a>
242
-                &centerdot;
243
-                <a href="https://flutter.dev" target="_blank">Flutter</a>
244
-                <em>(still learning)</em>
245
-            </p>
246
-        </section>
247
-
248
-        <section>
249
-            <h4>More about meditation</h4>
250
-            <p>
251
-                I advocate for this practice, as it helps people deal with difficult
252
-                circumstances, real or imagined. I am more than happy to teach basic
253
-                meditation techniques to my clients!
254
-            </p>
255
-        </section>
256
-    </div>
257
-
258
-
259
-    <div class="column">
260
-        <section>
261
-            <h4>How I work</h4>
262
-            <p>
263
-                As a
264
-                <a href="http://wiki.c2.com/?PlayerCoach" target="_blank">player-coach</a>,
265
-                my first job is to join the stream. Experience
266
-                how the team works. Get a sense for its rhythms. Where are things slow? Are there
267
-                blockages related to <strong>structure</strong>, <strong>process</strong>, or
268
-                <strong>habit</strong>?
269
-            </p>
270
-
271
-            <h5>Joining</h5>
272
-            <p>
273
-                The moment I join a team, if they don't already have a set of strong goals, we
274
-                begin with those. These are not projects that must be completed
275
-                (working "in" the team). Instead, they are goals toward <strong>having greater
276
-                impact</strong> (working "on" the team).
277
-            </p>
278
-
279
-            <p>
280
-                The beginning is <strong>helping everybody see</strong> what is going on. Often
281
-                teams aren't high performing because they are just used to how things are. Comfort
282
-                breeds a sense of satisfaction that can be misleading.
283
-            </p>
284
-
285
-            <h5>Supporting</h5>
286
-            <p>
287
-                Once they can see what's going on, they can work on changing. If they know the
288
-                impact they are having could be better, why wouldn't they work on that? It becomes
289
-                natural. The next step is <strong>modeling bravery</strong>. Often change doesn't
290
-                happen because of <strong>fear</strong>. I help the team get to the root of that
291
-                fear and work to mitigate it.
292
-            </p>
293
-
294
-            <p>
295
-                Then they can take confident steps towards implementing
296
-                powerful practices like
297
-                <a href="http://extremeprogramming.org" target="_blank">eXtreme Programming</a> (my
298
-                preferred method for doing software development), for software teams, or
299
-                <a href="" target="_blank">Participatory Leadership</a> (my
300
-                preferred starting point for management teams).
301
-            </p>
302
-
303
-            <h5>Self Sufficiency</h5>
304
-            <p>
305
-                Once a team has decided they can maintain awareness and continuously improve, I
306
-                move on to the next team. I work hard not to collude with the teams I'm on. This
307
-                can be quite challenging as a player-coach, as you're constantly with the team.
308
-                However, I've found that for roughly 6 months at a time I can maintain a distance
309
-                from the cultural baggage a team finds itself carrying. Much longer than that and
310
-                I'm likely to be less effective.
311
-            </p>
312
-
313
-            <p>
314
-                This doesn't mean I wouldn't mind sticking around for longer. However, my role
315
-                simply changes from being a coach to being a teammate. While it's not my favorite
316
-                role to fill, it's where I began my career, and there's a level of comfort in it.
317
-                If I'm needed in that capacity, I'm happy to adapt for a time.
318
-            </p>
319
-        </section>
320
-    </div>
321
-    <div style="clear:both"></div>
322
-    <footer>
323
-        <a href="https://s3.amazonaws.com/resume.sstarkey/resume.pdf"
324
-           target="_blank">My Résumé</a>
325
-        &centerdot;
326
-        <a href="https://git.calmabiding.me/scstarkey"
327
-           target="_blank">Side Projects</a>
328
-    </footer>
329
-</main>
330
-</body>
331
-</html>
1
+<div class="column">
2
+    <section>
3
+        <h4>About Stephen Starkey,
4
+            <a href="https://www.icagile.com/Certification/Verify-Credentials/ctl/UserDetails/mid/697/uid/1ac5b8e2-1f77-44fb-a64b-06262cd4b18a"
5
+               target="_blank">ICP-ACC</a></h4>
6
+
7
+        <img src="img/profile.png" alt="me" title="me" class="profile-img"/>
8
+
9
+        <p>
10
+            I began my more-than-20-year career in programming, moved towards leadership,
11
+            dabbled in management, and found my sweet spot as <strong>player-coach</strong>.
12
+            I am just as happy swimming in the waters of coders (I keep my coding
13
+            skills sharp) as with software development management folk.
14
+        </p>
15
+
16
+        <a href="https://stats.foldingathome.org/team/234894"
17
+           target="_blank"><img src="https://folding.extremeoverclocking.com/sigs/sigimage.php?u=823609"
18
+                                alt="folding@home" class="folding"/></a>
19
+    </section>
20
+
21
+    <section>
22
+
23
+        <h4>Enabling high performing software development organizations</h4>
24
+
25
+        <p>
26
+            My favorite thing to do is to join an organization, for however long it takes,
27
+            help it become super high-performing, and move on to another one. I enjoy the
28
+            gratification of seeing people's inspiration grow and, from that powerful
29
+            energy, their creativity and productivity.
30
+        </p>
31
+
32
+        <p>
33
+            It's amazing what can happen when people discover the power of good, strong
34
+            relationships amongst colleagues.
35
+        </p>
36
+    </section>
37
+
38
+    <section>
39
+        <h4>Favorite tools</h4>
40
+        <em>Not an exhaustive list</em>
41
+
42
+        <h5>Teamwork</h5>
43
+        <p>
44
+            <a href="https://liveingreatness.com" target="_blank">Core Protocols</a>
45
+            &centerdot;
46
+            <a href="https://sociocracy30.org" target="_blank">Sociocracy 3.0</a>
47
+            &centerdot;
48
+            <a href="http://extremeprogramming.org" target="_blank">eXtreme Programming</a>
49
+            &centerdot;
50
+            <a href="https://scrumguides.org" target="_blank">Scrum</a>
51
+        </p>
52
+
53
+        <h5>Coding</h5>
54
+        <p>
55
+            <a href="https://www.jetbrains.com/idea/" target="_blank">IntelliJ IDEA</a>
56
+            &centerdot;
57
+            <a href="https://git-scm.com" target="_blank">git</a>
58
+        </p>
59
+
60
+        <h5>Languages / Libraries / Frameworks</h5>
61
+        <p>
62
+            <a href="https://clojure.org" target="_blank">Clojure</a>
63
+            &centerdot;
64
+            <a href="https://github.com/tolitius/mount" target="_blank">Mount</a>
65
+            <em>(still learning)</em>
66
+            &centerdot;
67
+            <a href="https://www.java.com" target="_blank">Java</a>
68
+            &centerdot;
69
+            <a href="https://github.com/google/guice" target="_blank">Guice</a>
70
+            &centerdot;
71
+            <a href="https://flutter.dev" target="_blank">Flutter</a>
72
+            <em>(still learning)</em>
73
+        </p>
74
+    </section>
75
+</div>
76
+
77
+
78
+<div class="column">
79
+    <section>
80
+        <h4>How I work</h4>
81
+        <p>
82
+            As a
83
+            <a href="http://wiki.c2.com/?PlayerCoach" target="_blank">player-coach</a>,
84
+            my first job is to join the stream. Experience
85
+            how the team works. Get a sense for its rhythms. Where are things slow? Are there
86
+            blockages related to <strong>structure</strong>, <strong>process</strong>, or
87
+            <strong>habit</strong>?
88
+        </p>
89
+
90
+        <h5>Joining</h5>
91
+        <p>
92
+            The moment I join a team, if they don't already have a set of strong goals, we
93
+            begin with those. These are not projects that must be completed
94
+            (working "in" the team). Instead, they are goals toward <strong>having greater
95
+            impact</strong> (working "on" the team).
96
+        </p>
97
+
98
+        <p>
99
+            The beginning is <strong>helping everybody see</strong> what is going on. Often
100
+            teams aren't high performing because they are just used to how things are. Comfort
101
+            breeds a sense of satisfaction that can be misleading.
102
+        </p>
103
+
104
+        <h5>Supporting</h5>
105
+        <p>
106
+            Once they can see what's going on, they can work on changing. If they know the
107
+            impact they are having could be better, why wouldn't they work on that? It becomes
108
+            natural. The next step is <strong>modeling bravery</strong>. Often change doesn't
109
+            happen because of <strong>fear</strong>. I help the team get to the root of that
110
+            fear and work to mitigate it.
111
+        </p>
112
+
113
+        <p>
114
+            Then they can take confident steps towards implementing
115
+            powerful practices like
116
+            <a href="http://extremeprogramming.org" target="_blank">eXtreme Programming</a> (my
117
+            preferred method for doing software development), for software teams, or
118
+            <a href="" target="_blank">Participatory Leadership</a> (my
119
+            preferred starting point for management teams).
120
+        </p>
121
+
122
+        <h5>Self Sufficiency</h5>
123
+        <p>
124
+            Once a team has decided they can maintain awareness and continuously improve, I
125
+            move on to the next team. I work hard not to collude with the teams I'm on. This
126
+            can be quite challenging as a player-coach, as you're constantly with the team.
127
+            However, I've found that for roughly 6 months at a time I can maintain a distance
128
+            from the cultural baggage a team finds itself carrying. Much longer than that and
129
+            I'm likely to be less effective.
130
+        </p>
131
+
132
+        <p>
133
+            This doesn't mean I wouldn't mind sticking around for longer. However, my role
134
+            simply changes from being a coach to being a teammate. While it's not my favorite
135
+            role to fill, it's where I began my career, and there's a level of comfort in it.
136
+            If I'm needed in that capacity, I'm happy to adapt for a time.
137
+        </p>
138
+    </section>
139
+</div>

+ 18
- 0
resources/public/meditation.html View File

@@ -0,0 +1,18 @@
1
+<section>
2
+    <h4>Meditation</h4>
3
+    <p>
4
+        I believe strongly in the power of meditation. Not only does it bring peace
5
+        in-the-moment, but it also has many long-term effects on the brain. The primary
6
+        one is stability.
7
+    </p>
8
+
9
+    <p>
10
+        I've practiced meditation for <strong>over 10 years</strong>. And I can feel the difference.
11
+    </p>
12
+
13
+    <p>
14
+        I advocate for this practice, as it helps people deal with difficult
15
+        circumstances, real or imagined. I am more than happy to teach basic
16
+        meditation techniques to my clients!
17
+    </p>
18
+</section>

+ 75
- 3
src/calmabiding/core.clj View File

@@ -2,18 +2,90 @@
2 2
   (:require [compojure.core :refer :all]
3 3
             [compojure.handler :as handler]
4 4
             [compojure.route :as route]
5
+            [hiccup.core :refer :all]
5 6
             [ring.middleware.defaults :refer [wrap-defaults site-defaults]]
6
-            [ring.util.response :as resp]))
7
+            [clojure.java.io :as io]
8
+            [clojure.string :as str]))
7 9
 
8 10
 (defn init []
9 11
   (println "Initializing"))
10 12
 
13
+(defn link-separator []
14
+  (str/join "" ["&nbsp;" "&centerdot;" "&nbsp;"]))
15
+
16
+(defn wrap-contents [stylesheet contents]
17
+  (str "<!DOCTYPE html>"
18
+       (html [:html
19
+              [:head
20
+               [:meta {:charset "utf-8"}]
21
+               [:title "Calm Abiding"]
22
+               [:meta {:content "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
23
+                       :name "viewport"}]
24
+               [:link {:rel "webmention"
25
+                       :href "https://webmention.io/www.calmabiding.me/webmention"}]
26
+               [:link {:rel "pingback"
27
+                       :href "https://webmention.io/www.calmabiding.me/xmlrpc"}]
28
+               [:link {:rel "stylesheet"
29
+                       :href "https://fonts.googleapis.com/css?family=Cabin|Lusitana|Ubuntu+Mono&display=swap"}]
30
+               [:link {:rel "stylesheet"
31
+                       :href "https://use.fontawesome.com/releases/v5.8.2/css/all.css"
32
+                       :integrity "sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay"
33
+                       :crossorigin "anonymous"}]
34
+               [:link {:rel "stylesheet"
35
+                       :href "https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"}]
36
+               [:style {:type "text/css"} stylesheet]]
37
+              [:body
38
+               [:header
39
+                [:h1 "Calm Abiding LLC"]
40
+                [:a {:href "/"} "Home"]
41
+                (link-separator)
42
+                [:a {:href "https://www.linkedin.com/in/sstarkey" :target "_blank"} "LinkedIn"]
43
+                (link-separator)
44
+                [:a {:href "mailto:stephen@calmabiding.me"} "Hire Me"]
45
+                (link-separator)
46
+                [:a {:href "/meditation.html"} "Meditation"]]
47
+               [:main contents
48
+                [:div {:style "clear:both"}]
49
+                [:footer
50
+                 [:a {:href "https://s3.amazonaws.com/resume.sstarkey/resume.pdf" :target "_blank"} "My Résumé"]
51
+                 (link-separator)
52
+                 [:a {:href "https://git.calmabiding.me/scstarkey" :target "_blank"} "Side Projects"]]]]])))
53
+
54
+(defn load-stylesheet []
55
+  (slurp "resources/public/css/app.css"))
56
+
57
+(defn webpage-response [f]
58
+  (let [stylesheet (load-stylesheet)
59
+        f (io/file "resources/public" f)
60
+        found? (.exists f)
61
+        contents (if found?
62
+                   (slurp f)
63
+                   (format "'%s' not found" (.getAbsolutePath f)))
64
+        response-code (if found? 200 404)]
65
+    {:status response-code
66
+     :body (wrap-contents stylesheet contents)}))
67
+
68
+(defn html-file [request]
69
+  (-> request :uri (str/replace #"^/" "") webpage-response))
70
+
11 71
 (defroutes app-routes
12
-  (GET "/" [] (resp/resource-response "index.html" {:root "public"}))
72
+  (GET "/" [] (webpage-response "index.html"))
73
+  (GET "/*.html" [] html-file)
13 74
   (route/resources "/")
14 75
   (route/not-found "Not Found"))
15 76
 
16 77
 (def app (handler/site app-routes))
17 78
 
18 79
 (defn -main [& _]
19
-  (println "Nothing to do yet"))
80
+  (let [root (io/file "resources/public")
81
+        out (io/file "target/html-files")
82
+        files (filter (fn [f] (-> f .getName (.endsWith ".html"))) (.listFiles root))
83
+        stylesheet (load-stylesheet)]
84
+    (.mkdirs out)
85
+    (dorun (map (fn [f] (let [n (.getName f)
86
+                              out-f (io/file out n)]
87
+                          (spit out-f (wrap-contents stylesheet (slurp f))))) files))))
88
+
89
+(comment
90
+  (-main)
91
+  )