Update UI
- Add `navbar's - Show a `hero-unit' on the login page with a big login button.
This commit is contained in:
parent
901fc7b5dc
commit
88404fc72d
1 changed files with 39 additions and 6 deletions
45
scrumli.lisp
45
scrumli.lisp
|
@ -30,10 +30,13 @@
|
||||||
(defun logged-in-p ()
|
(defun logged-in-p ()
|
||||||
(hunchentoot:session-value :username))
|
(hunchentoot:session-value :username))
|
||||||
|
|
||||||
|
(defun page-title (title)
|
||||||
|
(<:title (concatenate 'string title " | scrumli")))
|
||||||
|
|
||||||
(define-route main ("")
|
(define-route main ("")
|
||||||
(if (logged-in-p)
|
(if (logged-in-p)
|
||||||
(<:html
|
(<:html
|
||||||
(<:head (<:title "Hello!")
|
(<:head (page-title "Backlog")
|
||||||
(<:link :href *scrumelo-bootstrap-css-location*
|
(<:link :href *scrumelo-bootstrap-css-location*
|
||||||
:rel "stylesheet" :type "text/css")
|
:rel "stylesheet" :type "text/css")
|
||||||
(<:link :href *scrumelo-font-awesome-css-location*
|
(<:link :href *scrumelo-font-awesome-css-location*
|
||||||
|
@ -47,8 +50,18 @@
|
||||||
(<:script :type "text/javascript"
|
(<:script :type "text/javascript"
|
||||||
:src *scrumelo-jsxtransformer-js-location*))
|
:src *scrumelo-jsxtransformer-js-location*))
|
||||||
(<:body
|
(<:body
|
||||||
(<:a :href "/logout" "Logout") " "
|
(<:div :class "navbar navbar-static-top navbar-inverse"
|
||||||
(hunchentoot:session-value :username)
|
(<:div :class "navbar-inner"
|
||||||
|
(<:div :class "container"
|
||||||
|
(<:a :class "brand" "scrumli")
|
||||||
|
(<:div :class "pull-right"
|
||||||
|
(<:span :class "navbar-text"
|
||||||
|
(hunchentoot:session-value
|
||||||
|
:username))
|
||||||
|
(<:ul :class "nav pull-right"
|
||||||
|
(<:li :class "divider-vertical")
|
||||||
|
(<:li (<:a :href "/logout"
|
||||||
|
"Logout")))))))
|
||||||
(<:div :class "container"
|
(<:div :class "container"
|
||||||
(<:h1 "Backlog")
|
(<:h1 "Backlog")
|
||||||
(<:div :id "content")
|
(<:div :id "content")
|
||||||
|
@ -128,14 +141,34 @@
|
||||||
(if (not (logged-in-p))
|
(if (not (logged-in-p))
|
||||||
(<:html :lang "en"
|
(<:html :lang "en"
|
||||||
(<:head (<:meta :charset "utf-8")
|
(<:head (<:meta :charset "utf-8")
|
||||||
(<:title "Login")
|
(page-title "Login")
|
||||||
|
(<:link :href *scrumelo-bootstrap-css-location*
|
||||||
|
:rel "stylesheet" :type "text/css")
|
||||||
|
(<:script :type "text/javascript"
|
||||||
|
:src *scrumelo-bootstrap-js-location*)
|
||||||
(<:script :src "https://login.persona.org/include.js")
|
(<:script :src "https://login.persona.org/include.js")
|
||||||
(<:script :src "/js/login.js"))
|
(<:script :src "/js/login.js"))
|
||||||
(<:body
|
(<:body
|
||||||
|
(<:div :class "navbar navbar-static-top navbar-inverse"
|
||||||
|
(<:div :class "navbar-inner"
|
||||||
|
(<:div :class "container"
|
||||||
|
(<:a :class "brand" "scrumli")
|
||||||
|
(<:ul :class "nav pull-right"
|
||||||
|
(<:li (<:a :href "javascript:login()"
|
||||||
|
"Login"))))))
|
||||||
|
(<:div :class "container"
|
||||||
|
(<:br)
|
||||||
|
(<:div :class "hero-unit"
|
||||||
|
(<:h1 "Scrumli")
|
||||||
|
(<:p "As a " (<:em "developer") " I "
|
||||||
|
(<:em "love") " to " (<:em "scrum")
|
||||||
|
"...")
|
||||||
|
(<:a :class "btn btn-primary btn-large"
|
||||||
|
:href "javascript:login()"
|
||||||
|
"Login")))
|
||||||
(<:form :id "login-form" :method "POST" :action ""
|
(<:form :id "login-form" :method "POST" :action ""
|
||||||
(<:input :id "assertion-field" :type "hidden"
|
(<:input :id "assertion-field" :type "hidden"
|
||||||
:name "assertion" :value ""))
|
:name "assertion" :value ""))))
|
||||||
(<:p (<:a :href "javascript:login()" "Login"))))
|
|
||||||
(redirect 'main)))
|
(redirect 'main)))
|
||||||
|
|
||||||
(define-route logout-page ("logout")
|
(define-route logout-page ("logout")
|
||||||
|
|
Loading…
Reference in a new issue