Browse Source

Multiple page support

master
Stephen Starkey 5 months ago
parent
commit
42b7e6bf7c
  1. 5
      build
  2. 2
      project.clj
  3. 120
      resources/public/css/app.css
  4. 470
      resources/public/index.html
  5. 18
      resources/public/meditation.html
  6. 78
      src/calmabiding/core.clj

5
build

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

2
project.clj

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

120
resources/public/css/app.css

@ -0,0 +1,120 @@
body {
font-family: Cabin, sans-serif;
font-size: 1.1em;
}
main {
line-height: 1.25em;
margin-top: 95px;
padding-left: 10px;
}
header {
position: fixed;
top: 0;
padding-left: 10px;
padding-bottom: 10px;
background-color: white;
width: 100%;
}
.column {
margin-right: 10px;
}
@media only screen and (min-width: 1024px) {
.column {
float: left;
width: 45%;
}
header, main {
padding-left: 60px;
}
}
section {
margin: 10px 0;
border: 1px solid lightgray;
}
footer {
margin: 30px 0;
text-align: center;
clear: left;
}
h1 {
margin-top: 20px;
margin-bottom: 5px;
}
h2, h3, h4, h5, p {
margin: 10px 0;
}
section h4 {
background-color: lightgray;
margin: 0;
}
section h5 {
font-weight: bold;
margin: 0 10px -20px 0;
}
section h4, section h5 {
padding: 5px 10px;
}
section img.profile-img {
float: left;
margin-right: 10px;
width: 150px;
}
section img.folding {
display: block;
margin: 10px auto;
width: 75%;
max-width: 500px;
}
section p {
padding: 5px 10px;
}
em {
font-style: italic;
}
section > em {
padding: 5px 10px;
}
section {
height: 100%;
}
p em {
font-size: 0.9em;
}
strong {
color: #6d2d2d;
font-size: 1.1em;
}
h1 {
font-size: 2em;
font-family: Lusitana, serif;
}
h4 {
font-weight: bold;
font-size: 1.2em;
}
strong {
font-weight: bold;
}

470
resources/public/index.html

