Skip to content

Instantly share code, notes, and snippets.

View garrying's full-sized avatar
🌱
c,o,n,t,i,n,u,o,u,s c-o-n-n-e-c-t-e-d

Garry Ing garrying

🌱
c,o,n,t,i,n,u,o,u,s c-o-n-n-e-c-t-e-d
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Notebook</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
/* sidenotes.js: standalone JS library for parsing HTML documents with Pandoc-style footnotes and dynamically repositioning them into the left/right margins, when browser windows are wide enough.
Sidenotes are superior to footnotes where possible because they enable the reader to immediately look at them without requiring user action to 'go to' or 'pop up' the footnotes; even floating footnotes require effort by the reader.
sidenotes.js is inspired by the Tufte-CSS sidenotes (https://edwardtufte.github.io/tufte-css/#sidenotes), but where Tufte-CSS uses static footnotes inlined into the body of the page (requiring modifications to Pandoc's compilation), which doesn't always work well for particularly long or frequent sidenotes, sidenotes.js will rearrange sidenotes to fit as best as possible, and will respond to window changes.
Particularly long sidenotes are also partially 'collapsed'.
Author: Said Achmiz
2019-03-11
license: MIT (derivative of footnotes.js, which is PD)
*/
@garrying
garrying / app.js
Created July 15, 2015 02:41
Evaluate wrapping elements. Style first element in wrapped row on window.resize and dom.ready
docReady( function() {
var app = {
init: function () {
this._menuInit();
this._resizeEventListener();
},
_menuInit: function () {
var firstEle = [];

Keybase proof

I hereby claim:

  • I am garrying on github.
  • I am garryi (https://keybase.io/garryi) on keybase.
  • I have a public key whose fingerprint is 3BB1 26D3 33B6 383F 1B04 E68A FF88 CBA1 B7CF 0EF0

To claim this, I am signing this object: