Skip to content

Instantly share code, notes, and snippets.

@r0adrunner
Created February 13, 2012 18:28
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 r0adrunner/1818843 to your computer and use it in GitHub Desktop.
Save r0adrunner/1818843 to your computer and use it in GitHub Desktop.
(ns arrois.controllers.user
(:use [noir.core :only [defpage]])
(:require [arrois.views.user :as view]
[arrois.models.user :as model]))
(defpage profile "/user/:nick" {:keys [nick]}
(view/template-profile {:nick nick}
#{ {:photo "pix/jm1.jpg" :thumb "pix/thumbs/jm1.jpg" :mainphoto 't}
{:photo "pix/jm2.jpg" :thumb "pix/thumbs/jm2.jpg"}
{:photo "pix/jm3.jpg" :thumb "pix/thumbs/jm3.jpg"}
{:photo "pix/jm4.jpg" :thumb "pix/thumbs/jm4.jpg"}
{:photo "pix/jm5.jpg" :thumb "pix/thumbs/jm5.jpg"}}))
ns arrois.views.user
(:use [net.cgrand.enlive-html]))
(deftemplate template-profile
(clojure.java.io/reader (clojure.java.io/resource "templates/profile.html") :encoding "UTF-8") [userdata photos])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment