From 16b45a1b6e0340c8578e43d8e550258603809e36 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 28 Dec 2016 21:28:09 +0000 Subject: [PATCH] Added a lot of a dummy website, to guide actual building of the app. --- resources/public/css/yyy-static.css | 188 ++++++++++++++++++++++++++ resources/public/facebook-login.html | 42 ++++++ resources/public/google-login.html | 42 ++++++ resources/public/img/threelines.png | Bin 0 -> 266 bytes resources/public/img/threelines.xcf | Bin 0 -> 942 bytes resources/public/index.html | 41 ++++++ resources/public/library.html | 51 +++++++ resources/public/login.html | 44 ++++++ resources/public/notyet.html | 40 ++++++ resources/public/supporter.html | 43 ++++++ resources/public/twitter-login.html | 42 ++++++ src/clj/youyesyet/routes/services.clj | 47 +++++++ 12 files changed, 580 insertions(+) create mode 100644 resources/public/css/yyy-static.css create mode 100644 resources/public/facebook-login.html create mode 100644 resources/public/google-login.html create mode 100644 resources/public/img/threelines.png create mode 100644 resources/public/img/threelines.xcf create mode 100644 resources/public/index.html create mode 100644 resources/public/library.html create mode 100644 resources/public/login.html create mode 100644 resources/public/notyet.html create mode 100644 resources/public/supporter.html create mode 100644 resources/public/twitter-login.html create mode 100644 src/clj/youyesyet/routes/services.clj diff --git a/resources/public/css/yyy-static.css b/resources/public/css/yyy-static.css new file mode 100644 index 0000000..1a479b0 --- /dev/null +++ b/resources/public/css/yyy-static.css @@ -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; +} diff --git a/resources/public/facebook-login.html b/resources/public/facebook-login.html new file mode 100644 index 0000000..1dbdffc --- /dev/null +++ b/resources/public/facebook-login.html @@ -0,0 +1,42 @@ + + + + + + + Login with Facebook + + +
+ + +

+ Login with Facebook +

+
+
+

+ 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 any passwords. +

+ +
+ + + diff --git a/resources/public/google-login.html b/resources/public/google-login.html new file mode 100644 index 0000000..f15ac67 --- /dev/null +++ b/resources/public/google-login.html @@ -0,0 +1,42 @@ + + + + + + + Login with Google + + +
+ + +

+ Login with Google +

+
+
+

+ 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 any passwords. +

+ +
+ + + diff --git a/resources/public/img/threelines.png b/resources/public/img/threelines.png new file mode 100644 index 0000000000000000000000000000000000000000..72a2fe5b5b4aa0af75ae9c84be2ea0dd577bfa2e GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0vp^hCr;r!3HG5U4{IC6kC$Fy9ABk`Uu+BCzd3jDiOH+ZK!2X? zmpo72sP(Xv3lmsa@#u}pe#L8DcP(eByV)AP>J$t-Qup^)>5FQoYXuosg?SeJnlbMO zzo^Vv;l=YLz8=ZYF54n%eXC3M>+i42~uelF{r G5}E)t6k)&s literal 0 HcmV?d00001 diff --git a/resources/public/img/threelines.xcf b/resources/public/img/threelines.xcf new file mode 100644 index 0000000000000000000000000000000000000000..e609fe3dd8e7ac08cfd607574096b406a0faff54 GIT binary patch literal 942 zcmah`yKcfj5VS262uXxd9#x8KA{kjmKuJ12B0U`EN3v-Bq@id6hF|UR>pgz6$6MfZ zuZcQ{@ta?6-h!4h(n9lmXq}hCniJCZ+WK()vQ~}3+WL0=!3o6{z4lpE$z9AEVpcU` p+%ojz6N)W*PiIvnA7a)Vv#PPdEpvZ!La{~f`K+qs^L72J`~i2G&+q^M literal 0 HcmV?d00001 diff --git a/resources/public/index.html b/resources/public/index.html new file mode 100644 index 0000000..04eaa42 --- /dev/null +++ b/resources/public/index.html @@ -0,0 +1,41 @@ + + + + + + + You Yes Yet? + + +
+ + +

+ You yes yet? +

+
+
+ + +
+
+
+ This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later. +
+
+ + diff --git a/resources/public/library.html b/resources/public/library.html new file mode 100644 index 0000000..ca247e0 --- /dev/null +++ b/resources/public/library.html @@ -0,0 +1,51 @@ + + + + + + + Issues + + +
+ + +

+ Issues +

+
+ + +
+
+ This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later. +
+
+ + diff --git a/resources/public/login.html b/resources/public/login.html new file mode 100644 index 0000000..e880f61 --- /dev/null +++ b/resources/public/login.html @@ -0,0 +1,44 @@ + + + + + + + Please Log in + + +
+ + +

+ Please Log in +

+
+ +
+
+ This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later. +
+
+ + diff --git a/resources/public/notyet.html b/resources/public/notyet.html new file mode 100644 index 0000000..ceacd2e --- /dev/null +++ b/resources/public/notyet.html @@ -0,0 +1,40 @@ + + + + + + + Can we persuade you? + + +
+ +

+ Can we persuade you? +

+
+ +
+
+ This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later. +
+
+ + diff --git a/resources/public/supporter.html b/resources/public/supporter.html new file mode 100644 index 0000000..ed879c6 --- /dev/null +++ b/resources/public/supporter.html @@ -0,0 +1,43 @@ + + + + + + {% style "/assets/bootstrap/css/bootstrap.min.css" %} + {% style "/assets/bootstrap/css/bootstrap-theme.min.css" %} + + Are you registered? + + +
+ + +

+ Have you signed up as a canvasser yet? +

+
+
+ + +
+
+
+ This is a dummy page illustrating the intended navigation flow through the app. It may be replaced by something more dynamic later. +
+
+ + diff --git a/resources/public/twitter-login.html b/resources/public/twitter-login.html new file mode 100644 index 0000000..b496dc5 --- /dev/null +++ b/resources/public/twitter-login.html @@ -0,0 +1,42 @@ + + + + + + + Login with Twitter + + +
+ + +

+ Login with Twitter +

+
+
+

+ 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 any passwords. +

+ +
+ + + diff --git a/src/clj/youyesyet/routes/services.clj b/src/clj/youyesyet/routes/services.clj new file mode 100644 index 0000000..e44bb79 --- /dev/null +++ b/src/clj/youyesyet/routes/services.clj @@ -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))))))