]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Apply v0.8.2 changes, add opensearch tpl, add favicon
authorArthurHoaro <arthur@hoa.ro>
Sun, 18 Dec 2016 13:23:24 +0000 (14:23 +0100)
committerArthurHoaro <arthur@hoa.ro>
Sun, 18 Dec 2016 13:23:24 +0000 (14:23 +0100)
tpl/default/css/shaarli.css
tpl/default/editlink.html
tpl/default/feed.atom.html
tpl/default/img/favicon.png [new file with mode: 0644]
tpl/default/includes.html
tpl/default/linklist.html
tpl/default/linklist.paging.html
tpl/default/loginform.html
tpl/default/opensearch.html [new file with mode: 0644]
tpl/default/page.header.html
tpl/default/tools.html

index fd0a144f227c0c98dd79a2fe446e81fc1b9e0bd5..f717b99adca4749778d003be005194c58c443d63 100644 (file)
@@ -119,8 +119,9 @@ pre {
     color: #b0ddce;
 }
 
-.pure-menu-link:hover,
-.pure-menu-selected .pure-menu-link:hover {
+.pure-menu-link:hover, .pure-menu-link:focus,
+.pure-menu-selected .pure-menu-link:hover,
+.pure-menu-selected .pure-menu-link:focus {
     color: #d1fff0;
     background: transparent;
 }
@@ -375,7 +376,7 @@ pre {
 
 @media screen and (min-width: 64em) {
     #content {
-        margin-top: 34px;
+        margin-top: 33px;
     }
 }
 
index 3c9b5cda7cdceeb7e6ce5e977508d4b4b1b12037..1708bee1ed876c9a4a47e3cb7ff949700bb9246a 100644 (file)
@@ -4,14 +4,19 @@
   {include="includes"}
 </head>
 <body>
-  {if="$source !== 'firefoxsocialapi'"}
+  {if="$source !== 'firefoxsocialapi' && $source !== 'bookmarklet'"}
     {include="page.header"}
+  {else}
+    <div class="center">Shaare to: {$shaarlititle}</div>
   {/if}
   <div id="editlinkform" class="pure-g">
     <div class="pure-u-lg-1-5 pure-u-1-8"></div>
     <form method="post" name="linkform" class="page-form pure-u-lg-3-5 pure-u-3-4 page-form page-form-light">
       <h2 class="window-title">{'Shaare'|t}</h2>
       <input type="hidden" name="lf_linkdate" value="{$link.linkdate}">
+      {if="isset($link.id)"}
+        <input type="hidden" name="lf_id" value="{$link.id}">
+      {/if}
       <div>
         <label for="lf_url">{'URL'|t}</label>
       </div>
index 2ebb162a2139439cd09b60267fcd2ea4e5c6f2b3..c8ab17220906b351defb993827f1cd54734ded60 100644 (file)
@@ -29,9 +29,7 @@
       {if="$show_dates"}
         <updated>{$value.iso_date}</updated>
       {/if}
-      <content type="html" xml:lang="{$language}">
-        <![CDATA[{$value.description}]]>
-      </content>
+      <content type="html" xml:lang="{$language}"><![CDATA[{$value.description}]]></content>
       {loop="$value.taglist"}
         <category scheme="{$index_url}?searchtags=" term="{$value|strtolower}" label="{$value}" />
       {/loop}
diff --git a/tpl/default/img/favicon.png b/tpl/default/img/favicon.png
new file mode 100644 (file)
index 0000000..4644321
Binary files /dev/null and b/tpl/default/img/favicon.png differ
index 24c4bef005c949c01fdcc83ce8e7df8b20a83233..7e0c4a64fe3c65e018ee6274db01374ff493898a 100644 (file)
@@ -2,9 +2,9 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="format-detection" content="telephone=no" />
 <meta name="viewport" content="width=device-width, initial-scale=1">
-<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
 <link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
-<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />
+<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
+<link href="img/favicon.png" rel="shortcut icon" type="image/png" />
 <link type="text/css" rel="stylesheet" href="css/pure.min.css" />
 <link type="text/css" rel="stylesheet" href="css/grids-responsive.min.css">
 <link type="text/css" rel="stylesheet" href="css/pure-extras.css">
@@ -17,4 +17,4 @@
 {loop="$plugins_includes.css_files"}
   <link type="text/css" rel="stylesheet" href="{$value}#"/>
 {/loop}
-<link rel="search" type="application/opensearchdescription+xml" href="?do=opensearch#" title="Shaarli search - {$shaarlititle|htmlspecialchars}"/>
\ No newline at end of file
+<link rel="search" type="application/opensearchdescription+xml" href="?do=opensearch#" title="Shaarli search - {$shaarlititle}"/>
\ No newline at end of file
index bdf7f3eb1cc550e0d11d9feb5c128cfbc8ec4bfa..051575dc01eb8dca5edf09ecac5520e522369e7d 100644 (file)
@@ -6,10 +6,6 @@
 <body>
 {include="page.header"}
 
-<!--{loop="$plugins_header.fields_toolbar"}
-    {$value}
-{/loop}-->
-
 <div id="linklist">
 
   <div id="linkcount" class="center">
@@ -68,8 +64,8 @@
               <div class="linklist-item-editbuttons">
                 <!-- FIXME! JS translation -->
                 <a href="#" title="{'Fold'|t}" class="fold-button"><i class="fa fa-chevron-up"></i></a>
-                <a href="?edit_link={$value.linkdate}" title="{'Edit'|t}"><i class="fa fa-pencil-square-o"></i></a>
-                <a href="?delete_link={$value.linkdate}&amp;token={$token}" title="{'Delete'|t}" class="delete-link">
+                <a href="?edit_link={$value.id}" title="{'Edit'|t}"><i class="fa fa-pencil-square-o"></i></a>
+                <a href="?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}" title="{'Delete'|t}" class="delete-link">
                   <i class="fa fa-trash"></i>
                 </a>
               </div>
index 5e9c84868f94421cfa33cbf668de3f8f8892f71d..4888267b3f452e44ef2eda344a4d5d30f05af365 100644 (file)
               ><i class="fa fa-key"></i></a>
             {/if}
             {loop="$action_plugin"}
-              {$value.class=isset($value.class) ? $value.class : ''}
-              {$value.class=!empty($value.on) ? $value.class .' filter-on' : $value.class .' filter-off'}
+              {$value.attr.class=isset($value.attr.class) ? $value.attr.class : ''}
+              {$value.attr.class=!empty($value.on) ? $value.attr.class .' filter-on' : $value.attr.class .' filter-off'}
               <a
-                {loop="$value"}
-                  {if="$key!='html'"}
-                    {$key}="{$value}"
-                  {/if}
+                {loop="$value.attr"}
+                  {$key}="{$value}"
                 {/loop}>
                 {$value.html}
               </a>
index b33219b69b3751590ad65ade61d4a0fef83067d9..dcc29676c3eca43cbc3c81e353aa04e3644df6b9 100644 (file)
@@ -5,7 +5,7 @@
 </head>
 <body>
 {include="page.header"}
-{if="!ban_canLogin()"}
+{if="!ban_canLogin($conf)"}
 <div class="pure-g pure-alert pure-alert-error pure-alert-closable center">
   <div class="pure-u-2-24"></div>
   <div class="pure-u-20-24">
       <form method="post" name="loginform">
         <h2 class="window-title">{'Login'|t}</h2>
         <div>
-          <input type="text" name="login" placeholder="{'Username'|t}" tabindex="20">
+          <input type="text" name="login" placeholder="{'Username'|t}"
+             {if="!empty($username)"}value="{$username}"{/if} class="autofocus" tabindex="20">
         </div>
         <div>
           <input type="password" name="password" placeholder="{'Password'|t}" tabindex="21">
         </div>
         <div class="remember-me">
-          <input type="checkbox" name="longlastingsession" id="longlastingsessionform" tabindex="22">
+          <input type="checkbox" name="longlastingsession" id="longlastingsessionform"
+             checked="checked" tabindex="22">
           <label for="longlastingsessionform">{'Remember me'|t}</label>
         </div>
         <div>
     </div>
     <div class="pure-u-lg-1-3 pure-u-1-8"></div>
   </div>
-
 {/if}
 
-
-</div>
-
 {include="page.footer"}
 <script>
-  document.getElementsByName('login')[1].focus();
+  {if="ban_canLogin($conf) && ! empty($username)"}
+    // Focus password on load if the username is set.
+    var passwords = document.getElementsByName('password');
+    if (passwords.length == 2) {
+        passwords[1].focus();
+    }
+  {/if}
 </script>
 </body>
 </html>
diff --git a/tpl/default/opensearch.html b/tpl/default/opensearch.html
new file mode 100644 (file)
index 0000000..3fcc30b
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
+    <ShortName>Shaarli search - {$pagetitle}</ShortName>
+    <Description>Shaarli search - {$pagetitle}</Description>
+    <Url type="text/html" template="{$serverurl}?searchterm={searchTerms}" />
+    <Url type="application/atom+xml" template="{$serverurl}?do=atom&amp;searchterm={searchTerms}"/>
+    <Url type="application/rss+xml" template="{$serverurl}?do=rss&amp;searchterm={searchTerms}"/>
+    <InputEncoding>UTF-8</InputEncoding>
+    <Developer>Shaarli Community - https://github.com/shaarli/Shaarli/</Developer>
+    <Image width="16" height="16">data:image/x-icon;base64,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
+    </Image>
+</OpenSearchDescription>
index d4963c89f07010601cd1df46b8fc5a409adbe8cc..4a3710ffb04a8ca8bf34e2556e68077ca8b00a2d 100644 (file)
         {loop="$plugins_header.buttons_toolbar"}
           <li class="pure-menu-item">
             <a
-              {$value.class=isset($value.class) ? $value.class . ' pure-menu-link' : 'pure-menu-link'}
-              {loop="$value"}
-                {if="$key!='html'"}
-                  {$key}="{$value}"
-                {/if}
+              {$value.attr.class=isset($value.class) ? $value.attr.class . ' pure-menu-link' : 'pure-menu-link'}
+              {loop="$value.attr"}
+                {$key}="{$value}"
               {/loop}>
               {$value.html}
             </a>
   </div>
   {loop="$plugins_header.fields_toolbar"}
     <form
-      {loop="$value"}
-        {if="$key!='inputs'"}
-          {$key}="{$value}"
-        {/if}
+      {loop="$value.attr"}
+        {$key}="{$value}"
       {/loop}>
       <div class="subheader-form open pure-u-0 pure-u-lg-visible pure-u-lg-1">
         {loop="$value.inputs"}
index ae794ce9d91a11c45cd35fe4d8e1e1bf4fe6e2fd..3f2cf0f1af2f19548fa75339912b3590a37aa437 100644 (file)
@@ -76,7 +76,7 @@
               '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+
               '&amp;title='%20+%20encodeURIComponent(title)+
               '&amp;description='%20+%20encodeURIComponent(document.getSelection())+
-              '&amp;source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1'
+              '&amp;source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
             );
           }
         )();">
   </div>
 </div>
 
