Browse Source

updated styling potential pdfs

ansible-setup-and-deploy
nberting 6 years ago
parent
commit
5fbdb06665
  1. 5
      app/static/css/style.css
  2. 27
      app/templates/potential_pdf.html
  3. 3
      app/templates/red_link.html
  4. 8
      app/templates/results.html
  5. 4
      app/templates/show_books.html
  6. 4
      app/views.py

5
app/static/css/style.css

@ -15,6 +15,11 @@ a{
text-decoration: none; text-decoration: none;
color: black; color: black;
} }
a:hover{
text-decoration: underline;
color: #0000FF;
}
.navigation ul{ .navigation ul{
list-style-type: none; list-style-type: none;

27
app/templates/potential_pdf.html

@ -13,27 +13,17 @@
</style> </style>
<title>XPPL</title> <title>XPPL</title>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head> </head>
<body> <body>
<div class="container" style="padding:20px;"> <div class="container" style="padding:10px; border-style:dashed; border-width:1px;">
<h1 style='font-family: Archivo Narrow; text-align: center;'>A Potential Collection</h1> <h1 style='font-family: Archivo Narrow; text-align: center;'>Potential Books</h1>
<h3 style='font-family: Archivo Narrow; text-align: center;'>Every book ever requested by XPPL librarians: </h3>
<div style='font-family: Courier New; text-align: center;'> <h3 style='font-family: Archivo Narrow; text-align: center;'>Archiving the gaps in the XPPL library: </h3>
<p> {% for pbook in pbooks %}{{ pbook.ptitle }} requested on: {{ pbook.time }} <div style='font-family: Courier New; text-align: center; font-size: 10pt;'>
<p> {% for pbook in pbooks %}"{{ pbook.ptitle }}" requested on: {{ pbook.time|string|truncate(17,true," ")}}
</p>{% endfor %} </p>{% endfor %}
</div> </div>
<div style=" font-family: Archivo Narrow; padding-left: 40%">
</body>
<br>
<div class="footer" style="padding-left: 40%">
<pre> <pre>
, , , ,
/////| /////|
@ -46,5 +36,8 @@
|===|/ |===|/
'---' '---'
</pre> </pre>
</body>
<br>
</div> </div>
</html> </html>

3
app/templates/red_link.html

@ -70,6 +70,7 @@
{{ form.upload }} {{ form.upload }}
{{ form.wish }} {{ form.wish }}
</form> </form>
<p><a href="{{ url_for('home') }}">go back home</a>?</p> <br>
<p><a href="{{ url_for('home') }}" style="font-size: 9pt;>go back home</a>?</p>
</div> </div>
{% endblock %} {% endblock %}

8
app/templates/results.html

@ -36,7 +36,7 @@
<th width="70px;">Cover</th> <th width="70px;">Cover</th>
<th>Title</th> <th>Title</th>
<th width="400px;">Author</th> <th width="400px;">Author</th>
<th width="100px;">Filetype</th> <th width="100px;">Year</th>
<th width="100px;">Category</th> <th width="100px;">Category</th>
<th width="100px;">Stack</th> <th width="100px;">Stack</th>
<th width="100px;">Add to stack</th> <th width="100px;">Add to stack</th>
@ -53,7 +53,7 @@
<li><a href="{{url_for('show_author_by_id', id=author.id)}}">{{ author.author_name }}</a> </li> <li><a href="{{url_for('show_author_by_id', id=author.id)}}">{{ author.author_name }}</a> </li>
{% endfor %}</td> {% endfor %}</td>
<td>{{ book.fileformat }}</td> <td>{{ book.year_published }}</td>
<td>{{ book.category}}</td> <td>{{ book.category}}</td>
<td> {% for stack in book.stacks %} <td> {% for stack in book.stacks %}
@ -78,7 +78,7 @@
<th width="70px;">Cover</th> <th width="70px;">Cover</th>
<th>Title</th> <th>Title</th>
<th width="400px;">Author</th> <th width="400px;">Author</th>
<th width="100px;">Filetype</th> <th width="100px;">Year</th>
<th width="100px;">Category</th> <th width="100px;">Category</th>
<th width="100px;">Stack</th> <th width="100px;">Stack</th>
<th width="100px;">Add to stack</th> <th width="100px;">Add to stack</th>
@ -94,7 +94,7 @@
<li><a href="{{url_for('show_author_by_id', id=author.id)}}">{{ author.author_name }}</a> </li> <li><a href="{{url_for('show_author_by_id', id=author.id)}}">{{ author.author_name }}</a> </li>
{% endfor %}</td> {% endfor %}</td>
<td>{{ book.fileformat }}</td> <td>{{ book.year_published }}</td>
<td>{{ book.category}}</td> <td>{{ book.category}}</td>
<td> {% for stack in book.stacks %} <td> {% for stack in book.stacks %}

4
app/templates/show_books.html

@ -32,7 +32,7 @@
<th width="70px;">Cover</th> <th width="70px;">Cover</th>
<th>Title</th> <th>Title</th>
<th width="400px;">Author</th> <th width="400px;">Author</th>
<th width="100px;">Filetype</th> <th width="100px;">Year</th>
<th width="100px;">Category</th> <th width="100px;">Category</th>
<th width="100px;">Stack</th> <th width="100px;">Stack</th>
<th width="100px;">Add to a stack</th> <th width="100px;">Add to a stack</th>
@ -56,7 +56,7 @@
<li><a href="{{url_for('show_author_by_id', id=author.id)}}">{{ author.author_name }}</a> </li> <li><a href="{{url_for('show_author_by_id', id=author.id)}}">{{ author.author_name }}</a> </li>
{% endfor %}</td> {% endfor %}</td>
<td id='fileformat'>{{ book.fileformat }}</td> <td id='fileformat'>{{ book.year_published }}</td>
<td>{{ book.category}}</td> <td>{{ book.category}}</td>
<td> <td>
{% for stack in book.stacks %} {% for stack in book.stacks %}

4
app/views.py

@ -430,8 +430,10 @@ def search_results(searchtype, query, viewby):
# results=Book.query.whoosh_search(query) # results=Book.query.whoosh_search(query)
results=Book.query.filter(Book.title.contains(query)) results=Book.query.filter(Book.title.contains(query))
results=results.union(Book.query.filter(Book.category.contains(query))) results=results.union(Book.query.filter(Book.category.contains(query)))
results=results.union(Book.query.filter(Book.year_published.contains(query)))
results=results.union(db.session.query(Book).join(Book.authors).filter(Author.author_name.contains(query))) results=results.union(db.session.query(Book).join(Book.authors).filter(Author.author_name.contains(query)))
results=results.union(db.session.query(Book).join(Book.stacks).filter(Stack.stack_name.contains(query))).order_by(Book.title) results=results.union(db.session.query(Book).join(Book.stacks).filter(Stack.stack_name.contains(query)))
results=results.union(db.session.query(Book).join(Book.stacks).filter(Stack.stack_description.contains(query))).order_by(Book.title)
if results.count() == 0: if results.count() == 0:
upload_form = UploadForm(title= query, author='') upload_form = UploadForm(title= query, author='')

Loading…
Cancel
Save