feat: better header

This commit is contained in:
zaaarf 2023-12-25 00:41:54 +01:00
parent fcd9ae305c
commit 6c73e82c8c
No known key found for this signature in database
GPG key ID: 102E445F4C3F829B
6 changed files with 35 additions and 39 deletions

View file

@ -6,13 +6,6 @@ pre {
font-style: monospace; font-style: monospace;
text-align: left; text-align: left;
white-space: pre-wrap; white-space: pre-wrap;
code {
padding: 0;
border-radius: 0;
color: inherit;
background-color: inherit;
}
} }
p code, p code,
@ -20,6 +13,8 @@ li code,
div code { div code {
padding: 0 .2rem 0 .2rem; padding: 0 .2rem 0 .2rem;
border-radius: .3rem; border-radius: .3rem;
color: var(--bgColor); }
background-color: var(--linkColor);
p code, li code {
background-color: var(--codeLineColor);
} }

View file

@ -1,6 +1,6 @@
::-moz-selection, ::selection { ::-moz-selection, ::selection {
color: var(--bgColor); color: var(--bgColor);
background: var(--fgCOlor); background: var(--fgColor);
} }
html { html {
@ -28,7 +28,6 @@ h1 {
color: var(--bgColor); color: var(--bgColor);
background-color: var(--metaColor); background-color: var(--metaColor);
text-align: center; text-align: center;
text-wrap: balance;
&::before { &::before {
color: var(--bgColor); color: var(--bgColor);
@ -56,7 +55,7 @@ a {
color: var(--bgColor); color: var(--bgColor);
} }
span.postDate { span.contentDate {
color: var(--dateLinkColor); color: var(--dateLinkColor);
} }
} }
@ -130,7 +129,6 @@ footer {
/* Site Specific Styling */ /* Site Specific Styling */
.wrapper { .wrapper {
min-height: 100vh; min-height: 100vh;
min-height: 100svh;
display: grid; display: grid;
grid-template-rows: auto 1fr auto; grid-template-rows: auto 1fr auto;
gap: 2rem; gap: 2rem;
@ -144,7 +142,6 @@ footer {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
color: var(--fgColor); color: var(--fgColor);
fill: var(--fgColor);
background-color: transparent; background-color: transparent;
&__background:hover { &__background:hover {
@ -157,16 +154,20 @@ footer {
gap: .4rem; gap: .4rem;
flex-wrap: wrap; flex-wrap: wrap;
a { .navBarRight {
float: right; float: right;
}
}
.themeButton { a {
padding: 0;
}
.themeButton {
float: right;
cursor: pointer; cursor: pointer;
border: none; border: none;
background-color: transparent; background: transparent;
float: right; }
}
} }
.dark .themeButton.dark, .dark .themeButton.dark,

View file

@ -7,6 +7,8 @@
<address rel="author">By <span class="metaData">{{config.extra.author}}</span></address> <address rel="author">By <span class="metaData">{{config.extra.author}}</span></address>
{% endif %} {% endif %}
<article>
{% include "base-page.html" %} {% include "base-page.html" %}
</article>
{% endblock content %} {% endblock content %}

View file

@ -103,6 +103,7 @@
--metaColor: {% if config.extra.colors.dark.meta_color %}{{ config.extra.colors.dark.meta_color }}{% else %}#78B6AD{% endif %}; --metaColor: {% if config.extra.colors.dark.meta_color %}{{ config.extra.colors.dark.meta_color }}{% else %}#78B6AD{% endif %};
--linkColor: {% if config.extra.colors.dark.link_color %}{{ config.extra.colors.dark.link_color }}{% else %}#DBD5BC{% endif %}; --linkColor: {% if config.extra.colors.dark.link_color %}{{ config.extra.colors.dark.link_color }}{% else %}#DBD5BC{% endif %};
--dateLinkColor: {% if config.extra.colors.dark.date_link_color %}{{ config.extra.colors.dark.date_link_color }}{% else %}#6F6847{% endif %}; --dateLinkColor: {% if config.extra.colors.dark.date_link_color %}{{ config.extra.colors.dark.date_link_color }}{% else %}#6F6847{% endif %};
--codeLineColor: {% if config.extra.colors.dark.code_line_color %}{{ config.extra.colors.dark.code_line_color }}{% else %}#31333d{% endif %};
} }
:root.light { :root.light {
@ -111,6 +112,7 @@
--metaColor: {% if config.extra.colors.light.meta_color %}{{ config.extra.colors.light.meta_color }}{% else %}#D26878{% endif %}; --metaColor: {% if config.extra.colors.light.meta_color %}{{ config.extra.colors.light.meta_color }}{% else %}#D26878{% endif %};
--linkColor: {% if config.extra.colors.light.link_color %}{{ config.extra.colors.light.link_color }}{% else %}#5690AF{% endif %}; --linkColor: {% if config.extra.colors.light.link_color %}{{ config.extra.colors.light.link_color }}{% else %}#5690AF{% endif %};
--dateLinkColor: {% if config.extra.colors.light.date_link_color %}{{ config.extra.colors.light.date_link_color }}{% else %}#223844{% endif %}; --dateLinkColor: {% if config.extra.colors.light.date_link_color %}{{ config.extra.colors.light.date_link_color }}{% else %}#223844{% endif %};
--codeLineColor: {% if config.extra.colors.light.code_line_color %}{{ config.extra.colors.light.code_line_color }}{% else %}#CCCCCC{% endif %};
} }
</style> </style>
<link rel="stylesheet" href="{{ get_url(path='style.css', trailing_slash=false) | safe }}"/> <link rel="stylesheet" href="{{ get_url(path='style.css', trailing_slash=false) | safe }}"/>

View file

@ -7,7 +7,11 @@
{% if config.extra.header_nav %} {% if config.extra.header_nav %}
<nav class="navBar"> <nav class="navBar">
{% include "logo.html" %} {% include "logo.html" %}
<div class="themeSwitch"> <div class="navBarRight">
{% for nav_item in config.extra.header_nav %}
<a href="{{ nav_item.url }}" class="{% if nav_item.url == current_url %}active{% endif %}">{% set language_key = 'name_' ~ current_lang %}{{ nav_item[language_key] }}</a>
{% endfor %}
&nbsp;
{% if not config.extra.default_theme %} {% if not config.extra.default_theme %}
<button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button> <button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button>
<button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button> <button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button>
@ -18,13 +22,5 @@
<button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button> <button class="themeButton dark" onclick="setTheme('dark')" title="Dark mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#darkMode', trailing_slash=false) | safe }}"></use></svg></button>
<button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button> <button class="themeButton light" onclick="setTheme('light')" title="Light mode"><svg class="icons icons__background"><use href="{{ get_url(path='icons.svg#lightMode', trailing_slash=false) | safe }}"></use></svg></button>
{% endif %} {% endif %}
</div>
{% for nav_item in config.extra.header_nav %}
<a href="{{ nav_item.url }}" class="{% if nav_item.url == current_url %}active{% endif %}">
{% set language_key = 'name_' ~ current_lang %}
{{ nav_item[language_key] }}
</a>
{% endfor %}
</nav> </nav>
{% endif %} {% endif %}

View file

@ -14,7 +14,7 @@
<ul class="titleList"> <ul class="titleList">
{% for page in pages %} {% for page in pages %}
<li> <li>
<a href="{{ page.permalink | safe }}">{{ page.title }}{% if config.extra.show_date_paginator and config.extra.show_date_paginator == true %}<span class="postDate"> @ {{ page.date }}</span>{% endif %}</a> <a href="{{ page.permalink | safe }}">{{ page.title }}{% if config.extra.show_date_paginator and config.extra.show_date_paginator == true %}<span class="contentDate"> @ {{ page.date }}</span>{% endif %}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>