mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Added new preview images
This commit is contained in:
@@ -21,6 +21,7 @@ from interface import views
|
|||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path("", views.index, name="index"),
|
path("", views.index, name="index"),
|
||||||
|
path("/<query>", views.index, name="index"),
|
||||||
path("sort/<_order>", views.index, name="index"),
|
path("sort/<_order>", views.index, name="index"),
|
||||||
path("download/<pk>", views.download, name="download"),
|
path("download/<pk>", views.download, name="download"),
|
||||||
path("favorite/<pk>", views.favorite, name="favorite"),
|
path("favorite/<pk>", views.favorite, name="favorite"),
|
||||||
|
|||||||
BIN
src/interface/static/img/navbar.png
vendored
Normal file
BIN
src/interface/static/img/navbar.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
7
src/interface/static/js/pyshelf_ux.js
vendored
7
src/interface/static/js/pyshelf_ux.js
vendored
@@ -80,4 +80,11 @@ $(document).ready(function(){
|
|||||||
var textSelected = optionSelected.text();
|
var textSelected = optionSelected.text();
|
||||||
window.location.href="/"+valueSelected
|
window.location.href="/"+valueSelected
|
||||||
});
|
});
|
||||||
|
$('#btn-home').on("click", function(){
|
||||||
|
console.log('Home Pressed');
|
||||||
|
_location = $(this).attr('data-location');
|
||||||
|
$('#_order').val(null);
|
||||||
|
$('#_search').val(null);
|
||||||
|
window.location.href=_location;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
2
src/interface/templates/index.html
vendored
2
src/interface/templates/index.html
vendored
@@ -39,7 +39,7 @@
|
|||||||
<h1 class="app_hdr" id="hdr_branding">pyShelf {{Version}}</h1>
|
<h1 class="app_hdr" id="hdr_branding">pyShelf {{Version}}</h1>
|
||||||
<div class="hdr_nav" id="hdr_nav_center">
|
<div class="hdr_nav" id="hdr_nav_center">
|
||||||
<ul id="tab_nav_menu">
|
<ul id="tab_nav_menu">
|
||||||
<li class="nav_menu_tab active_tab" onclick="window.location.href = '/'"><i class="fas fa-home"></i> Home</li>
|
<li class="nav_menu_tab active_tab" id="btn-home" data-location="/?query=0"><i class="fas fa-home"></i> Home</li>
|
||||||
<li class="nav_menu_tab"><i class="fas fa-layer-group"></i> Collections</li>
|
<li class="nav_menu_tab"><i class="fas fa-layer-group"></i> Collections</li>
|
||||||
<li class="nav_menu_tab"><i class="fas fa-star"></i> Favorites</li>
|
<li class="nav_menu_tab"><i class="fas fa-star"></i> Favorites</li>
|
||||||
<li class="nav_menu_tab"><i class="fas fa-bug"></i> Bug report</li>
|
<li class="nav_menu_tab"><i class="fas fa-bug"></i> Bug report</li>
|
||||||
|
|||||||
@@ -239,13 +239,13 @@ def payload(request, query, _set, _limit, _order):
|
|||||||
"""
|
"""
|
||||||
Return formatted data to template
|
Return formatted data to template
|
||||||
"""
|
"""
|
||||||
|
breakpoint()
|
||||||
_set = int(_set)
|
_set = int(_set)
|
||||||
if _set < 1: _set = 1
|
if _set < 1: _set = 1
|
||||||
if _limit is None: _limit = 20
|
if _limit is None: _limit = 20
|
||||||
_set_max = int(_set) * _limit
|
_set_max = int(_set) * _limit
|
||||||
_set_min = _set_max - _limit
|
_set_min = _set_max - _limit
|
||||||
_now_showing = "%s-%s"%(_set_min, _set_max)
|
_now_showing = "%s-%s"%(_set_min, _set_max)
|
||||||
|
|
||||||
if query:
|
if query:
|
||||||
if query != request.session.get('cached_query'):
|
if query != request.session.get('cached_query'):
|
||||||
request.session['cached_query'] = query
|
request.session['cached_query'] = query
|
||||||
|
|||||||
Reference in New Issue
Block a user