add footnotes
authorMark Otto <markdotto@gmail.com>
Sun, 19 Apr 2015 07:00:49 +0000 (00:00 -0700)
committerMark Otto <markdotto@gmail.com>
Sun, 19 Apr 2015 07:00:49 +0000 (00:00 -0700)
_posts/2014-01-01-example-content.md
_sass/_type.scss

index 0e410c1729c794b4533704beeba9bab8e308b2e5..6c0f875ab66aa5a84b63df8cfb4f4c00f3403d5d 100644 (file)
@@ -27,6 +27,22 @@ HTML defines a long list of available inline tags, a complete list of which can
 \r
 Most of these elements are styled by browsers with few modifications on our part.\r
 \r
+## Footnotes\r
+\r
+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:\r
+\r
+{% highlight text %}\r
+Clicking this number[^fn-sample_footnote]\r
+{% endhighlight %}\r
+\r
+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:\r
+\r
+{% highlight text %}\r
+[^fn-sample_footnote]: Handy! Now click the return link to go back.\r
+{% endhighlight %}\r
+\r
+You can place the footnoted content wherever you like. Markdown parsers should properly place it at the bottom of the post.\r
+\r
 ## Heading\r
 \r
 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.\r
@@ -136,3 +152,6 @@ Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur e
 -----\r
 \r
 Want to see something else added? <a href="https://github.com/poole/poole/issues/new">Open an issue.</a>\r
+\r
+[^fn-sample_footnote]: Handy! Now click the return link to go back.\r
+\r
index 064846d9c03ffcefd934e5ba77bf2d025da2151f..290d1dbd673827467ece7ab6bd4e05fc41b87d1a 100644 (file)
@@ -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.