Browse Source

GRADIENT

ansible-setup-and-deploy
Alex 7 years ago
parent
commit
87e88ead59
  1. 0
      176_Tilo_Arens_Rolf_Busam_Frank_Hettlich_Christianb-ok.xyz.txt
  2. 42
      app/static/css/style.css
  3. 2
      app/templates/add_book.html
  4. 25
      app/templates/base.html
  5. 4
      app/templates/home.html
  6. 2
      app/templates/scape.html
  7. 38
      app/templates/show_book_detail.html
  8. 12
      app/views.py
  9. 2
      init_db.sh
  10. BIN
      whoosh/Book/MAIN_071mbyqoitijmyv4.seg
  11. BIN
      whoosh/Book/MAIN_2a7vygakwdvdefoe.seg
  12. BIN
      whoosh/Book/MAIN_5id3ip2mvmsu2mbl.seg
  13. BIN
      whoosh/Book/MAIN_6bsjkp9xdes7zrrx.seg
  14. BIN
      whoosh/Book/MAIN_es8t5xyup7nfqm7j.seg
  15. BIN
      whoosh/Book/MAIN_hljrpqpa46dk3vgc.seg
  16. BIN
      whoosh/Book/MAIN_p6r8oedtat7ay25v.seg
  17. BIN
      whoosh/Book/MAIN_q0ohjvxyt5ufv1vl.seg
  18. BIN
      whoosh/Book/_MAIN_293.toc

0
whoosh/Book/MAIN_WRITELOCK → 176_Tilo_Arens_Rolf_Busam_Frank_Hettlich_Christianb-ok.xyz.txt

42
app/static/css/style.css

