aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/default/page.header.html
blob: 7117e3ca2f0e879a5809143f9d15ecf73b30c646 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<div class="shaarli-menu pure-g" id="shaarli-menu">
  <div class="pure-u-lg-0 pure-u-1">
    <div class="pure-menu">
     <header role="banner">
      <a href="{$titleLink}" class="pure-menu-link shaarli-title" id="shaarli-title-mobile">
        <i class="fa fa-shaarli" aria-hidden="true"></i>
        {$shaarlititle}
      </a>
      </header>
      <a href="#" class="menu-toggle" id="menu-toggle" aria-label="{'Menu'|t}"><s class="bar" aria-hidden="true"></s><s class="bar" aria-hidden="true"></s></a>
    </div>
  </div>
  <div class="pure-u-1">
    <div class="pure-menu menu-transform pure-menu-horizontal pure-g">
      <ul class="pure-menu-list pure-u-lg-5-6 pure-u-1">
        <li class="pure-menu-item pure-u-0 pure-u-lg-visible">
          <a href="{$titleLink}" class="pure-menu-link shaarli-title" id="shaarli-title-desktop">
            <i class="fa fa-shaarli" aria-hidden="true"></i>
            {$shaarlititle}
          </a>
        </li>
        {if="$is_logged_in || $openshaarli"}
          <li class="pure-menu-item">
            <a href="{$base_path}/add-shaare" class="pure-menu-link" id="shaarli-menu-shaare">
              <i class="fa fa-plus" aria-hidden="true"></i> {'Shaare'|t}
            </a>
          </li>
          <li class="pure-menu-item" id="shaarli-menu-tools">
            <a href="{$base_path}/tools" class="pure-menu-link">{'Tools'|t}</a>
          </li>
        {/if}
        <li class="pure-menu-item" id="shaarli-menu-tags">
          <a href="{$base_path}/tag-cloud" class="pure-menu-link">{'Tag cloud'|t}</a>
        </li>
        {if="$thumbnails_enabled"}
          <li class="pure-menu-item" id="shaarli-menu-picwall">
            <a href="{$base_path}/picture-wall?{function="ltrim($searchcrits, '&')"}" class="pure-menu-link">{'Picture wall'|t}</a>
          </li>
        {/if}
        <li class="pure-menu-item" id="shaarli-menu-daily">
          <a href="{$base_path}/daily" class="pure-menu-link">{'Daily'|t}</a>
        </li>
        {loop="$plugins_header.buttons_toolbar"}
          <li class="pure-menu-item shaarli-menu-plugin">
            <a
              {$value.attr.class=isset($value.class) ? $value.attr.class . ' pure-menu-link' : 'pure-menu-link'}
              {loop="$value.attr"}
                {$key}="{$value}"
              {/loop}>
              {$value.html}
            </a>
          </li>
        {/loop}
        <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-rss">
            <a href="{$base_path}/feed-{$feed_type}?{$searchcrits}" class="pure-menu-link">{'RSS Feed'|t}</a>
        </li>
        {if="$is_logged_in"}
          <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-logout">
            <a href="{$base_path}/logout" class="pure-menu-link">{'Logout'|t}</a>
          </li>
        {else}
          <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-login">
            <a href="{$base_path}/login" class="pure-menu-link">{'Login'|t}</a>
          </li>
        {/if}
      </ul>
      <div class="header-buttons pure-u-lg-1-6 pure-u-0 pure-u-lg-visible">
        <ul class="pure-menu-list">
          <li class="pure-menu-item" id="shaarli-menu-desktop-search">
            <a href="#" class="pure-menu-link subheader-opener"
               data-open-id="search"
               id="search-button" aria-label="{'Search'|t}" title="{'Search'|t}">
              <i class="fa fa-search" aria-hidden="true"></i>
            </a>
          </li>
          <li class="pure-menu-item" id="shaarli-menu-desktop-rss">
            <a href="{$base_path}/feed-{$feed_type}?{$searchcrits}" class="pure-menu-link" title="{'RSS Feed'|t}" aria-label="{'RSS Feed'|t}">
              <i class="fa fa-rss" aria-hidden="true"></i>
            </a>
          </li>
          {if="!$is_logged_in"}
            <li class="pure-menu-item" id="shaarli-menu-desktop-login">
              <a href="{$base_path}/login" class="pure-menu-link"
                 data-open-id="header-login-form"
                 id="login-button" aria-label="{'Login'|t}" title="{'Login'|t}">
                <i class="fa fa-user" aria-hidden="true"></i>
              </a>
            </li>
          {else}
            <li class="pure-menu-item" id="shaarli-menu-desktop-logout">
              <a href="{$base_path}/logout" class="pure-menu-link" aria-label="{'Logout'|t}" title="{'Logout'|t}">
                <i class="fa fa-sign-out" aria-hidden="true"></i>
              </a>
            </li>
          {/if}
        </ul>
      </div>
    </div>
  </div>
</div>

