This commit is contained in:
2023-03-11 17:30:20 +00:00
commit b6c4e025bc
5124 changed files with 1153349 additions and 0 deletions
+154
View File
@@ -0,0 +1,154 @@
.ttour-overlay {
position: absolute;
box-shadow: 0 0 0 99999px rgba(0,0,0,.8),inset 0 0 2px 0 #000
}
.ttour-wrapper {
position: relative;
height: 100%;
width: 100%
}
150
.ttour-shadow {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 100vh;
width: 100vw
}
.ttour-tip {
position: absolute;
background-color: #fff;
border-radius: 2px;
font-family: sans-serif;
min-width: 250px;
max-width: 375px;
box-shadow: 0 0 5px 0 rgba(0,0,0,.8);
z-index:10000;
}
.ttour-tip.top {
bottom: calc(100% + 10px);
left: 8px;
}
.ttour-tip.right {
top: -5px;
left: calc(100% + 10px);
}
.ttour-tip.bottom {
top: calc(100% + 10px);
left: 0
}
.ttour-tip.left {
right: calc(100% + 10px);
top: -4px;
}
.ttour-header {
padding: 15px 15px 10px 15px
}
.ttour-header h1 {
margin: 0;
font-size: 1.3em
}
.ttour-body {
font-weight: 300;
padding: 10px 15px
}
.ttour-footer {
padding: 10px 15px;
overflow: auto;
position: relative
}
.ttour-bullets {
position: absolute;
top: 50%;
left: 20px;
transform: translateY(-50%)
}
.ttour-bullet {
/*display: inline-block;*/
border: 3px solid #ccc;
border-radius: 50%;
margin: 2px;
display: none;
}
.ttour-bullet.active {
border-color: #333
}
.ttour-footer button {
cursor: pointer;
float: right;
border: none;
padding: 8px 16px;
font-size: 14px;
transition: .3s ease-out
}
.ttour-footer button.prev {
background-color: transparent;
margin-right: 5px
}
.ttour-footer button.prev:hover {
background-color: #efefef;
}
.ttour-footer button.next {
color: #fff;
background-color: #1e88e5;
border-radius: 2px;
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)
}
.ttour-footer button.next:hover {
background-color: #42a5f5;
}
.ttour-arrow {
position: absolute;
width: 14px;
height: 14px;
transform-origin: 0 0;
background-color: #fff;
box-shadow: -2px 2px 2px 0 rgba(0,0,0,.3)
}
.ttour-tip.right .ttour-arrow {
top: 15px;
left: 0;
transform: rotate(45deg)
}
.ttour-tip.bottom .ttour-arrow {
top: 0;
left: 35px;
transform: rotate(135deg)
}
.ttour-tip.left .ttour-arrow {
right: -14px;
top: 30px;
transform: rotate(-136deg)
}
.ttour-tip.top .ttour-arrow {
bottom: -14px;
left: 10px;
transform: rotate(-45deg)
}
.ttour-footer button.next:focus, .ttour-footer button.prev:focus {
outline: 0px;
}
+127
View File
@@ -0,0 +1,127 @@
window.Tour = function (t) {
t.prototype.init = function (t) {
this.current = 0, w.call(this, m(), t);
}, t.prototype.override = function (t, e) {
var n = this[t];
this[t] = e.bind(this, n.bind(this));
}, t.prototype.start = function () {
this.showOverlay(), this.showStep(this.steps[this.current = 0]);
}, t.prototype.goToStep = function (t) {
this.current = t, this.showStep(this.steps[this.current]);
}, t.prototype.nextStep = function () {
var t = this.steps[++this.current];
t ? this.showStep(t) : this.end();
if (t == undefined) {
$("#bizgaze_body").css("pointer-events", "auto");
}
}, t.prototype.prevStep = function () {
var t = this.steps[Math.max(--this.current, 0)];
this.showStep(t);
}, t.prototype.showStep = function (t) {
var n = v(t.element, this.container, this.padding), i = e(this, ".ttour-wrapper"), o = e(this, ".ttour-tip");
o && i.removeChild(o), o = s.call(this, t, t.position || "bottom"), i.appendChild(o),
r(e(this, ".ttour-overlay"), n);
}, t.prototype.showOverlay = function () {
this.el = this.el || n.call(this), this.container.appendChild(this.el);
}, t.prototype.end = function () {
this.container.removeChild(this.el), this.el = null;
};
var e = function (t, e) {
return t.el.querySelector(e);
}, n = function () {
return y("div", {
className: "ttour-shadow",
onclick: this.end.bind(this)
}, [i()]);
}, i = function () {
var t = y("div", {
className: "ttour-wrapper"
});
return y("div", {
className: "ttour-overlay"
}, [t]);
}, r = function (t, e) {
t.style.left = e.left + "px", t.style.top = e.top + "px", t.style.width = e.width + "px",
t.style.height = e.height + "px";
}, o = function () {
return y("div", {
className: "ttour-arrow"
});
}, s = function (t, e) {
return y("div", {
className: "ttour-tip tip-" + this.current + " " + e,
style: {
position: "absolute"
},
onclick: function (t) {
t.stopPropagation();
}
}, [h(t.title), u(t.description), c.call(this), o()]);
}, h = function (t) {
return y("div", {
className: "ttour-header"
}, [f(t)]);
}, u = function (t) {
return y("div", {
className: "ttour-body",
innerHTML: t
});
}, c = function () {
var t = [l(this.steps.length, this.current), a.call(this, this.steps.length - 1 == this.current)];
return this.current > 0 && t.push(d.call(this)), y("div", {
className: "ttour-footer"
}, t);
}, l = function (t, e) {
for (var n = [], i = 0; i < t; i++) n.push(p(i == e));
return y("div", {
className: "ttour-bullets"
}, n);
}, p = function (t) {
return y("div", {
className: "ttour-bullet " + (t ? "active" : "")
});
}, a = function (t) {
return y("button", {
className: "next",
innerText: t ? this.done : this.next,
onclick: this.nextStep.bind(this)
});
}, d = function () {
return y("button", {
className: "prev",
innerText: this.prev,
onclick: this.prevStep.bind(this)
});
}, f = function (t) {
return y("h1", {
innerText: t
});
}, v = function (t, e, n) {
var i = (e.querySelector(t) || e).getBoundingClientRect();
return {
left: e.scrollLeft + i.left - n,
top: e.scrollTop + i.top - n,
width: i.width + 2 * n,
height: i.height + 2 * n
};
}, y = function (t, e, n) {
var i = document.createElement(t);
w.call(i, e);
for (var r = 0; r < (n || []).length; r++) i.appendChild(n[r]);
return i;
}, m = function () {
return {
steps: [],
padding: 3,
container: document.body,
next: "Next",
done: "Done",
prev: "Prev"
};
}, w = function () {
for (var t = this, e = 0; e < arguments.length; e++) for (var n = Object.keys(arguments[e]), i = 0; i < n.length; i++) t[n[i]] = arguments[e][n[i]];
};
return t;
}(window.Tour || function (t) {
this.init(t || {});
});