small style changes

This commit is contained in:
Cristina Cochior 2019-05-13 01:45:35 +02:00
parent cdb86d12b2
commit a4e95e34b3
10 changed files with 59 additions and 46 deletions

BIN
.DS_Store vendored

Binary file not shown.

Binary file not shown.

View File

@ -100,7 +100,7 @@ def home():
sessionid = "current_user.id"
#add the very first time of connection to the interface
# if veryfirstnow is None :
session['veryfirstnow'] = datetime.now()
session['veryfirstnow'] = datetime.now()
return render_template('home.html')
def functionsession():
return(session)
@ -130,6 +130,7 @@ def description():
#open json file, list filepaths in array and loop with thefile
textfile=""
textfiles=[]
with open("static/"+jsonfilefordescription, 'r') as f:
data_dict = json.load(f)
datafromjson = data_dict["files"]
@ -139,12 +140,9 @@ def description():
if file.lower().endswith(('.html')):
with open("static/"+file,"r", encoding='utf-8') as f:
textfile = f.read()
# wordlinked = "<a href='/diverge?search="+word+"'>"+word+"</a>"
# textfile = re.sub(word, wordlinked, textfile)
textfile = Markup(textfile)
return render_template('description.html', datafromjson=datafromjson, itemid=itemid, textfile=textfile, idno=idno)
textfiles.append(textfile)
return render_template('description.html', datafromjson=datafromjson, itemid=itemid, textfiles=textfiles, idno=idno)
@app.route('/diverge', methods=['GET'])
def diverge():
@ -180,7 +178,7 @@ def get_file():
veryfirstnow = session['veryfirstnow']
tadam = None
for t in timelist :
for t in timelist :
t = str(t)
yo = dt.datetime.strptime(t, '%Y-%m-%d %H:%M:%S.%f')
timelistforoperations.append(yo)
@ -223,12 +221,12 @@ def get_file():
#If fullscore length superior 60 characters, insert linebreak
# Defining splitting point
# Defining splitting point
n = 60
# Using list comprehension
# Using list comprehension
out = [(fullscore[i:i+n]) for i in range(0, len(fullscore), n)]
#joining the strings with linebreaks
tadam = '\n'.join(out)
tadam = '\n'.join(out)
# have a message in file if no nav has been recorded so it's less dull than error page
if tadam is None:
tadam = "This score is Null"

BIN
fonts/SelectricMono.otf Normal file

Binary file not shown.

BIN
fonts/whois-mono.ttf Normal file

Binary file not shown.

View File

@ -1,11 +1,21 @@
@font-face {
font-family: 'whois-mono';
src: url('../../fonts/whois-mono.ttf');
}
@font-face {
font-family: 'SelectricMono';
src: url('../../fonts/SelectricMono.otf');
}
body{
background: #ffffff;
color:blue;
font-family: 'whois-mono';
}
a{
/*text-decoration: none;*/
text-decoration: none;
}
@ -19,9 +29,18 @@ li a{
li a:hover{
color: orange;
}
img{
max-width: 500px;
}
div{
/* width: 80%; */
margin:0 auto;
padding: 1em 2em 1em;
}
.diverge{
margin-left: 1em;
}

View File

@ -3,40 +3,36 @@
<div class="description">
<h2 style = "text-align: center;">{{ itemid }}</h2>
<!--passing files-->
<p>{{ datafromjson }}</p>
<!--passing files
<p>{{ datafromjson }}</p>-->
<div class="col-lg-3 col-md-4 col-xs-6 thumb">
<div class="col-lg-3 col-md-4 col-xs-6 thumb">
{% set count=[0] %}
{% for item in datafromjson %}
{% for item in datafromjson %}
{% if item.lower().endswith(('.png', '.jpg', '.jpeg')) %}
<div>
<img class="img-responsive" src=" ../{{ item }}">
</div>
{% if item.lower().endswith(('.png', '.jpg', '.jpeg')) %}
<div>
<img class="img-responsive" src=" ../{{ item }}">
</div>
{% elif item.lower().endswith(('.mp4')) %}
<div>
<video width="320" height="240" controls><source src="../{{ item }}" type="video/mp4">Your browser does not support the video tag.</video>
</div>
{% elif item.lower().endswith(('.mp4')) %}
<div><video width="320" height="240" controls><source src="../{{ item }}" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
{% elif item.lower().endswith(('.mp3')) %}
<div>
<audio controls><source src="../{{ item }}" type="audio/mpeg">Your browser does not support the audio tag.</audio>
</div>
{% elif item.lower().endswith(('.mp3')) %}
<div><audio controls><source src="../{{ item }}" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
</div>
{% endif %}
{% elif item.lower().endswith(('.html')) %}
{{ textfiles[count[0]] }}
{% if count.append(count.pop() + 1) %}{% endif %}
<br/><br/><br/>
{% endif %}
{% endfor %}
{% endfor %}
</div>
{% if textfile is defined %}
{{ textfile }}
{% endif %}
</div>
{% endblock %}
{% endblock %}

View File

@ -8,9 +8,9 @@
{% for item in wordlist_dict[word] %}
{% set address = "/description?id=" + item['id'] %}
<a href={{address}}>
<a href={{address}} class="diverge">
{{ item['sentence'] }}
</a><br>
</a><br/><br/><br/>
{% endfor %}
{% endif %}

View File

@ -2,10 +2,10 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>P.u.s.h.i.n.g.S.c.o.r.e.s</title>
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"> -->
</head>
<body>
<header>