refactor: allow to include head.html in custom app (#18671)

* Update base.html

* Create head.html

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
DrZoidberg09 2022-10-31 12:25:53 +01:00 committed by GitHub
parent cb7d25a293
commit cd9ee5b98c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 13 deletions

View file

@ -23,19 +23,7 @@
<link rel="canonical" href="{{ canonical }}">
{%- block head -%}
{% if head_html is defined -%}
{{ head_html or "" }}
{%- endif %}
{%- if theme.name != 'Standard' -%}
<link type="text/css" rel="stylesheet" href="{{ theme.theme_url }}">
{%- else -%}
{{ include_style('website.bundle.css') }}
{%- endif -%}
{%- for link in web_include_css %}
{{ include_style(link) }}
{%- endfor -%}
{% include "templates/includes/head.html" %}
{%- endblock -%}
{%- block head_include %}

View file

@ -0,0 +1,13 @@
{% if head_html is defined -%}
{{ head_html or "" }}
{%- endif %}
{%- if theme.name != 'Standard' -%}
<link type="text/css" rel="stylesheet" href="{{ theme.theme_url }}">
{%- else -%}
{{ include_style('website.bundle.css') }}
{%- endif -%}
{%- for link in web_include_css %}
{{ include_style(link) }}
{%- endfor -%}