From fe367f664e9b615c7039ce8667ff57b512206413 Mon Sep 17 00:00:00 2001 From: James Wang Date: Wed, 23 Dec 2015 17:53:00 -0500 Subject: [PATCH 1/3] Load api as blueprint within app.py --- server/api/__init__.py | 3 ++- server/app.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/api/__init__.py b/server/api/__init__.py index 2c4eac3..42138ea 100644 --- a/server/api/__init__.py +++ b/server/api/__init__.py @@ -1 +1,2 @@ -import models \ No newline at end of file +import models +import api diff --git a/server/app.py b/server/app.py index 197d279..77cffc5 100644 --- a/server/app.py +++ b/server/app.py @@ -4,8 +4,11 @@ from flask import Flask import config import json +from api.api import api + app = Flask(__name__) app.secret_key = config.SECRET +app.register_blueprint(api) @app.route("/api") def api(): @@ -28,4 +31,4 @@ if __name__ == "__main__": db.create_all() print db - app.run(host="0.0.0.0", port=8000) \ No newline at end of file + app.run(host="0.0.0.0", port=8000) From 5fa59fbd3d4231441ff1c37d3da94263759d4cf2 Mon Sep 17 00:00:00 2001 From: CommanderStrax Date: Wed, 23 Dec 2015 16:53:41 -0600 Subject: [PATCH 2/3] Added color coding to test result --- web/ascript.js | 3 +++ web/index.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web/ascript.js b/web/ascript.js index 91d8ac3..0ca34f8 100644 --- a/web/ascript.js +++ b/web/ascript.js @@ -1,4 +1,7 @@ var app = angular.module('myApp', []); app.controller('myCtrl', function($scope) { $scope.test = "Successful!"; + if($scope.test == "Successful!") { + document.getElementById("result").style.color="#00FF00"; + } }); diff --git a/web/index.html b/web/index.html index 66efab5..267de2e 100644 --- a/web/index.html +++ b/web/index.html @@ -5,6 +5,6 @@ -

Angular.js Status: {{test}}

+

Angular.js Status: Failed!

From 011eda51e161663f2861e78e10e1ee99c17be1a3 Mon Sep 17 00:00:00 2001 From: CommanderStrax Date: Wed, 23 Dec 2015 17:03:33 -0600 Subject: [PATCH 3/3] Added basic naviagation --- web/about.html | 9 +++++++++ web/index.html | 9 ++++++++- web/login.html | 9 +++++++++ web/register.html | 9 +++++++++ web/style.css | 4 ++++ 5 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 web/about.html create mode 100644 web/login.html create mode 100644 web/register.html create mode 100644 web/style.css diff --git a/web/about.html b/web/about.html new file mode 100644 index 0000000..1946531 --- /dev/null +++ b/web/about.html @@ -0,0 +1,9 @@ + + + + About + + +

EasyCTF is Fun!

+ + diff --git a/web/index.html b/web/index.html index 267de2e..5cad8e4 100644 --- a/web/index.html +++ b/web/index.html @@ -1,10 +1,17 @@ EasyCTF 2016 + -

Angular.js Status: Failed!

+ Angular.js Status: Failed! + diff --git a/web/login.html b/web/login.html new file mode 100644 index 0000000..174117f --- /dev/null +++ b/web/login.html @@ -0,0 +1,9 @@ + + + + Login + + +

Please Login to EasyCTF

+ + diff --git a/web/register.html b/web/register.html new file mode 100644 index 0000000..116aa22 --- /dev/null +++ b/web/register.html @@ -0,0 +1,9 @@ + + + + Register + + +

Please Register for EasyCTF

+ + diff --git a/web/style.css b/web/style.css new file mode 100644 index 0000000..2b150d5 --- /dev/null +++ b/web/style.css @@ -0,0 +1,4 @@ +marquee { + background-color: black; + color:white; +}