projects/booket

annotate booket.html @ 26:8c2f3e72d514

Create new view for notifications

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