view booket.html @ 25:b2c9c4fb8d4c

Add back the accidentally removed "input" event listener
author Guido Berhoerster <guido+booket@berhoerster.name>
date Mon, 06 Oct 2014 12:19:52 +0200
parents 6cf1ec2e8955
children 8c2f3e72d514
line wrap: on
line source

<!DOCTYPE html>
<!--
  Copyright (C) 2014 Guido Berhoerster <guido+booket@berhoerster.name>

  Permission is hereby granted, free of charge, to any person obtaining
  a copy of this software and associated documentation files (the
  "Software"), to deal in the Software without restriction, including
  without limitation the rights to use, copy, modify, merge, publish,
  distribute, sublicense, and/or sell copies of the Software, and to
  permit persons to whom the Software is furnished to do so, subject to
  the following conditions:

  The above copyright notice and this permission notice shall be included
  in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<html>
  <head>
    <meta charset="utf-8"></meta>
    <title>Booket</title>
    <link rel="stylesheet" type="text/css" href="booket.css"></link>
    <link rel="icon" type="image/png" href="booket-favicon.png"></link>
    <script src="booket.js"></script>
  </head>
  <body>
  <header>
    <img src="booket-logo.svg" alt="Booket Logo" id="logo"><img>
    <h1>Booket</h1>
    <p>Version 4</p>
  </header>

  <datalist id="tag-datalist"></datalist>

  <div id="keyboard-shortcuts">
    <h3>Keyboard Shortcuts</h3>
    <dl>
      <dt><kbd>Prefix</kbd>+<kbd>i</kbd></dt>
      <dd>Select bookmark file to load</dd>
      <dt><kbd>Prefix</kbd>+<kbd>l</kbd></dt>
      <dd>Load selected bookmark file</dd>
      <dt><kbd>Prefix</kbd>+<kbd>s</kbd></dt>
      <dd>Save bookmark file</dd>
      <dt><kbd>Prefix</kbd>+<kbd>a</kbd></dt>
      <dd>Focus bookmark editor</dd>
      <dt><kbd>Prefix</kbd>+<kbd>e</kbd></dt>
      <dd>Select bookmark file to import</dd>
      <dt><kbd>Prefix</kbd>+<kbd>m</kbd></dt>
      <dd>Import selected file</dd>
      <dt><kbd>Prefix</kbd>+<kbd>x</kbd></dt>
      <dd>Export selected file</dd>
      <dt><kbd>Prefix</kbd>+<kbd>f</kbd></dt>
      <dd>Focus search field</dd>
    </dl>
  </div>

  <template id="tag-input-template">
    <li><label class="top-label">Tag <input type="text" name="tag"
    pattern="[^,;]*" size="20" list="tag-datalist" placeholder="tag"></input>
    </label></li>
  </template>

  <template id="bookmark-editor-template">
    <form class="bookmark-editor-form">
      <fieldset>
        <legend></legend>
        <input type="hidden" name="original-url"></input>
        <label class="top-label">URL <input type="url" required="required"
        name="url" size="60" placeholder="http://example.com/"></input></label>
        <label class="top-label">Title <input type="text" name="title" size="60"
        placeholder="A Title"></input></label>
        <label class="top-label">Favicon <img width="16" height="16"
        src="missing-favicon.svg" class="bookmark-favicon" alt=""></img><input
        type="hidden" name="favicon"></input></label>
        <div>
          <ul class="tag-input-list"></ul>
          <button type="button" name="more-tags">Add more tags</button>
        </div>
        <label class="top-label">Import from Bookmarklet
        <textarea name="bookmarklet-import" cols="60" rows="4"
        spellcheck="false"></textarea></label>
        <button type="reset" name="cancel">Cancel</button><button type="submit"
        name="save-bookmark">Save</button>
      </fieldset>
    </form>
  </template>

  <section id="actions">
    <h2>Actions</h2>
    <aside id="bookmarklet">
      <h3>Bookmarklet</h3>
      <a title="Create Bookmark" id="bookmarklet-link">Create Bookmark</a>
    </aside>

    <form id="load-form">
      <fieldset class="expander">
        <legend tabindex="0" class="expander-label">Load Bookmarks</legend>
        <label accesskey="i" class="top-label">File <input type="file"
        accept="application/json" required="required"
        name="file"></input></label>
        <label><input type="checkbox" name="merge"></input> Merge with existing
        bookmarks</label>
        <button type="submit" name="load-file" accesskey="l">Load</button>
      </fieldset>
    </form>

    <form id="save-form">
      <fieldset class="expander">
        <legend tabindex="0" class="expander-label">Save Bookmarks</legend>
        <p class="unsaved-changes-message" hidden="hidden"><strong>There are
        unsaved changes to your bookmarks.</strong></p>
        <a href="#" id="save-link" hidden="hidden"
        download="bookmarks.json"></a>
        <button type="submit" name="save-file"
        accesskey="s">Save&#8230;</button>
      </fieldset>
    </form>

    <form id="import-form">
      <fieldset class="expander">
        <legend tabindex="0" class="expander-label">Import Bookmarks</legend>
        <label accesskey="e" class="top-label">File <input type="file"
        accept="text/html" required="required" name="file"></input></label>
        <label><input type="checkbox" name="merge"></input> Merge with existing
        bookmarks</label>
        <button type="submit" name="import-file" accesskey="m">Import</button>
      </fieldset>
    </form>

    <form id="export-form">
      <fieldset class="expander">
        <legend tabindex="0" class="expander-label">Export Bookmarks</legend>
        <a href="#" id="export-link" hidden="hidden"
        download="bookmarks.html"></a>
        <button type="submit" name="export-file"
        accesskey="x">Export&#8230;</button>
      </fieldset>
    </form>
  </section>

  <main>
    <section id="bookmarks">
      <h2>Bookmarks</h2>

      <aside id="tags">
        <h3>Tags</h3>

        <ul class="tag-list">
          <template id="tag-template">
            <li><button type="button" name="set-tag"></button><span
            class="tag-count"></span><button type="button"
            name="toggle-tag"></button></li>
          </template>
        </ul>

        <label><input type="checkbox" name="show-tag-cloud"></input> Show tag
        cloud</label>
      </aside>

      <aside id="search">
        <h3>Search</h3>

        <form id="search-form">
          <input type="search" name="search-term" size="20" placeholder="Search"
          accesskey="f"></input>
          <button type="submit" name="search">Search</button><button
          type="reset" name="clear">Clear</button>
        </form>
      </aside>

      <p id="bookmark-message"></p>

      <ul id="bookmark-list">
        <template id="bookmark-tag-template">
          <li><button type="button" name="set-tag"></button><button
          type="button" name="toggle-tag"></button></li>
        </template>
        <template id="bookmark-template">
          <li>
            <div class="expander">
              <div class="expander-label" tabindex="0"><p><img width="16"
                  height="16" class="bookmark-favicon"></img>
                  <a class="bookmark-link" target="_blank"></a>
                  <span class="bookmark-hostname"></span>
                </p>
                <ul class="tag-list"></ul></div>
              <div class="bookmark-actions">
                <button type="button" name="edit-bookmark">Edit</button><button
                type="button" name="delete-bookmark">Delete</button>
              </div>
              <dl class="bookmark-metadata">
                <dt>URL</dt>
                <dd class="bookmark-url"></dd>
                <dt>Added</dt>
                <dd><time class="ctime"></time></dd>
                <dt>Last modified</dt>
                <dd><time class="mtime"></time></dd>
              </dl>
            </div>
          </li>
        </template>
      </ul>
    </section>
  </main>

  <footer><address>Copyright 2014
    <a href="mailto:guido+booket@berhoerster.name"
    title="guido+booket@berhoerster.name">Guido
    Berhörster</a></address>
  </footer>
  </body>
</html>