Skip to content

Commit ebdc6f8

Browse files
committed
New! Embed Alerts via new include
Showing alerts in your content is simplified via include. Have a look at http://phlow.github.io/feeling-responsive/documentation/#alert-embed-an- alert-in-your-content
1 parent 70814f1 commit ebdc6f8

4 files changed

Lines changed: 79 additions & 3 deletions

File tree

_includes/alert

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{% comment %}
2+
*
3+
* This include lets you easily display an alert.
4+
* To use the include no `.html` ending is necessary.
5+
* You can use five different kinds of alerts:
6+
*
7+
* - warning
8+
* - info
9+
* - success
10+
* - alert
11+
* - text
12+
*
13+
* You can even use <html>-tags inside the alert. Beware:
14+
* Use " and ' properly.
15+
*
16+
* Example: {% include alert info='Show an info alert with outstanding information' %}
17+
*
18+
{% endcomment %}
19+
20+
21+
{% if include.warning %}
22+
<div class="alert-box warning radius">{{ include.warning }}</div>
23+
{% elsif include.info %}
24+
<div class="alert-box info radius">{{ include.info }}</div>
25+
{% elsif include.success %}
26+
<div class="alert-box success radius">{{ include.success }}</div>
27+
{% elsif include.alert %}
28+
<div class="alert-box alert radius">{{ include.alert }}</div>
29+
{% elsif include.text %}
30+
<div class="alert-box text radius">{{ include.text }}</div>
31+
{% elsif include.terminal %}
32+
<div class="alert-box terminal radius">{{ include.terminal }}</div>
33+
{% endif %}

_sass/_02_settings_colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $secondary-color: $ci-6;
3030
$alert-color: $ci-5;
3131
$success-color: $ci-6;
3232
$warning-color: $ci-4;
33-
$info-color: $ci-2;
33+
$info-color: $ci-1;
3434

3535

3636

_sass/_09_elements.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,15 @@
5858
border-bottom: 1px solid #fff;
5959
}
6060
.alert-box.terminal {
61-
background: $grey-16;
61+
background: $grey-12;
6262
color: #fff;
63-
border-color: scale-color($grey-16, $lightness: -14%);
63+
border-color: scale-color($grey-12, $lightness: -14%);
64+
}
65+
.alert-box.text {
66+
background-color: $grey-2;
67+
text-shadow: 0px 0px 0px rgba(0,0,0,0.9);
68+
border-color: scale-color($grey-2, $lightness: -14%);
69+
color: $grey-12;
6470
}
6571

6672
.breadcrumbs>.current {

pages/documentation.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,43 @@ If your content is on Jekyll you can use this include to automatically generate
250250
~~~
251251
252252
253+
### list-collection.html
254+
255+
This include lets you loop through a collection to list all entries in that collection. If you set »published: false« in front matter of a collection page the page gots filtered out via unless. The following example loops through a collection called *wordpress*.
256+
257+
~~~
258+
{% raw %}{% include list-collection.html collection='wordpress' %}{% endraw %}
259+
~~~
260+
261+
262+
### alert – Embed an alert in your content
263+
264+
This include lets you easily display an alert. To use the include no `.html` ending is necessary. You can use five different kinds of alerts: `warning`, `info`, `success`, `alert` and `text`.
265+
266+
~~~
267+
{% raw %}{% include alert warning='This is a warning.' %}
268+
{% include alert info='An info box.' %}
269+
{% include alert success='Yeah, you made it!' %}
270+
{% include alert alert='Danger!' %}
271+
{% include alert terminal='$ jekyll -serve' %}
272+
{% include alert text='Just a note!' %}{% endraw %}
273+
~~~
274+
275+
{% include alert warning='This is a warning.' %}
276+
{% include alert info='An info box.' %}
277+
{% include alert success='Yeah, you made it!' %}
278+
{% include alert alert='Danger!' %}
279+
{% include alert terminal='$ jekyll -serve' %}
280+
{% include alert text='Just a note!' %}
281+
282+
You can even use `<html>`-tags inside the alert. Beware: Use " and ' properly.
283+
284+
~~~
285+
{% raw %}{% include alert info='<em>Feeling Responsive</em> is listed on <a href="http://jekyllthemes.org/">http://jekyllthemes.org</a>' %}{% endraw %}
286+
~~~
287+
288+
{% include alert info='<em>Feeling Responsive</em> is listed on <a href="http://jekyllthemes.org/">http://jekyllthemes.org</a>' %}
289+
253290
<small markdown="1">[Up to table of contents](#toc)</small>
254291
{: .text-right }
255292

0 commit comments

Comments
 (0)