@ -1,331 +1,139 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Calm Abiding</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name="viewport">
<link rel="webmention"
href="https://webmention.io/www.calmabiding.me/webmention"/>
<link rel="pingback"
href="https://webmention.io/www.calmabiding.me/xmlrpc"/>
<link href="https://fonts.googleapis.com/css?family=Cabin|Lusitana|Ubuntu+Mono&display=swap"
rel="stylesheet">
<link rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay"
crossorigin="anonymous">
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"/>
<style type="text/css">
body {
font-family: Cabin, sans-serif;
font-size: 1.1em;
}
main {
line-height: 1.25em;
margin-top: 95px;
padding-left: 10px;
}
header {
position: fixed;
top: 0;
padding-left: 10px;
padding-bottom: 10px;
background-color: white;
width: 100%;
}
.column {
margin-right: 10px;
}
@media only screen and (min-width: 1024px) {
.column {
float: left;
width: 45%;
}
header, main {
padding-left: 60px;
}
}
section {
margin: 10px 0;
border: 1px solid lightgray;
}
footer {
margin: 30px 0;
text-align: center;
clear: left;
}
h1 {
margin-top: 20px;
margin-bottom: 5px;
}
h2, h3, h4, h5, p {
margin: 10px 0;
}
section h4 {
background-color: lightgray;
margin: 0;
}
section h5 {
font-weight: bold;
margin: 0 10px -20px 0;
}
section h4, section h5 {
padding: 5px 10px;
}
section img.profile-img {
float: left;
margin-right: 10px;
width: 150px;
}
section img.folding {
display: block;
margin: 10px auto;
width: 75%;
max-width: 500px;
}
section p {
padding: 5px 10px;
}
em {
font-style: italic;
}
section > em {
padding: 5px 10px;
}
section {
height: 100%;
}
p em {
font-size: 0.9em;
}
strong {
color: #6d2d2d;
font-size: 1.1em;
}
h1 {
font-size: 2em;
font-family: Lusitana, serif;
}
h4 {
font-weight: bold;
font-size: 1.2em;
}
strong {
font-weight: bold;
}
</style>
</head>
<body>
<header>
<h1>Calm Abiding LLC</h1>
<a href="https://www.linkedin.com/in/sstarkey"
target="_blank">LinkedIn</a>
&centerdot;
<a href="mailto:stephen@calmabiding.me">Hire Me</a>
</header>
<main>
<div class="column">
<section>
<h4>About Stephen Starkey,
<a href="https://www.icagile.com/Certification/Verify-Credentials/ctl/UserDetails/mid/697/uid/1ac5b8e2-1f77-44fb-a64b-06262cd4b18a"
target="_blank">ICP-ACC</a></h4>
<img src="img/profile.png" alt="me" title="me" class="profile-img"/>
<p>
I began my more-than-20-year career in programming, moved towards leadership,
dabbled in management, and found my sweet spot as <strong>player-coach</strong>.
I am just as happy swimming in the waters of coders (I keep my coding
skills sharp) as with software development management folk.
</p>
<p>
I believe strongly in the power of meditation. Not only does it bring peace
in-the-moment, but it also has many long-term effects on the brain. The primary
one is stability.
</p>
<p>
I've practiced meditation for <strong>over 10 years</strong>. And I can feel the difference.
</p>
<p>
Also, I have dedicated my computer's spare time to curing Alzheimer's. You could join <a
href="https://stats.foldingathome.org/team/234894" target="_blank">our
team</a> if you want! Visit <a href="https://foldingathome.org/home/" target="_blank">Folding@Home</a>
to install the software. Here's how my team is doing:
</p>
<img src="https://folding.extremeoverclocking.com/sigs/sigimage.php?u=823609"
alt="folding@home"
class="folding"/>
</section>
<section>
<h4>Enabling high performing software development organizations</h4>
<p>
My favorite thing to do is to join an organization, for however long it takes,
help it become super high-performing, and move on to another one. I enjoy the
gratification of seeing people's inspiration grow and, from that powerful
energy, their creativity and productivity.
</p>
<p>
It's amazing what can happen when people discover the power of good, strong
relationships amongst colleagues.
</p>
</section>
<section>
<h4>Favorite tools</h4>
<em>Not an exhaustive list</em>
<h5>Teamwork</h5>
<p>
<a href="https://liveingreatness.com" target="_blank">Core Protocols</a>
&centerdot;
<a href="https://sociocracy30.org" target="_blank">Sociocracy 3.0</a>
&centerdot;
<a href="http://extremeprogramming.org" target="_blank">eXtreme Programming</a>
&centerdot;
<a href="https://scrumguides.org" target="_blank">Scrum</a>
</p>
<h5>Coding</h5>
<p>
<a href="https://www.jetbrains.com/idea/" target="_blank">IntelliJ IDEA</a>
&centerdot;
<a href="https://git-scm.com" target="_blank">git</a>
</p>
<h5>Languages / Libraries / Frameworks</h5>
<p>
<a href="https://clojure.org" target="_blank">Clojure</a>
&centerdot;
<a href="https://github.com/tolitius/mount" target="_blank">Mount</a>
<em>(still learning)</em>
&centerdot;
<a href="https://www.java.com" target="_blank">Java</a>
&centerdot;
<a href="https://github.com/google/guice" target="_blank">Guice</a>
&centerdot;
<a href="https://flutter.dev" target="_blank">Flutter</a>
<em>(still learning)</em>
</p>
</section>
<section>
<h4>More about meditation</h4>
<p>
I advocate for this practice, as it helps people deal with difficult
circumstances, real or imagined. I am more than happy to teach basic
meditation techniques to my clients!
</p>
</section>
</div>
<div class="column">
<section>
<h4>How I work</h4>
<p>
As a
<a href="http://wiki.c2.com/?PlayerCoach" target="_blank">player-coach</a>,
my first job is to join the stream. Experience
how the team works. Get a sense for its rhythms. Where are things slow? Are there
blockages related to <strong>structure</strong>, <strong>process</strong>, or
<strong>habit</strong>?
</p>
<h5>Joining</h5>
<p>
The moment I join a team, if they don't already have a set of strong goals, we
begin with those. These are not projects that must be completed
(working "in" the team). Instead, they are goals toward <strong>having greater
impact</strong> (working "on" the team).
</p>
<p>
The beginning is <strong>helping everybody see</strong> what is going on. Often
teams aren't high performing because they are just used to how things are. Comfort
breeds a sense of satisfaction that can be misleading.
</p>
<h5>Supporting</h5>
<p>
Once they can see what's going on, they can work on changing. If they know the
impact they are having could be better, why wouldn't they work on that? It becomes
natural. The next step is <strong>modeling bravery</strong>. Often change doesn't
happen because of <strong>fear</strong>. I help the team get to the root of that
fear and work to mitigate it.
</p>
<p>
Then they can take confident steps towards implementing
powerful practices like
<a href="http://extremeprogramming.org" target="_blank">eXtreme Programming</a> (my
preferred method for doing software development), for software teams, or
<a href="" target="_blank">Participatory Leadership</a> (my
preferred starting point for management teams).
</p>
<h5>Self Sufficiency</h5>
<p>
Once a team has decided they can maintain awareness and continuously improve, I
move on to the next team. I work hard not to collude with the teams I'm on. This
can be quite challenging as a player-coach, as you're constantly with the team.
However, I've found that for roughly 6 months at a time I can maintain a distance
from the cultural baggage a team finds itself carrying. Much longer than that and
I'm likely to be less effective.
</p>
<p>
This doesn't mean I wouldn't mind sticking around for longer. However, my role
simply changes from being a coach to being a teammate. While it's not my favorite
role to fill, it's where I began my career, and there's a level of comfort in it.
If I'm needed in that capacity, I'm happy to adapt for a time.
</p>
</section>
</div>
<div style="clear:both"></div>
<footer>
<a href="https://s3.amazonaws.com/resume.sstarkey/resume.pdf"
target="_blank">My Résumé</a>
&centerdot;
<a href="https://git.calmabiding.me/scstarkey"
target="_blank">Side Projects</a>
</footer>
</main>
</body>
</html>
<div class="column">
<section>
<h4>About Stephen Starkey,
<a href="https://www.icagile.com/Certification/Verify-Credentials/ctl/UserDetails/mid/697/uid/1ac5b8e2-1f77-44fb-a64b-06262cd4b18a"
target="_blank">ICP-ACC</a></h4>
<img src="img/profile.png" alt="me" title="me" class="profile-img"/>
<p>
I began my more-than-20-year career in programming, moved towards leadership,
dabbled in management, and found my sweet spot as <strong>player-coach</strong>.
I am just as happy swimming in the waters of coders (I keep my coding
skills sharp) as with software development management folk.
</p>
<a href="https://stats.foldingathome.org/team/234894"
target="_blank"><img src="https://folding.extremeoverclocking.com/sigs/sigimage.php?u=823609"
alt="folding@home" class="folding"/></a>
</section>
<section>
<h4>Enabling high performing software development organizations</h4>
<p>
My favorite thing to do is to join an organization, for however long it takes,
help it become super high-performing, and move on to another one. I enjoy the
gratification of seeing people's inspiration grow and, from that powerful
energy, their creativity and productivity.
</p>
<p>
It's amazing what can happen when people discover the power of good, strong
relationships amongst colleagues.
</p>
</section>
<section>
<h4>Favorite tools</h4>
<em>Not an exhaustive list</em>
<h5>Teamwork</h5>
<p>
<a href="https://liveingreatness.com" target="_blank">Core Protocols</a>
&centerdot;
<a href="https://sociocracy30.org" target="_blank">Sociocracy 3.0</a>
&centerdot;
<a href="http://extremeprogramming.org" target="_blank">eXtreme Programming</a>
&centerdot;
<a href="https://scrumguides.org" target="_blank">Scrum</a>
</p>
<h5>Coding</h5>
<p>
<a href="https://www.jetbrains.com/idea/" target="_blank">IntelliJ IDEA</a>
&centerdot;
<a href="https://git-scm.com" target="_blank">git</a>
</p>
<h5>Languages / Libraries / Frameworks</h5>
<p>
<a href="https://clojure.org" target="_blank">Clojure</a>
&centerdot;
<a href="https://github.com/tolitius/mount" target="_blank">Mount</a>
<em>(still learning)</em>
&centerdot;
<a href="https://www.java.com" target="_blank">Java</a>
&centerdot;
<a href="https://github.com/google/guice" target="_blank">Guice</a>
&centerdot;
<a href="https://flutter.dev" target="_blank">Flutter</a>
<em>(still learning)</em>
</p>
</section>
</div>
<div class="column">
<section>
<h4>How I work</h4>
<p>
As a
<a href="http://wiki.c2.com/?PlayerCoach" target="_blank">player-coach</a>,
my first job is to join the stream. Experience
how the team works. Get a sense for its rhythms. Where are things slow? Are there
blockages related to <strong>structure</strong>, <strong>process</strong>, or
<strong>habit</strong>?
</p>
<h5>Joining</h5>
<p>
The moment I join a team, if they don't already have a set of strong goals, we
begin with those. These are not projects that must be completed
(working "in" the team). Instead, they are goals toward <strong>having greater
impact</strong> (working "on" the team).
</p>
<p>
The beginning is <strong>helping everybody see</strong> what is going on. Often
teams aren't high performing because they are just used to how things are. Comfort
breeds a sense of satisfaction that can be misleading.
</p>
<h5>Supporting</h5>
<p>
Once they can see what's going on, they can work on changing. If they know the
impact they are having could be better, why wouldn't they work on that? It becomes
natural. The next step is <strong>modeling bravery</strong>. Often change doesn't
happen because of <strong>fear</strong>. I help the team get to the root of that
fear and work to mitigate it.
</p>
<p>
Then they can take confident steps towards implementing
powerful practices like
<a href="http://extremeprogramming.org" target="_blank">eXtreme Programming</a> (my
preferred method for doing software development), for software teams, or
<a href="" target="_blank">Participatory Leadership</a> (my
preferred starting point for management teams).
</p>
<h5>Self Sufficiency</h5>
<p>
Once a team has decided they can maintain awareness and continuously improve, I
move on to the next team. I work hard not to collude with the teams I'm on. This
can be quite challenging as a player-coach, as you're constantly with the team.
However, I've found that for roughly 6 months at a time I can maintain a distance
from the cultural baggage a team finds itself carrying. Much longer than that and
I'm likely to be less effective.
</p>
<p>
This doesn't mean I wouldn't mind sticking around for longer. However, my role
simply changes from being a coach to being a teammate. While it's not my favorite
role to fill, it's where I began my career, and there's a level of comfort in it.
If I'm needed in that capacity, I'm happy to adapt for a time.
</p>
</section>
</div>

