diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-08-06 15:55:16 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-08-07 12:17:36 +0200 |
commit | 66195f0657d2c3b57ecfbf88107d3ee1cc31a790 (patch) | |
tree | 407b2e3c16bfb0dfd7e19bb3425d1a2d05093652 /tpl/default | |
parent | 56b7e1749022f47c2460f0d06f6ed5be174b0fc6 (diff) | |
download | Shaarli-66195f0657d2c3b57ecfbf88107d3ee1cc31a790.tar.gz Shaarli-66195f0657d2c3b57ecfbf88107d3ee1cc31a790.tar.zst Shaarli-66195f0657d2c3b57ecfbf88107d3ee1cc31a790.zip |
Tools page
Diffstat (limited to 'tpl/default')
-rw-r--r-- | tpl/default/css/shaarli.css | 22 | ||||
-rw-r--r-- | tpl/default/tools.html | 163 |
2 files changed, 182 insertions, 3 deletions
diff --git a/tpl/default/css/shaarli.css b/tpl/default/css/shaarli.css index 27a127bc..19bdc45c 100644 --- a/tpl/default/css/shaarli.css +++ b/tpl/default/css/shaarli.css | |||
@@ -81,6 +81,10 @@ pre { | |||
81 | cursor: pointer; | 81 | cursor: pointer; |
82 | } | 82 | } |
83 | 83 | ||
84 | .pure-alert-success { | ||
85 | background-color: #1b926c; | ||
86 | } | ||
87 | |||
84 | /** | 88 | /** |
85 | * MENU | 89 | * MENU |
86 | **/ | 90 | **/ |
@@ -608,11 +612,14 @@ pre { | |||
608 | border-bottom: 1px solid #797979; | 612 | border-bottom: 1px solid #797979; |
609 | } | 613 | } |
610 | 614 | ||
611 | .page-form div { | 615 | .page-form div, .page-form p { |
612 | width: 100%; | ||
613 | text-align: center; | 616 | text-align: center; |
614 | } | 617 | } |
615 | 618 | ||
619 | .page-form p { | ||
620 | color: #b0ddce; | ||
621 | } | ||
622 | |||
616 | .page-form input[type="text"], .page-form input[type="password"] { | 623 | .page-form input[type="text"], .page-form input[type="password"] { |
617 | margin: 10px 0; | 624 | margin: 10px 0; |
618 | padding: 5px 5px 3px 15px; | 625 | padding: 5px 5px 3px 15px; |
@@ -652,7 +659,9 @@ pre { | |||
652 | 659 | ||
653 | #page404 { | 660 | #page404 { |
654 | color: #3f3f3f; | 661 | color: #3f3f3f; |
655 | }/** | 662 | } |
663 | |||
664 | /** | ||
656 | * CONTENT - LINKLIST ITEMS | 665 | * CONTENT - LINKLIST ITEMS |
657 | */ | 666 | */ |
658 | .linklist-item { | 667 | .linklist-item { |
@@ -772,3 +781,10 @@ pre { | |||
772 | overflow: hidden; | 781 | overflow: hidden; |
773 | text-overflow: ellipsis; | 782 | text-overflow: ellipsis; |
774 | } | 783 | } |
784 | |||
785 | /** | ||
786 | * TOOLS | ||
787 | */ | ||
788 | .tools-item { | ||
789 | margin: 10px 0; | ||
790 | } \ No newline at end of file | ||
diff --git a/tpl/default/tools.html b/tpl/default/tools.html new file mode 100644 index 00000000..f5e8321b --- /dev/null +++ b/tpl/default/tools.html | |||
@@ -0,0 +1,163 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | {include="includes"} | ||
5 | </head> | ||
6 | <body> | ||
7 | {include="page.header"} | ||
8 | |||
9 | <div class="pure-g"> | ||
10 | <div class="pure-u-lg-1-3 pure-u-1-8"></div> | ||
11 | <div class="pure-u-lg-1-3 pure-u-3-4 page-form"> | ||
12 | <h2>Settings</h2> | ||
13 | <div class="tools-item"> | ||
14 | <a href="?do=configure" title="Change Shaarli settings: title, timezone, etc."> | ||
15 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Configure your Shaarli</span> | ||
16 | </a> | ||
17 | </div> | ||
18 | <div class="tools-item"> | ||
19 | <a href="?do=pluginadmin" title="Enable, disable and configure plugins"> | ||
20 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Plugin administration</span> | ||
21 | </a> | ||
22 | </div> | ||
23 | {if="!$openshaarli"} | ||
24 | <div class="tools-item"> | ||
25 | <a href="?do=changepasswd" title="Change your password"> | ||
26 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Change password</span> | ||
27 | </a> | ||
28 | </div> | ||
29 | {/if} | ||
30 | <div class="tools-item"> | ||
31 | <a href="?do=changetag" title="Rename or delete a tag in all links"> | ||
32 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Manage tags</span> | ||
33 | </a> | ||
34 | </div> | ||
35 | <div class="tools-item"> | ||
36 | <a href="?do=import" title="Import Netscape HTML bookmarks (as exported from Firefox, Chrome, Opera, delicious...)"> | ||
37 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Import links</span> | ||
38 | </a> | ||
39 | </div> | ||
40 | <div class="tools-item"> | ||
41 | <a href="?do=export" title="<!--Export Netscape HTML bookmarks (which can be imported in Firefox, Chrome, Opera, delicious...)-->"> | ||
42 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Export database</span> | ||
43 | </a> | ||
44 | </div> | ||
45 | |||
46 | |||
47 | </div> | ||
48 | {loop="$tools_plugin"} | ||
49 | {$value} | ||
50 | {/loop} | ||
51 | |||
52 | <div class="clear"></div> | ||
53 | |||
54 | <div class="pure-u-lg-1-3 pure-u-1-8"></div> | ||
55 | </div> | ||
56 | |||
57 | <div class="pure-g"> | ||
58 | <div class="pure-u-lg-1-3 pure-u-1-8"></div> | ||
59 | <div class="pure-u-lg-1-3 pure-u-3-4 page-form"> | ||
60 | <h2>Bookmarklets</h2> | ||
61 | <p> | ||
62 | Drag one of these button to your bookmarks toolbar or right-click it and "Bookmark This Link", | ||
63 | then click on the bookmarklet in any page you want to share. | ||
64 | </p> | ||
65 | <div class="tools-item"> | ||
66 | <a title="Drag this link to your bookmarks toolbar or right-click it and Bookmark This Link, | ||
67 | then click ✚Shaare link button in any page you want to share" | ||
68 | onclick="return alertBookmarklet();" | ||
69 | href="javascript:( | ||
70 | function(){ | ||
71 | var%20url%20=%20location.href; | ||
72 | var%20title%20=%20document.title%20||%20url; | ||
73 | window.open( | ||
74 | '{$pageabsaddr}?post='%20+%20encodeURIComponent(url)+ | ||
75 | '&title='%20+%20encodeURIComponent(title)+ | ||
76 | '&description='%20+%20encodeURIComponent(document.getSelection())+ | ||
77 | '&source=bookmarklet','_blank','menubar=no,height=390,width=600,toolbar=no,scrollbars=no,status=no,dialog=1' | ||
78 | ); | ||
79 | } | ||
80 | )();"> | ||
81 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ Shaare link</span> | ||
82 | </a> | ||
83 | </div> | ||
84 | <div class="tools-item"> | ||
85 | <a title="Drag this link to your bookmarks toolbar or right-click it and Bookmark This Link, | ||
86 | Then click ✚Add Note button anytime to start composing a private Note (text post) to your Shaarli" | ||
87 | onclick="return alertBookmarklet();" | ||
88 | href="?private=1&post="> | ||
89 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ Add Note</span> | ||
90 | </a> | ||
91 | </div> | ||
92 | </div> | ||
93 | <div class="pure-u-lg-1-3 pure-u-1-8"></div> | ||
94 | </div> | ||
95 | |||
96 | <div class="pure-g"> | ||
97 | <div class="pure-u-lg-1-3 pure-u-1-8"></div> | ||
98 | <div class="pure-u-lg-1-3 pure-u-3-4 page-form"> | ||
99 | <h2>Firefox Social API</h2> | ||
100 | <p>You need to browse your Shaarli over <strong>HTTPS</strong> to use this functionality.</p> | ||
101 | |||
102 | <div class="tools-item"> | ||
103 | <a title="Click on this button to add Shaarli to the 'Share this page' button in Firefox" | ||
104 | onclick="activateFirefoxSocial(this)"> | ||
105 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">✚ Add to Firefox social</span> | ||
106 | </a> | ||
107 | </div> | ||
108 | </div> | ||
109 | <div class="pure-u-lg-1-3 pure-u-1-8"></div> | ||
110 | </div> | ||
111 | |||
112 | <div class="pure-g"> | ||
113 | <div class="pure-u-lg-1-3 pure-u-1-8"></div> | ||
114 | <div class="pure-u-lg-1-3 pure-u-3-4 page-form"> | ||
115 | <h2>3rd party</h2> | ||
116 | <div class="tools-item"> | ||
117 | <a href="https://addons.mozilla.org/fr/firefox/addon/shaarli/" title="Firefox Plugin"> | ||
118 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Firefox plugin</span> | ||
119 | </a> | ||
120 | </div> | ||
121 | <div class="tools-item"> | ||
122 | <a href="https://chrome.google.com/webstore/detail/shiny-shaarli/hajdfkmbdmadjmmpkkbbcnllepomekin" | ||
123 | title="Chrome Plugin"> | ||
124 | <span class="pure-button pure-u-lg-2-3 pure-u-3-4">Chrome plugin</span> | ||
125 | </a> | ||
126 | </div> | ||
127 | </div> | ||
128 | </div> | ||
129 | |||
130 | {include="page.footer"} | ||
131 | <script> | ||
132 | function activateFirefoxSocial(node) { | ||
133 | var loc = location.href; | ||
134 | var baseURL = loc.substring(0, loc.lastIndexOf("/")); | ||
135 | |||
136 | // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable. | ||
137 | var data = { | ||
138 | name: "{$shaarlititle}", | ||
139 | description: "The personal, minimalist, super-fast, no-database delicious clone.", | ||
140 | author: "Shaarli", | ||
141 | version: "1.0.0", | ||
142 | |||
143 | iconURL: baseURL + "/images/favicon.ico", | ||
144 | icon32URL: baseURL + "/images/favicon.ico", | ||
145 | icon64URL: baseURL + "/images/favicon.ico", | ||
146 | |||
147 | shareURL: baseURL + "{noparse}?post=%{url}&title=%{title}&description=%{text}&source=firefoxsocialapi{/noparse}", | ||
148 | homepageURL: baseURL | ||
149 | }; | ||
150 | node.setAttribute("data-service", JSON.stringify(data)); | ||
151 | |||
152 | var activate = new CustomEvent("ActivateSocialFeature"); | ||
153 | node.dispatchEvent(activate); | ||
154 | } | ||
155 | |||
156 | function alertBookmarklet() { | ||
157 | alert('Drag this link to your bookmarks toolbar, or right-click it and choose Bookmark This Link...'); | ||
158 | return false; | ||
159 | } | ||
160 | </script> | ||
161 | </body> | ||
162 | </html> | ||
163 | |||