Add note, caution, and warn shortcodes

This commit is contained in:
Ryan Watters 2017-02-05 18:14:21 -06:00
parent b9a13344a9
commit b0de2c1e35
11 changed files with 92 additions and 4 deletions

View File

@ -15,3 +15,19 @@ slug:
aliases: []
notes:
---
## Heading
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, praesentium quod magnam veritatis, itaque tenetur minima nihil a at cum doloremque accusantium fugiat quam! Cumque ad vero provident enim temporibus!
{{% note title="Note" %}}
Here is *something in italic* in a shortcode. Here is **something in bold**.
{{% /note %}}
{{% caution title="Caution" %}}
Here is *something in italic* in a shortcode. Here is **something in bold**.
{{% /caution %}}
{{% warn title="Warn" %}}
Here is *something in italic* in a shortcode. Here is **something in bold**.
{{% /warn %}}

View File

@ -1,5 +1,5 @@
---
title: Hosting and Deployment Overview
title: Building Your Static Site
linktitle:
description: Build process, automated deployments, and popular hosting solutions.
date: 2016-11-01

View File

@ -1,5 +1,5 @@
---
title: Hostingon GitLab
title: Hosting on GitLab
linktitle:
description:
date: 2017-02-01

View File

@ -0,0 +1,6 @@
<div class="caution">
<h2>{{with .Get "title"}}{{.}}{{else}}Note{{end}}</h2>
<div class="shortcode-content">
{{.Inner}}
</div>
</div>

View File

@ -0,0 +1,6 @@
<div class="note">
<h2>{{with .Get "title"}}{{.}}{{else}}Note{{end}}</h2>
<div class="shortcode-content">
{{.Inner}}
</div>
</div>

View File

@ -0,0 +1,6 @@
<div class="warn">
<h2>{{with .Get "title"}}{{.}}{{else}}Note{{end}}</h2>
<div class="shortcode-content">
{{.Inner}}
</div>
</div>

View File

@ -12,8 +12,10 @@ $HUGE:1600px;
$hugo-black:#000000;
$hugo-white:#ffffff;
$hugo-pink:#ff4088;
$hugo-pink-dark:#C9177E;
$hugo-blue:#0594CB;
$hugo-yellow:#FCD804;
$hugo-gold:#EBB951;
$default-anchor-color:$hugo-pink;
$default-anchor-weight: 500;
$active-color: $default-anchor-color;

View File

@ -0,0 +1,48 @@
.note,
.caution,.warn {
display: block;
margin-bottom: 1em;
width: 100%;
h2 {
font-size: 1.1em;
color: $hugo-white;
width: 100%;
display: block;
margin: 0px;
padding: .25em 12px;
border: none;
outline: none;
}
.shortcode-content {
display: block;
margin: 0px;
padding: 12px;
}
}
.note {
> h2 {
background-color: $hugo-blue;
}
.shortcode-content {
background-color: lighten($hugo-blue, 50%);
}
}
.caution {
> h2 {
background-color: $hugo-gold;
}
.shortcode-content {
background-color: lighten($hugo-gold, 30%);
}
}
.warn {
> h2 {
background-color: $hugo-pink-dark;
}
.shortcode-content {
background-color: lighten($hugo-pink-dark, 50%);
}
}

View File

@ -22,6 +22,9 @@
display: inline-block;
margin-left: auto;
margin-right: auto;
@include MQ(L) {
margin-top: $site-header-height + 10px;
}
a {
color: $base-font-color;
font-weight: $base-font-weight;

View File

@ -14,6 +14,7 @@
@import 'components/buttons';
@import 'components/lists';
@import 'components/anchors';
@import 'components/note-and-warn';
// @import 'components/navigation-menu';
//major layout parts/chrome

File diff suppressed because one or more lines are too long