Add titles-only list export and Custom lists
Export - GET /l/<list>/export?format=csv|txt downloads a list's titles in rank order, one per line, with no header or other fields (CSV gets a UTF-8 BOM for Excel) - Export menu in the list editor and, for the owner, on the public list page; hidden lists stay owner-only Custom lists - New "Custom" category for anything not built in (sports teams, drinks…): owner-named, slug from the title, entries added by hand or from an unfiltered Wikipedia search - Per-list artwork shape (square or tall), stored in a new lists.art column (migration 2) - Art can be uploaded while adding an entry, not only after Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e9a75a968a
commit
58a29b7339
23 files changed
+314
-37
No files matched your search
@@ -13,6 +13,7 @@
|
||||
</div>
|
||||
<div class="admin-head-actions">
|
||||
<a class="btn btn--ghost" data-bind="public" href="/l/{{.Data.List.Slug}}">{{icon "external"}}View</a>
|
||||
{{template "export" .Data.List.Slug}}
|
||||
<button class="btn" type="button" data-action="edit-list">{{icon "settings"}}List settings</button>
|
||||
</div>
|
||||
</header>
|
||||
@@ -21,12 +22,12 @@
|
||||
<div class="editor">
|
||||
<section class="panel editor-search" aria-labelledby="add-h">
|
||||
<div class="panel-head">
|
||||
<h2 id="add-h">Add {{$c.Label}}</h2>
|
||||
<h2 id="add-h">{{if eq $c.Key "custom"}}Add favorites{{else}}Add {{$c.Label}}{{end}}</h2>
|
||||
<span class="muted small" data-bind="provider"></span>
|
||||
</div>
|
||||
<form class="search-bar" data-search role="search">
|
||||
{{icon "search"}}
|
||||
<input type="search" name="q" placeholder="Search for a {{$c.Singular}}…" autocomplete="off" aria-label="Search">
|
||||
<input type="search" name="q" placeholder="{{if eq $c.Key "custom"}}Search Wikipedia (optional)…{{else}}Search for a {{$c.Singular}}…{{end}}" autocomplete="off" aria-label="Search">
|
||||
<span class="spinner" hidden></span>
|
||||
</form>
|
||||
<div class="search-results" data-results aria-live="polite"></div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<a class="back-link" href="/">{{icon "arrow-left"}}All lists</a>
|
||||
<div class="list-hero-row">
|
||||
<div>
|
||||
<p class="eyebrow">{{icon .Category.Icon}}{{.Category.Label}}</p>
|
||||
{{if ne .Category.Key "custom"}}<p class="eyebrow">{{icon .Category.Icon}}{{.Category.Label}}</p>{{end}}
|
||||
<h1 class="list-title">{{.List.Title}}</h1>
|
||||
{{with .List.Description}}<p class="list-desc">{{.}}</p>{{end}}
|
||||
<p class="list-meta">
|
||||
@@ -16,7 +16,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="list-actions">
|
||||
{{if $.LoggedIn}}<a class="btn btn--ghost" href="/admin/lists/{{.List.ID}}">{{icon "pencil"}}Edit</a>{{end}}
|
||||
{{if $.LoggedIn}}<a class="btn btn--ghost" href="/admin/lists/{{.List.ID}}">{{icon "pencil"}}Edit</a>{{if .Items}}{{template "export" .List.Slug}}{{end}}{{end}}
|
||||
{{if .Items}}
|
||||
<div class="segmented" role="group" aria-label="Layout" data-layout-toggle data-default="{{.List.Layout}}" data-key="{{.List.Slug}}">
|
||||
<button type="button" data-layout="grid" title="Grid">{{icon "grid"}}<span class="sr-only">Grid</span></button>
|
||||
|
||||
Reference in new issue
Block a user