-<div class="pure-g">
-  <div class="pure-u-lg-1-3 pure-u-1-8"></div>
-  <div class="pure-u-lg-1-3 pure-u-3-4 page-form page-form-light">
-    <h2 class="window-title">Firefox Social API</h2>
-    <p>{'You need to browse your Shaarli over <strong>HTTPS</strong> to use this functionality.'|t}</p>
+{if="$sslenabled"}
+  <div class="pure-g">
+    <div class="pure-u-lg-1-3 pure-u-1-8"></div>
+    <div class="pure-u-lg-1-3 pure-u-3-4 page-form page-form-light">
+      <h2 class="window-title">Firefox Social API</h2>
+      <p>{'You need to browse your Shaarli over <strong>HTTPS</strong> to use this functionality.'|t}</p>
 
-    <div class="tools-item">
-      <a title="{'Click on this button to add Shaarli to the 'Share this page' button in Firefox"
-         onclick="activateFirefoxSocial(this)">
-      <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Add to'|t} Firefox Social</span>
-      </a>
+      <div class="tools-item">
+        <a title="{'Click on this button to add Shaarli to the 'Share this page' button in Firefox"
+           onclick="activateFirefoxSocial(this)">
+        <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Add to'|t} Firefox Social</span>
+        </a>
+      </div>
     </div>
   </div>
