quest page uses logical divs instead of a table

This commit is contained in:
iou1name 2018-06-26 00:29:10 -04:00
parent 2386d54c3d
commit 7bcf9d3007
4 changed files with 24 additions and 31 deletions

View File

@ -4,7 +4,6 @@ img {
}
.header {
display: initial;
position: fixed;
top: 0;
left: 0;
@ -20,7 +19,6 @@ img {
}
#headerHidden {
display: none;
width: auto;
}
@ -29,25 +27,21 @@ img {
overflow: auto;
}
#questBody {
#questPane {
padding-left: 10px;
padding-right: 32%;
}
#questPosts {
border-spacing: 15px;
.questPost {
display: flex;
}
.questPostTime {
vertical-align: top;
.questPostMeta {
white-space: nowrap;
}
.questPostData {
vertical-align: top;
}
#newQPostArea {
padding-left: 20px;
}
#chatPane {

View File

@ -84,27 +84,24 @@
{% endblock %}
{% block content %}
<div id="questContainer">
<div id="questBody">
<table id="questPosts">
<td></td>
<td><center><h1>{{ quest_title }}</h1></center></td>
<div id="questPane">
<center><h1>{{ quest_title }}</h1></center>
{% for quest_post in quest_posts %}
<tr>
<td class="questPostTime">
{{ quest_post[3] | strftime }}
{% if session.get("user_id") == owner_id %}
<br /><a href="javascript:void(0);" onclick="edit_post('{{ quest_post[0] }}')">Edit</a>
<a href="javascript:void(0);" id="savePost-{{ quest_post[0] }}" onclick="save_post('{{ quest_post[0] }}')" style="display:none;">Save</a>
{% endif %}
</td>
<td class="questPostData" id="questPostData-{{ quest_post[0] }}">
{% autoescape false %}
{{ quest_post[2] }}
{% endautoescape %}
</td>
</tr>
<div class="questPost">
<div class="questPostMeta">
{{ quest_post[3] | strftime }}
{% if session.get("user_id") == owner_id %}
<br /><a href="javascript:void(0);" onclick="edit_post('{{ quest_post[0] }}')">Edit</a>
<a href="javascript:void(0);" id="savePost-{{ quest_post[0] }}" onclick="save_post('{{ quest_post[0] }}')" style="display:none;">Save</a>
{% endif %}
</div>
<div class="questPostData" id="questPostData-{{ quest_post[0] }}">
{% autoescape false %}
{{ quest_post[2] }}
{% endautoescape %}
</div>
</div><br />
{% endfor %}
</table>
{% if session.get("user_id") == owner_id %}
<div id="postTextDiv">
<textarea id="postTextArea"></textarea><br />

View File

@ -40,7 +40,8 @@ def handle_img(post):
for chunk in res.iter_content(100000):
file.write(chunk)
alt_text = os.path.basename(url)
img_tag = f'<img src="/img/{fname}" alt="{alt_text}" />'
img_tag = f'<img src="/img/{fname}" alt="{alt_text}" '
img_tag += f'title="{alt_text}" />'
except requests.exceptions:
img_tag = "INVALID_IMG_URL"
except assertion:

View File

@ -117,6 +117,7 @@ def edit_quest(quest_title):
return render_template("edit_quest.html",
quest_title=quest_title,
ident_title=ident_title)
return redirect(url_for(".quest", quest_title=ident_title))
@views.route("/set_session")