background-color: var(--header-background-color);
opacity: 1;
}
-body > header > nav.m-navbar-landing a#m-navbar-brand {
+body > header > nav.m-navbar-landing a#m-navbar-brand.m-navbar-brand-hidden {
visibility: hidden;
}
-body > header > nav.m-navbar-landing:target a#m-navbar-brand {
+body > header > nav.m-navbar-landing:target a#m-navbar-brand.m-navbar-brand-hidden {
visibility: visible;
}
body > header > nav {
background-color: #22272e;
opacity: 1;
}
-body > header > nav.m-navbar-landing a#m-navbar-brand {
+body > header > nav.m-navbar-landing a#m-navbar-brand.m-navbar-brand-hidden {
visibility: hidden;
}
-body > header > nav.m-navbar-landing:target a#m-navbar-brand {
+body > header > nav.m-navbar-landing:target a#m-navbar-brand.m-navbar-brand-hidden {
visibility: visible;
}
body > header > nav {
background-color: #ffffff;
opacity: 1;
}
-body > header > nav.m-navbar-landing a#m-navbar-brand {
+body > header > nav.m-navbar-landing a#m-navbar-brand.m-navbar-brand-hidden {
visibility: hidden;
}
-body > header > nav.m-navbar-landing:target a#m-navbar-brand {
+body > header > nav.m-navbar-landing:target a#m-navbar-brand.m-navbar-brand-hidden {
visibility: visible;
}
body > header > nav {
The cover image always spans the whole screen width and goes also under the top
navbar. In order to make the navbar aware of the image, put a :css:`.m-navbar-landing`
CSS class on the :html:`<nav>` element --- this makes navbar dimmer with
-transparent background and hides the brand link on the left (with the
-assumption that the landing page includes a bigger version of it). While the
+transparent background. Usually the brand link on the left is superfluous as
+the landing page repeats it in a more prominent place, to hide it put a
+:css:`.m-navbar-brand-hidden` on the :css:`#m-navbar-brand` element. While the
landing page is designed to catch attention of new users, it shouldn't prevent
regular visitors from navigating the website --- because of that the top navbar
is not hidden completely and hovering it will make it more visible. This works
article always spans the whole screen width and goes below the top navbar. If
you want the navbar to be semi-transparent, put :css:`.m-navbar-jumbo` on the
:html:`<nav>` element. Compared to `landing pages <#landing-pages>`_ the navbar
-retains semi-transparent background and the brand link is not hidden, as brand
-name is not expected to be duplicated in article header.
+retains semi-transparent background at all times.
.. note-info::
:cover: {filename}/static/cover.jpg
:summary: A no-nonsense, no-JavaScript CSS framework and Pelican theme for
content-oriented websites
+:navbar_brand_hidden: true
:landing:
.. container:: m-row
:abbr:`reST <reStructuredText>`-processed content that appears on top of the
cover image. Contents of the :rst:`:landing:` are put into a
:html:`<div class="m-container">`, you are expected to fully take care of rows
-and columns in it.
+and columns in it. It's also possible to hide the navbar brand link --- simply
+add a :rst:`:navbar_brand_hidden:` field with non-empty contents.
.. block-warning:: Configuration
:save_as: index.html
:url:
:cover: {filename}/static/cover.jpg
+ :navbar_brand_hidden: true
:landing:
.. container:: m-row
<header><nav id="navigation"{% if page and page.landing and page.cover %} class="m-navbar-landing"{% endif %}{% if article and article.cover %} class="m-navbar-jumbo"{% endif %}>
<div class="m-container">
<div class="m-row">
- <a href="{{ SITEURL }}/" id="m-navbar-brand" class="m-col-t-9 m-col-m-none m-left-m">
+ <a href="{{ SITEURL }}/" id="m-navbar-brand" class="m-col-t-9 m-col-m-none m-left-m{% if page and page.landing and page.cover and page.navbar_brand_hidden %} m-navbar-brand-hidden{% endif %}">
{%- if SITE_LOGO %}<img src="{{ SITE_LOGO }}" />{% endif -%}
{{- SITE_LOGO_TEXT -}}
</a>