mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-08-30 17:59:59 +02:00
rebuild assets and fix issues after master rebase
This commit is contained in:
1
dist/plugin/highlight/zenburn.css
vendored
1
dist/plugin/highlight/zenburn.css
vendored
@@ -70,7 +70,6 @@ based on dark.css by Ivan Sagalaev
|
||||
color: #7f9f7f;
|
||||
}
|
||||
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
2
dist/plugin/search.js
vendored
2
dist/plugin/search.js
vendored
@@ -4,4 +4,4 @@
|
||||
*
|
||||
* @author Jon Snyder <snyder.jon@gmail.com>, February 2013
|
||||
*/return()=>{let n,t,i,o,a,g,f;function v(){t=document.createElement("div"),t.classList.add("searchbox"),t.style.position="absolute",t.style.top="10px",t.style.right="10px",t.style.zIndex=10,t.innerHTML=`<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>
|
||||
</span>`,i=t.querySelector(".searchinput"),i.style.width="240px",i.style.fontSize="14px",i.style.padding="4px 6px",i.style.color="#000",i.style.background="#fff",i.style.borderRadius="2px",i.style.border="0",i.style.outline="0",i.style.boxShadow="0 2px 18px rgba(0, 0, 0, 0.2)",i.style["-webkit-appearance"]="none",n.getRevealElement().appendChild(t),i.addEventListener("keyup",function(r){switch(r.keyCode){case 13:r.preventDefault(),k(),g=!1;break;default:g=!0}},!1),C()}function w(){t||v(),t.style.display="inline",i.focus(),i.select()}function C(){t||v(),t.style.display="none",f&&f.remove()}function T(){t||v(),t.style.display!=="inline"?w():C()}function k(){if(g){var r=i.value;r===""?(f&&f.remove(),o=null):(f=new L("slidecontent"),o=f.apply(r),a=0)}o&&(o.length&&o.length<=a&&(a=0),o.length>a&&(n.slide(o[a].h,o[a].v),a++))}function L(r,d){var I=document.getElementById(r)||document.body,x=d||"EM",M=new RegExp("^(?:"+x+"|SCRIPT|FORM)$"),E=["#ff6","#a0ffff","#9f9","#f99","#f6f"],m=[],B=0,y="",c=[];this.setRegex=function(e){e=e.trim(),y=new RegExp("("+e+")","i")},this.getRegex=function(){return y.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(e){if(!(e==null||!e)&&y&&!M.test(e.nodeName)){if(e.hasChildNodes())for(var l=0;l<e.childNodes.length;l++)this.hiliteWords(e.childNodes[l]);if(e.nodeType==3){var N,s;if((N=e.nodeValue)&&(s=y.exec(N))){for(var u=e;u!=null&&u.nodeName!="SECTION";)u=u.parentNode;for(var S=n.getIndices(u),D=c.length,R=!1,l=0;l<D;l++)c[l].h===S.h&&c[l].v===S.v&&(R=!0);R||c.push(S),m[s[0].toLowerCase()]||(m[s[0].toLowerCase()]=E[B++%E.length]);var h=document.createElement(x);h.appendChild(document.createTextNode(s[0])),h.style.backgroundColor=m[s[0].toLowerCase()],h.style.fontStyle="inherit",h.style.color="#000";var b=e.splitText(s.index);b.nodeValue=b.nodeValue.substring(s[0].length),e.parentNode.insertBefore(h,b)}}}},this.remove=function(){for(var e=document.getElementsByTagName(x),l;e.length&&(l=e[0]);)l.parentNode.replaceChild(l.firstChild,l)},this.apply=function(e){if(!(e==null||!e))return this.remove(),this.setRegex(e),this.hiliteWords(I),c}}return{id:"search",init:r=>{n=r,n.registerKeyboardShortcut("CTRL + Shift + F","Search"),document.addEventListener("keydown",function(d){d.key=="F"&&(d.ctrlKey||d.metaKey)&&(d.preventDefault(),T())},!1)},open:w}}});
|
||||
</span>`,i=t.querySelector(".searchinput"),i.style.width="240px",i.style.fontSize="14px",i.style.padding="4px 6px",i.style.color="#000",i.style.background="#fff",i.style.borderRadius="2px",i.style.border="0",i.style.outline="0",i.style.boxShadow="0 2px 18px rgba(0, 0, 0, 0.2)",i.style["-webkit-appearance"]="none",n.getRevealElement().appendChild(t),i.addEventListener("keyup",function(r){switch(r.keyCode){case 13:r.preventDefault(),k(),g=!1;break;default:g=!0}},!1),x()}function C(){t||v(),t.style.display="inline",i.focus(),i.select()}function x(){t||v(),t.style.display="none",f&&f.remove()}function E(){t||v(),t.style.display!=="inline"?C():x()}function k(){if(g){var r=i.value;r===""?(f&&f.remove(),o=null):(f=new L("slidecontent"),o=f.apply(r),a=0)}o&&(o.length&&o.length<=a&&(a=0),o.length>a&&(n.slide(o[a].h,o[a].v),a++))}function L(r,c){var I=document.getElementById(r)||document.body,m=c||"EM",M=new RegExp("^(?:"+m+"|SCRIPT|FORM)$"),N=["#ff6","#a0ffff","#9f9","#f99","#f6f"],S=[],B=0,y="",d=[];this.setRegex=function(e){e=e.trim(),y=new RegExp("("+e+")","i")},this.getRegex=function(){return y.toString().replace(/^\/\\b\(|\)\\b\/i$/g,"").replace(/\|/g," ")},this.hiliteWords=function(e){if(!(e==null||!e)&&y&&!M.test(e.nodeName)){if(e.hasChildNodes())for(var l=0;l<e.childNodes.length;l++)this.hiliteWords(e.childNodes[l]);if(e.nodeType==3){var R,s;if((R=e.nodeValue)&&(s=y.exec(R))){for(var u=e;u!=null&&u.nodeName!="SECTION";)u=u.parentNode;for(var b=n.getIndices(u),D=d.length,T=!1,l=0;l<D;l++)d[l].h===b.h&&d[l].v===b.v&&(T=!0);T||d.push(b),S[s[0].toLowerCase()]||(S[s[0].toLowerCase()]=N[B++%N.length]);var h=document.createElement(m);h.appendChild(document.createTextNode(s[0])),h.style.backgroundColor=S[s[0].toLowerCase()],h.style.fontStyle="inherit",h.style.color="#000";var w=e.splitText(s.index);w.nodeValue=w.nodeValue.substring(s[0].length),e.parentNode.insertBefore(h,w)}}}},this.remove=function(){for(var e=document.getElementsByTagName(m),l;e.length&&(l=e[0]);)l.parentNode.replaceChild(l.firstChild,l)},this.apply=function(e){if(!(e==null||!e))return this.remove(),this.setRegex(e),this.hiliteWords(I),d}}return{id:"search",init:r=>{n=r,n.registerKeyboardShortcut("CTRL + Shift + F","Search"),document.addEventListener("keydown",function(c){c.key=="F"&&(c.ctrlKey||c.metaKey)&&(c.preventDefault(),E())},!1)},open:C,close:x,toggle:E}}});
|
||||
|
52
dist/plugin/search.mjs
vendored
52
dist/plugin/search.mjs
vendored
@@ -5,10 +5,10 @@
|
||||
* @author Jon Snyder <snyder.jon@gmail.com>, February 2013
|
||||
*/
|
||||
const D = () => {
|
||||
let c, t, i, n, a, y, s;
|
||||
let c, t, l, n, a, y, s;
|
||||
function g() {
|
||||
t = document.createElement("div"), t.classList.add("searchbox"), t.style.position = "absolute", t.style.top = "10px", t.style.right = "10px", t.style.zIndex = 10, t.innerHTML = `<input type="search" class="searchinput" placeholder="Search..." style="vertical-align: top;"/>
|
||||
</span>`, i = t.querySelector(".searchinput"), i.style.width = "240px", i.style.fontSize = "14px", i.style.padding = "4px 6px", i.style.color = "#000", i.style.background = "#fff", i.style.borderRadius = "2px", i.style.border = "0", i.style.outline = "0", i.style.boxShadow = "0 2px 18px rgba(0, 0, 0, 0.2)", i.style["-webkit-appearance"] = "none", c.getRevealElement().appendChild(t), i.addEventListener("keyup", function(r) {
|
||||
</span>`, l = t.querySelector(".searchinput"), l.style.width = "240px", l.style.fontSize = "14px", l.style.padding = "4px 6px", l.style.color = "#000", l.style.background = "#fff", l.style.borderRadius = "2px", l.style.border = "0", l.style.outline = "0", l.style.boxShadow = "0 2px 18px rgba(0, 0, 0, 0.2)", l.style["-webkit-appearance"] = "none", c.getRevealElement().appendChild(t), l.addEventListener("keyup", function(r) {
|
||||
switch (r.keyCode) {
|
||||
case 13:
|
||||
r.preventDefault(), k(), y = !1;
|
||||
@@ -16,26 +16,26 @@ const D = () => {
|
||||
default:
|
||||
y = !0;
|
||||
}
|
||||
}, !1), w();
|
||||
}
|
||||
function b() {
|
||||
t || g(), t.style.display = "inline", i.focus(), i.select();
|
||||
}, !1), v();
|
||||
}
|
||||
function w() {
|
||||
t || g(), t.style.display = "inline", l.focus(), l.select();
|
||||
}
|
||||
function v() {
|
||||
t || g(), t.style.display = "none", s && s.remove();
|
||||
}
|
||||
function R() {
|
||||
t || g(), t.style.display !== "inline" ? b() : w();
|
||||
function C() {
|
||||
t || g(), t.style.display !== "inline" ? w() : v();
|
||||
}
|
||||
function k() {
|
||||
if (y) {
|
||||
var r = i.value;
|
||||
var r = l.value;
|
||||
r === "" ? (s && s.remove(), n = null) : (s = new T("slidecontent"), n = s.apply(r), a = 0);
|
||||
}
|
||||
n && (n.length && n.length <= a && (a = 0), n.length > a && (c.slide(n[a].h, n[a].v), a++));
|
||||
}
|
||||
function T(r, f) {
|
||||
var L = document.getElementById(r) || document.body, v = f || "EM", I = new RegExp("^(?:" + v + "|SCRIPT|FORM)$"), C = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"], x = [], M = 0, p = "", d = [];
|
||||
var L = document.getElementById(r) || document.body, x = f || "EM", I = new RegExp("^(?:" + x + "|SCRIPT|FORM)$"), E = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"], m = [], M = 0, p = "", d = [];
|
||||
this.setRegex = function(e) {
|
||||
e = e.trim(), p = new RegExp("(" + e + ")", "i");
|
||||
}, this.getRegex = function() {
|
||||
@@ -43,26 +43,26 @@ const D = () => {
|
||||
}, this.hiliteWords = function(e) {
|
||||
if (!(e == null || !e) && p && !I.test(e.nodeName)) {
|
||||
if (e.hasChildNodes())
|
||||
for (var l = 0; l < e.childNodes.length; l++)
|
||||
this.hiliteWords(e.childNodes[l]);
|
||||
for (var i = 0; i < e.childNodes.length; i++)
|
||||
this.hiliteWords(e.childNodes[i]);
|
||||
if (e.nodeType == 3) {
|
||||
var E, o;
|
||||
if ((E = e.nodeValue) && (o = p.exec(E))) {
|
||||
var N, o;
|
||||
if ((N = e.nodeValue) && (o = p.exec(N))) {
|
||||
for (var h = e; h != null && h.nodeName != "SECTION"; )
|
||||
h = h.parentNode;
|
||||
for (var m = c.getIndices(h), B = d.length, N = !1, l = 0; l < B; l++)
|
||||
d[l].h === m.h && d[l].v === m.v && (N = !0);
|
||||
N || d.push(m), x[o[0].toLowerCase()] || (x[o[0].toLowerCase()] = C[M++ % C.length]);
|
||||
var u = document.createElement(v);
|
||||
u.appendChild(document.createTextNode(o[0])), u.style.backgroundColor = x[o[0].toLowerCase()], u.style.fontStyle = "inherit", u.style.color = "#000";
|
||||
var S = e.splitText(o.index);
|
||||
S.nodeValue = S.nodeValue.substring(o[0].length), e.parentNode.insertBefore(u, S);
|
||||
for (var S = c.getIndices(h), B = d.length, R = !1, i = 0; i < B; i++)
|
||||
d[i].h === S.h && d[i].v === S.v && (R = !0);
|
||||
R || d.push(S), m[o[0].toLowerCase()] || (m[o[0].toLowerCase()] = E[M++ % E.length]);
|
||||
var u = document.createElement(x);
|
||||
u.appendChild(document.createTextNode(o[0])), u.style.backgroundColor = m[o[0].toLowerCase()], u.style.fontStyle = "inherit", u.style.color = "#000";
|
||||
var b = e.splitText(o.index);
|
||||
b.nodeValue = b.nodeValue.substring(o[0].length), e.parentNode.insertBefore(u, b);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, this.remove = function() {
|
||||
for (var e = document.getElementsByTagName(v), l; e.length && (l = e[0]); )
|
||||
l.parentNode.replaceChild(l.firstChild, l);
|
||||
for (var e = document.getElementsByTagName(x), i; e.length && (i = e[0]); )
|
||||
i.parentNode.replaceChild(i.firstChild, i);
|
||||
}, this.apply = function(e) {
|
||||
if (!(e == null || !e))
|
||||
return this.remove(), this.setRegex(e), this.hiliteWords(L), d;
|
||||
@@ -72,10 +72,12 @@ const D = () => {
|
||||
id: "search",
|
||||
init: (r) => {
|
||||
c = r, c.registerKeyboardShortcut("CTRL + Shift + F", "Search"), document.addEventListener("keydown", function(f) {
|
||||
f.key == "F" && (f.ctrlKey || f.metaKey) && (f.preventDefault(), R());
|
||||
f.key == "F" && (f.ctrlKey || f.metaKey) && (f.preventDefault(), C());
|
||||
}, !1);
|
||||
},
|
||||
open: b
|
||||
open: w,
|
||||
close: v,
|
||||
toggle: C
|
||||
};
|
||||
};
|
||||
export {
|
||||
|
Reference in New Issue
Block a user