/view')
+@using_election
+def election_view(election):
+ return flask.render_template('election/view.html', election=election)
diff --git a/eosweb/core/static/css/main.css b/eosweb/core/static/css/main.css
new file mode 100644
index 0000000..1d6fd67
--- /dev/null
+++ b/eosweb/core/static/css/main.css
@@ -0,0 +1,22 @@
+/*
+ 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 .
+*/
+
+.hash {
+ font-family: monospace;
+ word-wrap: break-word;
+}
diff --git a/eosweb/templates/base.html b/eosweb/core/templates/base.html
similarity index 100%
rename from eosweb/templates/base.html
rename to eosweb/core/templates/base.html
diff --git a/eosweb/core/templates/election/base.html b/eosweb/core/templates/election/base.html
new file mode 100644
index 0000000..f0d0922
--- /dev/null
+++ b/eosweb/core/templates/election/base.html
@@ -0,0 +1,56 @@
+{% 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 %}{{ election.name }}{% endblock %}
+
+{% block content %}
+ {{ election.name }}
+
+ Election fingerprint: {{ SHA256().update_obj(election).hash_as_b64() }}
+
+
+
+ {% block electioncontent %}
+ {% endblock %}
+
+{% endblock %}
+
+{% block basecontent %}
+ {{ super() }}
+
+
+{% endblock %}
diff --git a/eosweb/core/templates/election/view.html b/eosweb/core/templates/election/view.html
new file mode 100644
index 0000000..74b8668
--- /dev/null
+++ b/eosweb/core/templates/election/view.html
@@ -0,0 +1,51 @@
+{% extends 'election/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 .
+#}
+
+{% set Status = eos.base.workflow.WorkflowTask.Status %}
+
+{% block electioncontent %}
+ {% if election.workflow.get_task('eos.base.workflow.TaskConfigureElection').status == Status.EXITED %}
+ {% if election.workflow.get_task('eos.base.workflow.TaskOpenVoting').status == Status.EXITED %}
+ Click here to vote in this election
+ {% else %}
+ Voting in this election has not yet opened
+ {% endif %}
+
+
+ Voting in this election
+ {% if election.workflow.get_task('eos.base.workflow.TaskOpenVoting').status == Status.EXITED %}
+ opened
+ {% else %}
+ is scheduled to open
+ {% endif %}
+ at the administrators' discretion, and
+ {% if election.workflow.get_task('eos.base.workflow.TaskCloseVoting').status == Status.EXITED %}
+ closed
+ {% else %}
+ is scheduled to close
+ {% endif %}
+ at the administrators' discretion.
+
+ {% else %}
+ This election is not yet ready for voting
+
+ The administrator of this election has not yet finished setting the election parameters. The details of the election may change at any time.
+ {% endif %}
+{% endblock %}
diff --git a/eosweb/templates/index.html b/eosweb/core/templates/index.html
similarity index 76%
rename from eosweb/templates/index.html
rename to eosweb/core/templates/index.html
index 323de68..63d8ab3 100644
--- a/eosweb/templates/index.html
+++ b/eosweb/core/templates/index.html
@@ -21,5 +21,10 @@
{% block title %}Home{% endblock %}
{% block content %}
- Hello World!
+ Please choose an election from the list below:
+
+ {% for election in eos.base.election.Election.get_all() %}
+ {{ election.name }}
+ {% endfor %}
+
{% endblock %}
diff --git a/eosweb/templates/semantic_base.html b/eosweb/core/templates/semantic_base.html
similarity index 100%
rename from eosweb/templates/semantic_base.html
rename to eosweb/core/templates/semantic_base.html