Initial commit
This commit is contained in:
commit
65e0da7e11
1397 changed files with 596542 additions and 0 deletions
63
site/OFF_plugins/typography/assets/css/typography.css
Normal file
63
site/OFF_plugins/typography/assets/css/typography.css
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/* =-=-=-=-= NOARMALIZATION =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
|
||||
|
||||
/* Make sure that you have proper styling for subscript and superscript in
|
||||
stylesheet, so it does not affect the line-height of the surrounding text.
|
||||
The following defaults are taken from `Normalize.css` v.4.1.1:
|
||||
https://github.com/necolas/normalize.css/blob/master/normalize.css
|
||||
If you already have those rules in your stylesheet, which deal with that, feel
|
||||
free to remove the following lines from this file. */
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub { bottom: -0.25em; }
|
||||
sup { top: -0.5em; }
|
||||
|
||||
|
||||
/* =-=-=-=-= CHARACTER STYLING =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
|
||||
|
||||
/* If you really want to use that Baskerville ampersand, no matter if it matches
|
||||
with the other typefaces on your page, please go ahead and uncomment the
|
||||
following lines … */
|
||||
.char--ampersand {
|
||||
/*
|
||||
font-family: Baskerville, "Goudy Old Style", "Palatino", "Book Antiqua", "Warnock Pro", serif;
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
font-size: 1.1em;
|
||||
line-height: 1em;
|
||||
*/
|
||||
}
|
||||
|
||||
/* Words with all CAPITAL LETTERS */
|
||||
.char--caps {
|
||||
letter-spacing: 0.025em;
|
||||
}
|
||||
|
||||
/* Sequences of one or more digits */
|
||||
.char--numbers {
|
||||
/* Add your own rules here, if you need */
|
||||
}
|
||||
|
||||
/* Smart fractions */
|
||||
.frac--numerator { margin-right: .05em; }
|
||||
.frac--denominator { margin-left: .05em; }
|
||||
|
||||
|
||||
/* =-=-=-=-= HANGING PUNCUTATION =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
|
||||
|
||||
/* Initial Quotes */
|
||||
.char--singleQuoteInitial { margin-left: -0.4em; }
|
||||
.char--doubleQuoteInitial { margin-left: -0.2em; }
|
||||
|
||||
/* Double quote (") marks */
|
||||
.pull--doubleQuote { margin-left: -0.38em; }
|
||||
.push--doubleQuote { margin-right: 0.38em; }
|
||||
|
||||
/* Single quote (') marks */
|
||||
.pull--singleQuote { margin-left: -0.15em; }
|
||||
.push--singleQuote { margin-right: 0.15em; }
|
||||
1
site/OFF_plugins/typography/assets/js/dist/copyfix.min.js
vendored
Normal file
1
site/OFF_plugins/typography/assets/js/dist/copyfix.min.js
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
!function(e,a,t){function n(e){var a,t,o,i=0;switch(d){case"|":a="\\|";break;case"+":a="\\+";break;case"*":a="\\*";break;default:a=d}switch(r){case"|":t="\\|";break;case"+":t="\\+";break;case"*":t="\\*";break;default:t=r}for(o=e.childNodes[i];o;)3===o.nodeType?(o.data=o.data.replace(new RegExp(a,"g"),""),o.data=o.data.replace(new RegExp(t,"g"),"")):1===o.nodeType&&n(o),i+=1,o=e.childNodes[i]}function o(t){t.stopPropagation();var o=(a.body,e.getSelection()),d=o.getRangeAt(0),r=a.createElement("div");r.style.cssText="position: absolute;left: -1000px;width: 900px;overflow: hidden;",a.body.appendChild(r),r.appendChild(d.cloneContents()),n(r),o.selectAllChildren(r),e.setTimeout(function(){r.parentNode.removeChild(r),o.removeAllRanges(),o.addRange(d)},0)}var d=String.fromCharCode(173),r=String.fromCharCode(8203);e.getSelection&&a.addEventListener("copy",o)}(window,document);
|
||||
87
site/OFF_plugins/typography/assets/js/src/copyfix.js
Normal file
87
site/OFF_plugins/typography/assets/js/src/copyfix.js
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
(function (window, document, undefined) {
|
||||
|
||||
// Removal function based on Hyphenator 5.2.0(devel)
|
||||
// Copyright (C) 2015 Mathias Nater, Zürich (mathiasnater at gmail dot com)
|
||||
// https://github.com/mnater/Hyphenator
|
||||
// Released under the MIT license
|
||||
// http://mnater.github.io/Hyphenator/LICENSE.txt
|
||||
|
||||
var hyphen = String.fromCharCode(173),
|
||||
urlhyphen = String.fromCharCode(8203);
|
||||
|
||||
function removeHyphenationFromElement(el) {
|
||||
var h, u, i = 0, n;
|
||||
switch (hyphen) {
|
||||
case '|':
|
||||
h = '\\|';
|
||||
break;
|
||||
case '+':
|
||||
h = '\\+';
|
||||
break;
|
||||
case '*':
|
||||
h = '\\*';
|
||||
break;
|
||||
default:
|
||||
h = hyphen;
|
||||
}
|
||||
switch (urlhyphen) {
|
||||
case '|':
|
||||
u = '\\|';
|
||||
break;
|
||||
case '+':
|
||||
u = '\\+';
|
||||
break;
|
||||
case '*':
|
||||
u = '\\*';
|
||||
break;
|
||||
default:
|
||||
u = urlhyphen;
|
||||
}
|
||||
n = el.childNodes[i];
|
||||
while (!!n) {
|
||||
if (n.nodeType === 3) {
|
||||
n.data = n.data.replace(new RegExp(h, 'g'), '');
|
||||
n.data = n.data.replace(new RegExp(u, 'g'), '');
|
||||
} else if (n.nodeType === 1) {
|
||||
removeHyphenationFromElement(n);
|
||||
}
|
||||
i += 1;
|
||||
n = el.childNodes[i];
|
||||
}
|
||||
}
|
||||
|
||||
// Based on: http://bavotasan.com/2010/add-a-copyright-notice-to-copied-text/
|
||||
function fixBeforeCopy(e) {
|
||||
e.stopPropagation();
|
||||
|
||||
var body_element = document.body,
|
||||
selection = window.getSelection(),
|
||||
range = selection.getRangeAt(0),
|
||||
copytext = selection,
|
||||
dummy = document.createElement('div');
|
||||
|
||||
dummy.style.cssText =
|
||||
'position: absolute;' +
|
||||
'left: -1000px;' +
|
||||
'width: 900px;' +
|
||||
'overflow: hidden;';
|
||||
|
||||
document.body.appendChild(dummy);
|
||||
|
||||
dummy.appendChild(range.cloneContents());
|
||||
|
||||
removeHyphenationFromElement(dummy);
|
||||
selection.selectAllChildren(dummy);
|
||||
|
||||
window.setTimeout(function () {
|
||||
dummy.parentNode.removeChild(dummy);
|
||||
selection.removeAllRanges(); //IE9 needs that
|
||||
selection.addRange(range);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
if (!!window.getSelection) {
|
||||
document.addEventListener("copy", fixBeforeCopy);
|
||||
}
|
||||
|
||||
})(window, document);
|
||||
Loading…
Add table
Add a link
Reference in a new issue