Skip to content

Instantly share code, notes, and snippets.

@mcav
Created February 18, 2013 04:44
Show Gist options
  • Save mcav/4975173 to your computer and use it in GitHub Desktop.
Save mcav/4975173 to your computer and use it in GitHub Desktop.
(defn page-template [config post]
(list
"<!doctype html>"
[:html
[:head
[:meta {:charset "utf-8"}]
[:meta {:name "viewport" :content "width=680"}]
[:title (h (str (:title config) (when (:title post)
(str ": " (:title post)))))]
[:link {:rel "shortcut icon" :href "/images/favicon-large.png"}]
[:link {:rel "apple-touch-icon" :href "/images/favicon-large.png"}]
[:link {:rel "stylesheet" :type "text/css" :href "/css/styles.css"}]
;; [:link {:rel "stylesheet/less" :type "text/css" :href "/css/styles.less"}]
;; [:script {:src "/css/less-1.2.2.min.js"}]
[:link {:rel "stylesheet" :type "text/css"
:href "http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic"}]
[:link {:rel "alternate" :type "application/atom+xml" :href "http://mcav.com/feed/"}]
[:link {:rel "openid.server" :href "http://openid.claimid.com/server"}]
[:link {:rel "openid.delegate" :href "http://openid.claimid.com/mcav"}]
[:script {:src "http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"}]
[:script {:src "/js/prettify-combined.js"}]
[:link {:rel "stylesheet" :type "text/css" :href "/js/prettify/prettify.css"}]
[:script {:src "/js/site.js"}]
google-analytics-code]
[:body
[:div.outer-wrapper
[:div.inner-wrapper
[:header.site-header
[:a {:href "/"}
[:img {:alt "Marcus Cavanaugh"
:src "/images/name-white.png"
:class "logo"}]]
[:nav.site-nav
[:a {:href "/about/"} "About"]
[:a {:href "/stream/"} "Stream"]
[:a {:href "/projects/"} "Projects"]]]
(post-template config post)
[:footer.site-footer
"Copyright &copy; 1987–<script>document.write(new Date().getFullYear())</script> Marcus Cavanaugh"]]]]]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment