Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Meyer committed Jun 3, 2011
1 parent 8b88d41 commit 2e7a9b9
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion public/stylesheets/ericcasts.css
@@ -1,5 +1,5 @@
body {
background: #e3b200;
background: #338866;
font-family: sans-serif;
width: 600px;
margin: auto;
Expand Down
5 changes: 4 additions & 1 deletion src/ericcasts/controller/podcasts_controller.clj
Expand Up @@ -7,4 +7,7 @@
(->
(routes
(GET "/podcasts" [] (render-template "podcasts/index"))
(GET "/podcasts/:id" [id] (render-template "podcasts/show" :podcast {:id id})))))
(GET "/podcasts/:id" [id]
(if (= "1" id)
(render-template "podcasts/show" :podcast {:title "Complete History Of The Soviet Union, Arranged To The Melody Of Tetris" :youtube-id "hWTFG3J1CP8"})
(render-template "podcasts/show" :podcast {:title "Thermite vs. Car" :youtube-id "rdCsbZf1_Ng"}))))))
2 changes: 1 addition & 1 deletion src/ericcasts/core.clj
Expand Up @@ -7,7 +7,7 @@
[gaeshi.controllers :only (controller-router)]))

(defroutes ericcasts-routes
(GET "/" [] (render-template "index"))
(GET "/" [] (render-template "podcasts/index"))
(controller-router 'ericcasts.controller)
(not-found (render-template "not_found" :template-root "ericcasts/view" :ns `ericcasts.view.view-helpers)))

Expand Down
11 changes: 9 additions & 2 deletions src/ericcasts/view/podcasts/show.hiccup.clj
@@ -1,3 +1,10 @@
(let [podcast (:podcast *view-context*)]
[:h1 (:id podcast)]
)
[:div
[:a {:href "/podcasts"} "Home"]
[:h1 (:title podcast)]
[:iframe {:type "text/html"
:width "640"
:height "385"
:src (str "http://www.youtube.com/embed/" (:youtube-id podcast))
:frameborder "0"}]
])
Binary file modified war/WEB-INF/lib/ericcasts-0.0.1.jar
Binary file not shown.
Binary file modified war/WEB-INF/lib/ericcasts-0.0.1_views.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion war/public/stylesheets/ericcasts.css
@@ -1,5 +1,5 @@
body {
background: #e3b200;
background: #338866;
font-family: sans-serif;
width: 600px;
margin: auto;
Expand Down

0 comments on commit 2e7a9b9

Please sign in to comment.