Basic web GUI skeleton

This commit is contained in:
RunasSudo 2017-11-22 19:19:26 +11:00
parent b1730be551
commit 78bda9caa6
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
7 changed files with 125 additions and 0 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
__javascript__
__pycache__
refs
bower_components
\#*
.#*

3
eosweb/.bowerrc Normal file
View File

@ -0,0 +1,3 @@
{
"directory": "static/bower_components"
}

21
eosweb/bower.json Normal file
View 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"
}
}

View File

@ -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')

View 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 %}

View 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 %}

View 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>