-</div>
+{/if}
 
 <div class="pure-g">
   <div class="pure-u-lg-1-3 pure-u-1-8"></div>
 </div>
 
 {include="page.footer"}
-<script>
-  function activateFirefoxSocial(node) {
-    var loc = location.href;
-    var baseURL = loc.substring(0, loc.lastIndexOf("/"));
 
-    // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable.
-    var data = {
-      name: "{$shaarlititle}",
-      description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.",
-      author: "Shaarli",
-      version: "1.0.0",
+<script>
+  {if="$sslenabled"}
+    function activateFirefoxSocial(node) {
+      var loc = location.href;
+      var baseURL = loc.substring(0, loc.lastIndexOf("/"));
 
-      iconURL: baseURL + "/images/favicon.ico",
-      icon32URL: baseURL + "/images/favicon.ico",
-      icon64URL: baseURL + "/images/favicon.ico",
+      // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable.
+      var data = {
+        name: "{$shaarlititle}",
+        description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.",
+        author: "Shaarli",
+        version: "1.0.0",
 
-      shareURL: baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi{/noparse}",
-      homepageURL: baseURL
-    };
-    node.setAttribute("data-service", JSON.stringify(data));
+        iconURL: baseURL + "/images/favicon.ico",
+        icon32URL: baseURL + "/images/favicon.ico",
+        icon64URL: baseURL + "/images/favicon.ico",
 
-    var activate = new CustomEvent("ActivateSocialFeature");
-    node.dispatchEvent(activate);
-  }
+        shareURL: baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi{/noparse}",
+        homepageURL: baseURL
+      };
+      node.setAttribute("data-service", JSON.stringify(data));
 
+      var activate = new CustomEvent("ActivateSocialFeature");
+      node.dispatchEvent(activate);
+    }
+  {/if}
   function alertBookmarklet() {
     alert({"'Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link'"|t});
     return false;