-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add announcement shortcode and partial (#16210)
Add shortcode, partial, and css so we can display an accouncement site-wide. Create a shortcode for use in content/en/ _index.html so announcement is displayed on website landing page. Create a partial for use in layouts/docs/baseof.html so announcement is displaye on every page in '<url>/docs/home' directory. Add two values to config.toml: announcement (boolean) for toggling display of announcement; announcement_message, which is the actual message. Signed-off-by: Aimee Ukasick <[email protected]>
- Loading branch information
1 parent
876802d
commit d549942
Showing
6 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{ if .Param "announcement"}} | ||
<section id="announcement"> | ||
<main> | ||
<div class="content announcement"> | ||
<h3> | ||
{{ .Param "announcement_message" | markdownify }} | ||
</h3> | ||
</div> | ||
</main> | ||
</section> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{ if .Page.Param "announcement" }} | ||
<section id="announcement"> | ||
<main> | ||
<div class="content announcement"> | ||
<h3> | ||
{{ .Page.Param "announcement_message" | markdownify }} | ||
</h3> | ||
</div> | ||
</main> | ||
</section> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.announcement { | ||
padding: 20px; | ||
margin: 20px 0; | ||
border-radius: 3px; | ||
background-color: #eeeeee; | ||
} |