Progress...
This commit is contained in:
parent
be324e9d06
commit
2ce44cc0b8
|
@ -46,6 +46,7 @@
|
|||
#nav-menu {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#nav menu li {
|
||||
|
|
|
@ -1,16 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="css/yyy-common.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/yyy-app.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/spinner.css" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow" rel="stylesheet"/>
|
||||
<title>You Yes Yet?</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
{% extends "base-authenticated.html" %}
|
||||
{% block whole-page %}
|
||||
<div id="app">
|
||||
<div class="splash-screen">
|
||||
<div class="sk-fading-circle">
|
||||
|
@ -33,21 +22,16 @@
|
|||
You must enable JavaScript to use the You Yes Yet app.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- scripts and styles -->
|
||||
<!-- ATTENTION \/ -->
|
||||
<!-- Leaflet -->
|
||||
<link rel="stylesheet" href="vendor/leaflet/dist/leaflet.css" />
|
||||
<script src="vendor/leaflet/dist/leaflet.js"></script>
|
||||
<!-- ATTENTION /\ -->
|
||||
|
||||
<script type="text/javascript">
|
||||
var context = "{{servlet-context}}";
|
||||
var csrfToken = "{{csrf-token}}";
|
||||
</script>
|
||||
{% script "/js/app.js" %}
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
{% block extra-script %}
|
||||
<!-- scripts and styles -->
|
||||
<!-- ATTENTION \/ -->
|
||||
<!-- Leaflet -->
|
||||
<link rel="stylesheet" href="vendor/leaflet/dist/leaflet.css" />
|
||||
<script src="vendor/leaflet/dist/leaflet.js"></script>
|
||||
<!-- ATTENTION /\ -->
|
||||
{% script "/js/app.js" %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3,12 +3,14 @@
|
|||
<head>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" type="text/css" href="css/yyy-static.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/yyy-common.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/yyy-site.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/spinner.css" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Archivo+Black|Archivo+Narrow" rel="stylesheet"/>
|
||||
<title>{{title}}</title>
|
||||
</head>
|
||||
<body>
|
||||
{% block whole-page %}
|
||||
<header>
|
||||
<div id="nav">
|
||||
<img id="nav-icon" src="img/threelines.png" alt="Menu"/>
|
||||
|
@ -16,8 +18,12 @@
|
|||
<li class=""><a href="index.html">Home</a></li>
|
||||
<li class=""><a href="library.html">Library</a></li>
|
||||
<li class=""><a href="register.html">Register</a></li>
|
||||
<li class=""><a href="login.html">Login</a></li>
|
||||
<li class="">{% if user %}<a href="logout.html">Logout</a>
|
||||
{% else %}<a href="login.html">Login</a>{% endif %}</li>
|
||||
<li class=""><a href="about.html">About</a></li>
|
||||
{% if user %}
|
||||
<li id="user"><a href="profile">Logged in as {{user.username}}</a></li>
|
||||
{% endif %}
|
||||
</menu>
|
||||
</div>
|
||||
|
||||
|
@ -28,12 +34,40 @@
|
|||
|
||||
<div id="main-container" class="container">
|
||||
<div id="big-links">
|
||||
{{big-links}}
|
||||
</div>
|
||||
{% block big-links %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div if="#content">
|
||||
{{content}}
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div id="back-link-container">
|
||||
<a href="javascript:history.back()" id="back-link">Back</a>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
<div id="credits">
|
||||
<div>
|
||||
<img src="img/credits/ric-logo.png" width="24" height="24"/>
|
||||
A project of the
|
||||
<a href="https://radical.scot/">Radical Independence Campaign</a> ||
|
||||
Version {{version}}
|
||||
</div>
|
||||
<div>
|
||||
<img height="16" width="16" alt="Clojure" src="img/credits/luminus-logo.png"/>Built with <a href="http://www.luminusweb.net/">LuminusWeb</a> ||
|
||||
<img height="16" width="16" alt="Clojure" src="img/credits/clojure-icon.gif"/> Powered by <a href="http://clojure.org">Clojure</a> ||
|
||||
<img height="16" width="16" alt="GitHub" src="img/credits/github-logo-transparent.png"/>Find me/fork me on <a href="https://github.com/simon-brooke/smeagol">Github</a> ||
|
||||
<img height="16" width="16" alt="Free Software Foundation" src="img/credits/gnu.small.png"/>Licensed under the <a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU General Public License version 2.0</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{% endblock %}
|
||||
<script type="text/javascript">
|
||||
var context = "{{servlet-context}}";
|
||||
var csrfToken = "{{csrf-token}}";
|
||||
</script>
|
||||
{% block extra-script %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
{% extends "base-unauthenticated.html" %}
|
||||
{% block big-links %}
|
||||
<div id="back-link-container">
|
||||
<a href="javascript:history.back()" id="back-link">Back</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<p>
|
||||
We're not going to do login in the long term; we're going to use oauth.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{% extends "base-authenticated.html" %}
|
||||
{% block title %}
|
||||
{{ user }}
|
||||
{% endblock %}
|
||||
{% block big-links %}
|
||||
<div class="big-link-container">
|
||||
|
@ -7,7 +8,9 @@
|
|||
</div>
|
||||
{% for role in roles %}
|
||||
<div class="big-link-container">
|
||||
<a href="{{role}}" class="big-link" id="big-link">{{role}}</a>
|
||||
<a href="{{role.name|lower}}" class="big-link" id="big-link">{{role.name}}</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -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))
|
||||
)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue