1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/.hgignore Wed Nov 27 12:40:37 2013 +0100
1.3 @@ -0,0 +1,36 @@
1.4 +syntax: glob
1.5 +# This line is a comment, and will be skipped.
1.6 +# Empty lines are skipped too.
1.7 +# Backup files left behind by the Emacs editor.
1.8 +
1.9 +*~
1.10 +
1.11 +# Lock files used by the Emacs editor.
1.12 +# Notice that the "#" character is quoted with a backslash.
1.13 +# This prevents it from being interpreted as starting a comment.
1.14 +
1.15 +.\#*
1.16 +
1.17 +# Temporary files used by the vim editor.
1.18 +.*.swp
1.19 +
1.20 +# A hidden file created by the Mac OS X Finder.
1.21 +.DS_Store
1.22 +# temporare Dateien die mit "make html" jederzeit neu generieren kann.
1.23 +
1.24 +*.pyc
1.25 +spam.log
1.26 +pid.txt
1.27 +sphinxdocs
1.28 +modules1
1.29 +dummy*
1.30 +_build
1.31 +build
1.32 +*.log
1.33 +*.aux
1.34 +*.synctex.gz
1.35 +*.out
1.36 +pyhasse.similarity/*
1.37 +oldies
1.38 +level/Level*
1.39 +static/js/prettify*
1.40 \ No newline at end of file
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/babel.cfg Wed Nov 27 12:40:37 2013 +0100
2.3 @@ -0,0 +1,4 @@
2.4 +[python: **.py]
2.5 +[jinja2: **/templates/**.html]
2.6 +extensions=jinja2.ext.autoescape,jinja2.ext.with_
2.7 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/config.py Wed Nov 27 12:40:37 2013 +0100
3.3 @@ -0,0 +1,8 @@
3.4 +# -*- coding: utf-8 -*-
3.5 +# ...
3.6 +# available languages
3.7 +LANGUAGES = {
3.8 + 'en': 'English',
3.9 + 'de': 'Deutsch',
3.10 + 'it': 'Italiano'
3.11 +}
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/pymove3d.py Wed Nov 27 12:40:37 2013 +0100
4.3 @@ -0,0 +1,49 @@
4.4 +from flask import Flask
4.5 +from flask import render_template
4.6 +from flask import request
4.7 +from flask import abort, redirect, url_for
4.8 +import os
4.9 +from flask import send_from_directory
4.10 +import logging
4.11 +from logging import Formatter
4.12 +
4.13 +from flask.ext.babel import gettext
4.14 +from flask.ext.babel import Babel
4.15 +
4.16 +app = Flask(__name__)
4.17 +babel = Babel(app)
4.18 +
4.19 +@babel.localeselector
4.20 +def get_locale():
4.21 + return "en" #request.accept_languages.best_match(LANGUAGES.keys())
4.22 +
4.23 +@app.route("/")
4.24 +
4.25 +@app.route("/index")
4.26 +def index():
4.27 + return render_template("index.html", act="index")
4.28 +
4.29 +@app.route("/competition")
4.30 +def competition():
4.31 + return render_template("competition.html", act="competition")
4.32 +
4.33 +@app.route("/task")
4.34 +def task():
4.35 + return render_template("task.html", act="task")
4.36 +
4.37 +@app.route("/submission")
4.38 +def submission():
4.39 + return render_template("submission.html", act="submission")
4.40 +
4.41 +@app.route("/coursematerial")
4.42 +def coursematerial():
4.43 + return render_template("coursematerial.html", act="coursematerial")
4.44 +
4.45 +@app.errorhandler(404)
4.46 +def page_not_found(e):
4.47 + return render_template("404.html"), 404
4.48 +
4.49 +if __name__ == "__main__":
4.50 + app.run(host='localhost', port=5014, debug=True)
4.51 +
4.52 +
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/static/css/pymove3d.css Wed Nov 27 12:40:37 2013 +0100
5.3 @@ -0,0 +1,1 @@
5.4 +h1 {text-align: center;}
5.5 \ No newline at end of file
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/templates/404.html Wed Nov 27 12:40:37 2013 +0100
6.3 @@ -0,0 +1,5 @@
6.4 +{% extends "theme.html" %}
6.5 +{% block body %}
6.6 +<h1>Page Not Found</h1>
6.7 +<p>_('This information is not available!')<p><a href="{{ url_for('index') }}">_('Home')</a>
6.8 +{% endblock %}
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/templates/competition.html Wed Nov 27 12:40:37 2013 +0100
7.3 @@ -0,0 +1,16 @@
7.4 +{% extends "theme.html" %}
7.5 +
7.6 +{% block jumbotron %}
7.7 +<!-- default jumbotron -->
7.8 + {% include "jumbotron-competition.html" %}
7.9 +<p>Spezial Jubotron...</p>
7.10 +
7.11 +{% endblock %}
7.12 +
7.13 +
7.14 +{% block body %}
7.15 +<h1>
7.16 +Competition
7.17 +</h1>
7.18 +
7.19 +{% endblock %}
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/templates/coursematerial.html Wed Nov 27 12:40:37 2013 +0100
8.3 @@ -0,0 +1,16 @@
8.4 +{% extends "theme.html" %}
8.5 +
8.6 +{% block jumbotron %}
8.7 +<!-- default jumbotron -->
8.8 + {% include "jumbotron-coursematerial.html" %}
8.9 +<p>Spezial Jubotron...</p>
8.10 +
8.11 +{% endblock %}
8.12 +
8.13 +
8.14 +{% block body %}
8.15 +<h1>
8.16 +Course material
8.17 +</h1>
8.18 +
8.19 +{% endblock %}
9.1 --- a/templates/en/theme.html Wed Nov 27 11:18:18 2013 +0100
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,91 +0,0 @@
9.4 -<!DOCTYPE html>
9.5 -<html lang="en"><head>
9.6 -<meta http-equiv="content-type" content="text/html; charset=UTF-8">
9.7 - <meta charset="utf-8">
9.8 - <meta http-equiv="X-UA-Compatible" content="IE=edge">
9.9 - <meta name="viewport" content="width=device-width, initial-scale=1.0">
9.10 - <meta name="description" content="">
9.11 - <meta name="author" content="">
9.12 - <link rel="shortcut icon" href="http://getbootstrap.com/docs-assets/ico/favicon.png">
9.13 -
9.14 - <title>Navbar Template for Bootstrap</title>
9.15 -
9.16 - <!-- Bootstrap core CSS -->
9.17 - <link href="Navbar%20Template%20for%20Bootstrap-Dateien/bootstrap.css" rel="stylesheet">
9.18 -
9.19 - <!-- Custom styles for this template -->
9.20 - <link href="Navbar%20Template%20for%20Bootstrap-Dateien/navbar.css" rel="stylesheet">
9.21 -
9.22 - <!-- Just for debugging purposes. Don't actually copy this line! -->
9.23 - <!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
9.24 -
9.25 - <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
9.26 - <!--[if lt IE 9]>
9.27 - <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
9.28 - <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
9.29 - <![endif]-->
9.30 - </head>
9.31 -
9.32 - <body>
9.33 -
9.34 - <div class="container">
9.35 -
9.36 - <!-- Static navbar -->
9.37 - <div class="navbar navbar-default" role="navigation">
9.38 - <div class="navbar-header">
9.39 - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
9.40 - <span class="sr-only">Toggle navigation</span>
9.41 - <span class="icon-bar"></span>
9.42 - <span class="icon-bar"></span>
9.43 - <span class="icon-bar"></span>
9.44 - </button>
9.45 - <a class="navbar-brand" href="#">Project name</a>
9.46 - </div>
9.47 - <div class="navbar-collapse collapse">
9.48 - <ul class="nav navbar-nav">
9.49 - <li class="active"><a href="#">Link</a></li>
9.50 - <li><a href="#">Link</a></li>
9.51 - <li><a href="#">Link</a></li>
9.52 - <li class="dropdown">
9.53 - <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
9.54 - <ul class="dropdown-menu">
9.55 - <li><a href="#">Action</a></li>
9.56 - <li><a href="#">Another action</a></li>
9.57 - <li><a href="#">Something else here</a></li>
9.58 - <li class="divider"></li>
9.59 - <li class="dropdown-header">Nav header</li>
9.60 - <li><a href="#">Separated link</a></li>
9.61 - <li><a href="#">One more separated link</a></li>
9.62 - </ul>
9.63 - </li>
9.64 - </ul>
9.65 - <ul class="nav navbar-nav navbar-right">
9.66 - <li class="active"><a href="http://getbootstrap.com/examples/navbar/">Default</a></li>
9.67 - <li><a href="http://getbootstrap.com/examples/navbar-static-top/">Static top</a></li>
9.68 - <li><a href="http://getbootstrap.com/examples/navbar-fixed-top/">Fixed top</a></li>
9.69 - </ul>
9.70 - </div><!--/.nav-collapse -->
9.71 - </div>
9.72 -
9.73 - <!-- Main component for a primary marketing message or call to action -->
9.74 - <div class="jumbotron">
9.75 - <h1>Navbar example</h1>
9.76 - <p>This example is a quick exercise to illustrate how the
9.77 -default, static navbar and fixed to top navbar work. It includes the
9.78 -responsive CSS and HTML, so it also adapts to your viewport and device.</p>
9.79 - <p>
9.80 - <a class="btn btn-lg btn-primary" href="http://getbootstrap.com/components/#navbar" role="button">View navbar docs »</a>
9.81 - </p>
9.82 - </div>
9.83 -
9.84 - </div> <!-- /container -->
9.85 -
9.86 -
9.87 - <!-- Bootstrap core JavaScript
9.88 - ================================================== -->
9.89 - <!-- Placed at the end of the document so the pages load faster -->
9.90 - <script src="Navbar%20Template%20for%20Bootstrap-Dateien/jquery-1.js"></script>
9.91 - <script src="Navbar%20Template%20for%20Bootstrap-Dateien/bootstrap.js"></script>
9.92 -
9.93 -
9.94 -</body></html>
9.95 \ No newline at end of file
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/templates/index.html Wed Nov 27 12:40:37 2013 +0100
10.3 @@ -0,0 +1,18 @@
10.4 +{% extends "theme.html" %}
10.5 +
10.6 +{% block jumbotron %}
10.7 +<!-- default jumbotron -->
10.8 + {% include "jumbotron-default.html" %}
10.9 +<p>Spezial Jubotron...</p>
10.10 +
10.11 +{% endblock %}
10.12 +
10.13 +
10.14 +{% block body %}
10.15 +<h1>
10.16 +Welcome to the<br />
10.17 +Python competition<br />
10.18 +2014
10.19 +</h1>
10.20 +
10.21 +{% endblock %}
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/templates/jumbotron-competition.html Wed Nov 27 12:40:37 2013 +0100
11.3 @@ -0,0 +1,7 @@
11.4 +<h1>Jumbotron: competition</h1>
11.5 +<p>This example is a quick exercise to illustrate how the
11.6 + default, static navbar and fixed to top navbar work. It includes the
11.7 + responsive CSS and HTML, so it also adapts to your viewport and device.</p>
11.8 +<p>
11.9 + <a class="btn btn-lg btn-primary" href="http://vocword.org" role="button">View navbar docs »</a>
11.10 +</p>
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/templates/jumbotron-coursematerial.html Wed Nov 27 12:40:37 2013 +0100
12.3 @@ -0,0 +1,7 @@
12.4 +<h1>Jumbotron: coursematerial</h1>
12.5 +<p>This example is a quick exercise to illustrate how the
12.6 + default, static navbar and fixed to top navbar work. It includes the
12.7 + responsive CSS and HTML, so it also adapts to your viewport and device.</p>
12.8 +<p>
12.9 + <a class="btn btn-lg btn-primary" href="http://vocword.org" role="button">View navbar docs »</a>
12.10 +</p>
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/templates/jumbotron-default.html Wed Nov 27 12:40:37 2013 +0100
13.3 @@ -0,0 +1,7 @@
13.4 +<h1>Default-jumbotron</h1>
13.5 +<p>This example is a quick exercise to illustrate how the
13.6 + default, static navbar and fixed to top navbar work. It includes the
13.7 + responsive CSS and HTML, so it also adapts to your viewport and device.</p>
13.8 +<p>
13.9 + <a class="btn btn-lg btn-primary" href="http://vocword.org" role="button">View navbar docs »</a>
13.10 +</p>
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/templates/jumbotron-submission.html Wed Nov 27 12:40:37 2013 +0100
14.3 @@ -0,0 +1,7 @@
14.4 +<h1>Jumbotron: submission</h1>
14.5 +<p>This example is a quick exercise to illustrate how the
14.6 + default, static navbar and fixed to top navbar work. It includes the
14.7 + responsive CSS and HTML, so it also adapts to your viewport and device.</p>
14.8 +<p>
14.9 + <a class="btn btn-lg btn-primary" href="http://vocword.org" role="button">View navbar docs »</a>
14.10 +</p>
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/templates/jumbotron-task.html Wed Nov 27 12:40:37 2013 +0100
15.3 @@ -0,0 +1,7 @@
15.4 +<h1>Jumbotron: Task</h1>
15.5 +<p>This example is a quick exercise to illustrate how the
15.6 + default, static navbar and fixed to top navbar work. It includes the
15.7 + responsive CSS and HTML, so it also adapts to your viewport and device.</p>
15.8 +<p>
15.9 + <a class="btn btn-lg btn-primary" href="http://vocword.org" role="button">View navbar docs »</a>
15.10 +</p>
16.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
16.2 +++ b/templates/submission.html Wed Nov 27 12:40:37 2013 +0100
16.3 @@ -0,0 +1,16 @@
16.4 +{% extends "theme.html" %}
16.5 +
16.6 +{% block jumbotron %}
16.7 +<!-- default jumbotron -->
16.8 + {% include "jumbotron-submission.html" %}
16.9 +<p>Spezial Jubotron...</p>
16.10 +
16.11 +{% endblock %}
16.12 +
16.13 +
16.14 +{% block body %}
16.15 +<h1>
16.16 +Submission
16.17 +</h1>
16.18 +
16.19 +{% endblock %}
17.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17.2 +++ b/templates/task.html Wed Nov 27 12:40:37 2013 +0100
17.3 @@ -0,0 +1,16 @@
17.4 +{% extends "theme.html" %}
17.5 +
17.6 +{% block jumbotron %}
17.7 +<!-- default jumbotron -->
17.8 + {% include "jumbotron-task.html" %}
17.9 +<p>Spezial Jubotron...</p>
17.10 +
17.11 +{% endblock %}
17.12 +
17.13 +
17.14 +{% block body %}
17.15 +<h1>
17.16 +Task
17.17 +</h1>
17.18 +
17.19 +{% endblock %}
18.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
18.2 +++ b/templates/theme.html Wed Nov 27 12:40:37 2013 +0100
18.3 @@ -0,0 +1,92 @@
18.4 +<!DOCTYPE html>
18.5 +<html lang="en"><head>
18.6 +<meta http-equiv="content-type" content="text/html; charset=UTF-8">
18.7 + <meta charset="utf-8">
18.8 + <meta http-equiv="X-UA-Compatible" content="IE=edge">
18.9 + <meta name="viewport" content="width=device-width, initial-scale=1.0">
18.10 + <meta name="description" content="">
18.11 + <meta name="author" content="">
18.12 + <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico')}}">
18.13 +
18.14 + <title>Navbar Template for Bootstrap</title>
18.15 +
18.16 + <!-- Bootstrap core CSS -->
18.17 + <link href="/static/css/bootstrap.css" rel="stylesheet">
18.18 +
18.19 + <!-- Custom styles for this template -->
18.20 + <link href="/static/css/navbar.css" rel="stylesheet">
18.21 +
18.22 + <!-- Custom styles for pymove3d -->
18.23 + <link href="/static/css/pymove3d.css" rel="stylesheet">
18.24 +
18.25 +
18.26 + <!-- Just for debugging purposes. Don't actually copy this line! -->
18.27 + <!--[if lt IE 9]><script src="/static/js/ie8-responsive-file-warning.js"></script><![endif]-->
18.28 +
18.29 + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
18.30 + <!--[if lt IE 9]>
18.31 + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
18.32 + <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
18.33 + <![endif]-->
18.34 + </head>
18.35 +
18.36 + <body>
18.37 +
18.38 + <div class="container">
18.39 +
18.40 + <!-- Static navbar -->
18.41 + <div class="navbar navbar-default" role="navigation">
18.42 + <div class="navbar-header">
18.43 + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
18.44 + <span class="sr-only">Toggle navigation</span>
18.45 + <span class="icon-bar"></span>
18.46 + <span class="icon-bar"></span>
18.47 + <span class="icon-bar"></span>
18.48 + </button>
18.49 + <a class="navbar-brand" href="#">PyMove3D -- 2014</a>
18.50 + </div>
18.51 + <div class="navbar-collapse collapse">
18.52 + <!--ul class="nav navbar-nav">
18.53 + <li class="active"><a href="#">Link</a></li>
18.54 + <li><a href="#">Link</a></li>
18.55 + <li><a href="#">Link</a></li>
18.56 + <li class="dropdown">
18.57 + <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
18.58 + <ul class="dropdown-menu">
18.59 + <li><a href="#">Action</a></li>
18.60 + <li><a href="#">Another action</a></li>
18.61 + <li><a href="#">Something else here</a></li>
18.62 + <li class="divider"></li>
18.63 + <li class="dropdown-header">Nav header</li>
18.64 + <li><a href="#">Separated link</a></li>
18.65 + <li><a href="#">One more separated link</a></li>
18.66 + </ul>
18.67 + </li>
18.68 + </ul-->
18.69 + <ul class="nav navbar-nav navbar-right">
18.70 + <li class="active"><a href="/competition">Competition</a></li>
18.71 + <li><a href="/task">Task</a></li>
18.72 + <li><a href="/submission">Submission</a></li>
18.73 + <li><a href="/coursematerial">Course material</a></li>
18.74 + </ul>
18.75 + </div><!--/.nav-collapse -->
18.76 + </div>
18.77 +
18.78 + <!-- Main component for a primary marketing message or call to action -->
18.79 + <div class="jumbotron">
18.80 + {% block jumbotron %}{% endblock %}
18.81 + </div>
18.82 +
18.83 + {% block body %}{% endblock %}
18.84 +
18.85 + </div> <!-- /container -->
18.86 +
18.87 +
18.88 + <!-- Bootstrap core JavaScript
18.89 + ================================================== -->
18.90 + <!-- Placed at the end of the document so the pages load faster -->
18.91 + <script src="/static/js/jquery-1.js"></script>
18.92 + <script src="static/js/bootstrap.js"></script>
18.93 +
18.94 +
18.95 +</body></html>