aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/default
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-10-15 17:01:37 +0200
committerArthurHoaro <arthur@hoa.ro>2016-11-05 14:29:53 +0100
commit6eafe49eb9afad21b0ce2069489ef1dfc1daf941 (patch)
treea2302a391123d4bd03bcec78c3530a136920d5b3 /tpl/default
parent7aff34edf05ea791a531c8787d3d6ca792ffb304 (diff)
downloadShaarli-6eafe49eb9afad21b0ce2069489ef1dfc1daf941.tar.gz
Shaarli-6eafe49eb9afad21b0ce2069489ef1dfc1daf941.tar.zst
Shaarli-6eafe49eb9afad21b0ce2069489ef1dfc1daf941.zip
Import/export templates and minor fixes
Diffstat (limited to 'tpl/default')
-rw-r--r--tpl/default/css/shaarli.css17
-rw-r--r--tpl/default/export.html73
-rw-r--r--tpl/default/import.html87
-rw-r--r--tpl/default/js/shaarli.js5
-rw-r--r--tpl/default/loginform.html4
-rw-r--r--tpl/default/page.footer.html2
-rw-r--r--tpl/default/page.header.html26
7 files changed, 197 insertions, 17 deletions
diff --git a/tpl/default/css/shaarli.css b/tpl/default/css/shaarli.css
index 22c173b1..4b1be7e2 100644
--- a/tpl/default/css/shaarli.css
+++ b/tpl/default/css/shaarli.css
@@ -789,6 +789,11 @@ pre {
789 content:"\a\a"; 789 content:"\a\a";
790 white-space: pre; 790 white-space: pre;
791 } 791 }
792
793 .page-form-complete .radio-buttons {
794 text-align: left;
795 padding: 5px 15px;
796 }
792} 797}
793 798
794 799
@@ -970,3 +975,15 @@ pre {
970 border-top-style: none; 975 border-top-style: none;
971 } 976 }
972} 977}
978
979
980/**
981 * IMPORT
982 */
983#import-field {
984 margin: 15px 0;
985}
986
987@media screen and (max-width: 64em) {
988
989} \ No newline at end of file
diff --git a/tpl/default/export.html b/tpl/default/export.html
new file mode 100644
index 00000000..f6419763
--- /dev/null
+++ b/tpl/default/export.html
@@ -0,0 +1,73 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8
9{$ratioLabel='5-12'}
10{$ratioLabelMobile='7-8'}
11{$ratioInput='7-12'}
12{$ratioInputMobile='1-8'}
13
14<form method="GET" action="" name="exportform" id="exportform">
15 <div class="pure-g">
16 <div class="pure-u-lg-1-4 pure-u-1-8"></div>
17 <div class="pure-u-lg-1-2 pure-u-3-4 page-form page-form-complete">
18 <div>
19 <h2>{"Export Database"|t}</h2>
20 </div>
21 <input type="hidden" name="do" value="export">
22 <input type="hidden" name="token" value="{$token}">
23
24 <div class="pure-g">
25 <div class="pure-u-lg-1-2 pure-u-1">
26 <div class="form-label">
27 <label><span class="label-name">{'Selection'|t}</span></label>
28 </div>
29 </div>
30 <div class="pure-u-lg-1-2 pure-u-1">
31 <div class="radio-buttons">
32 <div>
33 <input type="radio" name="selection" value="all" checked="true">
34 {'All'|t}
35 </div>
36 <div>
37 <input type="radio" name="selection" value="private">
38 {'Private'|t}
39 </div>
40 <div>
41 <input type="radio" name="selection" value="public">
42 {'Public'|t}
43 </div>
44 </div>
45 </div>
46 </div>
47
48 <div class="pure-g">
49 <div class="pure-u-lg-1-2 pure-u-7-8">
50 <div class="form-label">
51 <label for="prepend_note_url">
52 <span class="label-name">{'Prepend note permalinks with this Shaarli instance\'s URL'|t}</span><br>
53 <span class="label-desc">{'Useful to import bookmarks in a web browser'|t}</span>
54 </label>
55 </div>
56 </div>
57 <div class="pure-u-lg-1-2 pure-u-1-8">
58 <div class="form-input">
59 <input type="checkbox" name="prepend_note_url" id="prepend_note_url">
60 </div>
61 </div>
62 </div>
63
64 <div class="center">
65 <input type="submit" value="{'Export'|t}">
66 </div>
67 </div>
68 </div>
69</form>
70
71{include="page.footer"}
72</body>
73</html>
diff --git a/tpl/default/import.html b/tpl/default/import.html
new file mode 100644
index 00000000..3e770110
--- /dev/null
+++ b/tpl/default/import.html
@@ -0,0 +1,87 @@
1<!DOCTYPE html>
2<html>
3<head>
4 {include="includes"}
5</head>
6<body>
7{include="page.header"}
8
9{$ratioLabel='5-12'}
10{$ratioLabelMobile='7-8'}
11{$ratioInput='7-12'}
12{$ratioInputMobile='1-8'}
13
14<form method="POST" action="?do=import" enctype="multipart/form-data" name="uploadform" id="uploadform">
15 <div class="pure-g">
16 <div class="pure-u-lg-1-4 pure-u-1-8"></div>
17 <div class="pure-u-lg-1-2 pure-u-3-4 page-form page-form-complete">
18 <div>
19 <h2>{"Import Database"|t}</h2>
20 </div>
21
22 <input type="hidden" name="token" value="{$token}">
23 <div class="center" id="import-field">
24 <input type="hidden" name="MAX_FILE_SIZE" value="{$maxfilesize}">
25 <input type="file" name="filetoupload">
26 </div>
27
28 <div class="pure-g">
29 <div class="pure-u-lg-1-3 pure-u-1">
30 <div class="form-label">
31 <label><span class="label-name">{'Visibility'|t}</span></label>
32 </div>
33 </div>
34 <div class="pure-u-lg-2-3 pure-u-1">
35 <div class="radio-buttons">
36 <div>
37 <input type="radio" name="privacy" value="default" checked="true">
38 Use values from the imported file, default to public
39 </div>
40 <div>
41 <input type="radio" name="privacy" value="private">
42 Import all bookmarks as private
43 </div>
44 <div>
45 <input type="radio" name="privacy" value="public">
46 Import all bookmarks as public
47 </div>
48 </div>
49 </div>
50 </div>
51
52 <div class="pure-g">
53 <div class="pure-u-lg-1-3 pure-u-7-8">
54 <div class="form-label">
55 <label for="overwrite"><span class="label-name">{'Overwrite existing bookmarks'|t}</span></label>
56 </div>
57 </div>
58 <div class="pure-u-lg-2-3 pure-u-1-8">
59 <div class="form-input">
60 <input type="checkbox" name="overwrite" id="overwrite">
61 </div>
62 </div>
63 </div>
64
65 <div class="pure-g">
66 <div class="pure-u-lg-1-3 pure-u-1">
67 <div class="form-label">
68 <label for="default_tags"><span class="label-name">{'Add default tags'|t}</span></label>
69 </div>
70 </div>
71 <div class="pure-u-lg-2-3 pure-u-1">
72 <div class="form-input">
73 <input type="text" name="default_tags" id="default_tags">
74 </div>
75 </div>
76 </div>
77
78 <div class="center">
79 <input type="submit" name="import_file" value="{'Import'|t}">
80 </div>
81 </div>
82 </div>
83</form>
84
85{include="page.footer"}
86</body>
87</html>
diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js
index e5425486..53ec20c5 100644
--- a/tpl/default/js/shaarli.js
+++ b/tpl/default/js/shaarli.js
@@ -166,9 +166,10 @@ if (hiddenReturnurl != null) {
166 hiddenReturnurl.value = window.location.href; 166 hiddenReturnurl.value = window.location.href;
167} 167}
168 168
169 169/**
170 * Autofocus text fields
171 */
170var autofocusElements = document.querySelector('.autofocus'); 172var autofocusElements = document.querySelector('.autofocus');
171console.log(autofocusElements);
172if (autofocusElements != null) { 173if (autofocusElements != null) {
173 autofocusElements.focus(); 174 autofocusElements.focus();
174} \ No newline at end of file 175} \ No newline at end of file
diff --git a/tpl/default/loginform.html b/tpl/default/loginform.html
index 21923606..28c92f3e 100644
--- a/tpl/default/loginform.html
+++ b/tpl/default/loginform.html
@@ -28,8 +28,8 @@
28 <input type="password" name="password" placeholder="{'Password'|t}" tabindex="21"> 28 <input type="password" name="password" placeholder="{'Password'|t}" tabindex="21">
29 </div> 29 </div>
30 <div class="remember-me"> 30 <div class="remember-me">
31 <input type="checkbox" name="longlastingsession" id="longlastingsession" tabindex="22"> 31 <input type="checkbox" name="longlastingsession" id="longlastingsessionform" tabindex="22">
32 <label for="longlastingsession">{'Remember me'|t}</label> 32 <label for="longlastingsessionform">{'Remember me'|t}</label>
33 </div> 33 </div>
34 <div> 34 <div>
35 <input type="submit" value="{'Login'|t}" class="bigbutton" tabindex="23"> 35 <input type="submit" value="{'Login'|t}" class="bigbutton" tabindex="23">
diff --git a/tpl/default/page.footer.html b/tpl/default/page.footer.html
index f5a92382..b9d4389b 100644
--- a/tpl/default/page.footer.html
+++ b/tpl/default/page.footer.html
@@ -3,7 +3,7 @@
3 <div id="footer" class="pure-u-20-24"> 3 <div id="footer" class="pure-u-20-24">
4 <strong><a href="https://github.com/shaarli/Shaarli">Shaarli</a></strong> - 4 <strong><a href="https://github.com/shaarli/Shaarli">Shaarli</a></strong> -
5 The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - 5 The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community -
6 <a href="doc/Home.html" rel="nofollow">Help/documentation</a> 6 <a href="doc/Home.html" rel="nofollow">Documentation</a>
7 {loop="$plugins_footer.text"} 7 {loop="$plugins_footer.text"}
8 {$value} 8 {$value}
9 {/loop} 9 {/loop}
diff --git a/tpl/default/page.header.html b/tpl/default/page.header.html
index 177b32fb..5442ab42 100644
--- a/tpl/default/page.header.html
+++ b/tpl/default/page.header.html
@@ -118,19 +118,21 @@
118</div> 118</div>
119 119
120<div id="content"> 120<div id="content">
121 <form method="post" name="loginform"> 121 {if="!isLoggedIn()"}
122 <div id="header-login-form"> 122 <form method="post" name="loginform">
123 <input type="text" name="login" placeholder="{'Username'|t}" tabindex="3"> 123 <div id="header-login-form">
124 <input type="password" name="password" placeholder="{'Password'|t}" tabindex="5"> 124 <input type="text" name="login" placeholder="{'Username'|t}" tabindex="3">
125 <div class="remember-me"> 125 <input type="password" name="password" placeholder="{'Password'|t}" tabindex="5">
126 <input type="checkbox" name="longlastingsession" id="longlastingsession" tabindex="6"> 126 <div class="remember-me">
127 <label for="longlastingsession">{'Remember me'|t}</label> 127 <input type="checkbox" name="longlastingsession" id="longlastingsession" tabindex="6">
128 <label for="longlastingsession">{'Remember me'|t}</label>
129 </div>
130 <input type="hidden" name="token" value="{$token}">
131 <input type="hidden" name="returnurl">
132 <input type="submit" value="Login" tabindex="7">
128 </div> 133 </div>
129 <input type="hidden" name="token" value="{$token}"> 134 </form>
130 <input type="hidden" name="returnurl"> 135 {/if}
131 <input type="submit" value="Login" tabindex="7">
132 </div>
133 </form>
134 136
135{if="!empty($newVersion) || !empty($versionError)"} 137{if="!empty($newVersion) || !empty($versionError)"}
136 <div class="pure-g new-version-message pure-alert pure-alert-warning pure-alert-closable"> 138 <div class="pure-g new-version-message pure-alert pure-alert-warning pure-alert-closable">