mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-19 11:54:45 -04:00
Add note, caution, and warn shortcodes
This commit is contained in:
parent
b9a13344a9
commit
b0de2c1e35
@ -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 %}}
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Hostingon GitLab
|
||||
title: Hosting on GitLab
|
||||
linktitle:
|
||||
description:
|
||||
date: 2017-02-01
|
||||
|
6
themes/hugodocs/layouts/shortcodes/caution.html
Normal file
6
themes/hugodocs/layouts/shortcodes/caution.html
Normal file
@ -0,0 +1,6 @@
|
||||
<div class="caution">
|
||||
<h2>{{with .Get "title"}}{{.}}{{else}}Note{{end}}</h2>
|
||||
<div class="shortcode-content">
|
||||
{{.Inner}}
|
||||
</div>
|
||||
</div>
|
6
themes/hugodocs/layouts/shortcodes/note.html
Normal file
6
themes/hugodocs/layouts/shortcodes/note.html
Normal file
@ -0,0 +1,6 @@
|
||||
<div class="note">
|
||||
<h2>{{with .Get "title"}}{{.}}{{else}}Note{{end}}</h2>
|
||||
<div class="shortcode-content">
|
||||
{{.Inner}}
|
||||
</div>
|
||||
</div>
|
6
themes/hugodocs/layouts/shortcodes/warn.html
Normal file
6
themes/hugodocs/layouts/shortcodes/warn.html
Normal file
@ -0,0 +1,6 @@
|
||||
<div class="warn">
|
||||
<h2>{{with .Get "title"}}{{.}}{{else}}Note{{end}}</h2>
|
||||
<div class="shortcode-content">
|
||||
{{.Inner}}
|
||||
</div>
|
||||
</div>
|
@ -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;
|
||||
|
48
themes/hugodocs/pipeline/scss/components/_note-and-warn.scss
Normal file
48
themes/hugodocs/pipeline/scss/components/_note-and-warn.scss
Normal 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%);
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
2
themes/hugodocs/static/css/style.min.css
vendored
2
themes/hugodocs/static/css/style.min.css
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user