<main id="content" class="container" role="main">
  <div id="search" class="subheader-form searchform-block header-search">
    <form method="GET" class="pure-form searchform" name="searchform">
      <input type="text" id="searchform_value" name="searchterm" aria-label="{'Search text'|t}" placeholder="{'Search text'|t}"
             {if="!empty($search_term)"}
             value="{$search_term}"
             {/if}
      >
      <input type="text" name="searchtags" id="tagfilter_value" aria-label="{'Filter by tag'|t}" placeholder="{'Filter by tag'|t}"
             {if="!empty($search_tags)"}
             value="{$search_tags}"
             {/if}
      autocomplete="off" data-multiple data-autofirst data-minChars="1"
      data-list="{loop="$tags"}{$key}, {/loop}"
      >
      <button type="submit" class="search-button" aria-label="{'Search'|t}"><i class="fa fa-search" aria-hidden="true"></i></button>
    </form>
  </div>
  <div id="actions" class="subheader-form">
    <div class="pure-g">
      <div class="pure-u-1">
        <a href="" id="actions-delete" class="button">
          <i class="fa fa-trash" aria-hidden="true"></i>
          {'Delete'|t}
        </a>&nbsp;
        <a href="" class="actions-change-visibility button" data-visibility="public">
          <i class="fa fa-globe" aria-hidden="true"></i>
          {'Set public'|t}
        </a>&nbsp;
        <a href="" class="actions-change-visibility button" data-visibility="private">
          <i class="fa fa-user-secret" aria-hidden="true"></i>
          {'Set private'|t}
        </a>
      </div>
    </div>
  </div>
  {if="!$is_logged_in"}
    <form method="post" name="loginform">
      <div class="subheader-form header-login-form" id="header-login-form">
        <input type="text" name="login" aria-label="{'Username'|t}" placeholder="{'Username'|t}" >
        <input type="password" name="password" aria-label="{'Password'|t}" placeholder="{'Password'|t}" >
        <div class="remember-me">
          <input type="checkbox" name="longlastingsession" id="longlastingsession" checked>
          <label for="longlastingsession">{'Remember me'|t}</label>
        </div>
        <input type="hidden" name="token" value="{$token}">
        <input type="hidden" name="returnurl">
        <input type="submit" value="Login">
      </div>
    </form>
  {/if}
{if="!empty($newVersion) || !empty($versionError)"}
  <div class="pure-g new-version-message pure-alert pure-alert-warning pure-alert-closable">
    <div class="pure-u-2-24"></div>
    {if="$newVersion"}
      <div class="pure-u-20-24">
        Shaarli {$newVersion}
        <a href="https://github.com/shaarli/Shaarli/releases">{'is available'|t}</a>.
      </div>
    {/if}
    {if="$versionError"}
      <div class="pure-u-20-24">
        {'Error'|t}: {$versionError}
      </div>
    {/if}
    <div class="pure-u-2-24">
      <i id="new-version-dismiss" class="fa fa-times pure-alert-close"></i>
    </div>
  </div>
{/if}

{if="!empty($plugin_errors) && $is_logged_in"}
  <div class="pure-g new-version-message pure-alert pure-alert-error pure-alert-closable" id="shaarli-errors-alert">
    <div class="pure-u-2-24"></div>
    <div class="pure-u-20-24">
        {loop="plugin_errors"}
            <p>{$value}</p>
        {/loop}
    </div>
    <div class="pure-u-2-24">
      <i class="fa fa-times pure-alert-close"></i>
    </div>
  </div>
{/if}

{if="!empty($global_errors) && $is_logged_in"}
  <div class="pure-g header-alert-message pure-alert pure-alert-error pure-alert-closable" id="shaarli-errors-alert">
  <div class="pure-u-2-24"></div>
    <div class="pure-u-20-24">
      {loop="$global_errors"}
        <p>{$value}</p>
      {/loop}
    </div>
    <div class="pure-u-2-24">
      <i class="fa fa-times pure-alert-close"></i>
    </div>
  </div>
{/if}

{if="!empty($global_warnings) && $is_logged_in"}
  <div class="pure-g header-alert-message pure-alert pure-alert-warning pure-alert-closable" id="shaarli-warnings-alert">
    <div class="pure-u-2-24"></div>
    <div class="pure-u-20-24">
      {loop="global_warnings"}
        <p>{$value}</p>
      {/loop}
    </div>
    <div class="pure-u-2-24">
      <i class="fa fa-times pure-alert-close"></i>
    </div>
  </div>
{/if}

{if="!empty($global_successes) && $is_logged_in"}
  <div class="pure-g header-alert-message new-version-message pure-alert pure-alert-success pure-alert-closable" id="shaarli-success-alert">
    <div class="pure-u-2-24"></div>
    <div class="pure-u-20-24">
      {loop="$global_successes"}
      <p>{$value}</p>
      {/loop}
    </div>
    <div class="pure-u-2-24">
      <i class="fa fa-times pure-alert-close"></i>
    </div>
  </div>
{/if}

  <div class="clear"></div>