aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-12-18 14:23:24 +0100
committerArthurHoaro <arthur@hoa.ro>2016-12-18 14:23:24 +0100
commit79a0dfe9cc658cbfafebac0aa9f1c2953faff777 (patch)
tree39ff0456f6032c6ebcb4549ecfff8f586869b95a
parent4b0838e698f7811a42b7dc02cda276d3f9d83855 (diff)
downloadShaarli-79a0dfe9cc658cbfafebac0aa9f1c2953faff777.tar.gz
Shaarli-79a0dfe9cc658cbfafebac0aa9f1c2953faff777.tar.zst
Shaarli-79a0dfe9cc658cbfafebac0aa9f1c2953faff777.zip
Apply v0.8.2 changes, add opensearch tpl, add favicon
-rw-r--r--tpl/default/css/shaarli.css7
-rw-r--r--tpl/default/editlink.html7
-rw-r--r--tpl/default/feed.atom.html4
-rw-r--r--tpl/default/img/favicon.pngbin0 -> 41600 bytes
-rw-r--r--tpl/default/includes.html6
-rw-r--r--tpl/default/linklist.html8
-rw-r--r--tpl/default/linklist.paging.html10
-rw-r--r--tpl/default/loginform.html20
-rw-r--r--tpl/default/opensearch.html45
-rw-r--r--tpl/default/page.header.html14
-rw-r--r--tpl/default/tools.html68
11 files changed, 118 insertions, 71 deletions
diff --git a/tpl/default/css/shaarli.css b/tpl/default/css/shaarli.css
index fd0a144f..f717b99a 100644
--- a/tpl/default/css/shaarli.css
+++ b/tpl/default/css/shaarli.css
@@ -119,8 +119,9 @@ pre {
119 color: #b0ddce; 119 color: #b0ddce;
120} 120}
121 121
122.pure-menu-link:hover, 122.pure-menu-link:hover, .pure-menu-link:focus,
123.pure-menu-selected .pure-menu-link:hover { 123.pure-menu-selected .pure-menu-link:hover,
124.pure-menu-selected .pure-menu-link:focus {
124 color: #d1fff0; 125 color: #d1fff0;
125 background: transparent; 126 background: transparent;
126} 127}
@@ -375,7 +376,7 @@ pre {
375 376
376@media screen and (min-width: 64em) { 377@media screen and (min-width: 64em) {
377 #content { 378 #content {
378 margin-top: 34px; 379 margin-top: 33px;
379 } 380 }
380} 381}
381 382
diff --git a/tpl/default/editlink.html b/tpl/default/editlink.html
index 3c9b5cda..1708bee1 100644
--- a/tpl/default/editlink.html
+++ b/tpl/default/editlink.html
@@ -4,14 +4,19 @@
4 {include="includes"} 4 {include="includes"}
5</head> 5</head>
6<body> 6<body>
7 {if="$source !== 'firefoxsocialapi'"} 7 {if="$source !== 'firefoxsocialapi' && $source !== 'bookmarklet'"}
8 {include="page.header"} 8 {include="page.header"}
9 {else}
10 <div class="center">Shaare to: {$shaarlititle}</div>
9 {/if} 11 {/if}
10 <div id="editlinkform" class="pure-g"> 12 <div id="editlinkform" class="pure-g">
11 <div class="pure-u-lg-1-5 pure-u-1-8"></div> 13 <div class="pure-u-lg-1-5 pure-u-1-8"></div>
12 <form method="post" name="linkform" class="page-form pure-u-lg-3-5 pure-u-3-4 page-form page-form-light"> 14 <form method="post" name="linkform" class="page-form pure-u-lg-3-5 pure-u-3-4 page-form page-form-light">
13 <h2 class="window-title">{'Shaare'|t}</h2> 15 <h2 class="window-title">{'Shaare'|t}</h2>
14 <input type="hidden" name="lf_linkdate" value="{$link.linkdate}"> 16 <input type="hidden" name="lf_linkdate" value="{$link.linkdate}">
17 {if="isset($link.id)"}
18 <input type="hidden" name="lf_id" value="{$link.id}">
19 {/if}
15 <div> 20 <div>
16 <label for="lf_url">{'URL'|t}</label> 21 <label for="lf_url">{'URL'|t}</label>
17 </div> 22 </div>
diff --git a/tpl/default/feed.atom.html b/tpl/default/feed.atom.html
index 2ebb162a..c8ab1722 100644
--- a/tpl/default/feed.atom.html
+++ b/tpl/default/feed.atom.html
@@ -29,9 +29,7 @@
29 {if="$show_dates"} 29 {if="$show_dates"}
30 <updated>{$value.iso_date}</updated> 30 <updated>{$value.iso_date}</updated>
31 {/if} 31 {/if}
32 <content type="html" xml:lang="{$language}"> 32 <content type="html" xml:lang="{$language}"><![CDATA[{$value.description}]]></content>
33 <![CDATA[{$value.description}]]>
34 </content>
35 {loop="$value.taglist"} 33 {loop="$value.taglist"}
36 <category scheme="{$index_url}?searchtags=" term="{$value|strtolower}" label="{$value}" /> 34 <category scheme="{$index_url}?searchtags=" term="{$value|strtolower}" label="{$value}" />
37 {/loop} 35 {/loop}
diff --git a/tpl/default/img/favicon.png b/tpl/default/img/favicon.png
new file mode 100644
index 00000000..4644321b
--- /dev/null
+++ b/tpl/default/img/favicon.png
Binary files differ
diff --git a/tpl/default/includes.html b/tpl/default/includes.html
index 24c4bef0..7e0c4a64 100644
--- a/tpl/default/includes.html
+++ b/tpl/default/includes.html
@@ -2,9 +2,9 @@
2<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 2<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
3<meta name="format-detection" content="telephone=no" /> 3<meta name="format-detection" content="telephone=no" />
4<meta name="viewport" content="width=device-width, initial-scale=1"> 4<meta name="viewport" content="width=device-width, initial-scale=1">
5<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
6<link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" /> 5<link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
7<link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" /> 6<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
7<link href="img/favicon.png" rel="shortcut icon" type="image/png" />
8<link type="text/css" rel="stylesheet" href="css/pure.min.css" /> 8<link type="text/css" rel="stylesheet" href="css/pure.min.css" />
9<link type="text/css" rel="stylesheet" href="css/grids-responsive.min.css"> 9<link type="text/css" rel="stylesheet" href="css/grids-responsive.min.css">
10<link type="text/css" rel="stylesheet" href="css/pure-extras.css"> 10<link type="text/css" rel="stylesheet" href="css/pure-extras.css">
@@ -17,4 +17,4 @@
17{loop="$plugins_includes.css_files"} 17{loop="$plugins_includes.css_files"}
18 <link type="text/css" rel="stylesheet" href="{$value}#"/> 18 <link type="text/css" rel="stylesheet" href="{$value}#"/>
19{/loop} 19{/loop}
20<link rel="search" type="application/opensearchdescription+xml" href="?do=opensearch#" title="Shaarli search - {$shaarlititle|htmlspecialchars}"/> \ No newline at end of file 20<link rel="search" type="application/opensearchdescription+xml" href="?do=opensearch#" title="Shaarli search - {$shaarlititle}"/> \ No newline at end of file
diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html
index bdf7f3eb..051575dc 100644
--- a/tpl/default/linklist.html
+++ b/tpl/default/linklist.html
@@ -6,10 +6,6 @@
6<body> 6<body>
7{include="page.header"} 7{include="page.header"}
8 8
9<!--{loop="$plugins_header.fields_toolbar"}
10 {$value}
11{/loop}-->
12
13<div id="linklist"> 9<div id="linklist">
14 10
15 <div id="linkcount" class="center"> 11 <div id="linkcount" class="center">
@@ -68,8 +64,8 @@
68 <div class="linklist-item-editbuttons"> 64 <div class="linklist-item-editbuttons">
69 <!-- FIXME! JS translation --> 65 <!-- FIXME! JS translation -->
70 <a href="#" title="{'Fold'|t}" class="fold-button"><i class="fa fa-chevron-up"></i></a> 66 <a href="#" title="{'Fold'|t}" class="fold-button"><i class="fa fa-chevron-up"></i></a>
71 <a href="?edit_link={$value.linkdate}" title="{'Edit'|t}"><i class="fa fa-pencil-square-o"></i></a> 67 <a href="?edit_link={$value.id}" title="{'Edit'|t}"><i class="fa fa-pencil-square-o"></i></a>
72 <a href="?delete_link={$value.linkdate}&amp;token={$token}" title="{'Delete'|t}" class="delete-link"> 68 <a href="?delete_link&amp;lf_linkdate={$value.id}&amp;token={$token}" title="{'Delete'|t}" class="delete-link">
73 <i class="fa fa-trash"></i> 69 <i class="fa fa-trash"></i>
74 </a> 70 </a>
75 </div> 71 </div>
diff --git a/tpl/default/linklist.paging.html b/tpl/default/linklist.paging.html
index 5e9c8486..4888267b 100644
--- a/tpl/default/linklist.paging.html
+++ b/tpl/default/linklist.paging.html
@@ -14,13 +14,11 @@
14 ><i class="fa fa-key"></i></a> 14 ><i class="fa fa-key"></i></a>
15 {/if} 15 {/if}
16 {loop="$action_plugin"} 16 {loop="$action_plugin"}
17 {$value.class=isset($value.class) ? $value.class : ''} 17 {$value.attr.class=isset($value.attr.class) ? $value.attr.class : ''}
18 {$value.class=!empty($value.on) ? $value.class .' filter-on' : $value.class .' filter-off'} 18 {$value.attr.class=!empty($value.on) ? $value.attr.class .' filter-on' : $value.attr.class .' filter-off'}
19 <a 19 <a
20 {loop="$value"} 20 {loop="$value.attr"}
21 {if="$key!='html'"} 21 {$key}="{$value}"
22 {$key}="{$value}"
23 {/if}
24 {/loop}> 22 {/loop}>
25 {$value.html} 23 {$value.html}
26 </a> 24 </a>
diff --git a/tpl/default/loginform.html b/tpl/default/loginform.html
index b33219b6..dcc29676 100644
--- a/tpl/default/loginform.html
+++ b/tpl/default/loginform.html
@@ -5,7 +5,7 @@
5</head> 5</head>
6<body> 6<body>
7{include="page.header"} 7{include="page.header"}
8{if="!ban_canLogin()"} 8{if="!ban_canLogin($conf)"}
9<div class="pure-g pure-alert pure-alert-error pure-alert-closable center"> 9<div class="pure-g pure-alert pure-alert-error pure-alert-closable center">
10 <div class="pure-u-2-24"></div> 10 <div class="pure-u-2-24"></div>
11 <div class="pure-u-20-24"> 11 <div class="pure-u-20-24">
@@ -22,13 +22,15 @@
22 <form method="post" name="loginform"> 22 <form method="post" name="loginform">
23 <h2 class="window-title">{'Login'|t}</h2> 23 <h2 class="window-title">{'Login'|t}</h2>
24 <div> 24 <div>
25 <input type="text" name="login" placeholder="{'Username'|t}" tabindex="20"> 25 <input type="text" name="login" placeholder="{'Username'|t}"
26 {if="!empty($username)"}value="{$username}"{/if} class="autofocus" tabindex="20">
26 </div> 27 </div>
27 <div> 28 <div>
28 <input type="password" name="password" placeholder="{'Password'|t}" tabindex="21"> 29 <input type="password" name="password" placeholder="{'Password'|t}" tabindex="21">
29 </div> 30 </div>
30 <div class="remember-me"> 31 <div class="remember-me">
31 <input type="checkbox" name="longlastingsession" id="longlastingsessionform" tabindex="22"> 32 <input type="checkbox" name="longlastingsession" id="longlastingsessionform"
33 checked="checked" tabindex="22">
32 <label for="longlastingsessionform">{'Remember me'|t}</label> 34 <label for="longlastingsessionform">{'Remember me'|t}</label>
33 </div> 35 </div>
34 <div> 36 <div>
@@ -40,15 +42,17 @@
40 </div> 42 </div>
41 <div class="pure-u-lg-1-3 pure-u-1-8"></div> 43 <div class="pure-u-lg-1-3 pure-u-1-8"></div>
42 </div> 44 </div>
43
44{/if} 45{/if}
45 46
46
47</div>
48
49{include="page.footer"} 47{include="page.footer"}
50<script> 48<script>
51 document.getElementsByName('login')[1].focus(); 49 {if="ban_canLogin($conf) && ! empty($username)"}
50 // Focus password on load if the username is set.
51 var passwords = document.getElementsByName('password');
52 if (passwords.length == 2) {
53 passwords[1].focus();
54 }
55 {/if}
52</script> 56</script>
53</body> 57</body>
54</html> 58</html>
diff --git a/tpl/default/opensearch.html b/tpl/default/opensearch.html
new file mode 100644
index 00000000..3fcc30b7
--- /dev/null
+++ b/tpl/default/opensearch.html
@@ -0,0 +1,45 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
3 <ShortName>Shaarli search - {$pagetitle}</ShortName>
4 <Description>Shaarli search - {$pagetitle}</Description>
5 <Url type="text/html" template="{$serverurl}?searchterm={searchTerms}" />
6 <Url type="application/atom+xml" template="{$serverurl}?do=atom&amp;searchterm={searchTerms}"/>
7 <Url type="application/rss+xml" template="{$serverurl}?do=rss&amp;searchterm={searchTerms}"/>
8 <InputEncoding>UTF-8</InputEncoding>
9 <Developer>Shaarli Community - https://github.com/shaarli/Shaarli/</Developer>
10 <Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAHRklE
11 QVRIx5WWaWxU5xWG3++7986dfYYZb+MN2xiMDRiDFePUiQsNoiwpUNpAmhInJVEqpa0oQ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J4vlz+asXqpb+hEcdotbdueZ47vyiqhpA2UoRQwpoLtpNHxR0382jR8RzT
40 k8xYMyCMMfR33Uc8rxdrA9tpuHPyS7pPOTRPZ1arepa4rUsybiWnnU9a39ZXxdur+XoGAGMdoXLi
41 M789axnfNxDr8omiDcvF1f3OhPf18efjF/nfz6PGvv6zlrlwWwYBgcBZbKH4WKHODLHEURDxbHDF
42 QWGePftHUlZWjsy8guYnH2EgwORfZ5cuavEqgGhLnL6+sycvRP1Fbux/fheIn3wCCN4N/qdPMwA4
43 2fYOeoe7kc6kcfCbh8n+r7YwAOjs6QCl9DNx5t7dew+MOf8CcuqqoLxlhwgAAAAASUVORK5CYII=
44 </Image>
45</OpenSearchDescription>
diff --git a/tpl/default/page.header.html b/tpl/default/page.header.html
index d4963c89..4a3710ff 100644
--- a/tpl/default/page.header.html
+++ b/tpl/default/page.header.html
@@ -38,11 +38,9 @@
38 {loop="$plugins_header.buttons_toolbar"} 38 {loop="$plugins_header.buttons_toolbar"}
39 <li class="pure-menu-item"> 39 <li class="pure-menu-item">
40 <a 40 <a
41 {$value.class=isset($value.class) ? $value.class . ' pure-menu-link' : 'pure-menu-link'} 41 {$value.attr.class=isset($value.class) ? $value.attr.class . ' pure-menu-link' : 'pure-menu-link'}
42 {loop="$value"} 42 {loop="$value.attr"}
43 {if="$key!='html'"} 43 {$key}="{$value}"
44 {$key}="{$value}"
45 {/if}
46 {/loop}> 44 {/loop}>
47 {$value.html} 45 {$value.html}
48 </a> 46 </a>
@@ -121,10 +119,8 @@
121 </div> 119 </div>
122 {loop="$plugins_header.fields_toolbar"} 120 {loop="$plugins_header.fields_toolbar"}
123 <form 121 <form
124 {loop="$value"} 122 {loop="$value.attr"}
125 {if="$key!='inputs'"} 123 {$key}="{$value}"
126 {$key}="{$value}"
127 {/if}
128 {/loop}> 124 {/loop}>
129 <div class="subheader-form open pure-u-0 pure-u-lg-visible pure-u-lg-1"> 125 <div class="subheader-form open pure-u-0 pure-u-lg-visible pure-u-lg-1">
130 {loop="$value.inputs"} 126 {loop="$value.inputs"}
diff --git a/tpl/default/tools.html b/tpl/default/tools.html
index ae794ce9..3f2cf0f1 100644
--- a/tpl/default/tools.html
+++ b/tpl/default/tools.html
@@ -76,7 +76,7 @@
76 '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+ 76 '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+
77 '&amp;title='%20+%20encodeURIComponent(title)+ 77 '&amp;title='%20+%20encodeURIComponent(title)+
78 '&amp;description='%20+%20encodeURIComponent(document.getSelection())+ 78 '&amp;description='%20+%20encodeURIComponent(document.getSelection())+
79 '&amp;source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1' 79 '&amp;source=bookmarklet','_blank','menubar=no,height=800,width=600,toolbar=no,scrollbars=yes,status=no,dialog=1'
80 ); 80 );
81 } 81 }
82 )();"> 82 )();">
@@ -94,20 +94,22 @@
94 </div> 94 </div>
95</div> 95</div>
96 96
97<div class="pure-g"> 97{if="$sslenabled"}
98 <div class="pure-u-lg-1-3 pure-u-1-8"></div> 98 <div class="pure-g">
99 <div class="pure-u-lg-1-3 pure-u-3-4 page-form page-form-light"> 99 <div class="pure-u-lg-1-3 pure-u-1-8"></div>
100 <h2 class="window-title">Firefox Social API</h2> 100 <div class="pure-u-lg-1-3 pure-u-3-4 page-form page-form-light">
101 <p>{'You need to browse your Shaarli over <strong>HTTPS</strong> to use this functionality.'|t}</p> 101 <h2 class="window-title">Firefox Social API</h2>
102 <p>{'You need to browse your Shaarli over <strong>HTTPS</strong> to use this functionality.'|t}</p>
102 103
103 <div class="tools-item"> 104 <div class="tools-item">
104 <a title="{'Click on this button to add Shaarli to the 'Share this page' button in Firefox" 105 <a title="{'Click on this button to add Shaarli to the 'Share this page' button in Firefox"
105 onclick="activateFirefoxSocial(this)"> 106 onclick="activateFirefoxSocial(this)">
106 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Add to'|t} Firefox Social</span> 107 <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ {'Add to'|t} Firefox Social</span>
107 </a> 108 </a>
109 </div>
108 </div> 110 </div>
109 </div> 111 </div>
110</div> 112{/if}
111 113
112<div class="pure-g"> 114<div class="pure-g">
113 <div class="pure-u-lg-1-3 pure-u-1-8"></div> 115 <div class="pure-u-lg-1-3 pure-u-1-8"></div>
@@ -128,31 +130,33 @@
128</div> 130</div>
129 131
130{include="page.footer"} 132{include="page.footer"}
131<script>
132 function activateFirefoxSocial(node) {
133 var loc = location.href;
134 var baseURL = loc.substring(0, loc.lastIndexOf("/"));
135 133
136 // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable. 134<script>
137 var data = { 135 {if="$sslenabled"}
138 name: "{$shaarlititle}", 136 function activateFirefoxSocial(node) {
139 description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.", 137 var loc = location.href;
140 author: "Shaarli", 138 var baseURL = loc.substring(0, loc.lastIndexOf("/"));
141 version: "1.0.0",
142 139
143 iconURL: baseURL + "/images/favicon.ico", 140 // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable.
144 icon32URL: baseURL + "/images/favicon.ico", 141 var data = {
145 icon64URL: baseURL + "/images/favicon.ico", 142 name: "{$shaarlititle}",
143 description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.",
144 author: "Shaarli",
145 version: "1.0.0",
146 146
147 shareURL: baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi{/noparse}", 147 iconURL: baseURL + "/images/favicon.ico",
148 homepageURL: baseURL 148 icon32URL: baseURL + "/images/favicon.ico",
149 }; 149 icon64URL: baseURL + "/images/favicon.ico",
150 node.setAttribute("data-service", JSON.stringify(data));
151 150
152 var activate = new CustomEvent("ActivateSocialFeature"); 151 shareURL: baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi{/noparse}",
153 node.dispatchEvent(activate); 152 homepageURL: baseURL
154 } 153 };
154 node.setAttribute("data-service", JSON.stringify(data));
155 155
156 var activate = new CustomEvent("ActivateSocialFeature");
157 node.dispatchEvent(activate);
158 }
159 {/if}
156 function alertBookmarklet() { 160 function alertBookmarklet() {
157 alert({"'Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link'"|t}); 161 alert({"'Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link'"|t});
158 return false; 162 return false;