From 78bda9caa692679734602af5352949f442d886e0 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Wed, 22 Nov 2017 19:19:26 +1100 Subject: [PATCH] Basic web GUI skeleton --- .gitignore | 1 + eosweb/.bowerrc | 3 +++ eosweb/bower.json | 21 +++++++++++++++++ eosweb/eosweb.py | 4 ++++ eosweb/templates/base.html | 36 +++++++++++++++++++++++++++++ eosweb/templates/index.html | 25 ++++++++++++++++++++ eosweb/templates/semantic_base.html | 35 ++++++++++++++++++++++++++++ 7 files changed, 125 insertions(+) create mode 100644 eosweb/.bowerrc create mode 100644 eosweb/bower.json create mode 100644 eosweb/templates/base.html create mode 100644 eosweb/templates/index.html create mode 100644 eosweb/templates/semantic_base.html diff --git a/.gitignore b/.gitignore index 5640075..071e786 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ __javascript__ __pycache__ refs +bower_components \#* .#* diff --git a/eosweb/.bowerrc b/eosweb/.bowerrc new file mode 100644 index 0000000..82eab30 --- /dev/null +++ b/eosweb/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "static/bower_components" +} diff --git a/eosweb/bower.json b/eosweb/bower.json new file mode 100644 index 0000000..35cdbfe --- /dev/null +++ b/eosweb/bower.json @@ -0,0 +1,21 @@ +{ + "name": "eosweb", + "homepage": "https://github.com/RunasSudo/Eos", + "authors": [ + "RunasSudo (Yingtong Li) " + ], + "description": "", + "main": "", + "license": "AGPL-3.0+", + "private": true, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "semantic": "semantic-ui#^2.2.13" + } +} diff --git a/eosweb/eosweb.py b/eosweb/eosweb.py index 2169be8..b37bcc5 100644 --- a/eosweb/eosweb.py +++ b/eosweb/eosweb.py @@ -25,3 +25,7 @@ app = flask.Flask(__name__) def run_tests(prefix, lang): import eos.tests eos.tests.run_tests(prefix, lang) + +@app.route('/') +def index(): + return flask.render_template('index.html') diff --git a/eosweb/templates/base.html b/eosweb/templates/base.html new file mode 100644 index 0000000..37774f5 --- /dev/null +++ b/eosweb/templates/base.html @@ -0,0 +1,36 @@ +{% extends 'semantic_base.html' %} + +{# + Eos - Verifiable elections + Copyright © 2017 RunasSudo (Yingtong Li) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +#} + +{% block head %} + +{% endblock %} + +{% block basecontent %} + +
+ {% block content %} + {% endblock content %} +
+{% endblock %} diff --git a/eosweb/templates/index.html b/eosweb/templates/index.html new file mode 100644 index 0000000..323de68 --- /dev/null +++ b/eosweb/templates/index.html @@ -0,0 +1,25 @@ +{% extends 'base.html' %} + +{# + Eos - Verifiable elections + Copyright © 2017 RunasSudo (Yingtong Li) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +#} + +{% block title %}Home{% endblock %} + +{% block content %} + Hello World! +{% endblock %} diff --git a/eosweb/templates/semantic_base.html b/eosweb/templates/semantic_base.html new file mode 100644 index 0000000..38dea6b --- /dev/null +++ b/eosweb/templates/semantic_base.html @@ -0,0 +1,35 @@ +{# + Eos - Verifiable elections + Copyright © 2017 RunasSudo (Yingtong Li) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +#} + + + + + + {% block title %}{% endblock %} – Eos Voting + + + + + + {% block head %}{% endblock %} + + + {% block basecontent %} + {% endblock %} + +