Indentation, whitespace fixes in templates, JS and srv.py
parent
1ca734bc8c
commit
65b653b3f5
6
srv.py
6
srv.py
|
@ -8,7 +8,7 @@ from output import array
|
|||
app = Flask(__name__)
|
||||
|
||||
def jsonify(data):
|
||||
return flask.Markup(json.dumps(data))
|
||||
return flask.Markup(json.dumps(data))
|
||||
|
||||
app.jinja_env.filters['jsonify'] = jsonify
|
||||
|
||||
|
@ -16,7 +16,7 @@ app.jinja_env.filters['jsonify'] = jsonify
|
|||
@app.route('/')
|
||||
def home(first_id=None, second_id=None, third_id=None):
|
||||
'''
|
||||
print len(array)
|
||||
print len(array)
|
||||
while first_id == None:
|
||||
rand_int = randint(0, len(array)-1)
|
||||
value = array[rand_int]
|
||||
|
@ -41,7 +41,7 @@ def home(first_id=None, second_id=None, third_id=None):
|
|||
|
||||
@app.route('/manifest.webapp')
|
||||
def manifest():
|
||||
return open('manifest.webapp').read()
|
||||
return open('manifest.webapp').read()
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='127.0.0.1', port=6969, debug=True)
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
$(function() {
|
||||
$.getJSON('https://ajax.googleapis.com/ajax/services/search/images?v=1.0&imgsz=medium|large|xlarge|xxlarge&rsz=8&as_rights=(cc_publicdomain|cc_attribute|cc_sharealike|cc_nonderived).-(cc_noncommertial)&as_filetype=jpg|png|gif&safe=moderate&callback=?', {'q':words.join(' || ')}, function(data) {
|
||||
results = data.responseData.results;
|
||||
//for(var i in results)
|
||||
{
|
||||
var i = 0; // hardcore
|
||||
$img = $('<img>');
|
||||
$img.attr('src', results[i].url);
|
||||
$img.appendTo($('#image_wrapper'));
|
||||
return;
|
||||
}
|
||||
})
|
||||
$(document).click(function(e) {
|
||||
window.location.reload()
|
||||
});
|
||||
$.getJSON('https://ajax.googleapis.com/ajax/services/search/images?v=1.0&imgsz=medium|large|xlarge|xxlarge&rsz=8&as_rights=(cc_publicdomain|cc_attribute|cc_sharealike|cc_nonderived).-(cc_noncommertial)&as_filetype=jpg|png|gif&safe=moderate&callback=?', {'q':words.join(' || ')}, function(data) {
|
||||
results = data.responseData.results;
|
||||
//for(var i in results)
|
||||
{
|
||||
var i = 0; // hardcore
|
||||
$img = $('<img>');
|
||||
$img.attr('src', results[i].url);
|
||||
$img.appendTo($('#image_wrapper'));
|
||||
return;
|
||||
}
|
||||
})
|
||||
$(document).click(function(e) {
|
||||
window.location.reload()
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,66 +1,64 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>So.I.am-a.cat mind derailer</title>
|
||||
<style>
|
||||
|
||||
|
||||
@font-face{
|
||||
font-family: "TPBAFK"; src: url("http://so.i.am-a.cat/static/phont/gr82.otf") format('opentype');
|
||||
}
|
||||
body
|
||||
{
|
||||
text-align: center;
|
||||
background: #2b2b2b;
|
||||
}
|
||||
#word1
|
||||
{
|
||||
z-index:0;
|
||||
font-family: "TPBAFK";
|
||||
position:relative;
|
||||
margin-top: 25px;
|
||||
font-size: 46px;
|
||||
font-variant: small-caps;
|
||||
color: #eee;
|
||||
text-shadow: 1px 1px 1px black, -1px -1px 1px black, -1px 1px 1px black, 1px -1px 1px black;
|
||||
}
|
||||
#word2
|
||||
{
|
||||
z-index:0;
|
||||
font-family: 'TPBAFK';
|
||||
position:relative;
|
||||
font-size: 46px;
|
||||
font-variant: small-caps;
|
||||
color: #eee;
|
||||
text-shadow: 1px 1px 1px black, -1px -1px 1px black, -1px 1px 1px black, 1px -1px 1px black;
|
||||
}
|
||||
#image_wrapper
|
||||
{
|
||||
margin-top: -56px;
|
||||
margin-bottom: -60px;
|
||||
max-height: 580px;
|
||||
overflow: hidden;
|
||||
z-index:1;
|
||||
}
|
||||
#image_wrapper img
|
||||
{
|
||||
width: 520px;
|
||||
}
|
||||
.foot {
|
||||
font-size: 8px;
|
||||
color: #666;
|
||||
margin-top: 20px;
|
||||
z-index:1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>words = {{ words|jsonify }}; </script>
|
||||
<span id="word1">{{ words[0]|e }}</span>
|
||||
<div id="image_wrapper"></div>
|
||||
<span id="word2">{{ words[1]|e }}</span><br />
|
||||
<div class="foot">Copyright © RiddleKiller Ltd.<br>Features Kelson Sans font by <a href=http://www.fontfabric.com/>FontFabric.com/</a></div>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/jquery-1.7.2.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/penis.js') }}"></script>
|
||||
<!--<script type="text/javascript" src="{{ url_for('static', filename='js/home.js') }}"></script>-->
|
||||
</body>
|
||||
<head>
|
||||
<title>So.I.am-a.cat mind derailer</title>
|
||||
<style>
|
||||
@font-face{
|
||||
font-family: "TPBAFK"; src: url("http://so.i.am-a.cat/static/phont/gr82.otf") format('opentype');
|
||||
}
|
||||
body
|
||||
{
|
||||
text-align: center;
|
||||
background: #2b2b2b;
|
||||
}
|
||||
#word1
|
||||
{
|
||||
z-index:0;
|
||||
font-family: "TPBAFK";
|
||||
position:relative;
|
||||
margin-top: 25px;
|
||||
font-size: 46px;
|
||||
font-variant: small-caps;
|
||||
color: #eee;
|
||||
text-shadow: 1px 1px 1px black, -1px -1px 1px black, -1px 1px 1px black, 1px -1px 1px black;
|
||||
}
|
||||
#word2
|
||||
{
|
||||
z-index:0;
|
||||
font-family: 'TPBAFK';
|
||||
position:relative;
|
||||
font-size: 46px;
|
||||
font-variant: small-caps;
|
||||
color: #eee;
|
||||
text-shadow: 1px 1px 1px black, -1px -1px 1px black, -1px 1px 1px black, 1px -1px 1px black;
|
||||
}
|
||||
#image_wrapper
|
||||
{
|
||||
margin-top: -56px;
|
||||
margin-bottom: -60px;
|
||||
max-height: 580px;
|
||||
overflow: hidden;
|
||||
z-index:1;
|
||||
}
|
||||
#image_wrapper img
|
||||
{
|
||||
width: 520px;
|
||||
}
|
||||
.foot {
|
||||
font-size: 8px;
|
||||
color: #666;
|
||||
margin-top: 20px;
|
||||
z-index:1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>words = {{ words|jsonify }}; </script>
|
||||
<span id="word1">{{ words[0]|e }}</span>
|
||||
<div id="image_wrapper"></div>
|
||||
<span id="word2">{{ words[1]|e }}</span><br />
|
||||
<div class="foot">Copyright © RiddleKiller Ltd.<br>Features Kelson Sans font by <a href=http://www.fontfabric.com/>FontFabric.com/</a></div>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/jquery-1.7.2.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/penis.js') }}"></script>
|
||||
<!--<script type="text/javascript" src="{{ url_for('static', filename='js/home.js') }}"></script>-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,54 +1,55 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>HellYeah mind derailer</title>
|
||||
<style>
|
||||
n1 {
|
||||
z-index:1;
|
||||
position:absolute;
|
||||
vertical-align:30%;
|
||||
}
|
||||
n2 {
|
||||
z-index:1;
|
||||
position:absolute;
|
||||
vertical-align:bottom;
|
||||
}
|
||||
span {
|
||||
font-size: 40px;
|
||||
font-variant: small-caps;
|
||||
color: #eee;/*
|
||||
text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black;
|
||||
<head>
|
||||
<title>HellYeah mind derailer</title>
|
||||
<style>
|
||||
n1 {
|
||||
z-index:1;
|
||||
position:absolute;
|
||||
vertical-align:30%;
|
||||
}
|
||||
n2 {
|
||||
z-index:1;
|
||||
position:absolute;
|
||||
vertical-align:bottom;
|
||||
}
|
||||
span {
|
||||
font-size: 40px;
|
||||
font-variant: small-caps;
|
||||
color: #eee;/*
|
||||
text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black;
|
||||
|
||||
text-shadow: -4px 0 black, 0 4px black, 4px 0 black, 0 -4px black;
|
||||
text-shadow: -4px 0 black, 0 4px black, 4px 0 black, 0 -4px black;
|
||||
|
||||
text-shadow: -6px 0 black, 0 6px black, 6px 0 black, 0 -6px black; */
|
||||
text-shadow: 1px 1px black, -1px 1px black, 1px -1px black, -1px -1px black, 2px 2px black, -2px 2px black, 2px -2px black, -2px -2px black, 0px 2px black, -2px 0px black, 0px -2px black, 2px 0px black;
|
||||
}
|
||||
body {
|
||||
background: #2b2b2b;
|
||||
text-align: center;
|
||||
@font-face{ font-family: TPBAFK; src url("../fonts/TPBAFK-Regular.ttf")}
|
||||
}
|
||||
img { width: 500px; max-height: 640px; z-index:0;}
|
||||
.foot {
|
||||
font-size: 8px;
|
||||
color: #666;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>words = {{ words|jsonify }}; </script>
|
||||
<div id="image_wrapper">
|
||||
<n1>
|
||||
<span id="word1">{{ words[0]|e }}</span1>
|
||||
</n1> <br />
|
||||
<n2>
|
||||
<span id="word2">{{ words[1]|e }}</span2>
|
||||
</n2>
|
||||
</div>
|
||||
<div class="foot">Copyright © RiddleKiller Ltd.</div>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/jquery-1.7.2.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/penis.js') }}"></script>
|
||||
<!--<script type="text/javascript" src="{{ url_for('static', filename='js/home.js') }}"></script>-->
|
||||
</body>
|
||||
text-shadow: -6px 0 black, 0 6px black, 6px 0 black, 0 -6px black; */
|
||||
text-shadow: 1px 1px black, -1px 1px black, 1px -1px black, -1px -1px black, 2px 2px black, -2px 2px black, 2px -2px black, -2px -2px black, 0px 2px black, -2px 0px black, 0px -2px black, 2px 0px black;
|
||||
}
|
||||
body {
|
||||
background: #2b2b2b;
|
||||
text-align: center;
|
||||
@font-face{ font-family: TPBAFK; src url("../fonts/TPBAFK-Regular.ttf")}
|
||||
}
|
||||
img { width: 500px; max-height: 640px; z-index:0;}
|
||||
.foot {
|
||||
font-size: 8px;
|
||||
color: #666;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>words = {{ words|jsonify }}; </script>
|
||||
<div id="image_wrapper">
|
||||
<n1>
|
||||
<span id="word1">{{ words[0]|e }}</span1>
|
||||
</n1>
|
||||
<br />
|
||||
<n2>
|
||||
<span id="word2">{{ words[1]|e }}</span2>
|
||||
</n2>
|
||||
</div>
|
||||
<div class="foot">Copyright © RiddleKiller Ltd.</div>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/jquery-1.7.2.min.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ url_for('static', filename='js/penis.js') }}"></script>
|
||||
<!--<script type="text/javascript" src="{{ url_for('static', filename='js/home.js') }}"></script>-->
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue