Skip to content

Instantly share code, notes, and snippets.

@pmn
Created August 23, 2011 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmn/1164329 to your computer and use it in GitHub Desktop.
Save pmn/1164329 to your computer and use it in GitHub Desktop.
homepage
(ns pmn.views.main
(:use [noir.core :only [defpartial defpage]]
[hiccup.page-helpers :only [link-to]])
(:require [pmn.views.common :as common]))
(def links
[{:description "email: " :url"mailto:paul@pmn.org" :title "paul@pmn.org"}
{:description "twitter: " :url "http://twitter.com/icey" :title "@icey"}
{:description "readlater feed: " :url "http://twitter.com/pmn_" :title "@pmn_"}])
(def projects
[{:url "http://peeranoia.com" :title "Peeranoia"}
{:url "http://twitmersion.com" :title "Twitmersion"}
{:url "http://planetcsharp.com" :title "Planet C#"}])
(defpartial link [{:keys [description url title]}]
[:li description (link-to url title)])
(defpartial make-links [links]
[:ul.links
(map link links)])
(defpage "/" []
;; do stuff
(common/layout
"home"
[:div#contactinfo
"Contact information"
(make-links links)]
[:div#projects
"Things I'm working on"
(make-links projects)]
[:div#announce
"Interested in early access or beta testing? "
(link-to "/beta" "Click here")]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment