Support either full URL or file from static folder
- ASSUMES: A full URL will start with http
This commit is contained in:
parent
8e4b42511a
commit
2871520111
1 changed files with 11 additions and 4 deletions
|
@ -4,7 +4,11 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="stylesheet" href="{{ get_url(path="main.css") | safe }}">
|
<link rel="stylesheet" href="{{ get_url(path="main.css") | safe }}">
|
||||||
{% if config.extra.favicon %}
|
{% if config.extra.favicon %}
|
||||||
<link rel="icon" href="{{ get_url(path=config.extra.favicon) | safe }}">
|
{% set _favicon = config.extra.favicon %}
|
||||||
|
{% if (_favicon is starting_with("http")) == false %}
|
||||||
|
{% set _favicon = get_url(path=config.extra.favicon) %}
|
||||||
|
{% endif %}
|
||||||
|
<link rel="icon" href="{{ _favicon | safe }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||||
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
|
<title>{% block title %}{{ config.title }}{% endblock title %}</title>
|
||||||
|
@ -30,11 +34,14 @@
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
{% if config.extra.logo %}
|
{% if config.extra.logo %}
|
||||||
|
{% set _logo = config.extra.logo %}
|
||||||
|
{% if (_logo is starting_with("http")) == false %}
|
||||||
|
{% set _logo = get_url(path=config.extra.logo) %}
|
||||||
|
{% endif %}
|
||||||
{% if current_path == "/" and not config.extra.easydocs_logo_always_clickable %}
|
{% if current_path == "/" and not config.extra.easydocs_logo_always_clickable %}
|
||||||
<img src="{{ get_url(path=config.extra.logo) | safe }}" alt=""/>
|
<img src="{{ _logo | safe }}" alt=""/>
|
||||||
|
|
||||||
{% else %}<a href="{{ config.base_url }}">
|
{% else %}<a href="{{ config.base_url }}">
|
||||||
<img src="{{ get_url(path=config.extra.logo) | safe }}" alt=""/>
|
<img src="{{ _logo | safe }}" alt=""/>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue