Skip to content

Commit cabe7d6

Browse files
committed
adding spoiler
1 parent d5316a7 commit cabe7d6

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

_includes/style.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@
2121
@import "components/share";
2222
@import "components/side-by-side";
2323
@import "components/social-links";
24+
@import "components/spoiler";

_posts/2015-02-24-markdown-extra-components.markdown

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ You can pick as item to see how to apply in markdown.
2222
- [Side-by-Side](#side-by-side)
2323
- [Star](#star)
2424
- [Especial Breaker](#especial-breaker)
25+
- [Spoiler](#spoiler)
2526

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

124125
---
125126

127+
## Spoiler
128+
129+
You can add an especial hidden content that appears on hover.
130+
131+
{% highlight html %}
132+
<div class="spoiler"><p>your content</p></div>
133+
{% endhighlight %}
134+
135+
<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>
136+
137+
---
138+
126139
## Gist
127140

128141
You can add Gists from github.

_sass/components/spoiler.sass

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.spoiler
2+
position: relative
3+
4+
&:before
5+
content: ''
6+
background-color: #fafae0
7+
position: absolute
8+
top: 0
9+
bottom: 0
10+
left: 0
11+
right: 0
12+
z-index: 50
13+
14+
&:hover:before
15+
display: none

0 commit comments

Comments
 (0)