Browse Source

fixed mistake with socket port

ansible-setup-and-deploy
nberting 6 years ago
parent
commit
45800d46e7
  1. 2
      app/templates/base.html
  2. 16
      app/templates/red_link.html
  3. 7
      app/templates/show_book_detail.html

2
app/templates/base.html

@ -60,7 +60,7 @@ console.log(time)
return ('0'+time.getDate()).slice(-2) + '.' + ('0'+(time.getMonth()+1)).slice(-2) + '.' + time.getFullYear() +" " + ('0'+time.getHours()).slice(-2)+":"+ ('0'+time.getMinutes()).slice(-2);
}
//change addr when ONLINE::::::->
var socket = io.connect('http://localhost:8080');
var socket = io.connect('http://localhost:5000');
var app = new Vue({
el: "#app",
delimiters: ['[[', ']]'],

16
app/templates/red_link.html

@ -5,14 +5,14 @@
{% block css %}
<style type="text/css">
body{
padding-top: 40px;
padding-top: 20px;
}
h1, p{
text-align:center;
text-align:left;
}
h1{
font-size:44px;
margin:75px 0 50px;
margin:40px 0 30px;
}
p{
font-size:14px;
@ -24,13 +24,9 @@
{% block header %}{% endblock %}
{% block main %}
<h1>We don't have any results for: {{ title }}</h1>
<p><a href="{{ url_for('add_book') }}">upload</a>?</p>
<p><a href="{{ url_for('home') }}">go back home</a>?</p>
<h1>Nothing in the library yet with: {{ title }}</h1>
<h2>Add this potential book:</h2>
<div class="container">
<h1 class="page-header">Add Book</h1>
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="alert alert-danger">
@ -42,6 +38,7 @@
</div>
{% endif %}
{% endwith %}
<div style="width: 200px:"
<form method="POST" action="{{ url_for('add_book') }}" enctype=multipart/form-data>
{{ form.csrf_token }}
<div class="form-group">{{ form.title.label }} {{ form.title(size=20, class="form-control") }}</div>
@ -68,5 +65,6 @@
{{ form.upload }}
{{ form.wish }}
</form>
<p><a href="{{ url_for('home') }}">go back home</a>?</p>
</div>
{% endblock %}

7
app/templates/show_book_detail.html

@ -2,10 +2,10 @@
{% block main %}
<div class="container">
<h1 class="header">{{ book.title }}</h1>
<img class="no_cover" id="{{ book.title }}" src="../uploads/cover/{{ book.cover }}" width="150" onerror="if (this.src != '../uploads/cover/{{ book.cover }}') this.src = '../static/img/default_cover.gif';">
<img class="no_cover" id="{{ book.title }}" src="../uploads/cover/{{ book.cover }}" width="180" onerror="if (this.src != '../uploads/cover/{{ book.cover }}') this.src = '../static/img/default_cover.gif';">
<p>Year published: {{ book.year_published }}</p>
<p>Author(s): <ul>{% for author in book.authors %}
<li><a href="{{url_for('show_author_by_id', id=author.id)}}">{{ author.author_name }}</a> </li>
@ -13,9 +13,8 @@
{% endfor %}</ul></p>
<p>Category: {{ book.category }}</p>
<p>Year published: {{ book.year_published }}</p>
<p>Stack(s): <ul>{% for stack in book.stacks %}
<p>Included in stack(s): <ul>{% for stack in book.stacks %}
<li><a href="{{url_for('show_stack_by_id', id=stack.id)}}">{{ stack.stack_name }}</a>
<p style="font-size: 10px;"><a href='{{url_for('remove_from_stack', stackid=stack.id, bookid=book.id)}}'> Remove from stack</a></p>

Loading…
Cancel
Save