MyShaarli/tpl/myShaarli/page.header.html

238 lines
8.1 KiB
HTML

<header>
<nav>
<h1>
<img src="{$asset_path}/img/favicon_128.png#" loading="lazy" height="120px" alt="logo" />
<a href="{$titleLink}">
{$shaarlititle}
</a>
</h1>
<ul>
{loop="$plugins_header.buttons_toolbar"}
<li>
<a
{loop="$value.attr"}
{$key}="{$value}"
{/loop}>
{$value.html}
</a>
</li>
{/loop}
{if="$is_logged_in || $openshaarli"}
<li>
<a href="{$base_path}/admin/add-shaare">
{'Shaare'|t}
</a>
</li>
<li>
<a href="{$base_path}/admin/tools">
{'Tools'|t}
</a>
</li>
{/if}
<li>
<a href="{$base_path}/tags/cloud">
{'Tag cloud'|t}
</a>
</li>
{if="$thumbnails_enabled"}
<li>
<a href="{$base_path}/picture-wall?{function="ltrim($searchcrits, '&')"}">
{'Picture wall'|t}
</a>
</li>
{/if}
</ul>
<ul>
<li>
<a href="#" title="Toggle Dark/Light theme" aria-label="Toggle Dark/Light theme" onclick="switchTheme();">
<i class="fa fa-moon-o" aria-hidden="true"></i>
</a>
</li>
<li>
<a href="{$base_path}/feed/{$feed_type}?{$searchcrits}" 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>
<a href="{$base_path}/login"
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>
<a href="{$base_path}/admin/logout" aria-label="{'Logout'|t}" title="{'Logout'|t}">
<i class="fa fa-sign-out" aria-hidden="true"></i>
</a>
</li>
{/if}
</ul>
</nav>
</header>
<main id="content" class="container" role="main" data-theme="dark">
<div id="search" class="subheader-form searchform-block header-search">
<form method="GET" class="pure-form searchform" name="searchform" action="{$base_path}/">
<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>&nbsp;
<a href="" class="subheader-opener button" data-open-id="bulk-tag-action-add">
<i class="fa fa-tag" aria-hidden="true"></i>
{'Add tags'|t}
</a>&nbsp;
<a href="" class="subheader-opener button" data-open-id="bulk-tag-action-delete">
<i class="fa fa-window-close" aria-hidden="true"></i>
{'Delete tags'|t}
</a>
</div>
</div>
</div>
{$addDelete=['add', 'delete']}
{loop="$addDelete"}
<div id="bulk-tag-action-{$value}" class="subheader-form">
<form class="pure-g" action="{$base_path}/admin/shaare/update-tags" method="post">
<div class="pure-u-1">
<span>
<input
type="text" name="tag" class="autofocus"
aria-label="{$value === 'add' ? t('Tag to add') : t('Tag to delete')}"
placeholder="{$value === 'add' ? t('Tag to add') : t('Tag to delete')}"
autocomplete="off" data-multiple data-autofirst data-minChars="1"
data-list="{loop="$tags"}{$key}, {/loop}"
>
<input type="hidden" name="action" value="{$value}" />
<input type="hidden" name="id" value="" />
<input type="hidden" name="token" value="{$token}" />
</span>&nbsp;
<a href="" class="button action">
<i class="fa fa-tag" aria-hidden="true"></i>
{$value === 'add' ? t('Add tag') : t('Delete tag')}
</a>&nbsp;
<a href="" class="subheader-opener button cancel" data-open-id="actions">{'Cancel'|t}</a>
</div>
</form>
</div>
{/loop}
{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}" autocapitalize="off" >
<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)"}
<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)"}
<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)"}
<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>