diff --git a/resources/public/css/yyy-site.css b/resources/public/css/yyy-site.css index 5387c7a..6f9b521 100644 --- a/resources/public/css/yyy-site.css +++ b/resources/public/css/yyy-site.css @@ -46,6 +46,7 @@ #nav-menu { margin: 0; padding: 0; + width: 100%; } #nav menu li { diff --git a/resources/templates/app.html b/resources/templates/app.html index 5214806..024aa39 100644 --- a/resources/templates/app.html +++ b/resources/templates/app.html @@ -1,16 +1,5 @@ - - - - - - - - - - You Yes Yet? - - - +{% extends "base-authenticated.html" %} +{% block whole-page %}
@@ -33,21 +22,16 @@ You must enable JavaScript to use the You Yes Yet app.

- - - - - - - - - - {% script "/js/app.js" %} - - +{% endblock %} +{% block extra-script %} + + + + + + +{% script "/js/app.js" %} +{% endblock %} diff --git a/resources/templates/base-authenticated.html b/resources/templates/base-authenticated.html index 7b2d418..7da389b 100644 --- a/resources/templates/base-authenticated.html +++ b/resources/templates/base-authenticated.html @@ -3,12 +3,14 @@ - + + {{title}} + {% block whole-page %}
@@ -28,12 +34,40 @@
+ {% block big-links %} + {% endblock %} +
- {{content}} + {% block content %} + {% endblock %} +
+
+ + {% endblock %} + + {% block extra-script %} + {% endblock %} diff --git a/resources/templates/login.html b/resources/templates/login.html index f3e8731..5ee3706 100644 --- a/resources/templates/login.html +++ b/resources/templates/login.html @@ -1,9 +1,4 @@ {% extends "base-unauthenticated.html" %} -{% block big-links %} - -{% endblock %} {% block content %}

We're not going to do login in the long term; we're going to use oauth. diff --git a/resources/templates/roles.html b/resources/templates/roles.html index 1c61866..6b49d2e 100644 --- a/resources/templates/roles.html +++ b/resources/templates/roles.html @@ -1,5 +1,6 @@ {% extends "base-authenticated.html" %} {% block title %} + {{ user }} {% endblock %} {% block big-links %}

{% for role in roles %} {% endfor %} {% endblock %} +{% block content %} +{% endblock %} diff --git a/src/clj/youyesyet/routes/home.clj b/src/clj/youyesyet/routes/home.clj index 77ef2f0..9e27942 100644 --- a/src/clj/youyesyet/routes/home.clj +++ b/src/clj/youyesyet/routes/home.clj @@ -34,9 +34,11 @@ (defn app-page [] (layout/render "app.html")) + (defn about-page [] (layout/render "about.html")) + (defn call-me-page [request] (if request @@ -57,8 +59,10 @@ roles (if user (db-core/get-roles-by-canvasser db-core/*db* {:canvasser (:id user)}))] (cond roles (layout/render "roles.html" - {:title (str "Welcome " (:fullname user)) + {:title (str "Welcome " (:fullname user) ", what do you want to do?") + :user user :roles roles}) + (empty? roles)(response/found "/app") true (assoc (response/found "/login") :session (dissoc session :user)) )))