Commit 0c7149d1 authored by Christian Elberfeld's avatar Christian Elberfeld

Dummy für wordpress implementiert

parent 29b16fbb
<!DOCTYPE html>
<!--[if IE 7 | IE 8]>
<html class="ie" lang="en-US">
<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html lang="en-US">
<!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title> Warpzone Status </title>
<link rel='stylesheet' id='frank_stylesheet-css' href='http://warpzone.ms/wp-content/themes/frank/style.css' type='text/css' media='all' />
<!--[if IE]>
<link rel='stylesheet' id='frank_stylesheet_ie-css' href='http://warpzone.ms/wp-content/themes/frank/ie.css' type='text/css' media='all' />
<![endif]-->
<link rel='stylesheet' id='emoticons-css' href='http://warpzone.ms/wp-content/plugins/font-emoticons/emoticons.css' type='text/css' media='all' />
<!--[if lt IE 9]><script src="http://warpzone.ms/wp-content/themes/frank/javascripts/html5.js"></script><![endif]--><!--[if lt IE 7]><script src="http://warpzone.ms/wp-content/themes/frank/javascripts/ie7.js"></script><![endif]--> <style type="text/css">
#site-title-description {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
}
</style>
<style type="text/css" id="custom-background-css">
body.custom-background { background-color: #fffefe; }
</style>
<link rel='stylesheet' id='frank_stylesheet-css' href='http://warpzone.ms/wp-content/themes/frank/style.css' type='text/css' media='all' />
<!--[if IE]>
<link rel='stylesheet' id='frank_stylesheet_ie-css' href='http://warpzone.ms/wp-content/themes/frank/ie.css' type='text/css' media='all' />
<![endif]-->
</head>
<body id="page" class="home blog custom-background">
<!--[if lt IE 9]>
<div class="chromeframe">Your browser is out of date. Please <a href="http://browsehappy.com/">upgrade your browser </a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a>.</div>
<![endif]-->
<div class="container">
<a href="http://warpzone.ms/">
<img src="http://warpzone.ms/wp-content/uploads/2013/11/cropped-warpzone_schriftzug.png" width="980" height="122" alt="" />
</a>
<style type="text/css" media="screen">
#site-nav h3{
display: none;
}
#site-nav{
border: 0px;
}
.zonenstatus {
padding: 15px 10px;
display: block;
color: #050000;
font: 700 11px Sans-Serif;
}
</style>
<br/>
{% if open %}
<span class="zonenstatus">Status: <span id="wankerTuerOffen" class="wankerClosed"><font color=\"00cc00\">Offen</font></span></span>
{% else %}
<span class="zonenstatus">Status: <span id="wankerTuerOffen" class="wankerClosed"><font color=\"cc0000\">Geschlossen</font></span></span>
{%endif %}
<br/>
<span class="zonenstatus">Lounge: <span id="wankerTempLounge"></span></span>
<br/>
<span class="zonenstatus">Werkstatt: <span id="wankerTempWerkstatt"></span></span>
</div>
</body>
</html>
......@@ -3,6 +3,7 @@ import pytz
from flask import Flask
from flask import request
from flask import redirect
from flask import render_template
from flask import send_from_directory
from flask import json
......@@ -21,6 +22,22 @@ def hello_world():
def send_static(path):
return send_from_directory('static', path)
# Statusanzeige auf der Webseite
@app.route('/wordpress')
def wordpress():
spaceopen = False
now = datetime.datetime.now(pytz.timezone('Europe/Berlin'))
dayofweek = now.strftime("%w")
# Hardcode Mittwoch Abend offen
if dayofweek == "3":
if now.hour >= 18:
spaceopen = True
# Hardcode Samstag Abend offen
if dayofweek == "6":
if now.hour >= 18:
spaceopen = True
return render_template('wordpress.html', open = spaceopen)
# Statusanzeige auf der Webseite
@app.route('/status')
def staus():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment