Created
February 13, 2012 18:28
-
-
Save r0adrunner/1818843 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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"}})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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