Skip to content

Commit

Permalink
adding spoiler
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiokopplin committed Jun 18, 2016
1 parent d5316a7 commit cabe7d6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions _includes/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
@import "components/share";
@import "components/side-by-side";
@import "components/social-links";
@import "components/spoiler";
13 changes: 13 additions & 0 deletions _posts/2015-02-24-markdown-extra-components.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ You can pick as item to see how to apply in markdown.
- [Side-by-Side](#side-by-side)
- [Star](#star)
- [Especial Breaker](#especial-breaker)
- [Spoiler](#spoiler)

#### External Elements
- [Gist](#gist)
Expand Down Expand Up @@ -123,6 +124,18 @@ You can add a especial *hr* to your text.

---

## Spoiler

You can add an especial hidden content that appears on hover.

{% highlight html %}
<div class="spoiler"><p>your content</p></div>
{% endhighlight %}

<div class="spoiler"><p>Lorem ipsum dolor sit amet, consectetur adipisicing 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.</p></div>

---

## Gist

You can add Gists from github.
Expand Down
15 changes: 15 additions & 0 deletions _sass/components/spoiler.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.spoiler
position: relative

&:before
content: ''
background-color: #fafae0
position: absolute
top: 0
bottom: 0
left: 0
right: 0
z-index: 50

&:hover:before
display: none

0 comments on commit cabe7d6

Please sign in to comment.