Upgrade katex and revealjs.
This commit is contained in:
parent
b88d8a4b93
commit
61ab3b44fa
|
@ -1,172 +0,0 @@
|
|||
# [<img src="https://khan.github.io/KaTeX/katex-logo.svg" width="130" alt="KaTeX">](https://khan.github.io/KaTeX/)
|
||||
[![Build Status](https://travis-ci.org/Khan/KaTeX.svg?branch=master)](https://travis-ci.org/Khan/KaTeX)
|
||||
[![codecov](https://codecov.io/gh/Khan/KaTeX/branch/master/graph/badge.svg)](https://codecov.io/gh/Khan/KaTeX)
|
||||
[![Join the chat at https://gitter.im/Khan/KaTeX](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Khan/KaTeX?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Greenkeeper badge](https://badges.greenkeeper.io/Khan/KaTeX.svg)](https://greenkeeper.io/)
|
||||
![](https://img.badgesize.io/Khan/KaTeX/v0.10.0-alpha/dist/katex.min.js?compression=gzip)
|
||||
|
||||
KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web.
|
||||
|
||||
* **Fast:** KaTeX renders its math synchronously and doesn't need to reflow the page. See how it compares to a competitor in [this speed test](http://www.intmath.com/cg5/katex-mathjax-comparison.php).
|
||||
* **Print quality:** KaTeX’s layout is based on Donald Knuth’s TeX, the gold standard for math typesetting.
|
||||
* **Self contained:** KaTeX has no dependencies and can easily be bundled with your website resources.
|
||||
* **Server side rendering:** KaTeX produces the same output regardless of browser or environment, so you can pre-render expressions using Node.js and send them as plain HTML.
|
||||
|
||||
KaTeX supports all major browsers, including Chrome, Safari, Firefox, Opera, Edge, and IE 9 - IE 11. More information can be found on the [list of supported commands](https://khan.github.io/KaTeX/function-support.html) and on the [wiki](https://github.com/khan/katex/wiki).
|
||||
|
||||
## Usage
|
||||
|
||||
You can [download KaTeX](https://github.com/khan/katex/releases) and host it on your server or include the `katex.min.js` and `katex.min.css` files on your page directly from a CDN:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0-alpha/dist/katex.min.css" integrity="sha384-BTL0nVi8DnMrNdMQZG1Ww6yasK9ZGnUxL1ZWukXQ7fygA1py52yPp9W4wrR00VML" crossorigin="anonymous">
|
||||
<script src="https://cdn.jsdelivr.net/npm/katex@0.10.0-alpha/dist/katex.min.js" integrity="sha384-y6SGsNt7yZECc4Pf86XmQhC4hG2wxL6Upkt9N1efhFxfh6wlxBH0mJiTE8XYclC1" crossorigin="anonymous"></script>
|
||||
```
|
||||
|
||||
#### In-browser rendering
|
||||
|
||||
Call `katex.render` with a TeX expression and a DOM element to render into:
|
||||
|
||||
```js
|
||||
katex.render("c = \\pm\\sqrt{a^2 + b^2}", element);
|
||||
```
|
||||
|
||||
To avoid escaping the backslash (double backslash), you can use
|
||||
[`String.raw`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/raw)
|
||||
(but beware that `${`, `\u` and `\x` may still need escaping):
|
||||
```js
|
||||
katex.render(String.raw`c = \pm\sqrt{a^2 + b^2}`, element);
|
||||
```
|
||||
|
||||
If KaTeX can't parse the expression, it throws a `katex.ParseError` error.
|
||||
|
||||
#### Server side rendering or rendering to a string
|
||||
|
||||
To generate HTML on the server or to generate an HTML string of the rendered math, you can use `katex.renderToString`:
|
||||
|
||||
```js
|
||||
var html = katex.renderToString("c = \\pm\\sqrt{a^2 + b^2}");
|
||||
// '<span class="katex">...</span>'
|
||||
```
|
||||
|
||||
Make sure to include the CSS and font files, but there is no need to include the JavaScript. Like `render`, `renderToString` throws if it can't parse the expression.
|
||||
|
||||
#### Security
|
||||
|
||||
Any HTML generated by KaTeX *should* be safe from `<script>` or other code
|
||||
injection attacks.
|
||||
(See `maxSize` below for preventing large width/height visual affronts,
|
||||
and see `maxExpand` below for preventing infinite macro loop attacks.)
|
||||
Of course, it is always a good idea to sanitize the HTML, though you will need
|
||||
a rather generous whitelist (including some of SVG and MathML) to support
|
||||
all of KaTeX.
|
||||
|
||||
#### Handling errors
|
||||
|
||||
If KaTeX encounters an error (invalid or unsupported LaTeX) and `throwOnError`
|
||||
hasn't been set to `false`, then it will throw an exception of type
|
||||
`katex.ParseError`. The message in this error includes some of the LaTeX
|
||||
source code, so needs to be escaped if you want to render it to HTML.
|
||||
In particular, you should convert `&`, `<`, `>` characters to
|
||||
`&`, `<`, `>` (e.g., using `_.escape`)
|
||||
before including either LaTeX source code or exception messages in your
|
||||
HTML/DOM. (Failure to escape in this way makes a `<script>` injection
|
||||
attack possible if your LaTeX source is untrusted.)
|
||||
Alternatively, you can set `throwOnError` to `false` to use built-in behavior
|
||||
of rendering the LaTeX source code with hover text stating the error.
|
||||
|
||||
#### Rendering options
|
||||
|
||||
You can provide an object of options as the last argument to `katex.render` and `katex.renderToString`. Available options are:
|
||||
|
||||
- `displayMode`: `boolean`. If `true` the math will be rendered in display mode, which will put the math in display style (so `\int` and `\sum` are large, for example), and will center the math on the page on its own line. If `false` the math will be rendered in inline mode. (default: `false`)
|
||||
- `throwOnError`: `boolean`. If `true` (the default), KaTeX will throw a `ParseError` when it encounters an unsupported command or invalid LaTeX. If `false`, KaTeX will render unsupported commands as text, and render invalid LaTeX as its source code with hover text giving the error, in the color given by `errorColor`.
|
||||
- `errorColor`: `string`. A color string given in the format `"#XXX"` or `"#XXXXXX"`. This option determines the color that unsupported commands and invalid LaTeX are rendered in when `throwOnError` is set to `false`. (default: `#cc0000`)
|
||||
- `macros`: `object`. A collection of custom macros. Each macro is a property with a name like `\name` (written `"\\name"` in JavaScript) which maps to a string that describes the expansion of the macro. Single-character keys can also be included in which case the character will be redefined as the given macro (similar to TeX active characters). *This object will be modified* if the LaTeX code defines its own macros via `\gdef`, which enables consecutive calls to KaTeX to share state.
|
||||
- `colorIsTextColor`: `boolean`. If `true`, `\color` will work like LaTeX's `\textcolor`, and take two arguments (e.g., `\color{blue}{hello}`), which restores the old behavior of KaTeX (pre-0.8.0). If `false` (the default), `\color` will work like LaTeX's `\color`, and take one argument (e.g., `\color{blue}hello`). In both cases, `\textcolor` works as in LaTeX (e.g., `\textcolor{blue}{hello}`).
|
||||
- `maxSize`: `number`. All user-specified sizes, e.g. in `\rule{500em}{500em}`, will be capped to `maxSize` ems. If set to `Infinity` (the default), users can make elements and spaces arbitrarily large.
|
||||
- `maxExpand`: `number`. Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to `Infinity`, the macro expander will try to fully expand as in LaTeX. (default: 1000)
|
||||
- `strict`: `boolean` or `string` or `function` (default: `"warn"`). If `false` or `"ignore`", allow features that make writing LaTeX convenient but are not actually supported by (Xe)LaTeX (similar to MathJax). If `true` or `"error"` (LaTeX faithfulness mode), throw an error for any such transgressions. If `"warn"` (the default), warn about such behavior via `console.warn`. Provide a custom function `handler(errorCode, errorMsg, token)` to customize behavior depending on the type of transgression (summarized by the string code `errorCode` and detailed in `errorMsg`); this function can also return `"ignore"`, `"error"`, or `"warn"` to use a built-in behavior. A list of such features and their `errorCode`s:
|
||||
- `"unknownSymbol"`: Use of unknown Unicode symbol, which will likely also
|
||||
lead to warnings about missing character metrics, and layouts may be
|
||||
incorrect (especially in terms of vertical heights).
|
||||
- `"unicodeTextInMathMode"`: Use of Unicode text characters in math mode.
|
||||
- `"mathVsTextUnits"`: Mismatch of math vs. text commands and units/mode.
|
||||
A second category of `errorCode`s never throw errors, but their strictness
|
||||
affects the behavior of KaTeX:
|
||||
- `"newLineInDisplayMode"`: Use of `\\` or `\newline` in display mode
|
||||
(outside an array/tabular environment). In strict mode, no line break
|
||||
results, as in LaTeX.
|
||||
|
||||
For example:
|
||||
|
||||
```js
|
||||
katex.render("c = \\pm\\sqrt{a^2 + b^2}\\in\\RR", element, {
|
||||
displayMode: true,
|
||||
macros: {
|
||||
"\\RR": "\\mathbb{R}"
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
#### Automatic rendering of math on a page
|
||||
|
||||
Math on the page can be automatically rendered using the auto-render extension. See [the Auto-render README](contrib/auto-render/README.md) for more information.
|
||||
|
||||
#### Font size and lengths
|
||||
|
||||
By default, KaTeX math is rendered in a 1.21× larger font than the surrounding
|
||||
context, which makes super- and subscripts easier to read. You can control
|
||||
this using CSS, for example:
|
||||
|
||||
```css
|
||||
.katex { font-size: 1.1em; }
|
||||
```
|
||||
|
||||
KaTeX supports all TeX units, including absolute units like `cm` and `in`.
|
||||
Absolute units are currently scaled relative to the default TeX font size of
|
||||
10pt, so that `\kern1cm` produces the same results as `\kern2.845275em`.
|
||||
As a result, relative and absolute units are both uniformly scaled relative
|
||||
to LaTeX with a 10pt font; for example, the rectangle `\rule{1cm}{1em}` has
|
||||
the same aspect ratio in KaTeX as in LaTeX. However, because most browsers
|
||||
default to a larger font size, this typically means that a 1cm kern in KaTeX
|
||||
will appear larger than 1cm in browser units.
|
||||
|
||||
### Common Issues
|
||||
- Many Markdown preprocessors, such as the one that Jekyll and GitHub Pages use,
|
||||
have a "smart quotes" feature. This changes `'` to `’` which is an issue for
|
||||
math containing primes, e.g. `f'`. This can be worked around by defining a
|
||||
single character macro which changes them back, e.g. `{"’", "'"}`.
|
||||
- KaTeX follows LaTeX's rendering of `aligned` and `matrix` environments unlike
|
||||
MathJax. When displaying fractions one above another in these vertical
|
||||
layouts there may not be enough space between rows for people who are used to
|
||||
MathJax's rendering. The distance between rows can be adjusted by using
|
||||
`\\[0.1em]` instead of the standard line separator distance.
|
||||
- KaTeX does not support the `align` environment because LaTeX doesn't support
|
||||
`align` in math mode. The `aligned` environment offers the same functionality
|
||||
but in math mode, so use that instead or define a macro that maps `align` to
|
||||
`aligned`.
|
||||
- MathJax defines `\color` to be like `\textcolor` by default; set KaTeX's
|
||||
`colorIsTextColor` option to `true` for this behavior. KaTeX's default
|
||||
behavior matches MathJax with its `color.js` extension enabled.
|
||||
|
||||
## Libraries
|
||||
|
||||
### Angular2+
|
||||
- [ng-katex](https://github.com/garciparedes/ng-katex) Angular module to write beautiful math expressions with TeX syntax boosted by KaTeX library
|
||||
|
||||
### React
|
||||
- [react-latex](https://github.com/zzish/react-latex) React component to render latex strings, based on KaTeX
|
||||
- [react-katex](https://github.com/talyssonoc/react-katex) React components that use KaTeX to typeset math expressions
|
||||
|
||||
### Ruby
|
||||
|
||||
- [katex-ruby](https://github.com/glebm/katex-ruby) Provides server-side rendering and integration with popular Ruby web frameworks (Rails, Hanami, and anything that uses Sprockets).
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
||||
## License
|
||||
|
||||
KaTeX is licensed under the [MIT License](http://opensource.org/licenses/MIT).
|
|
@ -1,875 +0,0 @@
|
|||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory(require("katex"));
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define(["katex"], factory);
|
||||
else if(typeof exports === 'object')
|
||||
exports["renderMathInElement"] = factory(require("katex"));
|
||||
else
|
||||
root["renderMathInElement"] = factory(root["katex"]);
|
||||
})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE__5__) {
|
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 12);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function (exec) {
|
||||
try {
|
||||
return !!exec();
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// Thank's IE8 for his funny defineProperty
|
||||
module.exports = !__webpack_require__(0)(function () {
|
||||
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function (it) {
|
||||
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var core = module.exports = { version: '2.5.7' };
|
||||
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
||||
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
||||
? window : typeof self != 'undefined' && self.Math == Math ? self
|
||||
// eslint-disable-next-line no-new-func
|
||||
: Function('return this')();
|
||||
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 5 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = __WEBPACK_EXTERNAL_MODULE__5__;
|
||||
|
||||
/***/ }),
|
||||
/* 6 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// 7.1.4 ToInteger
|
||||
var ceil = Math.ceil;
|
||||
var floor = Math.floor;
|
||||
module.exports = function (it) {
|
||||
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 7 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// 7.2.1 RequireObjectCoercible(argument)
|
||||
module.exports = function (it) {
|
||||
if (it == undefined) throw TypeError("Can't call method on " + it);
|
||||
return it;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 8 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
||||
var cof = __webpack_require__(24);
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
||||
return cof(it) == 'String' ? it.split('') : Object(it);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 9 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
||||
var IObject = __webpack_require__(8);
|
||||
var defined = __webpack_require__(7);
|
||||
module.exports = function (it) {
|
||||
return IObject(defined(it));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 10 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var hasOwnProperty = {}.hasOwnProperty;
|
||||
module.exports = function (it, key) {
|
||||
return hasOwnProperty.call(it, key);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 11 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = { "default": __webpack_require__(39), __esModule: true };
|
||||
|
||||
/***/ }),
|
||||
/* 12 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/assign.js
|
||||
var object_assign = __webpack_require__(11);
|
||||
var assign_default = /*#__PURE__*/__webpack_require__.n(object_assign);
|
||||
|
||||
// EXTERNAL MODULE: external "katex"
|
||||
var external_katex_ = __webpack_require__(5);
|
||||
var external_katex_default = /*#__PURE__*/__webpack_require__.n(external_katex_);
|
||||
|
||||
// CONCATENATED MODULE: ./contrib/auto-render/splitAtDelimiters.js
|
||||
/* eslint no-constant-condition:0 */
|
||||
var findEndOfMath = function findEndOfMath(delimiter, text, startIndex) {
|
||||
// Adapted from
|
||||
// https://github.com/Khan/perseus/blob/master/src/perseus-markdown.jsx
|
||||
var index = startIndex;
|
||||
var braceLevel = 0;
|
||||
|
||||
var delimLength = delimiter.length;
|
||||
|
||||
while (index < text.length) {
|
||||
var character = text[index];
|
||||
|
||||
if (braceLevel <= 0 && text.slice(index, index + delimLength) === delimiter) {
|
||||
return index;
|
||||
} else if (character === "\\") {
|
||||
index++;
|
||||
} else if (character === "{") {
|
||||
braceLevel++;
|
||||
} else if (character === "}") {
|
||||
braceLevel--;
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
return -1;
|
||||
};
|
||||
|
||||
var splitAtDelimiters = function splitAtDelimiters(startData, leftDelim, rightDelim, display) {
|
||||
var finalData = [];
|
||||
|
||||
for (var i = 0; i < startData.length; i++) {
|
||||
if (startData[i].type === "text") {
|
||||
var text = startData[i].data;
|
||||
|
||||
var lookingForLeft = true;
|
||||
var currIndex = 0;
|
||||
var nextIndex = void 0;
|
||||
|
||||
nextIndex = text.indexOf(leftDelim);
|
||||
if (nextIndex !== -1) {
|
||||
currIndex = nextIndex;
|
||||
finalData.push({
|
||||
type: "text",
|
||||
data: text.slice(0, currIndex)
|
||||
});
|
||||
lookingForLeft = false;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
if (lookingForLeft) {
|
||||
nextIndex = text.indexOf(leftDelim, currIndex);
|
||||
if (nextIndex === -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
finalData.push({
|
||||
type: "text",
|
||||
data: text.slice(currIndex, nextIndex)
|
||||
});
|
||||
|
||||
currIndex = nextIndex;
|
||||
} else {
|
||||
nextIndex = findEndOfMath(rightDelim, text, currIndex + leftDelim.length);
|
||||
if (nextIndex === -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
finalData.push({
|
||||
type: "math",
|
||||
data: text.slice(currIndex + leftDelim.length, nextIndex),
|
||||
rawData: text.slice(currIndex, nextIndex + rightDelim.length),
|
||||
display: display
|
||||
});
|
||||
|
||||
currIndex = nextIndex + rightDelim.length;
|
||||
}
|
||||
|
||||
lookingForLeft = !lookingForLeft;
|
||||
}
|
||||
|
||||
finalData.push({
|
||||
type: "text",
|
||||
data: text.slice(currIndex)
|
||||
});
|
||||
} else {
|
||||
finalData.push(startData[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return finalData;
|
||||
};
|
||||
|
||||
/* harmony default export */ var auto_render_splitAtDelimiters = (splitAtDelimiters);
|
||||
// CONCATENATED MODULE: ./contrib/auto-render/auto-render.js
|
||||
|
||||
/* eslint no-console:0 */
|
||||
|
||||
|
||||
|
||||
|
||||
var auto_render_splitWithDelimiters = function splitWithDelimiters(text, delimiters) {
|
||||
var data = [{ type: "text", data: text }];
|
||||
for (var i = 0; i < delimiters.length; i++) {
|
||||
var delimiter = delimiters[i];
|
||||
data = auto_render_splitAtDelimiters(data, delimiter.left, delimiter.right, delimiter.display || false);
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
||||
/* Note: optionsCopy is mutated by this method. If it is ever exposed in the
|
||||
* API, we should copy it before mutating.
|
||||
*/
|
||||
var auto_render_renderMathInText = function renderMathInText(text, optionsCopy) {
|
||||
var data = auto_render_splitWithDelimiters(text, optionsCopy.delimiters);
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
if (data[i].type === "text") {
|
||||
fragment.appendChild(document.createTextNode(data[i].data));
|
||||
} else {
|
||||
var span = document.createElement("span");
|
||||
var math = data[i].data;
|
||||
// Override any display mode defined in the settings with that
|
||||
// defined by the text itself
|
||||
optionsCopy.displayMode = data[i].display;
|
||||
try {
|
||||
external_katex_default.a.render(math, span, optionsCopy);
|
||||
} catch (e) {
|
||||
if (!(e instanceof external_katex_default.a.ParseError)) {
|
||||
throw e;
|
||||
}
|
||||
optionsCopy.errorCallback("KaTeX auto-render: Failed to parse `" + data[i].data + "` with ", e);
|
||||
fragment.appendChild(document.createTextNode(data[i].rawData));
|
||||
continue;
|
||||
}
|
||||
fragment.appendChild(span);
|
||||
}
|
||||
}
|
||||
|
||||
return fragment;
|
||||
};
|
||||
|
||||
var renderElem = function renderElem(elem, optionsCopy) {
|
||||
for (var i = 0; i < elem.childNodes.length; i++) {
|
||||
var childNode = elem.childNodes[i];
|
||||
if (childNode.nodeType === 3) {
|
||||
// Text node
|
||||
var frag = auto_render_renderMathInText(childNode.textContent, optionsCopy);
|
||||
i += frag.childNodes.length - 1;
|
||||
elem.replaceChild(frag, childNode);
|
||||
} else if (childNode.nodeType === 1) {
|
||||
// Element node
|
||||
var shouldRender = optionsCopy.ignoredTags.indexOf(childNode.nodeName.toLowerCase()) === -1;
|
||||
|
||||
if (shouldRender) {
|
||||
renderElem(childNode, optionsCopy);
|
||||
}
|
||||
}
|
||||
// Otherwise, it's something else, and ignore it.
|
||||
}
|
||||
};
|
||||
|
||||
var defaultAutoRenderOptions = {
|
||||
delimiters: [{ left: "$$", right: "$$", display: true }, { left: "\\(", right: "\\)", display: false },
|
||||
// LaTeX uses $…$, but it ruins the display of normal `$` in text:
|
||||
// {left: "$", right: "$", display: false},
|
||||
|
||||
// \[…\] must come last in this array. Otherwise, renderMathInElement
|
||||
// will search for \[ before it searches for $$ or \(
|
||||
// That makes it susceptible to finding a \\[0.3em] row delimiter and
|
||||
// treating it as if it were the start of a KaTeX math zone.
|
||||
{ left: "\\[", right: "\\]", display: true }],
|
||||
|
||||
ignoredTags: ["script", "noscript", "style", "textarea", "pre", "code"],
|
||||
|
||||
errorCallback: function errorCallback(msg, err) {
|
||||
console.error(msg, err);
|
||||
}
|
||||
};
|
||||
|
||||
var auto_render_renderMathInElement = function renderMathInElement(elem, options) {
|
||||
if (!elem) {
|
||||
throw new Error("No element provided to render");
|
||||
}
|
||||
|
||||
var optionsCopy = assign_default()({}, defaultAutoRenderOptions, options);
|
||||
renderElem(elem, optionsCopy);
|
||||
};
|
||||
|
||||
/* harmony default export */ var auto_render = __webpack_exports__["default"] = (auto_render_renderMathInElement);
|
||||
|
||||
/***/ }),
|
||||
/* 13 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.13 ToObject(argument)
|
||||
var defined = __webpack_require__(7);
|
||||
module.exports = function (it) {
|
||||
return Object(defined(it));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 14 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
exports.f = {}.propertyIsEnumerable;
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 15 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
exports.f = Object.getOwnPropertySymbols;
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 16 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// IE 8- don't enum bug keys
|
||||
module.exports = (
|
||||
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
||||
).split(',');
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 17 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var id = 0;
|
||||
var px = Math.random();
|
||||
module.exports = function (key) {
|
||||
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 18 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = true;
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 19 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var core = __webpack_require__(3);
|
||||
var global = __webpack_require__(4);
|
||||
var SHARED = '__core-js_shared__';
|
||||
var store = global[SHARED] || (global[SHARED] = {});
|
||||
|
||||
(module.exports = function (key, value) {
|
||||
return store[key] || (store[key] = value !== undefined ? value : {});
|
||||
})('versions', []).push({
|
||||
version: core.version,
|
||||
mode: __webpack_require__(18) ? 'pure' : 'global',
|
||||
copyright: '© 2018 Denis Pushkarev (zloirock.ru)'
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 20 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var shared = __webpack_require__(19)('keys');
|
||||
var uid = __webpack_require__(17);
|
||||
module.exports = function (key) {
|
||||
return shared[key] || (shared[key] = uid(key));
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 21 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var toInteger = __webpack_require__(6);
|
||||
var max = Math.max;
|
||||
var min = Math.min;
|
||||
module.exports = function (index, length) {
|
||||
index = toInteger(index);
|
||||
return index < 0 ? max(index + length, 0) : min(index, length);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 22 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.15 ToLength
|
||||
var toInteger = __webpack_require__(6);
|
||||
var min = Math.min;
|
||||
module.exports = function (it) {
|
||||
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 23 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// false -> Array#indexOf
|
||||
// true -> Array#includes
|
||||
var toIObject = __webpack_require__(9);
|
||||
var toLength = __webpack_require__(22);
|
||||
var toAbsoluteIndex = __webpack_require__(21);
|
||||
module.exports = function (IS_INCLUDES) {
|
||||
return function ($this, el, fromIndex) {
|
||||
var O = toIObject($this);
|
||||
var length = toLength(O.length);
|
||||
var index = toAbsoluteIndex(fromIndex, length);
|
||||
var value;
|
||||
// Array#includes uses SameValueZero equality algorithm
|
||||
// eslint-disable-next-line no-self-compare
|
||||
if (IS_INCLUDES && el != el) while (length > index) {
|
||||
value = O[index++];
|
||||
// eslint-disable-next-line no-self-compare
|
||||
if (value != value) return true;
|
||||
// Array#indexOf ignores holes, Array#includes - not
|
||||
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
|
||||
if (O[index] === el) return IS_INCLUDES || index || 0;
|
||||
} return !IS_INCLUDES && -1;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 24 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
var toString = {}.toString;
|
||||
|
||||
module.exports = function (it) {
|
||||
return toString.call(it).slice(8, -1);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 25 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var has = __webpack_require__(10);
|
||||
var toIObject = __webpack_require__(9);
|
||||
var arrayIndexOf = __webpack_require__(23)(false);
|
||||
var IE_PROTO = __webpack_require__(20)('IE_PROTO');
|
||||
|
||||
module.exports = function (object, names) {
|
||||
var O = toIObject(object);
|
||||
var i = 0;
|
||||
var result = [];
|
||||
var key;
|
||||
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
|
||||
// Don't enum bug & hidden keys
|
||||
while (names.length > i) if (has(O, key = names[i++])) {
|
||||
~arrayIndexOf(result, key) || result.push(key);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 26 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
||||
var $keys = __webpack_require__(25);
|
||||
var enumBugKeys = __webpack_require__(16);
|
||||
|
||||
module.exports = Object.keys || function keys(O) {
|
||||
return $keys(O, enumBugKeys);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 27 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// 19.1.2.1 Object.assign(target, source, ...)
|
||||
var getKeys = __webpack_require__(26);
|
||||
var gOPS = __webpack_require__(15);
|
||||
var pIE = __webpack_require__(14);
|
||||
var toObject = __webpack_require__(13);
|
||||
var IObject = __webpack_require__(8);
|
||||
var $assign = Object.assign;
|
||||
|
||||
// should work with symbols and should have deterministic property order (V8 bug)
|
||||
module.exports = !$assign || __webpack_require__(0)(function () {
|
||||
var A = {};
|
||||
var B = {};
|
||||
// eslint-disable-next-line no-undef
|
||||
var S = Symbol();
|
||||
var K = 'abcdefghijklmnopqrst';
|
||||
A[S] = 7;
|
||||
K.split('').forEach(function (k) { B[k] = k; });
|
||||
return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
|
||||
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
|
||||
var T = toObject(target);
|
||||
var aLen = arguments.length;
|
||||
var index = 1;
|
||||
var getSymbols = gOPS.f;
|
||||
var isEnum = pIE.f;
|
||||
while (aLen > index) {
|
||||
var S = IObject(arguments[index++]);
|
||||
var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
|
||||
var length = keys.length;
|
||||
var j = 0;
|
||||
var key;
|
||||
while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
|
||||
} return T;
|
||||
} : $assign;
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 28 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function (bitmap, value) {
|
||||
return {
|
||||
enumerable: !(bitmap & 1),
|
||||
configurable: !(bitmap & 2),
|
||||
writable: !(bitmap & 4),
|
||||
value: value
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 29 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 7.1.1 ToPrimitive(input [, PreferredType])
|
||||
var isObject = __webpack_require__(2);
|
||||
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
||||
// and the second argument - flag - preferred type is a string
|
||||
module.exports = function (it, S) {
|
||||
if (!isObject(it)) return it;
|
||||
var fn, val;
|
||||
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
||||
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
|
||||
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
||||
throw TypeError("Can't convert object to primitive value");
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 30 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var isObject = __webpack_require__(2);
|
||||
var document = __webpack_require__(4).document;
|
||||
// typeof document.createElement is 'object' in old IE
|
||||
var is = isObject(document) && isObject(document.createElement);
|
||||
module.exports = function (it) {
|
||||
return is ? document.createElement(it) : {};
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 31 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = !__webpack_require__(1) && !__webpack_require__(0)(function () {
|
||||
return Object.defineProperty(__webpack_require__(30)('div'), 'a', { get: function () { return 7; } }).a != 7;
|
||||
});
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 32 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var isObject = __webpack_require__(2);
|
||||
module.exports = function (it) {
|
||||
if (!isObject(it)) throw TypeError(it + ' is not an object!');
|
||||
return it;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 33 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var anObject = __webpack_require__(32);
|
||||
var IE8_DOM_DEFINE = __webpack_require__(31);
|
||||
var toPrimitive = __webpack_require__(29);
|
||||
var dP = Object.defineProperty;
|
||||
|
||||
exports.f = __webpack_require__(1) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
||||
anObject(O);
|
||||
P = toPrimitive(P, true);
|
||||
anObject(Attributes);
|
||||
if (IE8_DOM_DEFINE) try {
|
||||
return dP(O, P, Attributes);
|
||||
} catch (e) { /* empty */ }
|
||||
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
||||
if ('value' in Attributes) O[P] = Attributes.value;
|
||||
return O;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 34 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var dP = __webpack_require__(33);
|
||||
var createDesc = __webpack_require__(28);
|
||||
module.exports = __webpack_require__(1) ? function (object, key, value) {
|
||||
return dP.f(object, key, createDesc(1, value));
|
||||
} : function (object, key, value) {
|
||||
object[key] = value;
|
||||
return object;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 35 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = function (it) {
|
||||
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
|
||||
return it;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 36 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// optional / simple context binding
|
||||
var aFunction = __webpack_require__(35);
|
||||
module.exports = function (fn, that, length) {
|
||||
aFunction(fn);
|
||||
if (that === undefined) return fn;
|
||||
switch (length) {
|
||||
case 1: return function (a) {
|
||||
return fn.call(that, a);
|
||||
};
|
||||
case 2: return function (a, b) {
|
||||
return fn.call(that, a, b);
|
||||
};
|
||||
case 3: return function (a, b, c) {
|
||||
return fn.call(that, a, b, c);
|
||||
};
|
||||
}
|
||||
return function (/* ...args */) {
|
||||
return fn.apply(that, arguments);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 37 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
var global = __webpack_require__(4);
|
||||
var core = __webpack_require__(3);
|
||||
var ctx = __webpack_require__(36);
|
||||
var hide = __webpack_require__(34);
|
||||
var has = __webpack_require__(10);
|
||||
var PROTOTYPE = 'prototype';
|
||||
|
||||
var $export = function (type, name, source) {
|
||||
var IS_FORCED = type & $export.F;
|
||||
var IS_GLOBAL = type & $export.G;
|
||||
var IS_STATIC = type & $export.S;
|
||||
var IS_PROTO = type & $export.P;
|
||||
var IS_BIND = type & $export.B;
|
||||
var IS_WRAP = type & $export.W;
|
||||
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
|
||||
var expProto = exports[PROTOTYPE];
|
||||
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
|
||||
var key, own, out;
|
||||
if (IS_GLOBAL) source = name;
|
||||
for (key in source) {
|
||||
// contains in native
|
||||
own = !IS_FORCED && target && target[key] !== undefined;
|
||||
if (own && has(exports, key)) continue;
|
||||
// export native or passed
|
||||
out = own ? target[key] : source[key];
|
||||
// prevent global pollution for namespaces
|
||||
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
||||
// bind timers to global for call from export context
|
||||
: IS_BIND && own ? ctx(out, global)
|
||||
// wrap global constructors for prevent change them in library
|
||||
: IS_WRAP && target[key] == out ? (function (C) {
|
||||
var F = function (a, b, c) {
|
||||
if (this instanceof C) {
|
||||
switch (arguments.length) {
|
||||
case 0: return new C();
|
||||
case 1: return new C(a);
|
||||
case 2: return new C(a, b);
|
||||
} return new C(a, b, c);
|
||||
} return C.apply(this, arguments);
|
||||
};
|
||||
F[PROTOTYPE] = C[PROTOTYPE];
|
||||
return F;
|
||||
// make static versions for prototype methods
|
||||
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
||||
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
|
||||
if (IS_PROTO) {
|
||||
(exports.virtual || (exports.virtual = {}))[key] = out;
|
||||
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
|
||||
if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
|
||||
}
|
||||
}
|
||||
};
|
||||
// type bitmap
|
||||
$export.F = 1; // forced
|
||||
$export.G = 2; // global
|
||||
$export.S = 4; // static
|
||||
$export.P = 8; // proto
|
||||
$export.B = 16; // bind
|
||||
$export.W = 32; // wrap
|
||||
$export.U = 64; // safe
|
||||
$export.R = 128; // real proto method for `library`
|
||||
module.exports = $export;
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 38 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// 19.1.3.1 Object.assign(target, source)
|
||||
var $export = __webpack_require__(37);
|
||||
|
||||
$export($export.S + $export.F, 'Object', { assign: __webpack_require__(27) });
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 39 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(38);
|
||||
module.exports = __webpack_require__(3).Object.assign;
|
||||
|
||||
|
||||
/***/ })
|
||||
/******/ ])["default"];
|
||||
});
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +0,0 @@
|
|||
/* Force selection of entire .katex/.katex-display blocks, so that we can
|
||||
* copy/paste the entire source code. If you omit this CSS, partial
|
||||
* selections of a formula will work, but will copy the ugly HTML
|
||||
* representation instead of the LaTeX source code. (Full selections will
|
||||
* still produce the LaTeX source code.)
|
||||
*/
|
||||
.katex, .katex-display {
|
||||
user-select: all;
|
||||
-moz-user-select: all;
|
||||
-webkit-user-select: all;
|
||||
-ms-user-select: all;
|
||||
}
|
||||
|
|
@ -1,191 +0,0 @@
|
|||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory();
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define([], factory);
|
||||
else {
|
||||
var a = factory();
|
||||
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
||||
}
|
||||
})(typeof self !== 'undefined' ? self : this, function() {
|
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
|
||||
// EXTERNAL MODULE: ./contrib/copy-tex/copy-tex.css
|
||||
var copy_tex = __webpack_require__(2);
|
||||
|
||||
// CONCATENATED MODULE: ./contrib/copy-tex/katex2tex.js
|
||||
// Set these to how you want inline and display math to be delimited.
|
||||
var defaultCopyDelimiters = {
|
||||
inline: ['$', '$'], // alternative: ['\(', '\)']
|
||||
display: ['$$', '$$'] // alternative: ['\[', '\]']
|
||||
};
|
||||
|
||||
// Replace .katex elements with their TeX source (<annotation> element).
|
||||
// Modifies fragment in-place. Useful for writing your own 'copy' handler,
|
||||
// as in copy-tex.js.
|
||||
var katexReplaceWithTex = function katexReplaceWithTex(fragment) {
|
||||
var copyDelimiters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultCopyDelimiters;
|
||||
|
||||
// Remove .katex-html blocks that are preceded by .katex-mathml blocks
|
||||
// (which will get replaced below).
|
||||
var katexHtml = fragment.querySelectorAll('.katex-mathml + .katex-html');
|
||||
for (var i = 0; i < katexHtml.length; i++) {
|
||||
var element = katexHtml[i];
|
||||
if (element.remove) {
|
||||
element.remove(null);
|
||||
} else {
|
||||
element.parentNode.removeChild(element);
|
||||
}
|
||||
}
|
||||
// Replace .katex-mathml elements with their annotation (TeX source)
|
||||
// descendant, with inline delimiters.
|
||||
var katexMathml = fragment.querySelectorAll('.katex-mathml');
|
||||
for (var _i = 0; _i < katexMathml.length; _i++) {
|
||||
var _element = katexMathml[_i];
|
||||
var texSource = _element.querySelector('annotation');
|
||||
if (texSource) {
|
||||
if (_element.replaceWith) {
|
||||
_element.replaceWith(texSource);
|
||||
} else {
|
||||
_element.parentNode.replaceChild(texSource, _element);
|
||||
}
|
||||
texSource.innerHTML = copyDelimiters.inline[0] + texSource.innerHTML + copyDelimiters.inline[1];
|
||||
}
|
||||
}
|
||||
// Switch display math to display delimiters.
|
||||
var displays = fragment.querySelectorAll('.katex-display annotation');
|
||||
for (var _i2 = 0; _i2 < displays.length; _i2++) {
|
||||
var _element2 = displays[_i2];
|
||||
_element2.innerHTML = copyDelimiters.display[0] + _element2.innerHTML.substr(copyDelimiters.inline[0].length, _element2.innerHTML.length - copyDelimiters.inline[0].length - copyDelimiters.inline[1].length) + copyDelimiters.display[1];
|
||||
}
|
||||
return fragment;
|
||||
};
|
||||
|
||||
/* harmony default export */ var katex2tex = (katexReplaceWithTex);
|
||||
// CONCATENATED MODULE: ./contrib/copy-tex/copy-tex.js
|
||||
|
||||
|
||||
|
||||
// Global copy handler to modify behavior on .katex elements.
|
||||
document.addEventListener('copy', function (event) {
|
||||
var selection = window.getSelection();
|
||||
if (selection.isCollapsed) {
|
||||
return; // default action OK if selection is empty
|
||||
}
|
||||
var fragment = selection.getRangeAt(0).cloneContents();
|
||||
if (!fragment.querySelector('.katex-mathml')) {
|
||||
return; // default action OK if no .katex-mathml elements
|
||||
}
|
||||
// Preserve usual HTML copy/paste behavior.
|
||||
var html = [];
|
||||
for (var i = 0; i < fragment.childNodes.length; i++) {
|
||||
html.push(fragment.childNodes[i].outerHTML);
|
||||
}
|
||||
event.clipboardData.setData('text/html', html.join(''));
|
||||
// Rewrite plain-text version.
|
||||
event.clipboardData.setData('text/plain', katex2tex(fragment).textContent);
|
||||
// Prevent normal copy handling.
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
/* 1 */,
|
||||
/* 2 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// extracted by mini-css-extract-plugin
|
||||
|
||||
/***/ })
|
||||
/******/ ])["default"];
|
||||
});
|
|
@ -1 +0,0 @@
|
|||
.katex,.katex-display{user-select:all;-moz-user-select:all;-webkit-user-select:all;-ms-user-select:all}
|
|
@ -1 +0,0 @@
|
|||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);n(2);var r={inline:["$","$"],display:["$$","$$"]},o=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=e.querySelectorAll(".katex-mathml + .katex-html"),o=0;o<n.length;o++){var l=n[o];l.remove?l.remove(null):l.parentNode.removeChild(l)}for(var i=e.querySelectorAll(".katex-mathml"),a=0;a<i.length;a++){var u=i[a],f=u.querySelector("annotation");f&&(u.replaceWith?u.replaceWith(f):u.parentNode.replaceChild(f,u),f.innerHTML=t.inline[0]+f.innerHTML+t.inline[1])}for(var c=e.querySelectorAll(".katex-display annotation"),d=0;d<c.length;d++){var p=c[d];p.innerHTML=t.display[0]+p.innerHTML.substr(t.inline[0].length,p.innerHTML.length-t.inline[0].length-t.inline[1].length)+t.display[1]}return e};document.addEventListener("copy",function(e){var t=window.getSelection();if(!t.isCollapsed){var n=t.getRangeAt(0).cloneContents();if(n.querySelector(".katex-mathml")){for(var r=[],l=0;l<n.childNodes.length;l++)r.push(n.childNodes[l].outerHTML);e.clipboardData.setData("text/html",r.join("")),e.clipboardData.setData("text/plain",o(n).textContent),e.preventDefault()}}})},,function(e,t,n){}]).default});
|
|
@ -1,134 +0,0 @@
|
|||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory(require("katex"));
|
||||
else if(typeof define === 'function' && define.amd)
|
||||
define(["katex"], factory);
|
||||
else {
|
||||
var a = typeof exports === 'object' ? factory(require("katex")) : factory(root["katex"]);
|
||||
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
||||
}
|
||||
})(typeof self !== 'undefined' ? self : this, function(__WEBPACK_EXTERNAL_MODULE__0__) {
|
||||
return /******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 1);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = __WEBPACK_EXTERNAL_MODULE__0__;
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var katex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
||||
/* harmony import */ var katex__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(katex__WEBPACK_IMPORTED_MODULE_0__);
|
||||
|
||||
|
||||
var scripts = document.body.getElementsByTagName("script");
|
||||
scripts = Array.prototype.slice.call(scripts);
|
||||
scripts.forEach(function (script) {
|
||||
if (!script.type || !script.type.match(/math\/tex/i)) {
|
||||
return -1;
|
||||
}
|
||||
var display = script.type.match(/mode\s*=\s*display(;|\s|\n|$)/) != null;
|
||||
|
||||
var katexElement = document.createElement(display ? "div" : "span");
|
||||
katexElement.setAttribute("class", display ? "equation" : "inline-equation");
|
||||
try {
|
||||
katex__WEBPACK_IMPORTED_MODULE_0___default.a.render(script.text, katexElement, { displayMode: display });
|
||||
} catch (err) {
|
||||
//console.error(err); linter doesn't like this
|
||||
katexElement.textContent = script.text;
|
||||
}
|
||||
script.parentNode.replaceChild(katexElement, script);
|
||||
});
|
||||
|
||||
/***/ })
|
||||
/******/ ])["default"];
|
||||
});
|
|
@ -1 +0,0 @@
|
|||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("katex"));else if("function"==typeof define&&define.amd)define(["katex"],t);else{var r="object"==typeof exports?t(require("katex")):t(e.katex);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),u=document.body.getElementsByTagName("script");(u=Array.prototype.slice.call(u)).forEach(function(e){if(!e.type||!e.type.match(/math\/tex/i))return-1;var t=null!=e.type.match(/mode\s*=\s*display(;|\s|\n|$)/),r=document.createElement(t?"div":"span");r.setAttribute("class",t?"equation":"inline-equation");try{o.a.render(e.text,r,{displayMode:t})}catch(t){r.textContent=e.text}e.parentNode.replaceChild(r,e)})}]).default});
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,4 @@
|
|||
/* stylelint-disable font-family-no-missing-generic-family-keyword */
|
||||
@font-face {
|
||||
font-family: 'KaTeX_AMS';
|
||||
src: url(fonts/KaTeX_AMS-Regular.woff2) format('woff2'), url(fonts/KaTeX_AMS-Regular.woff) format('woff'), url(fonts/KaTeX_AMS-Regular.ttf) format('truetype');
|
||||
|
@ -118,36 +119,6 @@
|
|||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@media screen {
|
||||
.katex .mtable .vertical-separator {
|
||||
min-width: 1px;
|
||||
}
|
||||
.katex .mfrac .frac-line,
|
||||
.katex .overline .overline-line,
|
||||
.katex .underline .underline-line,
|
||||
.katex .hline,
|
||||
.katex .hdashline,
|
||||
.katex .rule {
|
||||
min-height: 1px;
|
||||
}
|
||||
}
|
||||
.katex-display {
|
||||
display: block;
|
||||
margin: 1em 0;
|
||||
text-align: center;
|
||||
}
|
||||
.katex-display > .katex {
|
||||
display: block;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.katex-display > .katex > .katex-html {
|
||||
display: block;
|
||||
}
|
||||
.katex-display > .katex > .katex-html > .tag {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
}
|
||||
.katex {
|
||||
font: normal 1.21em KaTeX_Main, Times New Roman, serif;
|
||||
line-height: 1.2;
|
||||
|
@ -157,6 +128,9 @@
|
|||
.katex * {
|
||||
-ms-high-contrast-adjust: none !important;
|
||||
}
|
||||
.katex .katex-version::after {
|
||||
content: "0.11.0";
|
||||
}
|
||||
.katex .katex-mathml {
|
||||
position: absolute;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
|
@ -196,10 +170,14 @@
|
|||
.katex .texttt {
|
||||
font-family: KaTeX_Typewriter;
|
||||
}
|
||||
.katex .mathit {
|
||||
.katex .mathdefault {
|
||||
font-family: KaTeX_Math;
|
||||
font-style: italic;
|
||||
}
|
||||
.katex .mathit {
|
||||
font-family: KaTeX_Main;
|
||||
font-style: italic;
|
||||
}
|
||||
.katex .mathrm {
|
||||
font-style: normal;
|
||||
}
|
||||
|
@ -237,8 +215,14 @@
|
|||
.katex .textsf {
|
||||
font-family: KaTeX_SansSerif;
|
||||
}
|
||||
.katex .mainit {
|
||||
font-family: KaTeX_Main;
|
||||
.katex .mathboldsf,
|
||||
.katex .textboldsf {
|
||||
font-family: KaTeX_SansSerif;
|
||||
font-weight: bold;
|
||||
}
|
||||
.katex .mathitsf,
|
||||
.katex .textitsf {
|
||||
font-family: KaTeX_SansSerif;
|
||||
font-style: italic;
|
||||
}
|
||||
.katex .mainrm {
|
||||
|
@ -290,6 +274,14 @@
|
|||
width: 100%;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
.katex .mfrac .frac-line,
|
||||
.katex .overline .overline-line,
|
||||
.katex .underline .underline-line,
|
||||
.katex .hline,
|
||||
.katex .hdashline,
|
||||
.katex .rule {
|
||||
min-height: 1px;
|
||||
}
|
||||
.katex .mspace {
|
||||
display: inline-block;
|
||||
}
|
||||
|
@ -341,10 +333,6 @@
|
|||
margin-left: 0.27777778em;
|
||||
margin-right: -0.55555556em;
|
||||
}
|
||||
.katex .sizing,
|
||||
.katex .fontsize-ensurer {
|
||||
display: inline-block;
|
||||
}
|
||||
.katex .sizing.reset-size1.size1,
|
||||
.katex .fontsize-ensurer.reset-size1.size1 {
|
||||
font-size: 1em;
|
||||
|
@ -869,22 +857,18 @@
|
|||
.katex .accent > .vlist-t {
|
||||
text-align: center;
|
||||
}
|
||||
.katex .accent .accent-body:not(.accent-full) {
|
||||
width: 0;
|
||||
}
|
||||
.katex .accent .accent-body {
|
||||
position: relative;
|
||||
}
|
||||
.katex .accent .accent-body:not(.accent-full) {
|
||||
width: 0;
|
||||
}
|
||||
.katex .overlay {
|
||||
display: block;
|
||||
}
|
||||
.katex .mtable .vertical-separator {
|
||||
display: inline-block;
|
||||
margin: 0 -0.025em;
|
||||
border-right: 0.05em solid;
|
||||
}
|
||||
.katex .mtable .vs-dashed {
|
||||
border-right: 0.05em dashed;
|
||||
min-width: 1px;
|
||||
}
|
||||
.katex .mtable .arraycolsep {
|
||||
display: inline-block;
|
||||
|
@ -921,14 +905,21 @@
|
|||
.katex svg path {
|
||||
stroke: none;
|
||||
}
|
||||
.katex img {
|
||||
border-style: none;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
max-width: none;
|
||||
max-height: none;
|
||||
}
|
||||
.katex .stretchy {
|
||||
width: 100%;
|
||||
display: block;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.katex .stretchy:before,
|
||||
.katex .stretchy:after {
|
||||
.katex .stretchy::before,
|
||||
.katex .stretchy::after {
|
||||
content: "";
|
||||
}
|
||||
.katex .hide-tail {
|
||||
|
@ -977,10 +968,7 @@
|
|||
.katex .boxpad {
|
||||
padding: 0 0.3em 0 0.3em;
|
||||
}
|
||||
.katex .fbox {
|
||||
box-sizing: border-box;
|
||||
border: 0.04em solid black;
|
||||
}
|
||||
.katex .fbox,
|
||||
.katex .fcolorbox {
|
||||
box-sizing: border-box;
|
||||
border: 0.04em solid;
|
||||
|
@ -996,4 +984,29 @@
|
|||
border-bottom-style: solid;
|
||||
border-bottom-width: 0.08em;
|
||||
}
|
||||
.katex-display {
|
||||
display: block;
|
||||
margin: 1em 0;
|
||||
text-align: center;
|
||||
}
|
||||
.katex-display > .katex {
|
||||
display: block;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.katex-display > .katex > .katex-html {
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
.katex-display > .katex > .katex-html > .tag {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
.katex-display.leqno > .katex > .katex-html > .tag {
|
||||
left: 0;
|
||||
right: auto;
|
||||
}
|
||||
.katex-display.fleqn > .katex {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -8,7 +8,6 @@ out/
|
|||
log/*.log
|
||||
tmp/**
|
||||
node_modules/
|
||||
package-lock.json
|
||||
.sass-cache
|
||||
css/reveal.min.css
|
||||
js/reveal.min.js
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- 4
|
||||
- 11
|
||||
after_script:
|
||||
- npm run build -- retire
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
/* global module:false */
|
||||
module.exports = function(grunt) {
|
||||
var port = grunt.option('port') || 8000;
|
||||
var root = grunt.option('root') || '.';
|
||||
const sass = require('node-sass');
|
||||
|
||||
module.exports = grunt => {
|
||||
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
let port = grunt.option('port') || 8000;
|
||||
let root = grunt.option('root') || '.';
|
||||
|
||||
if (!Array.isArray(root)) root = [root];
|
||||
|
||||
|
@ -15,7 +19,7 @@ module.exports = function(grunt) {
|
|||
' * http://revealjs.com\n' +
|
||||
' * MIT licensed\n' +
|
||||
' *\n' +
|
||||
' * Copyright (C) 2018 Hakim El Hattab, http://hakim.se\n' +
|
||||
' * Copyright (C) 2019 Hakim El Hattab, http://hakim.se\n' +
|
||||
' */'
|
||||
},
|
||||
|
||||
|
@ -35,6 +39,10 @@ module.exports = function(grunt) {
|
|||
},
|
||||
|
||||
sass: {
|
||||
options: {
|
||||
implementation: sass,
|
||||
sourceMap: false
|
||||
},
|
||||
core: {
|
||||
src: 'css/reveal.scss',
|
||||
dest: 'css/reveal.css'
|
||||
|
@ -85,10 +93,11 @@ module.exports = function(grunt) {
|
|||
console: false,
|
||||
unescape: false,
|
||||
define: false,
|
||||
exports: false
|
||||
exports: false,
|
||||
require: false
|
||||
}
|
||||
},
|
||||
files: [ 'Gruntfile.js', 'js/reveal.js' ]
|
||||
files: [ 'gruntfile.js', 'js/reveal.js' ]
|
||||
},
|
||||
|
||||
connect: {
|
||||
|
@ -120,7 +129,7 @@ module.exports = function(grunt) {
|
|||
|
||||
watch: {
|
||||
js: {
|
||||
files: [ 'Gruntfile.js', 'js/reveal.js' ],
|
||||
files: [ 'gruntfile.js', 'js/reveal.js' ],
|
||||
tasks: 'js'
|
||||
},
|
||||
theme: {
|
||||
|
@ -136,6 +145,10 @@ module.exports = function(grunt) {
|
|||
files: [ 'css/reveal.scss' ],
|
||||
tasks: 'css-core'
|
||||
},
|
||||
test: {
|
||||
files: [ 'test/*.html' ],
|
||||
tasks: 'test'
|
||||
},
|
||||
html: {
|
||||
files: root.map(path => path + '/*.html')
|
||||
},
|
||||
|
@ -145,26 +158,12 @@ module.exports = function(grunt) {
|
|||
options: {
|
||||
livereload: true
|
||||
}
|
||||
},
|
||||
|
||||
retire: {
|
||||
js: [ 'js/reveal.js', 'lib/js/*.js', 'plugin/**/*.js' ],
|
||||
node: [ '.' ]
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Dependencies
|
||||
grunt.loadNpmTasks( 'grunt-contrib-connect' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-qunit' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
|
||||
grunt.loadNpmTasks( 'grunt-contrib-watch' );
|
||||
grunt.loadNpmTasks( 'grunt-autoprefixer' );
|
||||
grunt.loadNpmTasks( 'grunt-retire' );
|
||||
grunt.loadNpmTasks( 'grunt-sass' );
|
||||
grunt.loadNpmTasks( 'grunt-zip' );
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-nodeunit');
|
||||
|
||||
// Default task
|
||||
grunt.registerTask( 'default', [ 'css', 'js' ] );
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (C) 2018 Hakim El Hattab, http://hakim.se, and reveal.js contributors
|
||||
Copyright (C) 2019 Hakim El Hattab, http://hakim.se, and reveal.js contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -8,6 +8,10 @@ reveal.js comes with a broad range of features including [nested slides](https:/
|
|||
## Table of contents
|
||||
|
||||
- [Online Editor](#online-editor)
|
||||
- [Installation](#installation)
|
||||
- [Basic setup](#basic-setup)
|
||||
- [Full setup](#full-setup)
|
||||
- [Folder Structure](#folder-structure)
|
||||
- [Instructions](#instructions)
|
||||
- [Markup](#markup)
|
||||
- [Markdown](#markdown)
|
||||
|
@ -19,6 +23,7 @@ reveal.js comes with a broad range of features including [nested slides](https:/
|
|||
- [Ready Event](#ready-event)
|
||||
- [Auto-sliding](#auto-sliding)
|
||||
- [Keyboard Bindings](#keyboard-bindings)
|
||||
- [Vertical Slide Navigation](#vertical-slide-navigation)
|
||||
- [Touch Navigation](#touch-navigation)
|
||||
- [Lazy Loading](#lazy-loading)
|
||||
- [API](#api)
|
||||
|
@ -37,6 +42,7 @@ reveal.js comes with a broad range of features including [nested slides](https:/
|
|||
- [Fullscreen mode](#fullscreen-mode)
|
||||
- [Embedded media](#embedded-media)
|
||||
- [Stretching elements](#stretching-elements)
|
||||
- [Resize Event](#resize-event)
|
||||
- [postMessage API](#postmessage-api)
|
||||
- [PDF Export](#pdf-export)
|
||||
- [Theming](#theming)
|
||||
|
@ -48,10 +54,6 @@ reveal.js comes with a broad range of features including [nested slides](https:/
|
|||
- [Client presentation](#client-presentation)
|
||||
- [Socket.io server](#socketio-server)
|
||||
- [MathJax](#mathjax)
|
||||
- [Installation](#installation)
|
||||
- [Basic setup](#basic-setup)
|
||||
- [Full setup](#full-setup)
|
||||
- [Folder Structure](#folder-structure)
|
||||
- [License](#license)
|
||||
|
||||
#### More reading
|
||||
|
@ -67,6 +69,56 @@ reveal.js comes with a broad range of features including [nested slides](https:/
|
|||
Presentations are written using HTML or Markdown but there's also an online editor for those of you who prefer a graphical interface. Give it a try at [https://slides.com](https://slides.com?ref=github).
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
The **basic setup** is for authoring presentations only. The **full setup** gives you access to all reveal.js features and plugins such as speaker notes as well as the development tasks needed to make changes to the source.
|
||||
|
||||
### Basic setup
|
||||
|
||||
The core of reveal.js is very easy to install. You'll simply need to download a copy of this repository and open the index.html file directly in your browser.
|
||||
|
||||
1. Download the latest version of reveal.js from <https://github.com/hakimel/reveal.js/releases>
|
||||
2. Unzip and replace the example contents in index.html with your own
|
||||
3. Open index.html in a browser to view it
|
||||
|
||||
### Full setup
|
||||
|
||||
Some reveal.js features, like external Markdown and speaker notes, require that presentations run from a local web server. The following instructions will set up such a server as well as all of the development tasks needed to make edits to the reveal.js source code.
|
||||
|
||||
1. Install [Node.js](http://nodejs.org/) (4.0.0 or later)
|
||||
|
||||
1. Clone the reveal.js repository
|
||||
```sh
|
||||
$ git clone https://github.com/hakimel/reveal.js.git
|
||||
```
|
||||
|
||||
1. Navigate to the reveal.js folder
|
||||
```sh
|
||||
$ cd reveal.js
|
||||
```
|
||||
|
||||
1. Install dependencies
|
||||
```sh
|
||||
$ npm install
|
||||
```
|
||||
|
||||
1. Serve the presentation and monitor source files for changes
|
||||
```sh
|
||||
$ npm start
|
||||
```
|
||||
|
||||
1. Open <http://localhost:8000> to view your presentation
|
||||
|
||||
You can change the port by using `npm start -- --port=8001`.
|
||||
|
||||
### Folder Structure
|
||||
|
||||
- **css/** Core styles without which the project does not function
|
||||
- **js/** Like above but for JavaScript
|
||||
- **plugin/** Components that have been developed as extensions to reveal.js
|
||||
- **lib/** All other third party assets (JavaScript, CSS, fonts)
|
||||
|
||||
|
||||
## Instructions
|
||||
|
||||
### Markup
|
||||
|
@ -175,7 +227,7 @@ We use [marked](https://github.com/chjj/marked) to parse Markdown. To customise
|
|||
```javascript
|
||||
Reveal.initialize({
|
||||
// Options which are passed into marked
|
||||
// See https://github.com/chjj/marked#options-1
|
||||
// See https://marked.js.org/#/USING_ADVANCED.md#options
|
||||
markdown: {
|
||||
smartypants: true
|
||||
}
|
||||
|
@ -209,7 +261,11 @@ Reveal.initialize({
|
|||
// Display the page number of the current slide
|
||||
slideNumber: false,
|
||||
|
||||
// Push each slide change to the browser history
|
||||
// Add the current slide number to the URL hash so that reloading the
|
||||
// page/copying the URL will return you to the same slide
|
||||
hash: false,
|
||||
|
||||
// Push each slide change to the browser history. Implies `hash: true`
|
||||
history: false,
|
||||
|
||||
// Enable keyboard shortcuts for navigation
|
||||
|
@ -230,6 +286,9 @@ Reveal.initialize({
|
|||
// Change the presentation direction to be RTL
|
||||
rtl: false,
|
||||
|
||||
// See https://github.com/hakimel/reveal.js/#navigation-mode
|
||||
navigationMode: 'default',
|
||||
|
||||
// Randomizes the order of slides each time the presentation loads
|
||||
shuffle: false,
|
||||
|
||||
|
@ -257,6 +316,13 @@ Reveal.initialize({
|
|||
// - false: No media will autoplay, regardless of individual setting
|
||||
autoPlayMedia: null,
|
||||
|
||||
// Global override for preloading lazy-loaded iframes
|
||||
// - null: Iframes with data-src AND data-preload will be loaded when within
|
||||
// the viewDistance, iframes with only data-src will be loaded when visible
|
||||
// - true: All iframes with data-src will be loaded when within the viewDistance
|
||||
// - false: All iframes with data-src will be loaded only when visible
|
||||
preloadIframes: null,
|
||||
|
||||
// Number of milliseconds between automatically proceeding to the
|
||||
// next slide, disabled when set to 0, this value can be overwritten
|
||||
// by using a data-autoslide attribute on your slides
|
||||
|
@ -276,6 +342,12 @@ Reveal.initialize({
|
|||
// Enable slide navigation via mouse wheel
|
||||
mouseWheel: false,
|
||||
|
||||
// Hide cursor if inactive
|
||||
hideInactiveCursor: true,
|
||||
|
||||
// Time before the cursor is hidden (in ms)
|
||||
hideCursorTime: 5000,
|
||||
|
||||
// Hides the address bar on mobile devices
|
||||
hideAddressBar: true,
|
||||
|
||||
|
@ -373,9 +445,6 @@ Reveal.js doesn't _rely_ on any third party scripts to work but a few optional l
|
|||
```javascript
|
||||
Reveal.initialize({
|
||||
dependencies: [
|
||||
// Cross-browser shim that fully implements classList - https://github.com/eligrey/classList.js/
|
||||
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
|
||||
|
||||
// Interpret Markdown in <section> elements
|
||||
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
|
@ -401,8 +470,6 @@ You can add your own extensions using the same syntax. The following properties
|
|||
- **callback**: [optional] Function to execute when the script has loaded
|
||||
- **condition**: [optional] Function which must return true for the script to be loaded
|
||||
|
||||
To load these dependencies, reveal.js requires [head.js](http://headjs.com/) *(a script loading library)* to be loaded before reveal.js.
|
||||
|
||||
### Ready Event
|
||||
|
||||
A `ready` event is fired when reveal.js has loaded all non-async dependencies and is ready to start navigating. To check if reveal.js is already 'ready' you can call `Reveal.isReady()`.
|
||||
|
@ -456,6 +523,21 @@ Reveal.configure({
|
|||
});
|
||||
```
|
||||
|
||||
### Vertical Slide Navigation
|
||||
|
||||
Slides can be nested within other slides to create vertical stacks (see [Markup](#markup)). When presenting, you use the left/right arrows to step through the main (horizontal) slides. When you arrive at a vertical stack you can optionally press the up/down arrows to view the vertical slides or skip past them by pressing the right arrow. Here's an example showing a bird's-eye view of what this looks like in action:
|
||||
|
||||
<img src="https://static.slid.es/support/reveal.js-vertical-slides.gif" width="450">
|
||||
|
||||
#### Navigation Mode
|
||||
You can finetune the reveal.js navigation behavior by using the `navigationMode` config option. Note that these options are only useful for presnetations that use a mix of horizontal and vertical slides. The following navigation modes are available:
|
||||
|
||||
| Value | Description |
|
||||
| :--------------------------- | :---------- |
|
||||
| default | Left/right arrow keys step between horizontal slides. Up/down arrow keys step between vertical slides. Space key steps through all slides (both horizontal and vertical). |
|
||||
| linear | Removes the up/down arrows. Left/right arrows step through all slides (both horizontal and vertical). |
|
||||
| grid | When this is enabled, stepping left/right from a vertical stack to an adjacent vertical stack will land you at the same vertical index.<br><br>Consider a deck with six slides ordered in two vertical stacks:<br>`1.1` `2.1`<br>`1.2` `2.2`<br>`1.3` `2.3`<br><br>If you're on slide 1.3 and navigate right, you will normally move from 1.3 -> 2.1. With navigationMode set to "grid" the same navigation takes you from 1.3 -> 2.3. |
|
||||
|
||||
### Touch Navigation
|
||||
|
||||
You can swipe to navigate through a presentation on any touch-enabled device. Horizontal swipes change between horizontal slides, vertical swipes change between vertical slides. If you wish to disable this you can set the `touch` config option to false when initializing reveal.js.
|
||||
|
@ -466,7 +548,7 @@ If there's some part of your content that needs to remain accessible to touch ev
|
|||
|
||||
When working on presentation with a lot of media or iframe content it's important to load lazily. Lazy loading means that reveal.js will only load content for the few slides nearest to the current slide. The number of slides that are preloaded is determined by the `viewDistance` configuration option.
|
||||
|
||||
To enable lazy loading all you need to do is change your `src` attributes to `data-src` as shown below. This is supported for image, video, audio and iframe elements. Lazy loaded iframes will also unload when the containing slide is no longer visible.
|
||||
To enable lazy loading all you need to do is change your `src` attributes to `data-src` as shown below. This is supported for image, video, audio and iframe elements.
|
||||
|
||||
```html
|
||||
<section>
|
||||
|
@ -479,6 +561,26 @@ To enable lazy loading all you need to do is change your `src` attributes to `da
|
|||
</section>
|
||||
```
|
||||
|
||||
#### Lazy Loading Iframes
|
||||
|
||||
Note that lazy loaded iframes ignore the `viewDistance` configuration and will only load when their containing slide becomes visible. Iframes are also unloaded as soon as the slide is hidden.
|
||||
|
||||
When we lazy load a video or audio element, reveal.js won't start playing that content until the slide becomes visible. However there is no way to control this for an iframe since that could contain any kind of content. That means if we loaded an iframe before the slide is visible on screen it could begin playing media and sound in the background.
|
||||
|
||||
You can override this behavior with the `data-preload` attribute. The iframe below will be loaded
|
||||
according to the `viewDistance`.
|
||||
|
||||
```html
|
||||
<section>
|
||||
<iframe data-src="http://hakim.se" data-preload></iframe>
|
||||
</section>
|
||||
```
|
||||
|
||||
You can also change the default globally with the `preloadIframes` configuration option. If set to
|
||||
`true` ALL iframes with a `data-src` attribute will be preloaded when within the `viewDistance`
|
||||
regardless of individual `data-preload` attributes. If set to `false`, all iframes will only be
|
||||
loaded when they become visible.
|
||||
|
||||
### API
|
||||
|
||||
The `Reveal` object exposes a JavaScript API for controlling navigation and reading state:
|
||||
|
@ -535,6 +637,9 @@ Reveal.isLastSlide();
|
|||
Reveal.isOverview();
|
||||
Reveal.isPaused();
|
||||
Reveal.isAutoSliding();
|
||||
|
||||
// Returns the top-level DOM element
|
||||
getRevealElement(); // <div class="reveal">...</div>
|
||||
```
|
||||
|
||||
### Custom Key Bindings
|
||||
|
@ -813,7 +918,7 @@ Reveal.addEventListener( 'fragmenthidden', function( event ) {
|
|||
|
||||
### Code syntax highlighting
|
||||
|
||||
By default, Reveal is configured with [highlight.js](https://highlightjs.org/) for code syntax highlighting. To enable syntax highlighting, you'll have to load the highlight plugin ([plugin/highlight/highlight.js](plugin/highlight/highlight.js)) and a highlight.js CSS theme (Reveal comes packaged with the zenburn theme: [lib/css/zenburn.css](lib/css/zenburn.css)).
|
||||
By default, Reveal is configured with [highlight.js](https://highlightjs.org/) for code syntax highlighting. To enable syntax highlighting, you'll have to load the highlight plugin ([plugin/highlight/highlight.js](plugin/highlight/highlight.js)) and a highlight.js CSS theme (Reveal comes packaged with the Monokai themes: [lib/css/monokai.css](lib/css/monokai.css)).
|
||||
|
||||
```javascript
|
||||
Reveal.initialize({
|
||||
|
@ -853,6 +958,12 @@ Reveal.configure({ slideNumber: true });
|
|||
// "c/t": flattened slide number / total slides
|
||||
Reveal.configure({ slideNumber: 'c/t' });
|
||||
|
||||
// You can provide a function to fully customize the number:
|
||||
Reveal.configure({ slideNumber: function() {
|
||||
// Ignore numbering of vertical slides
|
||||
return [ Reveal.getIndices().h ];
|
||||
}});
|
||||
|
||||
// Control which views the slide number displays on using the "showSlideNumber" value:
|
||||
// "all": show on all views (default)
|
||||
// "speaker": only show slide numbers on speaker notes view
|
||||
|
@ -908,6 +1019,16 @@ Limitations:
|
|||
- Only direct descendants of a slide section can be stretched
|
||||
- Only one descendant per slide section can be stretched
|
||||
|
||||
### Resize Event
|
||||
|
||||
When reveal.js changes the scale of the slides it fires a resize event. You can subscribe to the event to resize your elements accordingly.
|
||||
|
||||
```javascript
|
||||
Reveal.addEventListener( 'resize', function( event ) {
|
||||
// event.scale, event.oldScale, event.size
|
||||
} );
|
||||
```
|
||||
|
||||
### postMessage API
|
||||
|
||||
The framework has a built-in postMessage API that can be used when communicating with a presentation inside of another window. Here's an example showing how you'd make a reveal.js instance in the given window proceed to slide 2:
|
||||
|
@ -1049,7 +1170,7 @@ This will only display in the notes window.
|
|||
|
||||
Notes are only visible to the speaker inside of the speaker view. If you wish to share your notes with others you can initialize reveal.js with the `showNotes` configuration value set to `true`. Notes will appear along the bottom of the presentations.
|
||||
|
||||
When `showNotes` is enabled notes are also included when you [export to PDF](https://github.com/hakimel/reveal.js#pdf-export). By default, notes are printed in a semi-transparent box on top of the slide. If you'd rather print them on a separate page after the slide, set `showNotes: "separate-page"`.
|
||||
When `showNotes` is enabled notes are also included when you [export to PDF](https://github.com/hakimel/reveal.js#pdf-export). By default, notes are printed in a box on top of the slide. If you'd rather print them on a separate page, after the slide, set `showNotes: "separate-page"`.
|
||||
|
||||
#### Speaker notes clock and timers
|
||||
|
||||
|
@ -1120,7 +1241,7 @@ Reveal.initialize({
|
|||
|
||||
// Don't forget to add the dependencies
|
||||
dependencies: [
|
||||
{ src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
|
||||
{ src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js', async: true },
|
||||
{ src: 'plugin/multiplex/master.js', async: true },
|
||||
|
||||
// and if you want speaker notes
|
||||
|
@ -1150,7 +1271,7 @@ Reveal.initialize({
|
|||
|
||||
// Don't forget to add the dependencies
|
||||
dependencies: [
|
||||
{ src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
|
||||
{ src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js', async: true },
|
||||
{ src: 'plugin/multiplex/client.js', async: true }
|
||||
|
||||
// other dependencies...
|
||||
|
@ -1192,7 +1313,7 @@ Reveal.initialize({
|
|||
|
||||
// Don't forget to add the dependencies
|
||||
dependencies: [
|
||||
{ src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
|
||||
{ src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js', async: true },
|
||||
{ src: 'plugin/multiplex/client.js', async: true }
|
||||
|
||||
// other dependencies...
|
||||
|
@ -1216,7 +1337,7 @@ Reveal.initialize({
|
|||
|
||||
// Don't forget to add the dependencies
|
||||
dependencies: [
|
||||
{ src: '//cdn.socket.io/socket.io-1.3.5.js', async: true },
|
||||
{ src: '//cdnjs.cloudflare.com/ajax/libs/socket.io/2.2.0/socket.io.js', async: true },
|
||||
{ src: 'plugin/multiplex/master.js', async: true },
|
||||
{ src: 'plugin/multiplex/client.js', async: true }
|
||||
|
||||
|
@ -1241,6 +1362,8 @@ Reveal.initialize({
|
|||
math: {
|
||||
mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
|
||||
config: 'TeX-AMS_HTML-full' // See http://docs.mathjax.org/en/latest/config-files.html
|
||||
// pass other options into `MathJax.Hub.Config()`
|
||||
TeX: { Macros: macros }
|
||||
},
|
||||
|
||||
dependencies: [
|
||||
|
@ -1251,59 +1374,15 @@ Reveal.initialize({
|
|||
|
||||
Read MathJax's documentation if you need [HTTPS delivery](http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn) or serving of [specific versions](http://docs.mathjax.org/en/latest/configuration.html#loading-mathjax-from-the-cdn) for stability.
|
||||
|
||||
#### MathJax in Markdown
|
||||
If you want to include math inside of a presentation written in Markdown you need to wrap the formula in backticks. This prevents syntax conflicts between LaTeX and Markdown. For example:
|
||||
|
||||
## Installation
|
||||
|
||||
The **basic setup** is for authoring presentations only. The **full setup** gives you access to all reveal.js features and plugins such as speaker notes as well as the development tasks needed to make changes to the source.
|
||||
|
||||
### Basic setup
|
||||
|
||||
The core of reveal.js is very easy to install. You'll simply need to download a copy of this repository and open the index.html file directly in your browser.
|
||||
|
||||
1. Download the latest version of reveal.js from <https://github.com/hakimel/reveal.js/releases>
|
||||
2. Unzip and replace the example contents in index.html with your own
|
||||
3. Open index.html in a browser to view it
|
||||
|
||||
### Full setup
|
||||
|
||||
Some reveal.js features, like external Markdown and speaker notes, require that presentations run from a local web server. The following instructions will set up such a server as well as all of the development tasks needed to make edits to the reveal.js source code.
|
||||
|
||||
1. Install [Node.js](http://nodejs.org/) (4.0.0 or later)
|
||||
|
||||
1. Clone the reveal.js repository
|
||||
```sh
|
||||
$ git clone https://github.com/hakimel/reveal.js.git
|
||||
```
|
||||
|
||||
1. Navigate to the reveal.js folder
|
||||
```sh
|
||||
$ cd reveal.js
|
||||
`$$ J(\theta_0,\theta_1) = \sum_{i=0} $$`
|
||||
```
|
||||
|
||||
1. Install dependencies
|
||||
```sh
|
||||
$ npm install
|
||||
```
|
||||
|
||||
1. Serve the presentation and monitor source files for changes
|
||||
```sh
|
||||
$ npm start
|
||||
```
|
||||
|
||||
1. Open <http://localhost:8000> to view your presentation
|
||||
|
||||
You can change the port by using `npm start -- --port=8001`.
|
||||
|
||||
### Folder Structure
|
||||
|
||||
- **css/** Core styles without which the project does not function
|
||||
- **js/** Like above but for JavaScript
|
||||
- **plugin/** Components that have been developed as extensions to reveal.js
|
||||
- **lib/** All other third party assets (JavaScript, CSS, fonts)
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT licensed
|
||||
|
||||
Copyright (C) 2018 Hakim El Hattab, http://hakim.se
|
||||
Copyright (C) 2019 Hakim El Hattab, http://hakim.se
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "reveal.js",
|
||||
"version": "3.7.0",
|
||||
"version": "3.8.0",
|
||||
"main": [
|
||||
"js/reveal.js",
|
||||
"css/reveal.css"
|
||||
|
@ -11,9 +11,6 @@
|
|||
"authors": [
|
||||
"Hakim El Hattab <hakim.elhattab@gmail.com>"
|
||||
],
|
||||
"dependencies": {
|
||||
"headjs": "~1.0.3"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/hakimel/reveal.js.git"
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/* http://meyerweb.com/eric/tools/css/reset/
|
||||
v4.0 | 20180602
|
||||
License: none (public domain)
|
||||
*/
|
||||
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
main, menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
/* HTML5 display-role reset for older browsers */
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, main, menu, nav, section {
|
||||
display: block;
|
||||
}
|
|
@ -3,47 +3,24 @@
|
|||
* http://revealjs.com
|
||||
* MIT licensed
|
||||
*
|
||||
* Copyright (C) 2018 Hakim El Hattab, http://hakim.se
|
||||
* Copyright (C) 2019 Hakim El Hattab, http://hakim.se
|
||||
*/
|
||||
/*********************************************
|
||||
* RESET STYLES
|
||||
*********************************************/
|
||||
html, body, .reveal div, .reveal span, .reveal applet, .reveal object, .reveal iframe,
|
||||
.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6, .reveal p, .reveal blockquote, .reveal pre,
|
||||
.reveal a, .reveal abbr, .reveal acronym, .reveal address, .reveal big, .reveal cite, .reveal code,
|
||||
.reveal del, .reveal dfn, .reveal em, .reveal img, .reveal ins, .reveal kbd, .reveal q, .reveal s, .reveal samp,
|
||||
.reveal small, .reveal strike, .reveal strong, .reveal sub, .reveal sup, .reveal tt, .reveal var,
|
||||
.reveal b, .reveal u, .reveal center,
|
||||
.reveal dl, .reveal dt, .reveal dd, .reveal ol, .reveal ul, .reveal li,
|
||||
.reveal fieldset, .reveal form, .reveal label, .reveal legend,
|
||||
.reveal table, .reveal caption, .reveal tbody, .reveal tfoot, .reveal thead, .reveal tr, .reveal th, .reveal td,
|
||||
.reveal article, .reveal aside, .reveal canvas, .reveal details, .reveal embed,
|
||||
.reveal figure, .reveal figcaption, .reveal footer, .reveal header, .reveal hgroup,
|
||||
.reveal menu, .reveal nav, .reveal output, .reveal ruby, .reveal section, .reveal summary,
|
||||
.reveal time, .reveal mark, .reveal audio, .reveal video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline; }
|
||||
|
||||
.reveal article, .reveal aside, .reveal details, .reveal figcaption, .reveal figure,
|
||||
.reveal footer, .reveal header, .reveal hgroup, .reveal menu, .reveal nav, .reveal section {
|
||||
display: block; }
|
||||
|
||||
/*********************************************
|
||||
* GLOBAL STYLES
|
||||
*********************************************/
|
||||
html,
|
||||
body {
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
height: calc( var(--vh, 1vh) * 100);
|
||||
overflow: hidden; }
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
background-color: #fff;
|
||||
color: #000; }
|
||||
|
||||
|
@ -272,7 +249,7 @@ body {
|
|||
visibility: hidden;
|
||||
opacity: 0;
|
||||
-webkit-appearance: none;
|
||||
-webkit-tap-highlight-color: transparent; }
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
|
||||
.reveal .controls .controls-arrow:before,
|
||||
.reveal .controls .controls-arrow:after {
|
||||
content: '';
|
||||
|
@ -366,10 +343,16 @@ body {
|
|||
.reveal .controls .enabled.fragmented:hover {
|
||||
opacity: 1; }
|
||||
|
||||
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-up,
|
||||
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-down {
|
||||
display: none; }
|
||||
|
||||
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-left,
|
||||
.reveal:not(.has-vertical-slides) .controls .navigate-left {
|
||||
bottom: 1.4em;
|
||||
right: 5.5em; }
|
||||
|
||||
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-right,
|
||||
.reveal:not(.has-vertical-slides) .controls .navigate-right {
|
||||
bottom: 1.4em;
|
||||
right: 0.5em; }
|
||||
|
@ -486,12 +469,8 @@ body {
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none; }
|
||||
|
||||
@media only screen and (orientation: landscape) {
|
||||
.reveal.ua-iphone {
|
||||
position: fixed; } }
|
||||
-ms-touch-action: pinch-zoom;
|
||||
touch-action: pinch-zoom; }
|
||||
|
||||
.reveal .slides {
|
||||
position: absolute;
|
||||
|
@ -512,7 +491,8 @@ body {
|
|||
perspective-origin: 50% 40%; }
|
||||
|
||||
.reveal .slides > section {
|
||||
-ms-perspective: 600px; }
|
||||
-webkit-perspective: 600px;
|
||||
perspective: 600px; }
|
||||
|
||||
.reveal .slides > section,
|
||||
.reveal .slides > section > section {
|
||||
|
@ -544,7 +524,8 @@ body {
|
|||
.reveal .slides > section.stack {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
pointer-events: none; }
|
||||
pointer-events: none;
|
||||
height: 100%; }
|
||||
|
||||
.reveal .slides > section.present,
|
||||
.reveal .slides > section > section.present {
|
||||
|
@ -761,14 +742,14 @@ body {
|
|||
.reveal .slides > section > section[data-transition=zoom].past,
|
||||
.reveal .slides > section > section[data-transition~=zoom-out].past,
|
||||
.reveal.zoom .slides > section > section:not([data-transition]).past {
|
||||
-webkit-transform: translate(0, -150%);
|
||||
transform: translate(0, -150%); }
|
||||
-webkit-transform: scale(16);
|
||||
transform: scale(16); }
|
||||
|
||||
.reveal .slides > section > section[data-transition=zoom].future,
|
||||
.reveal .slides > section > section[data-transition~=zoom-in].future,
|
||||
.reveal.zoom .slides > section > section:not([data-transition]).future {
|
||||
-webkit-transform: translate(0, 150%);
|
||||
transform: translate(0, 150%); }
|
||||
-webkit-transform: scale(0.2);
|
||||
transform: scale(0.2); }
|
||||
|
||||
/*********************************************
|
||||
* CUBE TRANSITION
|
||||
|
@ -989,34 +970,35 @@ body {
|
|||
.no-transforms {
|
||||
overflow-y: auto; }
|
||||
|
||||
.no-transforms .reveal {
|
||||
overflow: visible; }
|
||||
|
||||
.no-transforms .reveal .slides {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
height: auto !important;
|
||||
max-width: 1280px;
|
||||
height: auto;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin: 0;
|
||||
margin: 0 auto;
|
||||
text-align: center; }
|
||||
|
||||
.no-transforms .reveal .controls,
|
||||
.no-transforms .reveal .progress {
|
||||
display: none !important; }
|
||||
display: none; }
|
||||
|
||||
.no-transforms .reveal .slides section {
|
||||
display: block !important;
|
||||
opacity: 1 !important;
|
||||
position: relative !important;
|
||||
display: block;
|
||||
opacity: 1;
|
||||
position: relative;
|
||||
height: auto;
|
||||
min-height: 0;
|
||||
top: 0;
|
||||
left: -50%;
|
||||
left: 0;
|
||||
margin: 10vh 0;
|
||||
margin: 70px 0;
|
||||
-webkit-transform: none;
|
||||
transform: none; }
|
||||
|
||||
.no-transforms .reveal .slides section section {
|
||||
left: 0; }
|
||||
|
||||
.reveal .no-transition,
|
||||
.reveal .no-transition * {
|
||||
transition: none !important; }
|
||||
|
@ -1041,7 +1023,7 @@ body {
|
|||
opacity: 0;
|
||||
visibility: hidden;
|
||||
overflow: hidden;
|
||||
background-color: transparent;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
transition: all 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); }
|
||||
|
||||
.reveal .slide-background-content {
|
||||
|
@ -1294,9 +1276,9 @@ body {
|
|||
transition-duration: 1200ms; }
|
||||
|
||||
/*********************************************
|
||||
* LINK PREVIEW OVERLAY
|
||||
* OVERLAY FOR LINK PREVIEWS AND HELP
|
||||
*********************************************/
|
||||
.reveal .overlay {
|
||||
.reveal > .overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
@ -1308,11 +1290,11 @@ body {
|
|||
visibility: hidden;
|
||||
transition: all 0.3s ease; }
|
||||
|
||||
.reveal .overlay.visible {
|
||||
.reveal > .overlay.visible {
|
||||
opacity: 1;
|
||||
visibility: visible; }
|
||||
|
||||
.reveal .overlay .spinner {
|
||||
.reveal > .overlay .spinner {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 50%;
|
||||
|
@ -1326,7 +1308,7 @@ body {
|
|||
opacity: 0.6;
|
||||
transition: all 0.3s ease; }
|
||||
|
||||
.reveal .overlay header {
|
||||
.reveal > .overlay header {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
@ -1335,7 +1317,7 @@ body {
|
|||
z-index: 2;
|
||||
border-bottom: 1px solid #222; }
|
||||
|
||||
.reveal .overlay header a {
|
||||
.reveal > .overlay header a {
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
@ -1345,10 +1327,10 @@ body {
|
|||
opacity: 0.6;
|
||||
box-sizing: border-box; }
|
||||
|
||||
.reveal .overlay header a:hover {
|
||||
.reveal > .overlay header a:hover {
|
||||
opacity: 1; }
|
||||
|
||||
.reveal .overlay header a .icon {
|
||||
.reveal > .overlay header a .icon {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
@ -1356,13 +1338,13 @@ body {
|
|||
background-size: 100%;
|
||||
background-repeat: no-repeat; }
|
||||
|
||||
.reveal .overlay header a.close .icon {
|
||||
.reveal > .overlay header a.close .icon {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABkklEQVRYR8WX4VHDMAxG6wnoJrABZQPYBCaBTWAD2g1gE5gg6OOsXuxIlr40d81dfrSJ9V4c2VLK7spHuTJ/5wpM07QXuXc5X0opX2tEJcadjHuV80li/FgxTIEK/5QBCICBD6xEhSMGHgQPgBgLiYVAB1dpSqKDawxTohFw4JSEA3clzgIBPCURwE2JucBR7rhPJJv5OpJwDX+SfDjgx1wACQeJG1aChP9K/IMmdZ8DtESV1WyP3Bt4MwM6sj4NMxMYiqUWHQu4KYA/SYkIjOsm3BXYWMKFDwU2khjCQ4ELJUJ4SmClRArOCmSXGuKma0fYD5CbzHxFpCSGAhfAVSSUGDUk2BWZaff2g6GE15BsBQ9nwmpIGDiyHQddwNTMKkbZaf9fajXQca1EX44puJZUsnY0ObGmITE3GVLCbEhQUjGVt146j6oasWN+49Vph2w1pZ5EansNZqKBm1txbU57iRRcZ86RWMDdWtBJUHBHwoQPi1GV+JCbntmvok7iTX4/Up9mgyTc/FJYDTcndgH/AA5A/CHsyEkVAAAAAElFTkSuQmCC); }
|
||||
|
||||
.reveal .overlay header a.external .icon {
|
||||
.reveal > .overlay header a.external .icon {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAcElEQVRYR+2WSQoAIQwEzf8f7XiOMkUQxUPlGkM3hVmiQfQR9GYnH1SsAQlI4DiBqkCMoNb9y2e90IAEJPAcgdznU9+engMaeJ7Azh5Y1U67gAho4DqBqmB1buAf0MB1AlVBek83ZPkmJMGc1wAR+AAqod/B97TRpQAAAABJRU5ErkJggg==); }
|
||||
|
||||
.reveal .overlay .viewport {
|
||||
.reveal > .overlay .viewport {
|
||||
position: absolute;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
|
@ -1372,7 +1354,7 @@ body {
|
|||
bottom: 0;
|
||||
left: 0; }
|
||||
|
||||
.reveal .overlay.overlay-preview .viewport iframe {
|
||||
.reveal > .overlay.overlay-preview .viewport iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
|
@ -1382,11 +1364,11 @@ body {
|
|||
visibility: hidden;
|
||||
transition: all 0.3s ease; }
|
||||
|
||||
.reveal .overlay.overlay-preview.loaded .viewport iframe {
|
||||
.reveal > .overlay.overlay-preview.loaded .viewport iframe {
|
||||
opacity: 1;
|
||||
visibility: visible; }
|
||||
|
||||
.reveal .overlay.overlay-preview.loaded .viewport-inner {
|
||||
.reveal > .overlay.overlay-preview.loaded .viewport-inner {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
left: 0;
|
||||
|
@ -1395,46 +1377,46 @@ body {
|
|||
text-align: center;
|
||||
letter-spacing: normal; }
|
||||
|
||||
.reveal .overlay.overlay-preview .x-frame-error {
|
||||
.reveal > .overlay.overlay-preview .x-frame-error {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease 0.3s; }
|
||||
|
||||
.reveal .overlay.overlay-preview.loaded .x-frame-error {
|
||||
.reveal > .overlay.overlay-preview.loaded .x-frame-error {
|
||||
opacity: 1; }
|
||||
|
||||
.reveal .overlay.overlay-preview.loaded .spinner {
|
||||
.reveal > .overlay.overlay-preview.loaded .spinner {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
-webkit-transform: scale(0.2);
|
||||
transform: scale(0.2); }
|
||||
|
||||
.reveal .overlay.overlay-help .viewport {
|
||||
.reveal > .overlay.overlay-help .viewport {
|
||||
overflow: auto;
|
||||
color: #fff; }
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner {
|
||||
width: 600px;
|
||||
margin: auto;
|
||||
padding: 20px 20px 80px 20px;
|
||||
text-align: center;
|
||||
letter-spacing: normal; }
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner .title {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner .title {
|
||||
font-size: 20px; }
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner table {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table {
|
||||
border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
font-size: 16px; }
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner table th,
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner table td {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table th,
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table td {
|
||||
width: 200px;
|
||||
padding: 14px;
|
||||
border: 1px solid #fff;
|
||||
vertical-align: middle; }
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner table th {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table th {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px; }
|
||||
|
||||
|
@ -1448,12 +1430,32 @@ body {
|
|||
z-index: 30;
|
||||
cursor: pointer;
|
||||
transition: all 400ms ease;
|
||||
-webkit-tap-highlight-color: transparent; }
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
|
||||
|
||||
.reveal.overview .playback {
|
||||
opacity: 0;
|
||||
visibility: hidden; }
|
||||
|
||||
/*********************************************
|
||||
* CODE HIGHLGIHTING
|
||||
*********************************************/
|
||||
.reveal .hljs table {
|
||||
margin: initial; }
|
||||
|
||||
.reveal .hljs-ln-code,
|
||||
.reveal .hljs-ln-numbers {
|
||||
padding: 0;
|
||||
border: 0; }
|
||||
|
||||
.reveal .hljs-ln-numbers {
|
||||
opacity: 0.6;
|
||||
padding-right: 0.75em;
|
||||
text-align: right;
|
||||
vertical-align: top; }
|
||||
|
||||
.reveal .hljs[data-line-numbers]:not([data-line-numbers=""]) tr:not(.highlight-line) {
|
||||
opacity: 0.4; }
|
||||
|
||||
/*********************************************
|
||||
* ROLLING LINKS
|
||||
*********************************************/
|
||||
|
@ -1512,7 +1514,7 @@ body {
|
|||
.reveal .speaker-notes {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 25vw;
|
||||
width: 33.3333333333%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
|
@ -1540,7 +1542,7 @@ body {
|
|||
opacity: 0.5; }
|
||||
|
||||
.reveal.show-notes {
|
||||
max-width: 75vw;
|
||||
max-width: 75%;
|
||||
overflow: visible; }
|
||||
|
||||
.reveal.show-notes .speaker-notes {
|
||||
|
@ -1555,19 +1557,24 @@ body {
|
|||
border-left: 0;
|
||||
max-width: none;
|
||||
max-height: 70%;
|
||||
max-height: 70vh;
|
||||
overflow: visible; }
|
||||
.reveal.show-notes .speaker-notes {
|
||||
top: 100%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 42.8571428571%; } }
|
||||
height: 42.8571428571%;
|
||||
height: 30vh;
|
||||
border: 0; } }
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.reveal.show-notes {
|
||||
max-height: 60%; }
|
||||
max-height: 60%;
|
||||
max-height: 60vh; }
|
||||
.reveal.show-notes .speaker-notes {
|
||||
top: 100%;
|
||||
height: 66.6666666667%; }
|
||||
height: 66.6666666667%;
|
||||
height: 40vh; }
|
||||
.reveal .speaker-notes {
|
||||
font-size: 14px; } }
|
||||
|
||||
|
|
|
@ -3,55 +3,28 @@
|
|||
* http://revealjs.com
|
||||
* MIT licensed
|
||||
*
|
||||
* Copyright (C) 2018 Hakim El Hattab, http://hakim.se
|
||||
* Copyright (C) 2019 Hakim El Hattab, http://hakim.se
|
||||
*/
|
||||
|
||||
|
||||
/*********************************************
|
||||
* RESET STYLES
|
||||
*********************************************/
|
||||
|
||||
html, body, .reveal div, .reveal span, .reveal applet, .reveal object, .reveal iframe,
|
||||
.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6, .reveal p, .reveal blockquote, .reveal pre,
|
||||
.reveal a, .reveal abbr, .reveal acronym, .reveal address, .reveal big, .reveal cite, .reveal code,
|
||||
.reveal del, .reveal dfn, .reveal em, .reveal img, .reveal ins, .reveal kbd, .reveal q, .reveal s, .reveal samp,
|
||||
.reveal small, .reveal strike, .reveal strong, .reveal sub, .reveal sup, .reveal tt, .reveal var,
|
||||
.reveal b, .reveal u, .reveal center,
|
||||
.reveal dl, .reveal dt, .reveal dd, .reveal ol, .reveal ul, .reveal li,
|
||||
.reveal fieldset, .reveal form, .reveal label, .reveal legend,
|
||||
.reveal table, .reveal caption, .reveal tbody, .reveal tfoot, .reveal thead, .reveal tr, .reveal th, .reveal td,
|
||||
.reveal article, .reveal aside, .reveal canvas, .reveal details, .reveal embed,
|
||||
.reveal figure, .reveal figcaption, .reveal footer, .reveal header, .reveal hgroup,
|
||||
.reveal menu, .reveal nav, .reveal output, .reveal ruby, .reveal section, .reveal summary,
|
||||
.reveal time, .reveal mark, .reveal audio, .reveal video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
.reveal article, .reveal aside, .reveal details, .reveal figcaption, .reveal figure,
|
||||
.reveal footer, .reveal header, .reveal hgroup, .reveal menu, .reveal nav, .reveal section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* GLOBAL STYLES
|
||||
*********************************************/
|
||||
|
||||
html,
|
||||
body {
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
height: calc( var(--vh, 1vh) * 100 );
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
|
@ -434,12 +407,19 @@ $controlsArrowAngleActive: 36deg;
|
|||
}
|
||||
}
|
||||
|
||||
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-up,
|
||||
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-down {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Adjust the layout when there are no vertical slides
|
||||
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-left,
|
||||
.reveal:not(.has-vertical-slides) .controls .navigate-left {
|
||||
bottom: $controlArrowSpacing;
|
||||
right: 0.5em + $controlArrowSpacing + $controlArrowSize;
|
||||
}
|
||||
|
||||
.reveal[data-navigation-mode="linear"].has-horizontal-slides .navigate-right,
|
||||
.reveal:not(.has-vertical-slides) .controls .navigate-right {
|
||||
bottom: $controlArrowSpacing;
|
||||
right: 0.5em;
|
||||
|
@ -586,17 +566,7 @@ $controlsArrowAngleActive: 36deg;
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
// Mobile Safari sometimes overlays a header at the top
|
||||
// of the page when in landscape mode. Using fixed
|
||||
// positioning ensures that reveal.js reduces its height
|
||||
// when this header is visible.
|
||||
@media only screen and (orientation : landscape) {
|
||||
.reveal.ua-iphone {
|
||||
position: fixed;
|
||||
}
|
||||
touch-action: pinch-zoom;
|
||||
}
|
||||
|
||||
.reveal .slides {
|
||||
|
@ -618,7 +588,7 @@ $controlsArrowAngleActive: 36deg;
|
|||
}
|
||||
|
||||
.reveal .slides>section {
|
||||
-ms-perspective: 600px;
|
||||
perspective: 600px;
|
||||
}
|
||||
|
||||
.reveal .slides>section,
|
||||
|
@ -657,6 +627,7 @@ $controlsArrowAngleActive: 36deg;
|
|||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
pointer-events: none;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.reveal .slides>section.present,
|
||||
|
@ -831,10 +802,10 @@ $controlsArrowAngleActive: 36deg;
|
|||
transform: scale(0.2);
|
||||
}
|
||||
@include transition-vertical-past(zoom) {
|
||||
transform: translate(0, -150%);
|
||||
transform: scale(16);
|
||||
}
|
||||
@include transition-vertical-future(zoom) {
|
||||
transform: translate(0, 150%);
|
||||
transform: scale(0.2);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1067,37 +1038,38 @@ $controlsArrowAngleActive: 36deg;
|
|||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.no-transforms .reveal {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.no-transforms .reveal .slides {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
height: auto !important;
|
||||
max-width: 1280px;
|
||||
height: auto;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin: 0;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.no-transforms .reveal .controls,
|
||||
.no-transforms .reveal .progress {
|
||||
display: none !important;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.no-transforms .reveal .slides section {
|
||||
display: block !important;
|
||||
opacity: 1 !important;
|
||||
position: relative !important;
|
||||
display: block;
|
||||
opacity: 1;
|
||||
position: relative;
|
||||
height: auto;
|
||||
min-height: 0;
|
||||
top: 0;
|
||||
left: -50%;
|
||||
left: 0;
|
||||
margin: 10vh 0;
|
||||
margin: 70px 0;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.no-transforms .reveal .slides section section {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.reveal .no-transition,
|
||||
.reveal .no-transition * {
|
||||
transition: none !important;
|
||||
|
@ -1416,10 +1388,10 @@ $controlsArrowAngleActive: 36deg;
|
|||
|
||||
|
||||
/*********************************************
|
||||
* LINK PREVIEW OVERLAY
|
||||
* OVERLAY FOR LINK PREVIEWS AND HELP
|
||||
*********************************************/
|
||||
|
||||
.reveal .overlay {
|
||||
.reveal > .overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
@ -1431,12 +1403,12 @@ $controlsArrowAngleActive: 36deg;
|
|||
visibility: hidden;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.reveal .overlay.visible {
|
||||
.reveal > .overlay.visible {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.reveal .overlay .spinner {
|
||||
.reveal > .overlay .spinner {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 50%;
|
||||
|
@ -1452,7 +1424,7 @@ $controlsArrowAngleActive: 36deg;
|
|||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.reveal .overlay header {
|
||||
.reveal > .overlay header {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
@ -1461,7 +1433,7 @@ $controlsArrowAngleActive: 36deg;
|
|||
z-index: 2;
|
||||
border-bottom: 1px solid #222;
|
||||
}
|
||||
.reveal .overlay header a {
|
||||
.reveal > .overlay header a {
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
@ -1472,10 +1444,10 @@ $controlsArrowAngleActive: 36deg;
|
|||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.reveal .overlay header a:hover {
|
||||
.reveal > .overlay header a:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
.reveal .overlay header a .icon {
|
||||
.reveal > .overlay header a .icon {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
@ -1484,14 +1456,14 @@ $controlsArrowAngleActive: 36deg;
|
|||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.reveal .overlay header a.close .icon {
|
||||
.reveal > .overlay header a.close .icon {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABkklEQVRYR8WX4VHDMAxG6wnoJrABZQPYBCaBTWAD2g1gE5gg6OOsXuxIlr40d81dfrSJ9V4c2VLK7spHuTJ/5wpM07QXuXc5X0opX2tEJcadjHuV80li/FgxTIEK/5QBCICBD6xEhSMGHgQPgBgLiYVAB1dpSqKDawxTohFw4JSEA3clzgIBPCURwE2JucBR7rhPJJv5OpJwDX+SfDjgx1wACQeJG1aChP9K/IMmdZ8DtESV1WyP3Bt4MwM6sj4NMxMYiqUWHQu4KYA/SYkIjOsm3BXYWMKFDwU2khjCQ4ELJUJ4SmClRArOCmSXGuKma0fYD5CbzHxFpCSGAhfAVSSUGDUk2BWZaff2g6GE15BsBQ9nwmpIGDiyHQddwNTMKkbZaf9fajXQca1EX44puJZUsnY0ObGmITE3GVLCbEhQUjGVt146j6oasWN+49Vph2w1pZ5EansNZqKBm1txbU57iRRcZ86RWMDdWtBJUHBHwoQPi1GV+JCbntmvok7iTX4/Up9mgyTc/FJYDTcndgH/AA5A/CHsyEkVAAAAAElFTkSuQmCC);
|
||||
}
|
||||
.reveal .overlay header a.external .icon {
|
||||
.reveal > .overlay header a.external .icon {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAcElEQVRYR+2WSQoAIQwEzf8f7XiOMkUQxUPlGkM3hVmiQfQR9GYnH1SsAQlI4DiBqkCMoNb9y2e90IAEJPAcgdznU9+engMaeJ7Azh5Y1U67gAho4DqBqmB1buAf0MB1AlVBek83ZPkmJMGc1wAR+AAqod/B97TRpQAAAABJRU5ErkJggg==);
|
||||
}
|
||||
|
||||
.reveal .overlay .viewport {
|
||||
.reveal > .overlay .viewport {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
top: 40px;
|
||||
|
@ -1500,7 +1472,7 @@ $controlsArrowAngleActive: 36deg;
|
|||
left: 0;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-preview .viewport iframe {
|
||||
.reveal > .overlay.overlay-preview .viewport iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
|
@ -1512,12 +1484,12 @@ $controlsArrowAngleActive: 36deg;
|
|||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-preview.loaded .viewport iframe {
|
||||
.reveal > .overlay.overlay-preview.loaded .viewport iframe {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-preview.loaded .viewport-inner {
|
||||
.reveal > .overlay.overlay-preview.loaded .viewport-inner {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
left: 0;
|
||||
|
@ -1526,26 +1498,26 @@ $controlsArrowAngleActive: 36deg;
|
|||
text-align: center;
|
||||
letter-spacing: normal;
|
||||
}
|
||||
.reveal .overlay.overlay-preview .x-frame-error {
|
||||
.reveal > .overlay.overlay-preview .x-frame-error {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease 0.3s;
|
||||
}
|
||||
.reveal .overlay.overlay-preview.loaded .x-frame-error {
|
||||
.reveal > .overlay.overlay-preview.loaded .x-frame-error {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-preview.loaded .spinner {
|
||||
.reveal > .overlay.overlay-preview.loaded .spinner {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transform: scale(0.2);
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-help .viewport {
|
||||
.reveal > .overlay.overlay-help .viewport {
|
||||
overflow: auto;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner {
|
||||
width: 600px;
|
||||
margin: auto;
|
||||
padding: 20px 20px 80px 20px;
|
||||
|
@ -1553,31 +1525,30 @@ $controlsArrowAngleActive: 36deg;
|
|||
letter-spacing: normal;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner .title {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner .title {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner table {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table {
|
||||
border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner table th,
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner table td {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table th,
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table td {
|
||||
width: 200px;
|
||||
padding: 14px;
|
||||
border: 1px solid #fff;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.reveal .overlay.overlay-help .viewport .viewport-inner table th {
|
||||
.reveal > .overlay.overlay-help .viewport .viewport-inner table th {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*********************************************
|
||||
* PLAYBACK COMPONENT
|
||||
*********************************************/
|
||||
|
@ -1598,6 +1569,32 @@ $controlsArrowAngleActive: 36deg;
|
|||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* CODE HIGHLGIHTING
|
||||
*********************************************/
|
||||
|
||||
.reveal .hljs table {
|
||||
margin: initial;
|
||||
}
|
||||
|
||||
.reveal .hljs-ln-code,
|
||||
.reveal .hljs-ln-numbers {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.reveal .hljs-ln-numbers {
|
||||
opacity: 0.6;
|
||||
padding-right: 0.75em;
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.reveal .hljs[data-line-numbers]:not([data-line-numbers=""]) tr:not(.highlight-line) {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
|
||||
/*********************************************
|
||||
* ROLLING LINKS
|
||||
*********************************************/
|
||||
|
@ -1648,6 +1645,8 @@ $controlsArrowAngleActive: 36deg;
|
|||
* SPEAKER NOTES
|
||||
*********************************************/
|
||||
|
||||
$notesWidthPercent: 25%;
|
||||
|
||||
// Hide on-page notes
|
||||
.reveal aside.notes {
|
||||
display: none;
|
||||
|
@ -1658,7 +1657,7 @@ $controlsArrowAngleActive: 36deg;
|
|||
.reveal .speaker-notes {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 25vw;
|
||||
width: $notesWidthPercent / (1-$notesWidthPercent/100) * 1%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
|
@ -1694,7 +1693,7 @@ $controlsArrowAngleActive: 36deg;
|
|||
|
||||
|
||||
.reveal.show-notes {
|
||||
max-width: 75vw;
|
||||
max-width: 100% - $notesWidthPercent;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
|
@ -1713,6 +1712,7 @@ $controlsArrowAngleActive: 36deg;
|
|||
border-left: 0;
|
||||
max-width: none;
|
||||
max-height: 70%;
|
||||
max-height: 70vh;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
|
@ -1721,17 +1721,21 @@ $controlsArrowAngleActive: 36deg;
|
|||
left: 0;
|
||||
width: 100%;
|
||||
height: (30/0.7)*1%;
|
||||
height: 30vh;
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.reveal.show-notes {
|
||||
max-height: 60%;
|
||||
max-height: 60vh;
|
||||
}
|
||||
|
||||
.reveal.show-notes .speaker-notes {
|
||||
top: 100%;
|
||||
height: (40/0.6)*1%;
|
||||
height: 40vh;
|
||||
}
|
||||
|
||||
.reveal .speaker-notes {
|
||||
|
|
|
@ -153,7 +153,7 @@ body {
|
|||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
|
|
|
@ -11,8 +11,8 @@ section.has-light-background, section.has-light-background h1, section.has-light
|
|||
* GLOBAL STYLES
|
||||
*********************************************/
|
||||
body {
|
||||
background: #222;
|
||||
background-color: #222; }
|
||||
background: #191919;
|
||||
background-color: #191919; }
|
||||
|
||||
.reveal {
|
||||
font-family: "Source Sans Pro", Helvetica, sans-serif;
|
||||
|
@ -149,7 +149,7 @@ body {
|
|||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
|
@ -270,4 +270,4 @@ body {
|
|||
*********************************************/
|
||||
@media print {
|
||||
.backgrounds {
|
||||
background-color: #222; } }
|
||||
background-color: #191919; } }
|
||||
|
|
|
@ -152,7 +152,7 @@ body {
|
|||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
|
|
|
@ -155,7 +155,7 @@ body {
|
|||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
|
|
|
@ -153,7 +153,7 @@ body {
|
|||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
|
|
|
@ -147,7 +147,7 @@ body {
|
|||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
|
|
|
@ -149,7 +149,7 @@ body {
|
|||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
|
|
|
@ -152,7 +152,7 @@ body {
|
|||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
|
|
|
@ -156,7 +156,7 @@ body {
|
|||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
|
|
|
@ -153,7 +153,7 @@ body {
|
|||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
|
||||
// Override theme settings (see ../template/settings.scss)
|
||||
$backgroundColor: #222;
|
||||
$backgroundColor: #191919;
|
||||
|
||||
$mainColor: #fff;
|
||||
$headingColor: #fff;
|
||||
|
|
|
@ -28,6 +28,8 @@ $heading2Size: 2.11em;
|
|||
$heading3Size: 1.55em;
|
||||
$heading4Size: 1.00em;
|
||||
|
||||
$codeFont: monospace;
|
||||
|
||||
// Links and actions
|
||||
$linkColor: #13DAEC;
|
||||
$linkColorHover: lighten( $linkColor, 20% );
|
||||
|
|
|
@ -162,16 +162,16 @@ body {
|
|||
|
||||
text-align: left;
|
||||
font-size: 0.55em;
|
||||
font-family: monospace;
|
||||
font-family: $codeFont;
|
||||
line-height: 1.2em;
|
||||
|
||||
word-wrap: break-word;
|
||||
|
||||
box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
font-family: $codeFont;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ body {
|
|||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); }
|
||||
box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
|
|
|
@ -12,13 +12,14 @@
|
|||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="css/reset.css">
|
||||
<link rel="stylesheet" href="css/reveal.css">
|
||||
<link rel="stylesheet" href="css/theme/black.css" id="theme">
|
||||
|
||||
<!-- Theme used for syntax highlighting of code -->
|
||||
<link rel="stylesheet" href="lib/css/zenburn.css">
|
||||
<link rel="stylesheet" href="lib/css/monokai.css">
|
||||
|
||||
<!-- Printing and PDF exports -->
|
||||
<script>
|
||||
|
@ -93,7 +94,10 @@
|
|||
Press <strong>ESC</strong> to enter the slide overview.
|
||||
</p>
|
||||
<p>
|
||||
Hold down alt and click on any element to zoom in on it using <a href="http://lab.hakim.se/zoom-js">zoom.js</a>. Alt + click anywhere to zoom back out.
|
||||
Hold down the <strong>alt</strong> key (<strong>ctrl</strong> in Linux) and click on any element to zoom towards it using <a href="http://lab.hakim.se/zoom-js">zoom.js</a>. Click again to zoom back out.
|
||||
</p>
|
||||
<p>
|
||||
(NOTE: Use ctrl + click in Linux.)
|
||||
</p>
|
||||
</section>
|
||||
|
||||
|
@ -195,16 +199,16 @@
|
|||
</section>
|
||||
<section data-background="https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png">
|
||||
<h2>Image Backgrounds</h2>
|
||||
<pre><code class="hljs"><section data-background="image.png"></code></pre>
|
||||
<pre><code class="hljs html"><section data-background="image.png"></code></pre>
|
||||
</section>
|
||||
<section data-background="https://s3.amazonaws.com/hakim-static/reveal-js/image-placeholder.png" data-background-repeat="repeat" data-background-size="100px">
|
||||
<h2>Tiled Backgrounds</h2>
|
||||
<pre><code class="hljs" style="word-wrap: break-word;"><section data-background="image.png" data-background-repeat="repeat" data-background-size="100px"></code></pre>
|
||||
<pre><code class="hljs html" style="word-wrap: break-word;"><section data-background="image.png" data-background-repeat="repeat" data-background-size="100px"></code></pre>
|
||||
</section>
|
||||
<section data-background-video="https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm" data-background-color="#000000">
|
||||
<div style="background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px;">
|
||||
<h2>Video Backgrounds</h2>
|
||||
<pre><code class="hljs" style="word-wrap: break-word;"><section data-background-video="video.mp4,video.webm"></code></pre>
|
||||
<pre><code class="hljs html" style="word-wrap: break-word;"><section data-background-video="video.mp4,video.webm"></code></pre>
|
||||
</div>
|
||||
</section>
|
||||
<section data-background="http://i.giphy.com/90F8aUepslB84.gif">
|
||||
|
@ -217,7 +221,7 @@
|
|||
<p>
|
||||
Different background transitions are available via the backgroundTransition option. This one's called "zoom".
|
||||
</p>
|
||||
<pre><code class="hljs">Reveal.configure({ backgroundTransition: 'zoom' })</code></pre>
|
||||
<pre><code class="hljs javascript">Reveal.configure({ backgroundTransition: 'zoom' })</code></pre>
|
||||
</section>
|
||||
|
||||
<section data-transition="slide" data-background="#b5533c" data-background-transition="zoom">
|
||||
|
@ -225,25 +229,32 @@
|
|||
<p>
|
||||
You can override background transitions per-slide.
|
||||
</p>
|
||||
<pre><code class="hljs" style="word-wrap: break-word;"><section data-background-transition="zoom"></code></pre>
|
||||
<pre><code class="hljs html" style="word-wrap: break-word;"><section data-background-transition="zoom"></code></pre>
|
||||
</section>
|
||||
|
||||
<section data-background-iframe="https://hakim.se" data-background-interactive>
|
||||
<div style="position: absolute; width: 40%; right: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.5), 0 5px 25px rgba(0,0,0,0.2); background-color: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px; font-size: 20px; text-align: left;">
|
||||
<h2>Iframe Backgrounds</h2>
|
||||
<p>Since reveal.js runs on the web, you can easily embed other web content. Try interacting with the page in the background.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Pretty Code</h2>
|
||||
<pre><code class="hljs" data-trim contenteditable>
|
||||
function linkify( selector ) {
|
||||
if( supports3DTransforms ) {
|
||||
<pre><code class="hljs" data-trim data-line-numbers="4,8-9">
|
||||
import React, { useState } from 'react';
|
||||
|
||||
var nodes = document.querySelectorAll( selector );
|
||||
function Example() {
|
||||
const [count, setCount] = useState(0);
|
||||
|
||||
for( var i = 0, len = nodes.length; i < len; i++ ) {
|
||||
var node = nodes[i];
|
||||
|
||||
if( !node.className ) {
|
||||
node.className += ' roll';
|
||||
}
|
||||
}
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<p>You clicked {count} times</p>
|
||||
<button onClick={() => setCount(count + 1)}>
|
||||
Click me
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
</code></pre>
|
||||
<p>Code syntax highlighting courtesy of <a href="http://softwaremaniacs.org/soft/highlight/en/description/">highlight.js</a>.</p>
|
||||
|
@ -384,7 +395,6 @@ Reveal.addEventListener( 'customevent', function() {
|
|||
|
||||
</div>
|
||||
|
||||
<script src="lib/js/head.min.js"></script>
|
||||
<script src="js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
|
@ -393,17 +403,16 @@ Reveal.addEventListener( 'customevent', function() {
|
|||
Reveal.initialize({
|
||||
controls: true,
|
||||
progress: true,
|
||||
history: true,
|
||||
center: true,
|
||||
hash: true,
|
||||
|
||||
transition: 'slide', // none/fade/slide/convex/concave/zoom
|
||||
|
||||
// More info https://github.com/hakimel/reveal.js#dependencies
|
||||
dependencies: [
|
||||
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
|
||||
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
|
||||
{ src: 'plugin/highlight/highlight.js', async: true },
|
||||
{ src: 'plugin/search/search.js', async: true },
|
||||
{ src: 'plugin/zoom-js/zoom.js', async: true },
|
||||
{ src: 'plugin/notes/notes.js', async: true }
|
||||
|
|
|
@ -6,11 +6,12 @@
|
|||
|
||||
<title>reveal.js</title>
|
||||
|
||||
<link rel="stylesheet" href="css/reset.css">
|
||||
<link rel="stylesheet" href="css/reveal.css">
|
||||
<link rel="stylesheet" href="css/theme/black.css">
|
||||
|
||||
<!-- Theme used for syntax highlighting of code -->
|
||||
<link rel="stylesheet" href="lib/css/zenburn.css">
|
||||
<link rel="stylesheet" href="lib/css/monokai.css">
|
||||
|
||||
<!-- Printing and PDF exports -->
|
||||
<script>
|
||||
|
@ -29,7 +30,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="lib/js/head.min.js"></script>
|
||||
<script src="js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
|
@ -41,7 +41,7 @@
|
|||
{ src: 'plugin/markdown/marked.js' },
|
||||
{ src: 'plugin/markdown/markdown.js' },
|
||||
{ src: 'plugin/notes/notes.js', async: true },
|
||||
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }
|
||||
{ src: 'plugin/highlight/highlight.js', async: true }
|
||||
]
|
||||
});
|
||||
</script>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
Monokai style - ported by Luigi Maselli - http://grigio.org
|
||||
*/
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: 0.5em;
|
||||
background: #272822;
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.hljs-tag,
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-strong,
|
||||
.hljs-name {
|
||||
color: #f92672;
|
||||
}
|
||||
|
||||
.hljs-code {
|
||||
color: #66d9ef;
|
||||
}
|
||||
|
||||
.hljs-class .hljs-title {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.hljs-attribute,
|
||||
.hljs-symbol,
|
||||
.hljs-regexp,
|
||||
.hljs-link {
|
||||
color: #bf79db;
|
||||
}
|
||||
|
||||
.hljs-string,
|
||||
.hljs-bullet,
|
||||
.hljs-subst,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-emphasis,
|
||||
.hljs-type,
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-addition,
|
||||
.hljs-variable,
|
||||
.hljs-template-tag,
|
||||
.hljs-template-variable {
|
||||
color: #a6e22e;
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote,
|
||||
.hljs-deletion,
|
||||
.hljs-meta {
|
||||
color: #75715e;
|
||||
}
|
||||
|
||||
.hljs-keyword,
|
||||
.hljs-selector-tag,
|
||||
.hljs-literal,
|
||||
.hljs-doctag,
|
||||
.hljs-title,
|
||||
.hljs-section,
|
||||
.hljs-type,
|
||||
.hljs-selector-id {
|
||||
font-weight: bold;
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/
|
||||
if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p<o;p++){if(p in this&&this[p]===q){return p}}return -1},n=function(o,p){this.name=o;this.code=DOMException[o];this.message=p},g=function(p,o){if(o===""){throw new n("SYNTAX_ERR","An invalid or illegal string was specified")}if(/\s/.test(o)){throw new n("INVALID_CHARACTER_ERR","String contains an invalid character")}return c.call(p,o)},d=function(s){var r=k.call(s.className),q=r?r.split(/\s+/):[],p=0,o=q.length;for(;p<o;p++){this.push(q[p])}this._updateClassName=function(){s.className=this.toString()}},e=d[f]=[],i=function(){return new d(this)};n[f]=Error[f];e.item=function(o){return this[o]||null};e.contains=function(o){o+="";return g(this,o)!==-1};e.add=function(o){o+="";if(g(this,o)===-1){this.push(o);this._updateClassName()}};e.remove=function(p){p+="";var o=g(this,p);if(o!==-1){this.splice(o,1);this._updateClassName()}};e.toggle=function(o){o+="";if(g(this,o)===-1){this.add(o)}else{this.remove(o)}};e.toString=function(){return this.join(" ")};if(b.defineProperty){var l={get:i,enumerable:true,configurable:true};try{b.defineProperty(m,a,l)}catch(h){if(h.number===-2146823252){l.enumerable=false;b.defineProperty(m,a,l)}}}else{if(b[f].__defineGetter__){m.__defineGetter__(a,i)}}}(self))};
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue