Basic web GUI skeleton
This commit is contained in:
parent
b1730be551
commit
78bda9caa6
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@
|
|||||||
__javascript__
|
__javascript__
|
||||||
__pycache__
|
__pycache__
|
||||||
refs
|
refs
|
||||||
|
bower_components
|
||||||
|
|
||||||
\#*
|
\#*
|
||||||
.#*
|
.#*
|
||||||
|
3
eosweb/.bowerrc
Normal file
3
eosweb/.bowerrc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"directory": "static/bower_components"
|
||||||
|
}
|
21
eosweb/bower.json
Normal file
21
eosweb/bower.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"name": "eosweb",
|
||||||
|
"homepage": "https://github.com/RunasSudo/Eos",
|
||||||
|
"authors": [
|
||||||
|
"RunasSudo (Yingtong Li) <runassudo@yingtongli.me>"
|
||||||
|
],
|
||||||
|
"description": "",
|
||||||
|
"main": "",
|
||||||
|
"license": "AGPL-3.0+",
|
||||||
|
"private": true,
|
||||||
|
"ignore": [
|
||||||
|
"**/.*",
|
||||||
|
"node_modules",
|
||||||
|
"bower_components",
|
||||||
|
"test",
|
||||||
|
"tests"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"semantic": "semantic-ui#^2.2.13"
|
||||||
|
}
|
||||||
|
}
|
@ -25,3 +25,7 @@ app = flask.Flask(__name__)
|
|||||||
def run_tests(prefix, lang):
|
def run_tests(prefix, lang):
|
||||||
import eos.tests
|
import eos.tests
|
||||||
eos.tests.run_tests(prefix, lang)
|
eos.tests.run_tests(prefix, lang)
|
||||||
|
|
||||||
|
@app.route('/')
|
||||||
|
def index():
|
||||||
|
return flask.render_template('index.html')
|
||||||
|
36
eosweb/templates/base.html
Normal file
36
eosweb/templates/base.html
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
#}
|
||||||
|
|
||||||
|
{% block head %}
|
||||||
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}" type="text/css">
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block basecontent %}
|
||||||
|
<div class="ui fixed inverted menu" style="margin-right: 1.5em;">
|
||||||
|
<div class="ui container">
|
||||||
|
<a href="#" class="header item">Eos Voting</a>
|
||||||
|
<a href="#" class="item right">Log in</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ui main text container" style="margin-top: 7em; margin-bottom: 3em;">
|
||||||
|
{% block content %}
|
||||||
|
{% endblock content %}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
25
eosweb/templates/index.html
Normal file
25
eosweb/templates/index.html
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
#}
|
||||||
|
|
||||||
|
{% block title %}Home{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
Hello World!
|
||||||
|
{% endblock %}
|
35
eosweb/templates/semantic_base.html
Normal file
35
eosweb/templates/semantic_base.html
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||||
|
#}
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>{% block title %}{% endblock %} – Eos Voting</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='bower_components/semantic/dist/semantic.min.css') }}">
|
||||||
|
|
||||||
|
<script src="{{ url_for('static', filename='bower_components/jquery/dist/jquery.min.js') }}"></script>
|
||||||
|
<script src="{{ url_for('static', filename='bower_components/semantic/dist/semantic.min.js') }}"></script>
|
||||||
|
{% block head %}{% endblock %}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{% block basecontent %}
|
||||||
|
{% endblock %}
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user