blob: 566a9ca567c1260af41ccfa886bead985b00f98d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
(ns ctf-website.views.home
(:require [ctf-website.views.common :as common]
[noir.session :as session])
(:use [noir.core :only [defpage]]
[hiccup.core :only [h]]))
(defpage
"/" []
(let [username (session/get :user)]
(common/layout
[:h1 "Austin 2600 CTF server"]
(if (nil? username)
[:a {:href "login"} "Compete"]
[:form {:method "POST"
:action "flag"}
[:p (str "Submit flag as " (h username) ":")
[:input {:type "text"
:name "flag"}]
[:input {:type "submit"
:value "Submit"}]]]))))
|