Merge pull request #1037 from ArthurHoaro/theme/improvements2

Add CSS classes and IDs in Shaarli's menu
This commit is contained in:
ArthurHoaro 2018-01-01 14:32:02 +01:00 committed by GitHub
commit d77bdb432a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,7 @@
<div class="shaarli-menu pure-g" id="shaarli-menu"> <div class="shaarli-menu pure-g" id="shaarli-menu">
<div class="pure-u-lg-0 pure-u-1"> <div class="pure-u-lg-0 pure-u-1">
<div class="pure-menu"> <div class="pure-menu">
<a href="{$titleLink}" class="pure-menu-link"> <a href="{$titleLink}" class="pure-menu-link shaarli-title" id="shaarli-title-mobile">
<img src="img/icon.png" width="16" height="16" class="head-logo" alt="logo" /> <img src="img/icon.png" width="16" height="16" class="head-logo" alt="logo" />
{$shaarlititle} {$shaarlititle}
</a> </a>
@ -12,32 +12,32 @@
<div class="pure-menu menu-transform pure-menu-horizontal pure-g"> <div class="pure-menu menu-transform pure-menu-horizontal pure-g">
<ul class="pure-menu-list pure-u-lg-5-6 pure-u-1"> <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"> <li class="pure-menu-item pure-u-0 pure-u-lg-visible">
<a href="{$titleLink}" class="pure-menu-link"> <a href="{$titleLink}" class="pure-menu-link shaarli-title" id="shaarli-title-desktop">
<img src="img/icon.png" width="16" height="16" class="head-logo" alt="logo" /> <img src="img/icon.png" width="16" height="16" class="head-logo" alt="logo" />
{$shaarlititle} {$shaarlititle}
</a> </a>
</li> </li>
{if="isLoggedIn() || $openshaarli"} {if="isLoggedIn() || $openshaarli"}
<li class="pure-menu-item"> <li class="pure-menu-item">
<a href="?do=addlink" class="pure-menu-link"> <a href="?do=addlink" class="pure-menu-link" id="shaarli-menu-shaare">
<i class="fa fa-plus" ></i> {'Shaare'|t} <i class="fa fa-plus" ></i> {'Shaare'|t}
</a> </a>
</li> </li>
<li class="pure-menu-item"> <li class="pure-menu-item" id="shaarli-menu-tools">
<a href="?do=tools" class="pure-menu-link">{'Tools'|t}</a> <a href="?do=tools" class="pure-menu-link">{'Tools'|t}</a>
</li> </li>
{/if} {/if}
<li class="pure-menu-item"> <li class="pure-menu-item" id="shaarli-menu-tags">
<a href="?do=tagcloud" class="pure-menu-link">{'Tag cloud'|t}</a> <a href="?do=tagcloud" class="pure-menu-link">{'Tag cloud'|t}</a>
</li> </li>
<li class="pure-menu-item"> <li class="pure-menu-item" id="shaarli-menu-picwall">
<a href="?do=picwall{$searchcrits}" class="pure-menu-link">{'Picture wall'|t}</a> <a href="?do=picwall{$searchcrits}" class="pure-menu-link">{'Picture wall'|t}</a>
</li> </li>
<li class="pure-menu-item"> <li class="pure-menu-item" id="shaarli-menu-daily">
<a href="?do=daily" class="pure-menu-link">{'Daily'|t}</a> <a href="?do=daily" class="pure-menu-link">{'Daily'|t}</a>
</li> </li>
{loop="$plugins_header.buttons_toolbar"} {loop="$plugins_header.buttons_toolbar"}
<li class="pure-menu-item"> <li class="pure-menu-item shaarli-menu-plugin">
<a <a
{$value.attr.class=isset($value.class) ? $value.attr.class . ' pure-menu-link' : 'pure-menu-link'} {$value.attr.class=isset($value.class) ? $value.attr.class . ' pure-menu-link' : 'pure-menu-link'}
{loop="$value.attr"} {loop="$value.attr"}
@ -47,47 +47,47 @@
</a> </a>
</li> </li>
{/loop} {/loop}
<li class="pure-menu-item pure-u-lg-0"> <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-rss">
<a href="?do={$feed_type}{$searchcrits}" class="pure-menu-link">{'RSS Feed'|t}</a> <a href="?do={$feed_type}{$searchcrits}" class="pure-menu-link">{'RSS Feed'|t}</a>
</li> </li>
{if="isLoggedIn()"} {if="isLoggedIn()"}
<li class="pure-menu-item pure-u-lg-0"> <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-logout">
<a href="?do=logout" class="pure-menu-link">{'Logout'|t}</a> <a href="?do=logout" class="pure-menu-link">{'Logout'|t}</a>
</li> </li>
{else} {else}
<li class="pure-menu-item pure-u-lg-0"> <li class="pure-menu-item pure-u-lg-0 shaarli-menu-mobile" id="shaarli-menu-mobile-login">
<a href="?do=login" class="pure-menu-link">{'Login'|t}</a> <a href="?do=login" class="pure-menu-link">{'Login'|t}</a>
</li> </li>
{/if} {/if}
</ul> </ul>
<div class="header-buttons pure-u-lg-1-6 pure-u-0 pure-u-lg-visible"> <div class="header-buttons pure-u-lg-1-6 pure-u-0 pure-u-lg-visible">
<ul class="pure-menu-list"> <ul class="pure-menu-list">
<li class="pure-menu-item"> <li class="pure-menu-item" id="shaarli-menu-desktop-search">
<a href="#" class="pure-menu-link subheader-opener" <a href="#" class="pure-menu-link subheader-opener"
data-open-id="search" data-open-id="search"
id="search-button" title="{'Search'|t}"> id="search-button" title="{'Search'|t}">
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
</a> </a>
</li> </li>
<li class="pure-menu-item"> <li class="pure-menu-item" id="shaarli-menu-desktop-rss">
<a href="?do={$feed_type}{$searchcrits}" class="pure-menu-link" title="{'RSS Feed'|t}"> <a href="?do={$feed_type}{$searchcrits}" class="pure-menu-link" title="{'RSS Feed'|t}">
<i class="fa fa-rss"></i> <i class="fa fa-rss"></i>
</a> </a>
</li> </li>
{if="!isLoggedIn()"} {if="!isLoggedIn()"}
<li class="pure-menu-item"> <li class="pure-menu-item" id="shaarli-menu-desktop-login">
<a href="?do=login" class="pure-menu-link" <a href="?do=login" class="pure-menu-link"
data-open-id="header-login-form" data-open-id="header-login-form"
id="login-button" title="{'Login'|t}"> id="login-button" title="{'Login'|t}">
<i class="fa fa-user"></i> <i class="fa fa-user"></i>
</a> </a>
</li> </li>
{else} {else}
<li class="pure-menu-item"> <li class="pure-menu-item" id="shaarli-menu-desktop-logout">
<a href="?do=logout" class="pure-menu-link" title="{'Logout'|t}"> <a href="?do=logout" class="pure-menu-link" title="{'Logout'|t}">
<i class="fa fa-sign-out"></i> <i class="fa fa-sign-out"></i>
</a> </a>
</li> </li>
{/if} {/if}
</ul> </ul>
</div> </div>
@ -156,7 +156,7 @@
{/if} {/if}
{if="!empty($plugin_errors) && isLoggedIn()"} {if="!empty($plugin_errors) && isLoggedIn()"}
<div class="pure-g new-version-message pure-alert pure-alert-error pure-alert-closable"> <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-2-24"></div>
<div class="pure-u-20-24"> <div class="pure-u-20-24">
{loop="plugin_errors"} {loop="plugin_errors"}