projects/booket

view booket.html @ 24:6cf1ec2e8955

Use expanders for action forms
author Guido Berhoerster <guido+booket@berhoerster.name>
date Sun Oct 05 20:25:51 2014 +0200 (2014-10-05)
parents 69552aee9993
children 8c2f3e72d514
line source
1 <!DOCTYPE html>
2 <!--
3 Copyright (C) 2014 Guido Berhoerster <guido+booket@berhoerster.name>
5 Permission is hereby granted, free of charge, to any person obtaining
6 a copy of this software and associated documentation files (the
7 "Software"), to deal in the Software without restriction, including
8 without limitation the rights to use, copy, modify, merge, publish,
9 distribute, sublicense, and/or sell copies of the Software, and to
10 permit persons to whom the Software is furnished to do so, subject to
11 the following conditions:
13 The above copyright notice and this permission notice shall be included
14 in all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 -->
24 <html>
25 <head>
26 <meta charset="utf-8"></meta>
27 <title>Booket</title>
28 <link rel="stylesheet" type="text/css" href="booket.css"></link>
29 <link rel="icon" type="image/png" href="booket-favicon.png"></link>
30 <script src="booket.js"></script>
31 </head>
32 <body>
33 <header>
34 <img src="booket-logo.svg" alt="Booket Logo" id="logo"><img>
35 <h1>Booket</h1>
36 <p>Version 4</p>
37 </header>
39 <datalist id="tag-datalist"></datalist>
41 <div id="keyboard-shortcuts">
42 <h3>Keyboard Shortcuts</h3>
43 <dl>
44 <dt><kbd>Prefix</kbd>+<kbd>i</kbd></dt>
45 <dd>Select bookmark file to load</dd>
46 <dt><kbd>Prefix</kbd>+<kbd>l</kbd></dt>
47 <dd>Load selected bookmark file</dd>
48 <dt><kbd>Prefix</kbd>+<kbd>s</kbd></dt>
49 <dd>Save bookmark file</dd>
50 <dt><kbd>Prefix</kbd>+<kbd>a</kbd></dt>
51 <dd>Focus bookmark editor</dd>
52 <dt><kbd>Prefix</kbd>+<kbd>e</kbd></dt>
53 <dd>Select bookmark file to import</dd>
54 <dt><kbd>Prefix</kbd>+<kbd>m</kbd></dt>
55 <dd>Import selected file</dd>
56 <dt><kbd>Prefix</kbd>+<kbd>x</kbd></dt>
57 <dd>Export selected file</dd>
58 <dt><kbd>Prefix</kbd>+<kbd>f</kbd></dt>
59 <dd>Focus search field</dd>
60 </dl>
61 </div>
63 <template id="tag-input-template">
64 <li><label class="top-label">Tag <input type="text" name="tag"
65 pattern="[^,;]*" size="20" list="tag-datalist" placeholder="tag"></input>
66 </label></li>
67 </template>
69 <template id="bookmark-editor-template">
70 <form class="bookmark-editor-form">
71 <fieldset>
72 <legend></legend>
73 <input type="hidden" name="original-url"></input>
74 <label class="top-label">URL <input type="url" required="required"
75 name="url" size="60" placeholder="http://example.com/"></input></label>
76 <label class="top-label">Title <input type="text" name="title" size="60"
77 placeholder="A Title"></input></label>
78 <label class="top-label">Favicon <img width="16" height="16"
79 src="missing-favicon.svg" class="bookmark-favicon" alt=""></img><input
80 type="hidden" name="favicon"></input></label>
81 <div>
82 <ul class="tag-input-list"></ul>
83 <button type="button" name="more-tags">Add more tags</button>
84 </div>
85 <label class="top-label">Import from Bookmarklet
86 <textarea name="bookmarklet-import" cols="60" rows="4"
87 spellcheck="false"></textarea></label>
88 <button type="reset" name="cancel">Cancel</button><button type="submit"
89 name="save-bookmark">Save</button>
90 </fieldset>
91 </form>
92 </template>
94 <section id="actions">
95 <h2>Actions</h2>
96 <aside id="bookmarklet">
97 <h3>Bookmarklet</h3>
98 <a title="Create Bookmark" id="bookmarklet-link">Create Bookmark</a>
99 </aside>
101 <form id="load-form">
102 <fieldset class="expander">
103 <legend tabindex="0" class="expander-label">Load Bookmarks</legend>
104 <label accesskey="i" class="top-label">File <input type="file"
105 accept="application/json" required="required"
106 name="file"></input></label>
107 <label><input type="checkbox" name="merge"></input> Merge with existing
108 bookmarks</label>
109 <button type="submit" name="load-file" accesskey="l">Load</button>
110 </fieldset>
111 </form>
113 <form id="save-form">
114 <fieldset class="expander">
115 <legend tabindex="0" class="expander-label">Save Bookmarks</legend>
116 <p class="unsaved-changes-message" hidden="hidden"><strong>There are
117 unsaved changes to your bookmarks.</strong></p>
118 <a href="#" id="save-link" hidden="hidden"
119 download="bookmarks.json"></a>
120 <button type="submit" name="save-file"
121 accesskey="s">Save&#8230;</button>
122 </fieldset>
123 </form>
125 <form id="import-form">
126 <fieldset class="expander">
127 <legend tabindex="0" class="expander-label">Import Bookmarks</legend>
128 <label accesskey="e" class="top-label">File <input type="file"
129 accept="text/html" required="required" name="file"></input></label>
130 <label><input type="checkbox" name="merge"></input> Merge with existing
131 bookmarks</label>
132 <button type="submit" name="import-file" accesskey="m">Import</button>
133 </fieldset>
134 </form>
136 <form id="export-form">
137 <fieldset class="expander">
138 <legend tabindex="0" class="expander-label">Export Bookmarks</legend>
139 <a href="#" id="export-link" hidden="hidden"
140 download="bookmarks.html"></a>
141 <button type="submit" name="export-file"
142 accesskey="x">Export&#8230;</button>
143 </fieldset>
144 </form>
145 </section>
147 <main>
148 <section id="bookmarks">
149 <h2>Bookmarks</h2>
151 <aside id="tags">
152 <h3>Tags</h3>
154 <ul class="tag-list">
155 <template id="tag-template">
156 <li><button type="button" name="set-tag"></button><span
157 class="tag-count"></span><button type="button"
158 name="toggle-tag"></button></li>
159 </template>
160 </ul>
162 <label><input type="checkbox" name="show-tag-cloud"></input> Show tag
163 cloud</label>
164 </aside>
166 <aside id="search">
167 <h3>Search</h3>
169 <form id="search-form">
170 <input type="search" name="search-term" size="20" placeholder="Search"
171 accesskey="f"></input>
172 <button type="submit" name="search">Search</button><button
173 type="reset" name="clear">Clear</button>
174 </form>
175 </aside>
177 <p id="bookmark-message"></p>
179 <ul id="bookmark-list">
180 <template id="bookmark-tag-template">
181 <li><button type="button" name="set-tag"></button><button
182 type="button" name="toggle-tag"></button></li>
183 </template>
184 <template id="bookmark-template">
185 <li>
186 <div class="expander">
187 <div class="expander-label" tabindex="0"><p><img width="16"
188 height="16" class="bookmark-favicon"></img>
189 <a class="bookmark-link" target="_blank"></a>
190 <span class="bookmark-hostname"></span>
191 </p>
192 <ul class="tag-list"></ul></div>
193 <div class="bookmark-actions">
194 <button type="button" name="edit-bookmark">Edit</button><button
195 type="button" name="delete-bookmark">Delete</button>
196 </div>
197 <dl class="bookmark-metadata">
198 <dt>URL</dt>
199 <dd class="bookmark-url"></dd>
200 <dt>Added</dt>
201 <dd><time class="ctime"></time></dd>
202 <dt>Last modified</dt>
203 <dd><time class="mtime"></time></dd>
204 </dl>
205 </div>
206 </li>
207 </template>
208 </ul>
209 </section>
210 </main>
212 <footer><address>Copyright 2014
213 <a href="mailto:guido+booket@berhoerster.name"
214 title="guido+booket@berhoerster.name">Guido
215 Berhörster</a></address>
216 </footer>
217 </body>
218 </html>