Added a lot of a dummy website, to guide actual building of the app.

This commit is contained in:
simon 2016-12-28 21:28:09 +00:00
parent fe7028de8e
commit 16b45a1b6e
12 changed files with 580 additions and 0 deletions

View file

@ -0,0 +1,188 @@
/**
* Static CSS for basic YouYesYet pages to establish look-and-feel. Something
* more dynamic, designed by someone more skilled than me, will replace it
* later.
*/
/* Probably have to find Helvetica Neue as a web font */
body {
font-family: "Helvetica Neue", "Sans Bold", "Arial Black", sans-serif;
background-color: rgb( 50, 109, 177);
color: white;
}
/* footer of the document */
footer {
clear: both;
font-size: smaller;
padding: 0 2em;
text-align: center;
color: white;
background-color: rgba(16, 58, 106, 0.95);
width: 100%;
margin: 0;
bottom:0;
position:fixed;
z-index:150;
_position:absolute;
_top:expression(eval(document.documentElement.scrollTop+
(document.documentElement.clientHeight-this.offsetHeight)));
}
header {
width:100%;
padding: 2em 0 0.25em 0;
background-color: rgb(16, 58, 106);
color: white;
}
/* ids generally in document order */
/* Overall container div, holds all content of page. Yes, I know it shouldn't have fixed width */
#nav{
margin: 0;
padding: 0;
width: 100%;
position: fixed;
z-index: 149;
}
#nav:hover #nav-menu {
display: inline;
}
#nav-icon {
padding: 0.25em;
}
#nav-menu {
display: none;
}
#nav ul li {
padding: 0;
margin: 0;
display: inline;
}
#nav ul li a {
color: white;
text-decoration: none;
font-weight: bold;
padding: 0.1em 0.75em;
margin: 0;
}
#nav ul li.active a { background-color: silver;}
li.nav-item a:hover { background-color: rgb( 240, 240, 240) }
li.nav-item a:active { background-color: gray; color: white; }
#main-container{
clear: both;
width:100%;
}
.big-link {
min-width: 8em;
padding: 0.25em 1em;
background-color: rgb(16, 58, 106);
color: white;
text-decoration: none;
}
.big-link:hover {
text-decoration: none;
}
.big-link:hover::after {
content: " >";
}
.big-link-container {
font-size: 300%;
padding: 0.5em 0;
text-align: right;
}
.dummy {
font-family: sans-serif;
font-size: 80%;
font-weight: normal;
}
.error {
background-color: red;
color: white;
}
.widget {
background-color: silver;
border: thin solid white;
margin-top: 0;
margin-bottom: 0;
}
.world {
font-size: 8pt;
}
div.error {
width: 100%;
}
form {
border: thin solid silver;
}
h1 {
font-size: 300%;
}
div.content, form, p, pre, ul, ol, dl, menu, h1, h2, h3, h4, h5 {
padding: 0.25em 10%;
}
input {
background-color: white;
}
input.submit {
background-color: green;
}
input.required:after {
content: " \*";
color: red;
}
label {
width: 30em;
min-width: 20em;
border-right: thin solid gray;
}
menu li {
display: inline;
}
menu li::before {
content: "|| ";
}
div.world table, div.world table tr td {
padding: 0;
margin: 0;
border-collapse: collapse;
border: none;
}
table.music-ruled tr:nth-child(odd) {
background-color: silver;
}
th, td {
text-align: left;
padding: 0 0.25em;
}

View file

@ -0,0 +1,42 @@
<!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-static.css" />
<title>Login with Facebook</title>
</head>
<body>
<header>
<div id="nav">
<img id="nav-icon" src="img/threelines.png" alt="Menu"/>
<ul id="nav-menu" class="nav">
<li class=""><a href="index.html">Home</a></li>
<li class=""><a href="/microworld/params">Parameters</a></li>
<li class=""><a href="/microworld/rules">Rules</a></li>
<li class=""><a href="/microworld/world">World</a></li>
<li class=""><a href="/microworld/about">About</a></li>
<li class=""><a href="/microworld/docs">Documentation</a></li>
</ul>
</div>
<h1>
Login with Facebook
</h1>
</header>
<div id="main-container" class="container">
<p>
The actual login page is provided by the 0-auth provider chosen by the user. We don't
handle login ourselves, and we don't store <em>any</em> passwords.
</p>
<div class="big-link-container">
<a href="app.html" class="big-link" id="app-link">Login</a>
</div>
</div>
<footer>
<div class="dummy">
This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later.
</div>
</footer>
</body>
</html>

View file

