</div>
</div>
</div>
+ <div class="pure-g">
+ <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile}">
+ <div class="form-label">
+ <label for="apiEnabled">
+ <span class="label-name">{'Enable REST API'|t}</span><br>
+ <span class="label-desc">{'Allow third party software to use Shaarli such as mobile application'|t}</span>
+ </label>
+ </div>
+ </div>
+ <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile}">
+ <div class="form-input">
+ <input type="checkbox" name="apiEnabled" id="apiEnabled"
+ {if="$api_enabled"}checked{/if}/>
+ </div>
+ </div>
+ </div>
+ <div class="pure-g">
+ <div class="pure-u-lg-{$ratioLabel} pure-u-1">
+ <div class="form-label">
+ <label for="apiSecret">
+ <span class="label-name">{'API secret'|t}</span><br>
+ </label>
+ </div>
+ </div>
+ <div class="pure-u-lg-{$ratioLabel} pure-u-1">
+ <div class="form-input">
+ <input type="text" name="apiSecret" id="apiSecret" size="50" value="{$api_secret}">
+ </div>
+ </div>
+ </div>
<div class="center">
<input type="submit" value="{'Save'|t}" name="save">
</div>
* General
*/
body {
- background: #c5c5c5;
+ background: #d0d0d0;
}
.strong {
width: 200px;
}
+/* because chrome */
+#header-login-form input[type="text"]::-webkit-input-placeholder,
+#header-login-form input[type="password"]::-webkit-input-placeholder {
+ color: #777777;
+}
+
.subheader-form {
visibility: hidden;
position: fixed;
color: #252525;
}
+.toolbar-plugin input[type="submit"]:hover {
+ background: #fff;
+}
+
@media screen and (max-width: 64em) {
.toolbar-plugin input[type="text"] {
width: 70%;
background: #f5f5f5;
}
-.linklist-item.private .linklist-item-title::before {
- position: absolute;
- left: 3px;
- top: 0;
- display: block;
- content:"";
- background: #F89406;
- height: 95%;
- width: 2px;
- margin-top: 3px;
- z-index: 1;
-}
-
.linklist-item-title h2 {
padding: 3px 10px 0 10px;
line-height: 30px;
.linklist-item-description {
position: relative;
padding: 10px;
- background: #f5f5f5;
font-family: Roboto Slab, Arial, sans-serif;
word-wrap: break-word;
color: #252525;
line-height: 1.3em;
}
-.linklist-item.private .linklist-item-description::before {
+ {
position: absolute;
left: 3px;
top: 0;
}
.linklist-item-thumbnail {
+ position: relative;
margin-top: 10px;
padding: 10px;
float: left;
+ z-index: 50;
+}
+
+.linklist-item.private .linklist-item-title::before,
+.linklist-item.private .linklist-item-description::before,
+.linklist-item.private .linklist-item-thumbnail::before {
+ position: absolute;
+ left: 3px;
+ top: 0;
+ display: block;
+ content:"";
+ background: #F89406;
+ height: 95%;
+ width: 2px;
+ z-index: 1;
+}
+
+.linklist-item.private .linklist-item-title::before {
+ margin-top: 3px;
}
.linklist-item-infos {
text-align: center;
}
-.page-form .window-title:after {
- display: block;
- content:"";
- background: linear-gradient(to right, #f5f5f5, #1b926c, #f5f5f5);
- height: 1px;
- width: 80%;
- margin: auto;
-}
-
.page-form .window-subtitle {
text-align: center;
}
}
.page-form textarea {
- height: 240px;
+ min-height: 240px;
padding: 15px 5px 3px 15px;
resize: vertical;
overflow-y: auto;
.daily-entry-thumbnail {
float: left;
- margin: 15px 5px 5px 5px;
+ margin: 15px 5px 5px 15px;
}
.daily-entry-description a {
.daily-entry-description a:visited {
color: #20b988;
}
+
+/*
+ * Fix empty bookmarklet name in Firefox
+ */
+.pure-button {
+ -moz-user-select: auto;
+}
<label for="lf_description">{'Description'|t}</label>
</div>
<div>
- <textarea name="lf_description" id="lf_description" onkeyup="textAreaAdjust(this)"
- >{$link.description}</textarea>
+ <textarea name="lf_description" id="lf_description">{$link.description}</textarea>
</div>
<div>
<label for="lf_tags">{'Tags'|t}</label>
<div>
<input type="checkbox" name="lf_private" id="lf_private"
- {if="($link_is_new && $default_private_links) || $link.private == true"}
+ {if="($link_is_new && $default_private_links || $link.private == true)"}
checked="checked"
{/if}>
<label for="lf_private">{'Private'|t}</label>
<div class="submit-buttons center">
<input type="submit" value="{'Save'|t}" name="save_edit" class="">
{if="!$link_is_new"}
- <a href="?delete_link&lf_linkdate={$value.id}&token={$token}"
+ <a href="?delete_link&lf_linkdate={$link.id}&token={$token}"
title="" name="delete_link" class="button button-red confirm-delete">
{'Delete'|t}
</a>
{/if}
</form>
</div>
- {if="$source !== 'firefoxsocialapi'"}
+ {if="$source !== 'firefoxsocialapi' && $source !== 'bookmarklet'"}
{include="page.footer"}
{/if}
<script>
} else {
document.linkform.lf_tags.focus();
}
- function textAreaAdjust(el) {
- el.style.height = (el.scrollHeight > el.clientHeight) ? (el.scrollHeight) + "px" : (el.clientHeight - 18) + "px";
- }
- (function (window, document) {
- textAreaAdjust(document.linkform.lf_description)
- })(this, this.document);
</script>
</body>
</html>
<link type="text/css" rel="stylesheet" href="inc/awesomplete.css#" />
<link type="text/css" rel="stylesheet" href="css/shaarli.css" />
{if="is_file('inc/user.css')"}
- <link type="text/css" rel="stylesheet" href="inc/user.css#" />
+ <link type="text/css" rel="stylesheet" href="data/user.css#" />
{/if}
{loop="$plugins_includes.css_files"}
<link type="text/css" rel="stylesheet" href="{$value}#"/>
[].forEach.call(foldAllButtons, function (foldAllButton) {
foldAllButton.addEventListener('click', function (event) {
event.preventDefault();
+ var state = foldAllButton.firstElementChild.getAttribute('class').indexOf('down') != -1 ? 'down' : 'up';
[].forEach.call(foldButtons, function (foldButton) {
+ if (foldButton.firstElementChild.classList.contains('fa-chevron-up') && state == 'down'
+ || foldButton.firstElementChild.classList.contains('fa-chevron-down') && state == 'up'
+ ) {
+ return;
+ }
// Retrieve description
var description = null;
var thumbnail = null;
anchor.style.paddingTop = 0;
}
}
+
+ /**
+ * Text area resizer
+ */
+ var description = document.getElementById('lf_description');
+ var observe = function (element, event, handler) {
+ element.addEventListener(event, handler, false);
+ };
+ function init () {
+ function resize () {
+ description.style.height = 'auto';
+ description.style.height = description.scrollHeight+10+'px';
+ }
+ /* 0-timeout to get the already changed text */
+ function delayedResize () {
+ window.setTimeout(resize, 0);
+ }
+ observe(description, 'change', resize);
+ observe(description, 'cut', delayedResize);
+ observe(description, 'paste', delayedResize);
+ observe(description, 'drop', delayedResize);
+ observe(description, 'keydown', delayedResize);
+
+ resize();
+ }
+ if (description != null) {
+ init();
+ }
};
{$updated=$value.updated_timestamp ? 'Edited: '. strftime('%c', $value.updated_timestamp) : 'Permalink'}
<span class="linkdate" title="{$updated}">
<i class="fa fa-clock-o"></i>
- {function="strftime('%d %B %Y %H:%M', $value.timestamp)"}{if="$value.updated_timestamp"}*{/if}
+ {function="strftime('%c', $value.timestamp)"}{if="$value.updated_timestamp"}*{/if}
·
</span>
{/if}
class={if="$privateonly"}"filter-on"{else}"filter-off"{/if}
><i class="fa fa-key"></i></a>
{/if}
- <a href="#" class="filter-off fold-all" title="Fold all">
+ <a href="#" class="filter-off fold-all pure-u-lg-0" title="Fold all">
<i class="fa fa-chevron-up"></i>
</a>
{loop="$action_plugin"}
<form method="GET" class="pure-u-0 pure-u-lg-visible">
<input type="text" name="linksperpage" placeholder="133">
</form>
+ <a href="#" class="filter-off fold-all pure-u-0 pure-u-lg-visible" title="Fold all">
+ <i class="fa fa-chevron-up"></i>
+ </a>
</div>
</div>
</div>
\ No newline at end of file
</li>
{if="!isLoggedIn()"}
<li class="pure-menu-item">
- <a href="?do=login" class="pure-menu-link subheader-opener"
+ <a href="?do=login" class="pure-menu-link"
data-open-id="header-login-form"
id="login-button" title="{'Login'|t}">
<i class="fa fa-user"></i>