mirror of
https://github.com/pmoreno-rodriguez/grav-theme-future2021.git
synced 2025-06-07 11:58:53 +00:00
Added options to display logo in header
This commit is contained in:
parent
9efe80590a
commit
e43950104b
3 changed files with 19 additions and 8 deletions
|
@ -2,11 +2,22 @@
|
|||
{% set icon_lang = theme_var('menu_langswitcher')|defined('false') %}
|
||||
{% set icon_search = theme_var('menu_search')|defined('false') %}
|
||||
{% set icon_login = theme_var('menu_login')|defined('false') %}
|
||||
|
||||
{% set logoImageHeader = theme_var('type_logo_header')|defined('text') %}
|
||||
<header id="header">
|
||||
<div class="logo">
|
||||
<a href="{{ home_url }}">{{ site.title }}</a>
|
||||
</div>
|
||||
|
||||
<div class="logo">
|
||||
|
||||
<a href="{{ home_url }}" class="">
|
||||
{% if logoImageHeader == 'image' %}
|
||||
{% include 'partials/logo.html.twig' with {'logo_class': 'logo-img'} %}
|
||||
{% elseif logoImageHeader == 'both' %}
|
||||
{% include 'partials/logo.html.twig' with {'logo_class': 'logo-img'} %}{{ site.title }}
|
||||
{% else %}
|
||||
{{ site.title }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<nav class="dropdown">
|
||||
{% block header_navigation %}
|
||||
{% include 'partials/navigation.html.twig' %}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
{% set logo = theme_var('custom_logo_mobile') ?: theme_var('custom_logo') %}
|
||||
<a href="{{ home_url }}" class="logo" rel="nofollow" title="{{ site.title|raw }}">
|
||||
{% if logo %}
|
||||
{% set logo_file = (logo|first).name %}
|
||||
<img src="{{ url('theme://images/logo/' ~ logo_file) }}" alt="{{ site.title|raw }}"/>
|
||||
<img src="{{ url('theme://images/logo/' ~ logo_file) }}" alt="{{ site.title|raw }}" class="{{ logo_class }}"/>
|
||||
{% else %}
|
||||
{% include('@images/grav-logo.svg') %}
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endif %}
|
|
@ -1,6 +1,8 @@
|
|||
<!-- Intro -->
|
||||
<section id="intro">
|
||||
<a href="{{ home_url }}" class="logo" rel="nofollow" title="{{ site.title|raw }}">
|
||||
{% include 'partials/logo.html.twig' %}
|
||||
</a>
|
||||
<header>
|
||||
<h2>{{ site.title|e('html') }}</h2>
|
||||
<p>{{theme_config.slogan|raw}}</p>
|
||||
|
|
Loading…
Add table
Reference in a new issue