@ -0,0 +1,42 @@
<!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-static.css" />
<title>Login with Google</title>
</head>
<body>
<header>
<div id="nav">
<img id="nav-icon" src="img/threelines.png" alt="Menu"/>
<ul id="nav-menu" class="nav">
<li class=""><a href="index.html">Home</a></li>
<li class=""><a href="/microworld/params">Parameters</a></li>
<li class=""><a href="/microworld/rules">Rules</a></li>
<li class=""><a href="/microworld/world">World</a></li>
<li class=""><a href="/microworld/about">About</a></li>
<li class=""><a href="/microworld/docs">Documentation</a></li>
</ul>
</div>
<h1>
Login with Google
</h1>
</header>
<div id="main-container" class="container">
<p>
The actual login page is provided by the 0-auth provider chosen by the user. We don't
handle login ourselves, and we don't store <em>any</em> passwords.
</p>
<div class="big-link-container">
<a href="app.html" class="big-link" id="app-link">Login</a>
</div>
</div>
<footer>
<div class="dummy">
This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later.
</div>
</footer>
</body>
</html>

Binary file not shown.

After

(image error) Size: 266 B

Binary file not shown.

View file

@ -0,0 +1,41 @@
<!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-static.css" />
<title>You Yes Yet?</title>
</head>
<body>
<header>
<div id="nav">
<img id="nav-icon" src="img/threelines.png" alt="Menu"/>
<ul id="nav-menu" class="nav">
<li class=""><a href="index.html">Home</a></li>
<li class=""><a href="/microworld/params">Parameters</a></li>
<li class=""><a href="/microworld/rules">Rules</a></li>
<li class=""><a href="/microworld/world">World</a></li>
<li class=""><a href="/microworld/about">About</a></li>
<li class=""><a href="/microworld/docs">Documentation</a></li>
</ul>
</div>
<h1>
You yes yet?
</h1>
</header>
<div id="main-container" class="container">
<div class="big-link-container">
<a href="supporter.html" class="big-link" id="yes-link">Yes</a>
</div>
<div class="big-link-container">
<a href="notyet.html" class="big-link" id="not-yet-link">No</a>
</div>
</div>
<footer>
<div class="dummy">
This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later.
</div>
</footer>
</body>
</html>

View file

@ -0,0 +1,51 @@
<!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-static.css" />
<title>Issues</title>
</head>
<body>
<header>
<div id="nav">
<img id="nav-icon" src="img/threelines.png" alt="Menu"/>
<ul id="nav-menu" class="nav">
<li class=""><a href="index.html">Home</a></li>
<li class=""><a href="/microworld/params">Parameters</a></li>
<li class=""><a href="/microworld/rules">Rules</a></li>
<li class=""><a href="/microworld/world">World</a></li>
<li class=""><a href="/microworld/about">About</a></li>
<li class=""><a href="/microworld/docs">Documentation</a></li>
</ul>
</div>
<h1>
Issues
</h1>
</header>
<div id="main-container" class="container">
<div class="big-link-container">
<a href="blurb.html" class="big-link" id="currency-link">Currency</a>
</div>
<div class="big-link-container">
<a href="blurb.html" class="big-link" id="eu-link">EU Membership</a>
</div>
<div class="big-link-container">
<a href="afford.html" class="big-link" id="afford-link">Can Scotland afford it?</a>
</div>
<div class="big-link-container">
<a href="blurb.html" class="big-link" id="queen-link">Keep the Queen?</a>
</div>
<div class="big-link-container">
<a href="blurb.html" class="big-link" id="defence-link">Defence/NATO</a>
</div>
</div>
<footer>
<div class="dummy">
This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later.
</div>
</footer>
</body>
</html>

View file

@ -0,0 +1,44 @@
<!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-static.css" />
<title>Please Log in</title>
</head>
<body>
<header>
<div id="nav">
<img id="nav-icon" src="img/threelines.png" alt="Menu"/>
<ul id="nav-menu" class="nav">
<li class=""><a href="index.html">Home</a></li>
<li class=""><a href="/microworld/params">Parameters</a></li>
<li class=""><a href="/microworld/rules">Rules</a></li>
<li class=""><a href="/microworld/world">World</a></li>
<li class=""><a href="/microworld/about">About</a></li>
<li class=""><a href="/microworld/docs">Documentation</a></li>
</ul>
</div>
<h1>
Please Log in
</h1>
</header>
<div id="main-container" class="container">
<div class="big-link-container">
<a href="google-login.html" class="big-link" id="google-login-link">Login with Google</a>
</div>
<div class="big-link-container">
<a href="facebook-login.html" class="big-link" id="facebook-login-link">Login with Facebook</a>
</div>
<div class="big-link-container">
<a href="twitter-login.html" class="big-link" id="twitter-login-link">Login with Twitter</a>
</div>
</div>
<footer>
<div class="dummy">
This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later.
</div>
</footer>
</body>
</html>

View file