@ -242,7 +242,7 @@ div.marquee > div.marquee-text {
position: fixed;
bottom: 0;
right: 0;
width: 30%;
width: 25%;
height: 100%;
}
@ -254,7 +254,7 @@ div.marquee > div.marquee-text {
padding: 10px;
margin: 0px;
height: 100%;
background-color: #b4b9be;
/*background-color: #b4b9be;*/
overflow-y: scroll;
overflow-x: hidden;
color: white;
@ -265,6 +265,43 @@ div.marquee > div.marquee-text {
z-index: -100000;
}
.messageback1{
position: absolute;
bottom: 40px;
display: block;
width:100%;
padding: 0px;
margin: 0px;
height: 100%;
background-color: #b4b9be;
overflow-y: scroll;
overflow-x: hidden;
color: white;
word-wrap:break-word;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
z-index: -100000;}
.messageback2{
position: absolute;
bottom: 40px;
display: block;
width:100%;
padding: 0px;
margin: 0px;
height: 100%;
background-color: #b4b9be;
overflow-y: scroll;
overflow-x: hidden;
color: white;
word-wrap:break-word;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
z-index: -100000;}
.new-message {
position: absolute;
bottom: 0;
@ -273,6 +310,7 @@ width:100%;
margin:0;
padding:0;
z-index: 100000;
opacity: 1!important;
}
.control{
display: block;

2
app/templates/add_book.html

@ -36,7 +36,7 @@ function outputUpdate3(gender) {
<div class="form-group">Title:* <br> {{ form.title (size=50, class="form-control") }}</div>
<br>
<div data-toggle="fieldset" id="phone-fieldset">
Author(s):* <button type="button" data-toggle="fieldset-add-row data-target="#phone-fieldset">+</button>
Author(s):* <button type="button" data-toggle="fieldset-add-row" data-target="#phone-fieldset">+</button>
<table>
<tr>
<th></th>

25
app/templates/base.html

@ -99,6 +99,31 @@ socket.on('connect', function() {
});
socket.on('channel-' + app.channel, function(msg) {
console.log("new: "+msg.text)
$(".messageback1").each(function() {
var oldColor = $(this).css("background-color");
var randomColor = colorHash(msg.text).rgb;
console.log("old: "+oldColor)
console.log("new: "+randomColor)
$(this).css({
background: "-webkit-gradient(linear, left top, left bottom, from("+oldColor+"), to("+randomColor+"))",
backgroundColor: randomColor
});
$('.messageback2').animate({
opacity: 0
}, 1000, function() {
$('.messageback2').css({background: "-webkit-gradient(linear, left top, left bottom, from("+oldColor+"), to("+randomColor+"))", opacity: 1})
});
});
// Add new message to HTML
let my_messages = app.messages;
my_messages.push({

4
app/templates/home.html

@ -25,7 +25,10 @@ This might only be one interface to this library:
</div>
<div id="app" class="container">
<div class="messageback1"></div>
<div class="messageback2"></div>
<section class="messages">
<div v-for="message in messages" class="box">
<article class="media">
<div class="media-content">
@ -38,6 +41,7 @@ This might only be one interface to this library:
</div>
</article>
</div>
</section>
<section class="new-message">
<div class="field has-addons">

2
app/templates/scape.html

@ -74,7 +74,7 @@
<div class = "drag" id = "{{ book.id }}" style="position: absolute;width:70px;height:auto; top:{{ book.scapeY }}px; left:{{ book.scapeX }}px;">
<img class="no_cover" id="{{ book.title }}" src="../uploads/cover/{{ book.cover }}" style="width:100%;height:auto;" onerror="if (this.src != '../static/img/default_cover.png') this.src = '../static/img/default_cover.png';">
<img class="no_cover" id="{{ book.title }}" src="../uploads/cover/{{ book.cover }}" style="width:100%;height:auto;" onerror="if (this.src != '../static/img/default_cover.gif') this.src = '../static/img/default_cover.gif';">
<p class="booktitle" style="font-size:7px;"><a href="books/{{ book.id }}">{{ book.title }}</a></p>
{% set got = {} %}

38
app/templates/show_book_detail.html

@ -62,30 +62,28 @@
<td>How much time has been spent with this item?<br></td>
<td>{{ book.time or '?' }} </td>
</tr>
<tr>
<td>Instances:</td>
<td>{% set got = {} %}
{% set all = 1 %}
{% for instance in book.instances %}
</tbody>
</table>
{% if instance.name in got %}
{% set x=got.__setitem__(instance.name, got[instance.name]+1) %}
{% else %}
{% set x=got.__setitem__(instance.name, 1) %}
{% endif %}
{% set all = loop.index %}
{% endfor %}
<a href="../uploads/{{ book.file }}">download {{ book.fileformat }}</a>
<br>
<br>
<p>Instances:</p>
{% set got = {} %}
{% set all = 1 %}
{% for instance in book.instances %}
{% for instance, value in got.items() %}
{% set result = value/(book.instances|length) %}
{{ instance }}: {{ (result*100)|round|int }}%<br>
{% endfor %}</td>
{% if instance.name in got %}
{% set x=got.__setitem__(instance.name, got[instance.name]+1) %}
{% else %}
{% set x=got.__setitem__(instance.name, 1) %}
{% endif %}
{% set all = loop.index %}
{% endfor %}
</tbody>
</table>
{% for instance, value in got.items() %}
{% set result = value/(book.instances|length) %}
{{ instance }}: {{ (result*100)|round|int }}%<br>
{% endfor %}
<br>

12
app/views.py

@ -258,7 +258,9 @@ def add_book():
sameness = upload_form.sameness.data
gender = upload_form.gender.data
diversity = upload_form.diversity.data
time = upload_form.time.data
time = None
if time:
time = upload_form.time.data
who = upload_form.who.data
if year_published=="":
@ -677,9 +679,11 @@ def import_csv():
year_published = int(row['year_published'])
else:
year_published = None;
book = Book(row['title'], row['file'], cover, row['fileformat'], row['category'],year_published, None, None, None, None, None, None)
book.scapeX = float(row['scapeX'])
book.scapeY = float(row['scapeY'])
book = Book(row['title'], row['file'], cover, row['fileformat'], row['category'], year_published, None, None, None, None, None, None)
if row['scapeX']:
book.scapeX = float(row['scapeX'])
if row['scapeY']:
book.scapeY = float(row['scapeY'])
db.session.add(book)
numberadded = numberadded+1

2
init_db.sh

@ -1,5 +1,5 @@
#!/bin/bash
rm app/mydatabase.db
#rm app/mydatabase.db
mkdir -p app/uploads/cover
chmod 777 app/uploads/
chmod 777 app/uploads/cover

BIN
whoosh/Book/MAIN_071mbyqoitijmyv4.seg

Binary file not shown.

BIN
whoosh/Book/MAIN_2a7vygakwdvdefoe.seg

Binary file not shown.

BIN
whoosh/Book/MAIN_5id3ip2mvmsu2mbl.seg

Binary file not shown.

BIN
whoosh/Book/MAIN_6bsjkp9xdes7zrrx.seg

Binary file not shown.

BIN
whoosh/Book/MAIN_es8t5xyup7nfqm7j.seg

Binary file not shown.

BIN
whoosh/Book/MAIN_hljrpqpa46dk3vgc.seg

Binary file not shown.

BIN
whoosh/Book/MAIN_p6r8oedtat7ay25v.seg

Binary file not shown.

BIN
whoosh/Book/MAIN_q0ohjvxyt5ufv1vl.seg

Binary file not shown.

BIN
whoosh/Book/_MAIN_293.toc

Binary file not shown.
Loading…
Cancel
Save