feat: update HTTP handlers and templates for shelf model
This commit is contained in:
@@ -40,10 +40,6 @@
|
||||
.group { padding:10px 14px 4px; font-size:11px; letter-spacing:0.04em; color: var(--text-tertiary); }
|
||||
.row { display:flex; align-items:center; gap:10px; padding:5px 14px; font-size:13px; }
|
||||
.glyph { font-size:15px; color:var(--text-tertiary); width:16px; }
|
||||
.pill { padding:1px 7px; border-radius:var(--radius-md); font-size:11px; }
|
||||
.pill.want { background:var(--bg-info); color:var(--text-info); }
|
||||
.pill.reading { background:var(--bg-warning); color:var(--text-warning); }
|
||||
.pill.read { background:var(--bg-success); color:var(--text-success); }
|
||||
.title { flex:1; min-width:0; }
|
||||
.muted { color:var(--text-tertiary); }
|
||||
.tags { color:var(--text-info); font-size:12px; }
|
||||
@@ -66,30 +62,22 @@
|
||||
<div class="frame">
|
||||
<div class="titlebar">
|
||||
<span style="font-weight:500;">spine</span>
|
||||
<span class="muted">{{total_books}} books · {{reading_count}} reading</span>
|
||||
<span class="muted">{{total_books}} books · {{shelf_count}} shelves</span>
|
||||
</div>
|
||||
|
||||
{{#current_filter}}
|
||||
<div class="filter-bar">
|
||||
<a href="/index">Concise view</a>
|
||||
</div>
|
||||
{{/current_filter}}
|
||||
{{^current_filter}}
|
||||
<div class="filter-bar">
|
||||
<a href="/index?filter=all">All books ({{total_books}})</a>
|
||||
<a href="/index"{{^current_shelf}} style="font-weight:600"{{/current_shelf}}>All</a>
|
||||
{{#shelf_nav}}
|
||||
·
|
||||
<a href="/index?filter=want">Want list</a>
|
||||
·
|
||||
<a href="/index?filter=read">Read ({{reading_count}})</a>
|
||||
<a href="{{href}}"{{#current}} style="font-weight:600"{{/current}}>{{name}}</a>
|
||||
{{/shelf_nav}}
|
||||
</div>
|
||||
{{/current_filter}}
|
||||
|
||||
{{#groups}}
|
||||
<div class="group">{{label}} · {{count}}</div>
|
||||
{{#books}}
|
||||
<div class="row{{#selected}} selected{{/selected}}">
|
||||
<i class="ti {{format_icon}} glyph" aria-hidden="true"></i>
|
||||
<span class="pill {{status_class}}">{{status_label}}</span>
|
||||
<span class="title">{{title}} <span class="muted">· {{author}}</span></span>
|
||||
{{#tags_inline}}<span class="tags">{{tags_inline}}</span>{{/tags_inline}}
|
||||
{{#rec_via}}<span class="trail">via {{rec_via}}</span>{{/rec_via}}
|
||||
@@ -106,10 +94,6 @@
|
||||
{{/books}}
|
||||
{{/groups}}
|
||||
|
||||
{{#summary_groups}}
|
||||
<div class="group"><a href="{{href}}" style="color:var(--text-info);text-decoration:none">{{label}} · {{count}}</a></div>
|
||||
{{/summary_groups}}
|
||||
|
||||
{{#minibuffer}}
|
||||
<div class="minibuffer">
|
||||
<span class="muted">M-x</span>
|
||||
|
||||
Reference in New Issue
Block a user