Add alerts
parent
668ea2602e
commit
bbdea7c507
@ -0,0 +1,21 @@
|
||||
---
|
||||
authors: ["will-faught"]
|
||||
categories: ["content", "paige"]
|
||||
description: "A complex alert."
|
||||
paige:
|
||||
alert:
|
||||
message: "Get more information <a href=\"#\" class=\"alert-link\">here</a>."
|
||||
type: "danger"
|
||||
tags: ["alerts"]
|
||||
title: "Complex Alert"
|
||||
weight: 70
|
||||
---
|
||||
|
||||
This page has the following parameters:
|
||||
|
||||
```yaml
|
||||
paige:
|
||||
alert:
|
||||
message: "Get more information <a href=\"#\" class=\"alert-link\">here</a>."
|
||||
type: "danger"
|
||||
```
|
@ -0,0 +1,17 @@
|
||||
---
|
||||
authors: ["will-faught"]
|
||||
categories: ["content", "paige"]
|
||||
description: "A simple alert."
|
||||
paige:
|
||||
alert: "Get more information <a href=\"#\" class=\"alert-link\">here</a>."
|
||||
tags: ["alerts"]
|
||||
title: "Simple Alert"
|
||||
weight: 60
|
||||
---
|
||||
|
||||
This page has the following parameters:
|
||||
|
||||
```yaml
|
||||
paige:
|
||||
alert: "Get more information <a href=\"#\" class=\"alert-link\">here</a>."
|
||||
```
|
@ -0,0 +1,9 @@
|
||||
{{ $page := . }}
|
||||
|
||||
{{ with $page.Param "paige.alert" }}
|
||||
{{ if reflect.IsMap . }}
|
||||
<div class="alert alert-{{ .type }}" role="alert">{{ .message | markdownify }}</div>
|
||||
{{ else }}
|
||||
<div class="alert alert-primary" role="alert">{{ . | markdownify }}</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Reference in New Issue