18
resources/public/meditation.html

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

78
src/calmabiding/core.clj

@ -2,18 +2,90 @@
(:require [compojure.core :refer :all]
[compojure.handler :as handler]
[compojure.route :as route]
[hiccup.core :refer :all]
[ring.middleware.defaults :refer [wrap-defaults site-defaults]]
[ring.util.response :as resp]))
[clojure.java.io :as io]
[clojure.string :as str]))
(defn init []
(println "Initializing"))
(defn link-separator []
(str/join "" ["&nbsp;" "&centerdot;" "&nbsp;"]))
(defn wrap-contents [stylesheet contents]
(str "<!DOCTYPE html>"
(html [:html
[:head
[:meta {:charset "utf-8"}]
[:title "Calm Abiding"]
[:meta {:content "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
:name "viewport"}]
[:link {:rel "webmention"
:href "https://webmention.io/www.calmabiding.me/webmention"}]
[:link {:rel "pingback"
:href "https://webmention.io/www.calmabiding.me/xmlrpc"}]
[:link {:rel "stylesheet"
:href "https://fonts.googleapis.com/css?family=Cabin|Lusitana|Ubuntu+Mono&display=swap"}]
[:link {:rel "stylesheet"
:href "https://use.fontawesome.com/releases/v5.8.2/css/all.css"
:integrity "sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay"
:crossorigin "anonymous"}]
[:link {:rel "stylesheet"
:href "https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"}]
[:style {:type "text/css"} stylesheet]]
[:body
[:header
[:h1 "Calm Abiding LLC"]
[:a {:href "/"} "Home"]
(link-separator)
[:a {:href "https://www.linkedin.com/in/sstarkey" :target "_blank"} "LinkedIn"]
(link-separator)
[:a {:href "mailto:stephen@calmabiding.me"} "Hire Me"]
(link-separator)
[:a {:href "/meditation.html"} "Meditation"]]
[:main contents
[:div {:style "clear:both"}]
[:footer
[:a {:href "https://s3.amazonaws.com/resume.sstarkey/resume.pdf" :target "_blank"} "My Résumé"]
(link-separator)
[:a {:href "https://git.calmabiding.me/scstarkey" :target "_blank"} "Side Projects"]]]]])))
(defn load-stylesheet []
(slurp "resources/public/css/app.css"))
(defn webpage-response [f]
(let [stylesheet (load-stylesheet)
f (io/file "resources/public" f)
found? (.exists f)
contents (if found?
(slurp f)
(format "'%s' not found" (.getAbsolutePath f)))
response-code (if found? 200 404)]
{:status response-code
:body (wrap-contents stylesheet contents)}))
(defn html-file [request]
(-> request :uri (str/replace #"^/" "") webpage-response))
(defroutes app-routes
(GET "/" [] (resp/resource-response "index.html" {:root "public"}))
(GET "/" [] (webpage-response "index.html"))
(GET "/*.html" [] html-file)
(route/resources "/")
(route/not-found "Not Found"))
(def app (handler/site app-routes))
(defn -main [& _]
(println "Nothing to do yet"))
(let [root (io/file "resources/public")
out (io/file "target/html-files")
files (filter (fn [f] (-> f .getName (.endsWith ".html"))) (.listFiles root))
stylesheet (load-stylesheet)]
(.mkdirs out)
(dorun (map (fn [f] (let [n (.getName f)
out-f (io/file out n)]
(spit out-f (wrap-contents stylesheet (slurp f))))) files))))
(comment
(-main)
)
Loading…
Cancel
Save