Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 1.42 KB

README.md

File metadata and controls

28 lines (24 loc) · 1.42 KB

Civil Footnotes 2

WordPress plugin for making footnotes, a simple improvement upon Civil Footnotes's plugin.

Parses and displays footnotes, based on Civil Footnotes, which itself was based on WP-Foonotes by Simon Elvery, and the footnote syntax pioneered by John Gruber. The improvement here is that the title information is placed in a data-title attribute, not in the anchor's title attribute. This allows a custom CSS to style the popup, instead of the ugly default browser way. Without this, adding custom CSS worked, but the default popup still showed at the same time. See here and here.

Here is a sample CSS:

/* Note: See: https://stackoverflow.com/a/2011199/ */
/* selecting on `a.civil-footnote`, could also do: `a[rel="footnote"` */

a.civil-footnote {
  display: inline;
}
a.civil-footnote:hover {
  text-decoration-line: none;
}
a.civil-footnote:hover:after {
  content: attr(data-title);
  z-index: 99;
  font-size: 18px;
  border-radius: 10px;
  padding: 4px 10px;
  margin-left: 5px;
  color: #fff;
  background: rgba(55, 55, 55, 0.5);
}