@ -0,0 +1,40 @@
<!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-static.css" />
<title>Can we persuade you?</title>
</head>
<body>
<header>
<div id="nav">
<img id="nav-icon" src="img/threelines.png" alt="Menu"/>
<ul id="nav-menu" class="nav">
<li class=""><a href="index.html">Home</a></li>
<li class=""><a href="/microworld/params">Parameters</a></li>
<li class=""><a href="/microworld/rules">Rules</a></li>
<li class=""><a href="/microworld/world">World</a></li>
<li class=""><a href="/microworld/about">About</a></li>
<li class=""><a href="/microworld/docs">Documentation</a></li>
</ul>
</div>
<h1>
Can we persuade you?
</h1>
</header>
<div id="main-container" class="container">
<div class="big-link-container">
<a href="library.html" class="big-link" id="library-link">Browse the issues</a>
</div>
<div class="big-link-container">
<a href="call-me.html" class="big-link" id="call-me-link">Get someone to talk to you</a>
</div>
</div>
<footer>
<div class="dummy">
This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later.
</div>
</footer>
</body>
</html>

View file

@ -0,0 +1,43 @@
<!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"/>
{% style "/assets/bootstrap/css/bootstrap.min.css" %}
{% style "/assets/bootstrap/css/bootstrap-theme.min.css" %}
<link rel="stylesheet" type="text/css" href="css/yyy-static.css" />
<title>Are you registered?</title>
</head>
<body>
<header>
<div id="nav">
<img id="nav-icon" src="img/threelines.png" alt="Menu"/>
<ul id="nav-menu" class="nav">
<li class=""><a href="index.html">Home</a></li>
<li class=""><a href="/microworld/params">Parameters</a></li>
<li class=""><a href="/microworld/rules">Rules</a></li>
<li class=""><a href="/microworld/world">World</a></li>
<li class=""><a href="/microworld/about">About</a></li>
<li class=""><a href="/microworld/docs">Documentation</a></li>
</ul>
</div>
<h1>
Have you signed up as a canvasser yet?
</h1>
</header>
<div id="main-container" class="container">
<div class="big-link-container">
<a href="login.html" class="big-link" id="yes-link">Yes</a>
</div>
<div class="big-link-container">
<a href="signup.html" class="big-link" id="signup-link">No</a>
</div>
</div>
<footer>
<div class="dummy">
This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later.
</div>
</footer>
</body>
</html>

View file

@ -0,0 +1,42 @@
<!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-static.css" />
<title>Login with Twitter</title>
</head>
<body>
<header>
<div id="nav">
<img id="nav-icon" src="img/threelines.png" alt="Menu"/>
<ul id="nav-menu" class="nav">
<li class=""><a href="index.html">Home</a></li>
<li class=""><a href="/microworld/params">Parameters</a></li>
<li class=""><a href="/microworld/rules">Rules</a></li>
<li class=""><a href="/microworld/world">World</a></li>
<li class=""><a href="/microworld/about">About</a></li>
<li class=""><a href="/microworld/docs">Documentation</a></li>
</ul>
</div>
<h1>
Login with Twitter
</h1>
</header>
<div id="main-container" class="container">
<p>
The actual login page is provided by the 0-auth provider chosen by the user. We don't
handle login ourselves, and we don't store <em>any</em> passwords.
</p>
<div class="big-link-container">
<a href="app.html" class="big-link" id="app-link">Login</a>
</div>
</div>
<footer>
<div class="dummy">
This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later.
</div>
</footer>
</body>
</html>

View file

@ -0,0 +1,47 @@
(ns youyesyet.routes.services
(:require [clj-http.client :as client]
[ring.util.http-response :refer :all]
[compojure.api.sweet :refer :all]
[schema.core :as s]))
(defapi service-routes
{:swagger {:ui "/swagger-ui"
:spec "/swagger.json"
:data {:info {:version "1.0.0"
:title "Sample API"
:description "Sample Services"}}}}
(context "/api" []
:tags ["thingie"]
(GET "/electors/:address-id" []
(GET "/plus" []
:return Long
:query-params [x :- Long, {y :- Long 1}]
:summary "x+y with query-parameters. y defaults to 1."
(ok (+ x y)))
(POST "/minus" []
:return Long
:body-params [x :- Long, y :- Long]
:summary "x-y with body-parameters."
(ok (- x y)))
(GET "/times/:x/:y" []
:return Long
:path-params [x :- Long, y :- Long]
:summary "x*y with path-parameters"
(ok (* x y)))
(POST "/divide" []
:return Double
:form-params [x :- Long, y :- Long]
:summary "x/y with form-parameters"
(ok (/ x y)))
(GET "/power" []
:return Long
:header-params [x :- Long, y :- Long]
:summary "x^y with header-parameters"
(ok (long (Math/pow x y))))))