Blasta/xhtml/edit.xhtml

275 lines
12 KiB
HTML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="color-scheme" content="dark light" />
<title>Blasta</title>
<link rel="shortcut icon" href="/graphic/blasta.svg"/>
<link rel='icon' type='image/svg+xml' href='/graphic/blasta.svg'/>
<link rel='stylesheet' type='text/css' media='screen' href='/stylesheet/stylesheet.css'/>
</head>
<body>
<div id="container">
<div id="header" class="row">
<h1>
<img src="/graphic/blasta.svg"/>
<a href="/">Blasta</a> / {{path}}
</h1>
<dl id="navigation">
<dd>
<img src="/graphic/blasta.svg"/>
</dd>
{% if jabber_id %}
<dd>
<a href="/jid">Public</a>
</dd>
<dd>
<a href="/private">Private</a>
</dd>
<dd>
<a href="/read">Read</a>
</dd>
{% endif %}
<dd>
<a href="/search{% if jabber_id %}/jid/{{jabber_id}}{% endif %}">Search</a>
</dd>
<dd>
<a href="/popular">Popular</a>
</dd>
<dd>
<a href="/recent">Recent</a>
</dd>
<dd>
{% if jabber_id %}
<a href="/disconnect">Disconnect</a>
{% else %}
<a href="/connect">Connect</a>
{% endif %}
</dd>
</dl>
</div>
<div id="main" class="row">
<div id="content">
<h2>&nbsp; PubSub Bookmarks</h2>
<p>
» Bookmark a link to your personal PubSub node.
</p>
<h3>
{{description}}
</h3>
<!-- You might not want to do it.
Try to bookmark psi-plus.com with a bookmarklet;
Replace URL by XMPP URI of groupchat Psi+;
Problem: The URL MD5 checksum is different than the expected one; and
that would result in an error; and
consequently a malformed operation! -->
<form id="editor" method="post"
action="{% if url_hash %}/url/{{url_hash}}{% else %}/save{% endif %}">
<table>
<tr>
<th>
<label for="url">URL *</label>
</th>
<td>
{% if confirm or edit %}
<input id="url"
name="url"
required=""
type="hidden"
value="{{url}}" />
<p>{{url}}</p>
{% else %}
<input id="url"
name="url"
placeholder="Enter a URL (required)."
required=""
type="url"
value="{{url}}" />
{% endif %}
</td>
</tr>
<tr>
<th>
<label for="title">Title *</label>
</th>
<td>
{% if confirm %}
<input id="title"
name="title"
required=""
type="hidden"
value="{{title}}" />
<p>{{title}}</p>
{% else %}
<input id="title"
placeholder="Enter a title (required)."
required=""
type="text" name="title"
value="{{title}}" />
{% endif %}
</td>
</tr>
<tr>
<th>
<label for="summary">Summary</label>
</th>
<td>
{% if confirm %}
<textarea hidden=""
id="summary"
name="summary">
{{summary}}</textarea>
<p class="summary">{{summary}}</p>
{% else %}
<textarea cols="40"
id="summary"
name="summary"
placeholder="Enter a summary (recommended)."
rows="5">{{summary}}</textarea>
{% endif %}
</td>
</tr>
<tr>
<th>
<label for="tags">Tags</label>
</th>
<td>
{% if confirm %}
<input type="hidden" id="tags" name="tags"
value="{{tags}}"/>
<p>{{tags}}</p>
{% else %}
<input type="text" id="tags" name="tags"
placeholder="Enter tags (comma
separated). Example: culture, family, leisure, salt lake city (or city:salt-lake)."
value="{{tags}}" autofocus=""/>
{% endif %}
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
{% if confirm %}
<input type="submit" value="Save"/>
{% else %}
<input type="submit" value="Proceed"/>
{% endif %}
{% if confirm %}
<input type="hidden" id="node" name="node"
value="{{node}}"/>
<span>[ {{node}} ]</span>
{% else %}
<input {% if routine == 'private' or node == 'private' %}checked=""{% endif %}
id="private"
name="node"
required=""
type="radio"
value="private" />
<label for="private"
title="Keep link private (whitelist).">
Private
</label>
<input {% if routine == 'public' or (node and node not in ('private', 'read')) %}checked=""{% endif %}
id="public"
name="node"
type="radio"
value="public"/>
<label for="public"
title="Share link (open).">
Public
</label>
<input {% if routine == 'read' or node == 'read' %}checked=""{% endif %}
id="read"
name="node"
type="radio"
value="read"/>
<label for="read"
title="Keep link private and save it
to reading list (whitelist).">
Read
</label>
(<abbr title="Blasta manages your bookmarks
within three PubSub nodes: Public, Private and Read. Move your cursor on a label
to view details.">
?
</abbr>)
{% endif %}
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<p>
<i>
Fields that are marked with an asterisk
(*) are required.
</i>
</p>
<p>
<i>
Press key F5 or reload page to reset
form values.
<!-- input type="reset" value="Reset"/ -->
</i>
</p>
</td>
</tr>
</table>
{% if published %}
<input id="published"
name="published"
required=""
type="hidden"
value="{{published}}"/>
{% endif %}
<!-- Use this hidden form to indicate that a database update is required -->
<input id="update"
name="update"
required=""
type="hidden"
value="yes"/>
<input id="tags_old"
name="tags_old"
type="hidden"
value="{{tags}}"/>
</form>
</div>
</div>
<div id="footer" class="row">
<dl>
<dd>
<img src="/graphic/blasta.svg" alt="logo"/>
<a href="/">blasta</a>
</dd>
<dd>
<a href="/help/about">about</a>
</dd>
<dd>
<a href="/help/about/xmpp">xmpp</a>
</dd>
<dd>
<a href="/help/about/xmpp/pubsub">pubsub</a>
</dd>
<dd>
<a href="{{journal}}">journal</a>
</dd>
<dd>
<a href="/help">help</a>
</dd>
<dd>
<a href="/help/policy">policy</a>
</dd>
<dd>
<a href="/help/feeds">rss</a>
</dd>
<dd>
<a href="/contact">contact</a>
</dd>
</dl>
</div>
</div>
</body>
</html>