Skip to content

Instantly share code, notes, and snippets.

@caraya
caraya / my_looper-no_comments.php
Created June 21, 2011 11:49 — forked from alderete/my_looper-no_comments.php
A starter template for the Custom Loop API in the Thesis theme for WordPress.
<?php
// Source and explanation of this file:
// http://aldosoft.com/blog/2011/01/thesis-custom-loop-template/
class my_looper extends thesis_custom_loop {
function home() {
thesis_loop::home();
}
@caraya
caraya / custom.css
Created March 25, 2012 18:47 — forked from mattonomics/custom.css
Thesis Skin Starter Template - Advanced
/*---:[ body ]:---*/
body { background: #000; }
/*---:[ menu ]:---*/
.menu { list-style: none; }
.menu li { float: left; }
.menu li a { text-decoration: none; display: block; }
/*---:[ post image fix from @kristarella ]:---*/
.post_image { max-width: 100%; height: auto; }
module.exports = {
options: {
separator: ';'
},
dist: {
src: ['src/**/*.js'],
dest: 'dist/<%= pkg.name %>.js'
}
}
/*
* This decorates Handlebars.js with the ability to load
* templates from an external source, with light caching.
*
* To render a template, pass a closure that will receive the
* template as a function parameter, eg,
* T.render('templateName', function(t) {
* $('#somediv').html( t() );
* });
* Source: https://github.com/wycats/handlebars.js/issues/82
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
</head>
<body>
<div class="viewport"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/three.js/r58/three.min.js"></script>
<script src="//threejs.org/examples/js/controls/OrbitControls.js"></script>

The only requirements for popup footnotes in iBooks are:

  • Ebook has to be an EPUB3
  • epub:type "noteref" and "footnote"

So you can link to a totally separate document, as you normally would for endnotes, but include the attributes so the link behaves differently in iBooks, instead triggering the popup.

Original reference link would look something like this (in a file called ch001.html):

1

//originally published here: http://www.pdsassoc.com/downloads/ReassertParaStyles.js.zip
//rewritten to be CC compliant
//DESCRIPTION: Visit all paragraphs in document and reassert paragraph styles
myStyles = app.activeDocument.allParagraphStyles;
app.findTextPreferences = null;
app.changeTextPreferences = null;
for (var n = 1; myStyles.length > n; n++){
app.findTextPreferences.appliedParagraphStyle = myStyles[n];
app.changeTextPreferences.appliedParagraphStyle = myStyles[n];
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
(function boom(){
@caraya
caraya / CSSOM
Last active August 29, 2015 14:07 — forked from paceaux/CSSOM
window.analyzer = {
init: function (object, id) {
this.functions.appendTable(id);
this.functions.setupHeaders(object);
this.functions.addData(object);
this.functions.addCaption("Analysis of the stylesheets");
},
data: {},
helpers: {
wrapper: function (id) {