Allow custom styles to override primary color

This commit is contained in:
daudix
2024-08-08 05:29:09 +03:00
parent 8c36ff9c07
commit 83b7e84292

View File

@ -38,22 +38,6 @@
<link rel="alternate" type={% if config.feed_filenames[0] == "atom.xml" %}"application/atom+xml"{% else %}"application/rss+xml"{% endif %} title="{{ config.title }}" href="{{ get_url(path=config.feed_filenames[0]) | safe }}" />
{%- endif %}
{%- set stylesheets = [ "style.css" ] %}
{%- if config.extra.stylesheets %}
{%- set stylesheets = stylesheets | concat(with=config.extra.stylesheets) %}
{%- endif %}
{%- if page.extra.stylesheets %}
{%- set stylesheets = stylesheets | concat(with=page.extra.stylesheets) %}
{%- elif section.extra.stylesheets %}
{%- set stylesheets = stylesheets | concat(with=section.extra.stylesheets) %}
{%- endif %}
{%- for stylesheet in stylesheets %}
<link type="text/css" rel="stylesheet" href="{{ get_url(path=stylesheet) | safe }}" />
{%- endfor %}
<style type="text/css">
:root {
--primary-color: {{ config.extra.primary_color | default(value="#6f8396") }};
@ -70,6 +54,22 @@
{%- endif %}
</style>
{%- set stylesheets = [ "style.css" ] %}
{%- if config.extra.stylesheets %}
{%- set stylesheets = stylesheets | concat(with=config.extra.stylesheets) %}
{%- endif %}
{%- if page.extra.stylesheets %}
{%- set stylesheets = stylesheets | concat(with=page.extra.stylesheets) %}
{%- elif section.extra.stylesheets %}
{%- set stylesheets = stylesheets | concat(with=section.extra.stylesheets) %}
{%- endif %}
{%- for stylesheet in stylesheets %}
<link type="text/css" rel="stylesheet" href="{{ get_url(path=stylesheet) | safe }}" />
{%- endfor %}
{%- if config.extra.goatcounter %}
<script type="text/javascript" data-goatcounter="https://{{ config.extra.goatcounter.user }}.{{ config.extra.goatcounter.host | default(value='goatcounter.com') }}/count" async src="//gc.zgo.at/count.js"></script>
<noscript>