Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

Commit

Permalink
Added one of the shouting ways, for #8
Browse files Browse the repository at this point in the history
  • Loading branch information
kizu committed Apr 16, 2013
1 parent 1dbba46 commit 9c721e3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
11 changes: 11 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,17 @@ By default the slide would take an `id` from it's content, almost like in GitHub

In this way the slide would have `id="Foo"` instead.

##### Shouting

If you'd like to _shout_ (use the `shout` class on a slide), you could just wrap the content of a header with `strong`:


```md
## **You can even shout this way**
```

This would make such slide a `shout` one.

##### Extra classes or attributes

Another way to add stuff to a slide is to use a more general syntax (`{:…}`) from kramdown for adding different attributes.
Expand Down
16 changes: 14 additions & 2 deletions _includes/showerify.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,25 @@
{% assign flag = false %}
{% for slide in slides %}
{% capture slide_attrs %}{{ slide | split:'>' | first }}{% endcapture %}

<!-- Looking for strong in header for shout -->
{% capture slide_header_content %}^BEGIN^{{ slide | remove_first:slide_attrs | split:'</h2>' | first }}$END${% endcapture %}
{% if slide_header_content contains '^BEGIN^><strong>' and slide_header_content contains '</strong>$END$' %}
{% assign slide_extra_class = ' shout' %}
{% endif %}

{% if flag == false %}
{% capture showerify_middle %}{{ showerify_middle }}{{ slide }}{% endcapture %}
{% assign flag = true %}
{% else %}
{% capture showerify_middle %}{{ showerify_middle }}</div></section>
<section class="slide"{{ slide_attrs }}><div><h2{% endcapture %}
{% capture showerify_middle %}{{ showerify_middle }}{{ slide | remove_first:slide_attrs }}{% endcapture %}
<section class="slide{{ slide_extra_class }}"{{ slide_attrs }}><div><h2{% endcapture %}
{% assign newslide = slide | remove_first:slide_attrs %}
{% if slide_extra_class %}
{% assign newslide = newslide | replace_first:'><strong>','>' %}
{% assign newslide = newslide | replace_first:'</strong></h2>','</h2>' %}
{% endif %}
{% capture showerify_middle %}{{ showerify_middle }}{{ newslide }}{% endcapture %}
{% endif %}
{% endfor %}
{% capture showerify_middle %}{{ showerify_middle }}</div></section>{% endcapture %}
Expand Down
3 changes: 1 addition & 2 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ Lorem ipsum dolor sit amet, consectetur [adipisicing](#all-kind-of-lists) elit,
![](pictures/picture.jpg)
<!-- photo by John Carey, fiftyfootshadows.net -->

## You can even shout this way
{:.shout}
## **You can even shout this way**

## Inner Navigation

Expand Down

0 comments on commit 9c721e3

Please sign in to comment.