mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-23 05:01:58 +00:00
enhancement
reduced recent_uploads to 5 records, added searchbar to frontpage. This closes #47
This commit is contained in:
@@ -25,6 +25,9 @@ INVENIO_THEME_TUGRAZ_ICON = 'images/icon_use.png'
|
|||||||
THEME_LOGO = 'images/tug_logo.png'
|
THEME_LOGO = 'images/tug_logo.png'
|
||||||
"""TU Graz logo"""
|
"""TU Graz logo"""
|
||||||
|
|
||||||
|
THEME_SEARCHBAR = False
|
||||||
|
"""Enable or disable the header search bar."""
|
||||||
|
|
||||||
THEME_HEADER_TEMPLATE = 'invenio_theme_tugraz/header.html'
|
THEME_HEADER_TEMPLATE = 'invenio_theme_tugraz/header.html'
|
||||||
"""TU Graz header template"""
|
"""TU Graz header template"""
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,25 @@
|
|||||||
|
|
||||||
{%- block page_body %}
|
{%- block page_body %}
|
||||||
|
|
||||||
|
|
||||||
|
{%- block frontpage_search %}
|
||||||
|
|
||||||
|
{%- block frontpage_form %}
|
||||||
|
<div class="ui center aligned grid">
|
||||||
|
<div class="eight wide column">
|
||||||
|
<form action="/search" class="ui form">
|
||||||
|
<div class="ui fluid big action input">
|
||||||
|
<input type="text" name="q" class="form-control" placeholder="{{ _("Type and press enter to search") }}">
|
||||||
|
<button type="submit" class="ui icon search button"><i class="search icon"></i></button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="ui divider hidden"></div>
|
||||||
|
{%- endblock frontpage_form %}
|
||||||
|
|
||||||
|
{%- endblock frontpage_search %}
|
||||||
|
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
|
|
||||||
<div class="ui stackable grid">
|
<div class="ui stackable grid">
|
||||||
@@ -66,7 +85,11 @@
|
|||||||
{%- if not loop.last %}
|
{%- if not loop.last %}
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
{%- else%}
|
{%- else%}
|
||||||
<a href="{{url_for('invenio_search_ui.search')}}" class="ui right floated button">{{_('More')}}</a>
|
<div class="ui center aligned grid">
|
||||||
|
<div class="eight wide column">
|
||||||
|
<a href="{{url_for('invenio_search_ui.search')}}" class="ui right floated button">{{_('More')}}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -26,4 +26,4 @@ def index():
|
|||||||
"""Render frontpage view."""
|
"""Render frontpage view."""
|
||||||
return render_template(
|
return render_template(
|
||||||
"invenio_theme_tugraz/index.html",
|
"invenio_theme_tugraz/index.html",
|
||||||
records=FrontpageRecordsSearch()[:10].sort('-_created').execute(),)
|
records=FrontpageRecordsSearch()[:5].sort('-_created').execute(),)
|
||||||
|
|||||||
Reference in New Issue
Block a user