Skip to content
Permalink
Browse files

add back front-end architecture

  • Loading branch information...
athyuttamre committed Apr 18, 2015
1 parent 6524045 commit 73f700845e7a5555a6aab1b73d337933ceacf462
@@ -4,6 +4,7 @@
*.lock
*.swp
*.out
*.secret

# Virtualenv #
##############
@@ -35,3 +36,7 @@ Thumbs.db
# Foreman Environment #
#######################
.env

# Webassets Cache #
###################
api/static/.webassets-cache
@@ -1,4 +1,5 @@
from flask import jsonify, render_template, url_for, request, redirect
from flask.ext.assets import Environment, Bundle
from api import app, db, limiter, RATE_LIMIT
from scripts.add_client import add_client_id
from scripts.email_handler import send_id_email
@@ -11,6 +12,14 @@
# simplify collection names
clients = db.clients

# Compile Sass and JavaScript assets
bundles = {
"css_all": Bundle("scss/main.scss", filters=["scss"], output="gen/main.css"),
"js_all": Bundle("js/*.js", output="gen/main.js")
}
assets = Environment(app)
assets.register(bundles)

# Messages for success/failure during Client ID signup
SUCCESS_MSG = "Your Client ID has been emailed to you!"
FAILURE_MSG = "Your request could not be processed. Please email 'joseph_engelman@brown.edu' for manual registration."
@@ -22,11 +31,11 @@ def root():
signed_up = request.args.get('signedup', '')
num_requests = get_total_requests()
if signed_up == 'true':
return render_template('documentation.html', message=SUCCESS_MSG, num_requests=num_requests)
return render_template('index.html', message=SUCCESS_MSG, num_requests=num_requests)
if signed_up == 'false':
return render_template('documentation.html', message=FAILURE_MSG, num_requests=num_requests)
return render_template('index.html', message=FAILURE_MSG, num_requests=num_requests)
else:
return render_template('documentation.html', num_requests=num_requests)
return render_template('index.html', num_requests=num_requests)



@@ -0,0 +1,85 @@
/* line 1 */
* {
font-family: "Courier New", Courier, monospace;
}

/* line 5 */
body {
margin-left: 7%;
margin-right: 7%;
}

/* line 10 */
#messagebox {
background-color: gainsboro;
outline-color: black;
outline-width: 2px;
outline-style: solid;
margin: auto;
height: 50px;
line-height: 50px;
font-size: 16px;
}

/* line 21 */
h1 {
font-size: 36px;
font-weight: bold;
}

/* line 26 */
a {
color: black;
}

/* line 30 */
.center {
margin: auto;
text-align: center;
}

/* line 35 */
.codeblock {
padding-left: 20px;
padding-right: 20px;
display: inline-block;
line-height: 40px;
background-color: whitesmoke;
}

/* line 43 */
.endpoint {
margin-left: 3%;
}

/* line 47 */
.parameters {
margin-top: 0px;
margin-bottom: 0px;
}

/* line 52 */
.example {
margin-left: 1%;
}

/* line 56 */
.api {
display: none;
}

/* line 60 */
input {
font-size: 14px;
}

/* line 64 */
input[type="submit"] {
background-color: gainsboro;
border-radius: 1px;
border-color: black;
width: 210px;
height: 30px;
font-size: 16px;
font-weight: bold;
}
@@ -0,0 +1,7 @@
function toggle_vis(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
No changes.
@@ -0,0 +1,7 @@
function toggle_vis(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
No changes.

This file was deleted.

@@ -0,0 +1,72 @@
* {
font-family: "Courier New", Courier, monospace;
}

body {
margin-left: 7%;
margin-right: 7%;
}

#messagebox {
background-color: gainsboro;
outline-color: black;
outline-width: 2px;
outline-style: solid;
margin: auto;
height: 50px;
line-height: 50px;
font-size: 16px;
}

h1 {
font-size: 36px;
font-weight: bold;
}

a {
color: black;
}

.center {
margin: auto;
text-align: center;
}

.codeblock {
padding-left: 20px;
padding-right: 20px;
display: inline-block;
line-height: 40px;
background-color: whitesmoke;
}

.endpoint {
margin-left: 3%;
}

.parameters {
margin-top: 0px;
margin-bottom: 0px;
}

.example {
margin-left: 1%;
}

.api {
display: none;
}

input {
font-size: 14px;
}

input[type="submit"] {
background-color: gainsboro;
border-radius: 1px;
border-color: black;
width: 210px;
height: 30px;
font-size: 16px;
font-weight: bold;
}
No changes.
No changes.
No changes.
No changes.

0 comments on commit 73f7008

Please sign in to comment.
You can’t perform that action at this time.