diff options
author | Zachary Betz <zwbetz@gmail.com> | 2019-02-26 23:39:42 +0300 |
---|---|---|
committer | Zachary Betz <zwbetz@gmail.com> | 2019-02-26 23:39:42 +0300 |
commit | b1204b9d2f02c55458dfc83d9b695c4aaa7cecad (patch) | |
tree | 12405ed2335e01b5d2cef986da1e1301cf5907c1 | |
parent | 32f7aeef4737ec54baa6f8aae79f3bca982a7d83 (diff) |
Initial shortcodes
-rw-r--r-- | exampleSite/content/post/papercss-shortcodes.md | 221 | ||||
-rw-r--r-- | layouts/shortcodes/alert.html | 3 | ||||
-rw-r--r-- | layouts/shortcodes/background.html | 3 | ||||
-rw-r--r-- | layouts/shortcodes/badge.html | 3 | ||||
-rw-r--r-- | layouts/shortcodes/border.html | 17 | ||||
-rw-r--r-- | layouts/shortcodes/color.html | 3 |
6 files changed, 250 insertions, 0 deletions
diff --git a/exampleSite/content/post/papercss-shortcodes.md b/exampleSite/content/post/papercss-shortcodes.md new file mode 100644 index 0000000..3c785f9 --- /dev/null +++ b/exampleSite/content/post/papercss-shortcodes.md @@ -0,0 +1,221 @@ +--- +title: "Papercss Shortcodes" +date: 2019-02-26T13:50:01-06:00 +tags: [shortcodes] +--- + +## Border + +``` +{{</* border "dashed" */>}} +Dashed +{{</* /border */>}} + +{{</* border "dotted" */>}} +Dotted +{{</* /border */>}} + +{{</* border "dashed thick" */>}} +Dashed Thick +{{</* /border */>}} + +{{</* border "dotted thick" */>}} +Dotted Thick +{{</* /border */>}} +``` + +{{< border "dashed" >}} +Dashed +{{< /border >}} + +{{< border "dotted" >}} +Dotted +{{< /border >}} + +{{< border "dashed thick" >}} +Dashed Thick +{{< /border >}} + +{{< border "dotted thick" >}} +Dotted Thick +{{< /border >}} + +## Color + +``` +{{</* color "primary" */>}} +Text primary +{{</* /color */>}} + +{{</* color "secondary" */>}} +Text secondary +{{</* /color */>}} + +{{</* color "success" */>}} +Text success +{{</* /color */>}} + +{{</* color "warning" */>}} +Text warning +{{</* /color */>}} + +{{</* color "danger" */>}} +Text danger +{{</* /color */>}} + +{{</* color "muted" */>}} +Text muted +{{</* /color */>}} +``` + +{{< color "primary" >}} +Text primary +{{< /color >}} + +{{< color "secondary" >}} +Text secondary +{{< /color >}} + +{{< color "success" >}} +Text success +{{< /color >}} + +{{< color "warning" >}} +Text warning +{{< /color >}} + +{{< color "danger" >}} +Text danger +{{< /color >}} + +{{< color "muted" >}} +Text muted +{{< /color >}} + +## Background + +``` +{{</* background "primary" */>}} +Background primary +{{</* /background */>}} + +{{</* background "secondary" */>}} +Background secondary +{{</* /background */>}} + +{{</* background "success" */>}} +Background success +{{</* /background */>}} + +{{</* background "warning" */>}} +Background warning +{{</* /background */>}} + +{{</* background "danger" */>}} +Background danger +{{</* /background */>}} +``` + +{{< background "primary" >}} +Background primary +{{< /background >}} + +{{< background "secondary" >}} +Background secondary +{{< /background >}} + +{{< background "success" >}} +Background success +{{< /background >}} + +{{< background "warning" >}} +Background warning +{{< /background >}} + +{{< background "danger" >}} +Background danger +{{< /background >}} + +## Alert + +``` +{{</* alert "primary" */>}} +Alert-primary +{{</* /alert */>}} + +{{</* alert "secondary" */>}} +Alert-secondary +{{</* /alert */>}} + +{{</* alert "success" */>}} +Alert-success +{{</* /alert */>}} + +{{</* alert "warning" */>}} +Alert-warning +{{</* /alert */>}} + +{{</* alert "danger" */>}} +Alert-danger +{{</* /alert */>}} +``` + +{{< alert "primary" >}} +Alert-primary +{{< /alert >}} + +{{< alert "secondary" >}} +Alert-secondary +{{< /alert >}} + +{{< alert "success" >}} +Alert-success +{{< /alert >}} + +{{< alert "warning" >}} +Alert-warning +{{< /alert >}} + +{{< alert "danger" >}} +Alert-danger +{{< /alert >}} + +## Badge + +``` +<h3>Example badge {{</* badge */>}}123{{</* /badge */>}}</h3> + +<h3>Example badge {{</* badge "secondary" >}}123{{</* /badge */>}}</h3> + +<h3>Example badge {{</* badge "success" >}}123{{</* /badge */>}}</h3> + +<h3>Example badge {{</* badge "warning" >}}123{{</* /badge */>}}</h3> + +<h3>Example badge {{</* badge "danger" >}}123{{</* /badge */>}}</h3> +``` + +<h3>Example badge {{< badge >}}123{{< /badge >}}</h3> + +<h3>Example badge {{< badge "secondary" >}}123{{< /badge >}}</h3> + +<h3>Example badge {{< badge "success" >}}123{{< /badge >}}</h3> + +<h3>Example badge {{< badge "warning" >}}123{{< /badge >}}</h3> + +<h3>Example badge {{< badge "danger" >}}123{{< /badge >}}</h3> + +## Card + +``` +TODO +``` + +<div class="card row flex-center" style="width: 20rem;"> + <img src="https://picsum.photos/768" alt="Card example image"> + + <div class="card-body"> + <h4 class="card-title">My awesome Paper card!</h4> + <h5 class="card-subtitle">Nice looking subtitle.</h5> + <p class="card-text">Notice that the card width in this example have been set to 20rem, otherwise it will try to fill the current container/row where the card is.</p> + </div> +</div> diff --git a/layouts/shortcodes/alert.html b/layouts/shortcodes/alert.html new file mode 100644 index 0000000..200f43b --- /dev/null +++ b/layouts/shortcodes/alert.html @@ -0,0 +1,3 @@ +<p class="alert alert-{{ .Get 0 }}"> + {{ .Inner }} +</p>
\ No newline at end of file diff --git a/layouts/shortcodes/background.html b/layouts/shortcodes/background.html new file mode 100644 index 0000000..5ddc8ec --- /dev/null +++ b/layouts/shortcodes/background.html @@ -0,0 +1,3 @@ +<p class="sm col background-{{ .Get 0 }}"> + {{ .Inner }} +</p>
\ No newline at end of file diff --git a/layouts/shortcodes/badge.html b/layouts/shortcodes/badge.html new file mode 100644 index 0000000..94ee273 --- /dev/null +++ b/layouts/shortcodes/badge.html @@ -0,0 +1,3 @@ +<span class="badge {{ .Get 0 }}"> + {{ .Inner }} +</span>
\ No newline at end of file diff --git a/layouts/shortcodes/border.html b/layouts/shortcodes/border.html new file mode 100644 index 0000000..6446f3c --- /dev/null +++ b/layouts/shortcodes/border.html @@ -0,0 +1,17 @@ +{{ $arg := .Get 0 }} +{{ $class := "" }} +{{ if eq $arg "dashed" }} + {{ $class = "border-dashed" }} +{{ else if eq $arg "dotted" }} + {{ $class = "border-dotted" }} +{{ else if eq $arg "dashed thick" }} + {{ $class = "border-dashed border-thick" }} +{{ else if eq $arg "dotted thick" }} + {{ $class = "border-dashed border-thick" }} +{{ end }} + +<div class="child-borders"> + <p class="sm col {{ $class }}"> + {{ .Inner }} + </p> +</div>
\ No newline at end of file diff --git a/layouts/shortcodes/color.html b/layouts/shortcodes/color.html new file mode 100644 index 0000000..c87a3e0 --- /dev/null +++ b/layouts/shortcodes/color.html @@ -0,0 +1,3 @@ +<p class="text-{{ .Get 0 }}"> + {{ .Inner }} +</p>
\ No newline at end of file |