Added styles for announcement bar

This commit is contained in:
squidfunk 2020-01-25 15:09:27 +01:00
parent 4196de39a9
commit d329b6921f
9 changed files with 66 additions and 11 deletions

View File

@ -478,6 +478,15 @@ hr {
@page { @page {
margin: 25mm; } margin: 25mm; }
.md-announcement {
background-color: rgba(0, 0, 0, 0.87); }
.md-announcement__inner {
min-height: 2.4rem;
padding: 0 0.8rem;
color: white;
font-size: 0.7rem;
line-height: 2.4rem; }
.md-clipboard { .md-clipboard {
position: absolute; position: absolute;
top: 0.3rem; top: 0.3rem;
@ -1594,8 +1603,7 @@ hr {
margin: 0; margin: 0;
padding: 0.525rem 0.6rem; padding: 0.525rem 0.6rem;
background-color: transparent; background-color: transparent;
overflow: auto; overflow: auto; }
vertical-align: top; }
.md-typeset .codehilite pre::-webkit-scrollbar, .md-typeset .highlight pre::-webkit-scrollbar, .md-typeset .codehilite pre::-webkit-scrollbar, .md-typeset .highlight pre::-webkit-scrollbar,
.md-typeset .codehilite code::-webkit-scrollbar, .md-typeset .codehilite code::-webkit-scrollbar,
.md-typeset .highlight code::-webkit-scrollbar { .md-typeset .highlight code::-webkit-scrollbar {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -96,9 +96,11 @@
</a> </a>
{% endif %} {% endif %}
{% if self.announcement() %} {% if self.announcement() %}
<div class="md-announcement" data-md-component="announcement"> <aside class="md-announcement" data-md-component="announcement">
<div class="md-announcement__inner md-grid md-typeset">
{% block announcement %}{% endblock %} {% block announcement %}{% endblock %}
</div> </div>
</aside>
{% endif %} {% endif %}
{% block header %} {% block header %}
{% include "partials/header.html" %} {% include "partials/header.html" %}

View File

@ -2,3 +2,6 @@
This file was automatically generated - do not edit This file was automatically generated - do not edit
-#} -#}
{% extends "base.html" %} {% extends "base.html" %}
{% block announcement %}
The quick brown fox jumpy over the lazy dog
{% endblock %}

View File

@ -42,6 +42,7 @@
@import "base/typeset"; @import "base/typeset";
@import "layout/base"; @import "layout/base";
@import "layout/announce";
@import "layout/clipboard"; @import "layout/clipboard";
@import "layout/content"; @import "layout/content";
@import "layout/header"; @import "layout/header";

View File

@ -0,0 +1,39 @@
////
/// Copyright (c) 2016-2019 Martin Donath <martin.donath@squidfunk.com>
///
/// Permission is hereby granted, free of charge, to any person obtaining a
/// copy of this software and associated documentation files (the "Software"),
/// to deal in the Software without restriction, including without limitation
/// the rights to use, copy, modify, merge, publish, distribute, sublicense,
/// and/or sell copies of the Software, and to permit persons to whom the
/// Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
/// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
/// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
/// DEALINGS
////
// ----------------------------------------------------------------------------
// Rules
// ----------------------------------------------------------------------------
// Announcement bar
.md-announcement {
background-color: $md-color-black;
// Actual content
&__inner {
min-height: px2rem(48px);
padding: 0 px2rem(16px);
color: $md-color-white;
font-size: px2rem(14px);
line-height: px2rem(48px);
}
}

View File

@ -226,9 +226,11 @@
<!-- Announcement bar --> <!-- Announcement bar -->
{% if self.announcement() %} {% if self.announcement() %}
<div class="md-announcement" data-md-component="announcement"> <aside class="md-announcement" data-md-component="announcement">
<div class="md-announcement__inner md-grid md-typeset">
{% block announcement %}{% endblock %} {% block announcement %}{% endblock %}
</div> </div>
</aside>
{% endif %} {% endif %}
<!-- Application header --> <!-- Application header -->