From: Mark Otto Date: Sun, 19 Apr 2015 07:00:49 +0000 (-0700) Subject: add footnotes X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=e3b8aaa07778a9a2a613f0aaa1568ada87978320;p=blog add footnotes --- diff --git a/_posts/2014-01-01-example-content.md b/_posts/2014-01-01-example-content.md index 0e410c1..6c0f875 100644 --- a/_posts/2014-01-01-example-content.md +++ b/_posts/2014-01-01-example-content.md @@ -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. @@ -136,3 +152,6 @@ Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur e ----- Want to see something else added? Open an issue. + +[^fn-sample_footnote]: Handy! Now click the return link to go back. + diff --git a/_sass/_type.scss b/_sass/_type.scss index 064846d..290d1db 100644 --- a/_sass/_type.scss +++ b/_sass/_type.scss @@ -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.