Demoing bootstrap alerts.
Primary alert
Note:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Warning alert
Warning:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Dark alert
Note:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
How to use the alerts
The alerts are in the _includes
directory of this blog:
1
2
3
4
5
6
7
8
9
10
11
12
~/G/yaslamblog / gh-pages / _includes $ tree
.
├── alert-dark.html
├── alert-primary.html
├── alert-warning.html
├── comments.html
├── footer.html
├── links.html
├── navigation.html
└── post-data.html
1 directory, 8 files
You choose the alert you want and use it in a post with the capture functionality of Jekyll like this:
1
2
3
\{\% capture alert-dark \%\}
Something here.
\{\% endcapture \%\}
Then include the file from _includes
:
1
\{\% include alert-dark.html heading="" content=alert-dark \%\}
Which will produce an alert like this:
Note:
Something here.
If the heading is unset, the default heading is Note:
for the alert-dark
alert.