Skip to content

Commit 283a2d6

Browse files
committed
added reveal spoilers on click
1 parent 24f6cba commit 283a2d6

File tree

5 files changed

+48
-19
lines changed

5 files changed

+48
-19
lines changed
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
---
22
layout: post
3-
title: "Quick Start Guide"
3+
title: "Let's test spoilers"
44
author: sal
55
categories: [ Jekyll, tutorial ]
66
image: assets/images/12.jpg
77
featured: true
88
hidden: true
99
---
1010

11-
If you already have a full Ruby development environment with all headers and RubyGems installed (see Jekyll’s requirements), you can create a new Jekyll site by doing the following:
11+
Director Roland Suso Richter's enigmatic psychological thriller (direct to video/DVD) was based upon screenwriter Michael Cooney's own play "Point of Death" - a title that gave away the film's entire plot twist premise.
1212

13-
```ruby
14-
# Install Jekyll and Bundler gems through RubyGems
15-
gem install jekyll bundler
13+
As in many similar films, such as Jacob's Ladder (1990), Soul Survivors (2001), and The Butterfly Effect (2004), events and people were thoroughly distorted and confused because the protagonist was at the point of death. The tagline was misleading:
1614

17-
# Create a new Jekyll site at ./myblog
18-
jekyll new myblog
15+
"When You Don't Have a Memory, How Can You Remember Who to Trust?"
1916

20-
# Change into your new directory
21-
cd myblog
17+
The mind-warping film opened with a hospital patient Simon Cable (Ryan Phillippe) awakening in a <span class="spoiler"> hospital with little knowledge (amnesia perhaps?) of what had happened, and why he was there, etc. He was told by attending Dr. Jeremy Newman (Stephen Rea) that it was July 29, 2002 (Simon thought it was the year 2000 - he was confused - he heard a doctor say 20:00 hours!) and that he had died for two minutes from cardiac arrest following the near-fatal accident -- but he had been revived ("You're as good as new").</span> Dr. Newman: "Simon, this is the 29th of July. The year is 2002. And your wife, whose name is Anna, is waiting outside."
2218

23-
# Build the site on the preview server
24-
bundle exec jekyll serve
19+
(The doctor left off four crucial additional words, revealed in the film's ending.) (Spoiler: Simon had died and was not resuscitated!).
2520

26-
# Now browse to http://localhost:4000
27-
```
21+
A major clue to everything that truly happened was the scene that played next under the credits - hospital staff failed to bring a patient back to life with a defibrillator after a car accident. Chest compressions failed and there was no pulse. A second major clue was provided by hospital orderly Travis (Stephen Graham): <span class="spoiler">Everybody dies. No mystery there. But why and how everyone dies. Now, there's a mystery worth solving. Probably the biggest mystery there is.</span>
22+
23+
#### So how do we do spoilers?
24+
25+
```html
26+
<span class="spoiler">My hidden paragraph here.</span>
27+
```

_sass/_syntax.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11

22
.highlight {
3-
background: #F7FAFB;
3+
background: #fff;
4+
border: 0;
5+
padding: 0;
6+
margin-bottom:1.7rem;
47
.c { color: #999988; font-style: italic } /* Comment */
58
.err { color: #a61717; background-color: #e3d2d2 } /* Error */
69
.k { font-weight: bold } /* Keyword */

assets/css/screen.css

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ License: https://www.wowthemes.net/freebies-license/
1717
pre {
1818
-moz-box-sizing: border-box;
1919
box-sizing: border-box;
20-
margin: 0 0 1.75em 0;
2120
border: #E3EDF3 1px solid;
2221
width: 100%;
23-
padding: 10px;
22+
padding: 7px;
2423
font-family: monospace, sans-serif;
2524
font-size: 14px;
2625
white-space: pre;
2726
overflow: auto;
28-
background: #F7FAFB;
29-
border-radius: 3px;
27+
background: #fff;
28+
border-radius: 0px;
3029
line-height: 1.6;
3130
color:#333;
31+
margin-bottom:-rem;
3232
}
3333
.mediumnavigation {
3434
background:rgba(255,255,255,.97);
@@ -668,3 +668,15 @@ License: https://www.wowthemes.net/freebies-license/
668668
.star-rating {
669669
font-size:20px;
670670
}
671+
672+
a.reveal {
673+
font-size: 65%;
674+
padding: 4px;
675+
border-radius:2px;
676+
line-height:1;
677+
background: #333;
678+
color: #fff !important;
679+
font-style: italic;
680+
cursor: pointer;
681+
display:inline-block;
682+
}

assets/js/mediumish.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,12 @@ jQuery(document).ready(function($){
8787

8888
$('.site-content').css('margin-top', $('header').outerHeight() + 'px');
8989

90-
});
90+
// spoilers
91+
$("span.spoiler").hide();
92+
$('<a class="reveal">Reveal Spoiler &gt;&gt;</a> ').insertBefore('.spoiler');
93+
$("a.reveal").click(function(){
94+
$(this).parents("p").children("span.spoiler").fadeIn(1500);
95+
$(this).parents("p").children("a.reveal").fadeOut(0);
96+
});
97+
98+
});

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# Mediumish Jekyll Theme - Change Log
22

3+
## 2019-03-01, v1.0.27
4+
5+
### Added
6+
- Reveal hidden spoilers on click
7+
38
## 2019-03-01, v1.0.26
49

510
### Added
611
- Syntax line numbers
12+
- Post rating stars
713

814
### Fixed
915
- Category links with more than 1 word

0 commit comments

Comments
 (0)