Browse Source

small style changes

master
Cristina Cochior 6 years ago
parent
commit
a4e95e34b3
  1. BIN
      .DS_Store
  2. BIN
      __pycache__/config.cpython-37.pyc
  3. BIN
      __pycache__/contextualise.cpython-37.pyc
  4. 8
      contextualise.py
  5. BIN
      fonts/SelectricMono.otf
  6. BIN
      fonts/whois-mono.ttf
  7. 25
      static/css/main.css
  8. 30
      templates/description.html
  9. 4
      templates/diverge.html
  10. 4
      templates/layout.html

BIN
.DS_Store

Binary file not shown.

BIN
__pycache__/config.cpython-37.pyc

Binary file not shown.

BIN
__pycache__/contextualise.cpython-37.pyc

Binary file not shown.

8
contextualise.py

@ -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():

BIN
fonts/SelectricMono.otf

Binary file not shown.

BIN
fonts/whois-mono.ttf

Binary file not shown.

25
static/css/main.css

@ -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;
}

30
templates/description.html

@ -3,12 +3,12 @@
<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">
{% set count=[0] %}
{% for item in datafromjson %}
{% if item.lower().endswith(('.png', '.jpg', '.jpeg')) %}
@ -17,26 +17,22 @@
</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>
<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>
<audio controls><source src="../{{ item }}" type="audio/mpeg">Your browser does not support the audio tag.</audio>
</div>
{% endif %}
{% endfor %}
{% if textfile is defined %}
{{ textfile }}
{% elif item.lower().endswith(('.html')) %}
{{ textfiles[count[0]] }}
{% if count.append(count.pop() + 1) %}{% endif %}
<br/><br/><br/>
{% endif %}
{% endfor %}
</div>
{% endblock %}

4
templates/diverge.html

@ -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 %}

4
templates/layout.html

@ -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>

Loading…
Cancel
Save