Skip to content

Commit

Permalink
Merge pull request poole#84 from poole/footnotes
Browse files Browse the repository at this point in the history
Add footnotes
  • Loading branch information
mdo committed Apr 19, 2015
2 parents 20d86be + e3b8aaa commit 188b972
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions _posts/2014-01-01-example-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ HTML defines a long list of available inline tags, a complete list of which can

Most of these elements are styled by browsers with few modifications on our part.

## Footnotes

Footnotes are supported as part of the Markdown syntax. Here's one in action. Clicking this number[^fn-sample_footnote] will lead you to a footnote. The syntax looks like:

{% highlight text %}
Clicking this number[^fn-sample_footnote]
{% endhighlight %}

Each footnote needs the `^fn-` prefix and a unique ID to be referenced for the footnoted content. The syntax for that list looks something like this:

{% highlight text %}
[^fn-sample_footnote]: Handy! Now click the return link to go back.
{% endhighlight %}

You can place the footnoted content wherever you like. Markdown parsers should properly place it at the bottom of the post.

## Heading

Vivamus sagittis lacus vel augue rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.
Expand Down Expand Up @@ -136,3 +152,6 @@ Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur e
-----

Want to see something else added? <a href="https://github.com/poole/poole/issues/new">Open an issue.</a>

[^fn-sample_footnote]: Handy! Now click the return link to go back.

19 changes: 19 additions & 0 deletions _sass/_type.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,25 @@ blockquote {
}


// Markdown footnotes
//
// See the example content post for an example.

// Footnote number within body text
a[href^="#fn:"],
// Back to footnote link
a[href^="#fnref:"] {
display: inline-block;
margin-left: .1rem;
font-weight: bold;
}

// List of footnotes
.footnotes {
margin-top: 2rem;
font-size: 85%;
}

// Custom type
//
// Extend paragraphs with `.lead` for larger introductory text.
Expand Down

0 comments on commit 188b972

Please sign in to comment.