mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-06-07 20:08:54 +00:00
Added login, lang and search icons to header
This commit is contained in:
parent
688aaa02de
commit
49a076c6bc
3 changed files with 82 additions and 8 deletions
|
@ -87,6 +87,47 @@ form:
|
|||
slogan:
|
||||
type: text
|
||||
label: FUTURE.ADMIN.THEME.SLOGAN
|
||||
|
||||
menu_options:
|
||||
type: section
|
||||
title: FUTURE.ADMIN.THEME.MENU.TITLE
|
||||
underline: true
|
||||
|
||||
menu_langswitcher:
|
||||
type: toggle
|
||||
label: FUTURE.ADMIN.THEME.MENU.LANGSWITCHER
|
||||
help: FUTURE.ADMIN.THEME.MENU.LANGSWITCHER_HELP
|
||||
default: 1
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
menu_search:
|
||||
type: toggle
|
||||
label: FUTURE.ADMIN.THEME.MENU.SEARCH
|
||||
help: FUTURE.ADMIN.THEME.MENU.SEARCH_HELP
|
||||
default: 1
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
menu_login:
|
||||
type: toggle
|
||||
label: FUTURE.ADMIN.THEME.MENU.LOGIN
|
||||
help: FUTURE.ADMIN.THEME.MENU.LOGIN_HELP
|
||||
default: 1
|
||||
highlight: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
|
||||
blog_section:
|
||||
type: fieldset
|
||||
|
|
|
@ -11,6 +11,14 @@ en:
|
|||
CUSTOM_LOGO_DESCRIPTION: Will be used instead of default logo `theme://images/grav-logo.svg`
|
||||
CUSTOM_LOGO_MOBILE: Mobile Custom Logo
|
||||
SLOGAN: Slogan
|
||||
MENU:
|
||||
TITLE: Top Menu Configuration
|
||||
LANGSWITCHER: Enable Langswitcher icon
|
||||
LANGSWITCHER_HELP: With Langswitcher plugin enabled and multi-language setup in your site, you can enable or disable the langswitcher functionality appearing in the top menu.
|
||||
SEARCH: Enable Search icon
|
||||
SEARCH_HELP: With SimpleSearch plugin enabled you can enable or disable the search block in top menu.
|
||||
LOGIN: Enable Login icon
|
||||
LOGIN_HELP: You can enable or disable Login icon in top menu, to show login status.
|
||||
BLOG_DEFAULTS: Blog Defaults
|
||||
BLOG_PAGE: Blog Page
|
||||
BLOG_PAGE_HELP: The route to the blog page when working with blog sidebar
|
||||
|
@ -212,8 +220,6 @@ en:
|
|||
HEADLINE: Archives
|
||||
SYNDICATE:
|
||||
HEADLINE: Syndicate
|
||||
|
||||
LOGIN: Log in
|
||||
LATESTPOSTS: Latest posts
|
||||
FEATURED: Featured
|
||||
PRIVACY: By using this form you agree our terms
|
||||
|
@ -234,6 +240,14 @@ de:
|
|||
CUSTOM_LOGO_DESCRIPTION: Dieses Logo wird anstelle des Standardlogos `theme://images/grav-logo.svg` verwendet
|
||||
CUSTOM_LOGO_MOBILE: Benutzerdefiniertes Logo für Mobilgeräte
|
||||
SLOGAN: Motto
|
||||
MENU:
|
||||
TITLE:
|
||||
LANGSWITCHER:
|
||||
LANGSWITCHER_HELP:
|
||||
SEARCH:
|
||||
SEARCH_HELP:
|
||||
LOGIN:
|
||||
LOGIN_HELP:
|
||||
BLOG_DEFAULTS: Blog-Optionen
|
||||
BLOG_PAGE: Blog-Seite
|
||||
BLOG_PAGE_HELP: Der Pfad zur Blog-Seite wenn die Blog-Seitenleiste aktiv ist
|
||||
|
@ -432,8 +446,6 @@ de:
|
|||
HEADLINE: Letzte Einträge
|
||||
SYNDICATE:
|
||||
HEADLINE: Verteilen
|
||||
|
||||
LOGIN: Einloggen
|
||||
LATESTPOSTS: Letzte Beiträge
|
||||
FEATURED: Hervorgehoben
|
||||
PRIVACY: Durch die Nutzung dieses Formulars stimmen Sie unseren Bedingungen zu
|
||||
|
@ -454,6 +466,14 @@ es:
|
|||
CUSTOM_LOGO_DESCRIPTION: Este logo se usará en lugar del log por defecto `theme://images/grav-logo.svg`
|
||||
CUSTOM_LOGO_MOBILE: Logo personalizado para dispositivos móviles
|
||||
SLOGAN: Slogan
|
||||
MENU:
|
||||
TITLE: Configuración del Menú Superior
|
||||
LANGSWITCHER: Habilitar icono Idioma
|
||||
LANGSWITCHER_HELP: Con el complemento Langswitcher habilitado y la configuración multilingüe en su sitio, puede habilitar o deshabilitar la funcionalidad de cambiar de idioma, que aparece en el menú superior.
|
||||
SEARCH: Habilitar icono Buscar
|
||||
SEARCH_HELP: Con el complemento SimpleSearch habilitado, puede habilitar o deshabilitar el bloque de búsqueda en el menú superior.
|
||||
LOGIN: Habilitar icono Login
|
||||
LOGIN_HELP: Puede habilitar o deshabilitar el icono de inicio de sesión en el menú superior para mostrar el estado de la sesión.
|
||||
BLOG_DEFAULTS: Opciones de Blog
|
||||
BLOG_PAGE: Página de Blog
|
||||
BLOG_PAGE_HELP: Ruta de la página de Blog cuando funciona con el blog de barra lateral
|
||||
|
@ -641,8 +661,6 @@ es:
|
|||
HEADLINE: Últimas entradas
|
||||
SYNDICATE:
|
||||
HEADLINE: Distribuir
|
||||
|
||||
LOGIN: Iniciar sesión
|
||||
LATESTPOSTS: Últimos posts
|
||||
FEATURED: Destacados
|
||||
PRIVACY: Al usar este formulario estás de acuerdo con nuestra
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
{% set icon_lang = theme_var('menu_langswitcher')|defined('true') %}
|
||||
{% set icon_search = theme_var('menu_search')|defined('true') %}
|
||||
{% set icon_login = theme_var('menu_login')|defined('true') %}
|
||||
|
||||
<header id="header">
|
||||
<h1 class="logo">
|
||||
<a href="{{ home_url }}">{{ site.title }}</a>
|
||||
|
@ -10,10 +14,21 @@
|
|||
<nav class="main">
|
||||
{% block header_extra %}
|
||||
<ul>
|
||||
{% if config.plugins.langswitcher.enabled and system.languages.supported is not null %}
|
||||
{% if icon_login %}
|
||||
<li class="login-logout">
|
||||
{% if not grav.user.authenticated %}
|
||||
<a class="fa-sign-in-alt" href="{{ base_url_absolute }}/login" title="{{ 'PLUGIN_LOGIN.BTN_LOGIN'|t }}">{{ 'PLUGIN_LOGIN.BTN_LOGIN'|t }}</a>
|
||||
{% else %}
|
||||
<a class="fa-sign-out-alt" href="{{ url(uri.addNonce((uri.path)|trim('/') ~ '/task' ~ config.system.param_sep ~ 'login.logout', 'logout-form', 'logout-nonce'))|e }}" title="{{ 'PLUGIN_LOGIN.BTN_LOGOUT'|t }} {{ grav.user.fullname ?: grav.user.username }}">{{ 'PLUGIN_LOGIN.BTN_LOGOUT'|t }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if icon_lang and config.plugins.langswitcher.enabled and system.languages.supported is not null %}
|
||||
{% include 'partials/langswitcher.html.twig' %}
|
||||
{% endif %}
|
||||
{% if config.plugins.simplesearch.enabled %}
|
||||
|
||||
{% if config.plugins.simplesearch.enabled and icon_search %}
|
||||
{% include 'partials/simplesearch_searchbox.html.twig' %}
|
||||
{% endif %}
|
||||
<li class="menu">
|
||||
|
|
Loading…
Add table
Reference in a new issue