Initial commit

This commit is contained in:
WIN-VSNMD38DUOC\Administrator
2024-03-07 19:25:30 +08:00
commit 2946829d06
84 changed files with 58318 additions and 0 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="160px" height="160px" viewBox="0 0 160 160">
<rect y="0" fill="#FAFAFA" width="80" height="160"/>
<rect x="80" fill="#F2F2F2" width="80" height="160"/>
<path fill="#B2B2B2" d="M98.916,97.252c10.393-6.382,17.34-17.851,17.34-30.916c0-19.992-16.266-36.255-36.257-36.255
c-19.992,0-36.255,16.263-36.255,36.255c0,13.064,6.946,24.534,17.338,30.916C34.114,105.371,14.467,130.387,14.467,160h131.066
C145.533,130.387,125.885,105.371,98.916,97.252z"/>
</svg>

After

Width:  |  Height:  |  Size: 498 B

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="150"></svg>

After

Width:  |  Height:  |  Size: 71 B

View File

@@ -0,0 +1 @@
<svg t="1589899525104" class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" p-id="2529" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M118.826971 138.409143a7.968041 7.968041 0 0 0 7.920612-7.920612V111.351003a7.920612 7.920612 0 1 0-15.841225 0v19.173099a7.968041 7.968041 0 0 0 7.920613 7.920613z m14.596218 14.596218h19.184956a7.920612 7.920612 0 1 0 0-15.841224H133.435046a7.920612 7.920612 0 1 0 0 15.841224z m-29.192437-15.781938H85.057653a7.920612 7.920612 0 0 0 0 15.841224h19.173099a7.920612 7.920612 0 0 0 0-15.841224z m14.596219 14.584361a7.968041 7.968041 0 0 0-7.920613 7.920612v19.173099a7.920612 7.920612 0 0 0 15.841225 0v-19.149385a7.968041 7.968041 0 0 0-7.920612-7.920612z m788.50407 118.27561a38.725628 38.725628 0 1 0 38.725628 38.725629 38.6782 38.6782 0 0 0-38.7612-38.784915z m0 61.49146a22.884404 22.884404 0 1 1 22.884403-22.884403 22.919975 22.919975 0 0 1-22.884403 22.884403zM692.525932 47.87939a23.500978 23.500978 0 1 0-23.500979-23.500978 23.500978 23.500978 0 0 0 23.500979 23.500978z m0-31.303019a7.671611 7.671611 0 1 1-7.671611 7.671611 7.707183 7.707183 0 0 1 7.671611-7.671611z m0 0" fill="#e6e6e6" p-id="2530"></path><path d="M275.768923 992.815553c0 11.145772 38.156483 21.342967 99.849516 26.963282a1197.186323 1197.186323 0 0 0 199.91246 0c61.906462-5.572886 99.849515-15.81751 99.849516-26.963282s-38.156483-21.342967-99.849516-26.963282a1197.020322 1197.020322 0 0 0-199.91246 0c-61.657461 5.572886-99.849515 15.81751-99.849516 26.963282z m0 0" fill="#f0f0f0" p-id="2531"></path><path d="M571.025162 482.896493a7.766469 7.766469 0 0 0-11.133915 0l-11.99949 11.99949-11.999491-11.99949a7.873183 7.873183 0 1 0-11.133914 11.133914l11.99949 11.999491-11.99949 11.99949a7.956184 7.956184 0 1 0 11.252486 11.252487l11.999491-11.999491 11.99949 11.999491a7.778326 7.778326 0 0 0 5.572886 2.371441 7.576753 7.576753 0 0 0 5.572886-2.371441 7.766469 7.766469 0 0 0 0-11.133915l-11.99949-11.99949 11.99949-11.999491a8.110328 8.110328 0 0 0-0.118572-11.252486z m-154.902514 46.397239a7.873183 7.873183 0 0 0 5.572886 2.371441 7.873183 7.873183 0 0 0 5.572886-13.481641l-11.999491-11.999491 11.999491-11.99949a7.766469 7.766469 0 0 0 0-11.133915 7.991756 7.991756 0 0 0-11.264344 0l-11.999491 11.999491-11.99949-11.999491a7.991756 7.991756 0 0 0-11.264344 0 7.766469 7.766469 0 0 0 0 11.133915l11.999491 11.99949-11.999491 11.999491a7.766469 7.766469 0 0 0 0 11.133915 7.778326 7.778326 0 0 0 5.572886 2.37144 7.576753 7.576753 0 0 0 5.572886-2.37144l11.99949-11.999491z m59.87888 83.391716a107.390697 107.390697 0 0 0-77.451256 32.65474 7.956184 7.956184 0 0 0 0.118572 11.133915 7.837612 7.837612 0 0 0 11.133914-0.118572 92.616621 92.616621 0 0 1 132.385684 0 8.157756 8.157756 0 0 0 5.691457 2.371441 7.825755 7.825755 0 0 0 7.304038-4.825882 8.01547 8.01547 0 0 0-1.61258-8.655759 107.758271 107.758271 0 0 0-77.569829-32.536168z m0 0" fill="#dbdbdb" p-id="2532"></path><path d="M768.601753 313.872049l-82.14671-91.679902a94.229201 94.229201 0 0 0-70.147219-31.303019H246.505344a85.905443 85.905443 0 0 0-85.858015 85.858015v564.651914a85.905443 85.905443 0 0 0 85.858015 85.858015h459.490372a85.905443 85.905443 0 0 0 85.858014-85.858015V374.616505a91.063327 91.063327 0 0 0-23.263834-60.744456z m-94.027628-81.162562l82.14671 91.679902a77.427543 77.427543 0 0 1 14.228645 23.263834h-85.490442a38.962773 38.962773 0 0 1-38.97463-38.97463v-95.877352a77.285256 77.285256 0 0 1 28.089717 19.920103z m101.450238 608.701428a70.123505 70.123505 0 0 1-70.028647 70.028647H246.505344a70.123505 70.123505 0 0 1-70.028647-70.028647V276.747143a70.123505 70.123505 0 0 1 70.028647-70.028647h369.80248a79.443267 79.443267 0 0 1 14.347217 1.363578v100.584662a54.910712 54.910712 0 0 0 54.803997 54.803997h89.699749a84.35215 84.35215 0 0 1 0.865576 11.133915v466.794409z m0 0" fill="#dbdbdb" p-id="2533"></path></svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1,16 @@
<svg width="18" height="18" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" stroke="#ffffff">
<g fill="none" fill-rule="evenodd">
<g transform="translate(1 1)" stroke-width="1">
<circle stroke-opacity=".2" cx="14" cy="14" r="12"/>
<path d="M14,26C7.372,26,2,20.629,2,14">
<animateTransform
attributeName="transform"
type="rotate"
from="0 14 14"
to="360 14 14"
dur="1s"
repeatCount="indefinite"/>
</path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 623 B

View File

@@ -0,0 +1,16 @@
<svg width="18" height="18" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg" stroke="#198cff">
<g fill="none" fill-rule="evenodd">
<g transform="translate(1 1)" stroke-width="1">
<circle stroke-opacity=".2" cx="14" cy="14" r="12"/>
<path d="M14,26C7.372,26,2,20.629,2,14">
<animateTransform
attributeName="transform"
type="rotate"
from="0 14 14"
to="360 14 14"
dur="1s"
repeatCount="indefinite"/>
</path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 623 B

View File

@@ -0,0 +1,24 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="160px" height="160px" viewBox="0 0 160 160">
<rect fill="#FFFFFF" width="160" height="160"/>
<g>
<g>
<g>
<path fill="#C9CACA" d="M79.087,87.86H61.983c-1.717,0-3.108-1.223-3.109-2.73v-2.111l9.163-6.958l3.284,2.841
c1.708,1.486,4.422,1.585,6.262,0.228L93.07,67.625l6.226,5.479c0.628,0.591,0.892,0.858,1.58,0.858
c0.493,0,0.904-0.244,1.219-0.587c0.333-0.363,0.311-1.238,0.311-1.672V57.81c0-3.018-2.783-5.465-6.218-5.465H61.983
c-3.435,0-6.218,2.447-6.218,5.465v27.32c0,1.448,0.655,2.839,1.821,3.863c1.167,1.023,2.749,1.601,4.397,1.601h17.071
c0.795,0,1.525-0.567,1.582-1.265c0.065-0.8-0.653-1.467-1.547-1.467L79.087,87.86z M58.875,57.81
c0-1.509,1.392-2.732,3.109-2.732h34.203c1.718,0,3.109,1.223,3.109,2.732v11.434l-4.123-3.629
c-1.152-0.857-2.84-0.86-3.996-0.008L75.587,77.029c-0.613,0.449-1.513,0.417-2.082-0.075l-3.287-2.84
c-1.159-0.993-2.989-1.044-4.216-0.121l-7.127,5.42L58.875,57.81L58.875,57.81z M67.004,64.215c0,1.658,0.999,3.153,2.53,3.787
c1.532,0.635,3.295,0.285,4.467-0.888c1.173-1.172,1.522-2.935,0.889-4.466c-0.635-1.531-2.129-2.531-3.787-2.531
c-1.087,0-2.13,0.432-2.898,1.2C67.436,62.086,67.004,63.127,67.004,64.215L67.004,64.215z M102.338,79.737
c3.737,3.733,3.737,9.786,0,13.52c-3.735,3.735-9.789,3.736-13.523,0c-3.682-3.744-3.655-9.754,0.057-13.463
C92.583,76.082,98.595,76.056,102.338,79.737L102.338,79.737z M90.745,91.325c2.295,2.294,5.886,2.657,8.593,0.869l-9.462-9.464
c-1.787,2.706-1.424,6.298,0.869,8.592V91.325z M101.272,90.259c1.782-2.708,1.416-6.295-0.875-8.585
c-2.293-2.29-5.879-2.657-8.587-0.875L101.272,90.259z M101.272,90.259"/>
</g>
</g>
<text transform="matrix(1 0 0 1 54.8237 110.5508)" fill="#C9CACA" font-family="'MicrosoftYaHei'" font-size="12.5877">暂无图片</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,88 @@
@charset "utf-8";
/*!
*Last modified: 2022-11-23 11:33:09
*名称: ax-rate.css
*简介: 评星插件的css文件
*用法: new axRate('#id',{参数})
*版本: v1.0.0
*演示: https://www.axui.cn/v2.0/ax-tree.php
*客服: 3217728223@qq.com
*交流: QQ群952502085
*作者: AXUI团队
*/
.ax-rate {
display: flex;
justify-content: flex-start;
align-items: center;
}
.ax-rate ul {
display: inline-flex;
}
.ax-rate li.ax-item {
width: 1.8rem;
height: 1.8rem;
line-height: 1.8rem;
margin: 0 0.2rem;
cursor: pointer;
position: relative;
}
.ax-rate li.ax-item i {
font-size: 1.8rem;
text-align: left;
height: 100%;
overflow: hidden;
position: absolute;
left: 0;
top: 0;
}
.ax-rate li.ax-item i:first-child {
width: 0%;
z-index: 2;
transition: width 100ms linear;
}
.ax-rate li.ax-item i:first-child:before {
color: #ff8400;
transition: color 100ms linear;
}
.ax-rate li.ax-item i.ax-half:first-child {
width: 50%;
}
.ax-rate li.ax-item i.ax-full:first-child {
width: 100%;
}
.ax-rate li.ax-item i:last-child {
width: 100%;
}
.ax-rate li.ax-item i:last-child:before {
color: #f5e7d7;
}
.ax-rate[size=md] li.ax-item {
width: 2.8rem;
height: 2.8rem;
line-height: 2.8rem;
}
.ax-rate[size=md] li.ax-item i {
font-size: 2.8rem;
}
.ax-rate[size=lg] li.ax-item {
width: 3.8rem;
height: 3.8rem;
line-height: 3.8rem;
}
.ax-rate[size=lg] li.ax-item i {
font-size: 3.8rem;
}
.ax-rate [clear] {
font-size: 1.4rem;
color: #ccc;
margin-right: 0.4rem;
transition: all 100ms linear;
}
.ax-rate [clear]:hover {
cursor: pointer;
color: #dc3545;
}
.ax-rate .ax-tips {
font-size: 1.4rem;
margin-left: 0.4rem;
}

View File

@@ -0,0 +1,263 @@
/*!
*Last modified: 2023-06-04 21:01:53
*名称: axRate.js
*简介: 评星插件的js文件
*用法: new axRate('#id',{参数})
*版本: v1.0.3
*演示: https://www.axui.cn/v2.0/ax-rate.php
*客服: 3217728223@qq.com
*交流: QQ群952502085
*作者: AXUI团队
*/
class axRate {
constructor(elem, options) {
this.targetDom = axIdToDom(elem);
this.options = axExtend({
insName: '',
half: false,
icon: 'ax-iconfont ax-icon-star-f',
count: 5,
multiplier: 1,
value: 0,
readonly: false,
popShow: false,
popTheme: 'ad',
popFormat: '<i stars></i>星,总分:<i value></i>',
tipsShow: false,
tipsFormat: '<i stars></i>星,总分:<i value></i>',
clearShow: false,
size: '',
rendered: '',
getValue: '',
setValue: '',
}, options, this.targetDom, this.constructor.name);
this.handlers = {};
if (!this.targetDom || this.targetDom.nodeName == 'INPUT') {
this.parent = axAddElem('div', { class: 'ax-rate' });
if (this.targetDom.nodeName == 'INPUT') {
this.hidden = this.targetDom;
this.hidden.insertAdjacentElement('beforeBegin', this.parent);
this.hidden.type != 'hidden' ? this.hidden.style.display = 'none' : null;
}
} else {
this.parent = this.targetDom;
}
this.value = 0;
this.stars = 0;
this.items = [];
this.init();
return this;
}
init() {
axInstance.push(this, this.options.insName, 'rate');
this.renderRate();
this.set(this.options.value);
let pop;
if (this.options.popShow) {
pop = axAddElem('div', { class: 'ax-rate-popcon' }, this.options.popFormat);
this.tooltip = new axTooltip(this.items[0].dom, {
trigger: 'none',
theme: this.options.popTheme,
content: pop,
});
new axHover(this.ul, {
enter: () => {
this.tooltip.popup.show()
},
leave: () => {
this.tooltip.popup.hide();
},
hold: this.tooltip.popup.targetDom,
});
}
if (!this.options.readonly) {
this.clear.onclick = () => {
this.set(0);
}
this.items.forEach((item) => {
let itemDom = item.dom,
firstChild = itemDom.firstElementChild,
before = this.items.filter(i => i.id < item.id),
after = this.items.filter(i => i.id > item.id);
if (this.options.popShow) {
new axHover(itemDom, {
enter: () => {
this.tooltip.popup.updatePosition(itemDom);
},
});
}
itemDom.onmousemove = (e) => {
let place = this.movePlace(e, itemDom);
before.forEach(i => {
i.dom.firstElementChild.classList.add('ax-full');
i.value = 1;
});
if (place == 'half') {
firstChild.classList.remove('ax-full');
firstChild.classList.add('ax-half');
} else if (place == 'full') {
firstChild.classList.remove('ax-half');
firstChild.classList.add('ax-full');
}
after.forEach(i => {
i.dom.firstElementChild.classList.remove('ax-half');
i.dom.firstElementChild.classList.remove('ax-full');
});
if (this.options.popShow) {
this.calculate(item, place, pop);
}
itemDom.onclick = () => {
if (place == 'half') {
item.value = 0.5;
} else if (place == 'full') {
item.value = 1;
} else {
item.value = 0;
}
this.calculate(item, place);
if (this.options.tipsShow) {
this.tipsValue ? this.tipsValue.innerHTML = this.value : null;
this.tipsStars ? this.tipsStars.innerHTML = this.stars : null;
}
this.options.getValue && this.options.getValue.call(this, this.value, this.stars);
this.handlers.hasOwnProperty('getValue') ? this.emit('getValue', this.value, this.stars) : null;
}
}
});
this.ul.onmouseleave = () => {
this.set(this.value);
this.options.setValue && this.options.setValue.call(this, this.value, this.stars);
this.handlers.hasOwnProperty('setValue') ? this.emit('setValue', this.value, this.stars) : null;
}
}
}
set(val) {
if (val <= 0) {
val = 0;
}
if (val >= this.options.multiplier * this.options.count) {
val = this.options.multiplier * this.options.count;
}
let stars = val / this.options.multiplier,
beforeStars = Math.floor(stars),
currentStar = stars - beforeStars;
if (!this.options.half) {
currentStar = 0;
}
if (!val) {
this.items.forEach(i => {
let dom = i.dom.firstElementChild;
dom.classList.remove('ax-half');
dom.classList.remove('ax-full');
i.value = 0;
});
} else {
for (let i = 0; i <= beforeStars - 1; i++) {
let dom = this.items[i].dom.firstElementChild;
dom.classList.remove('ax-half');
dom.classList.add('ax-full');
this.items[i].value = 1;
}
}
this.stars = beforeStars;
if (currentStar == 0.5) {
let dom = this.items[beforeStars].dom.firstElementChild;
dom.classList.remove('ax-full');
dom.classList.add('ax-half');
this.items[beforeStars].value = 0.5;
this.stars += 0.5;
beforeStars++;
}
for (let i = beforeStars; i < this.items.length; i++) {
let dom = this.items[i].dom.firstElementChild;
dom.classList.remove('ax-half');
dom.classList.remove('ax-full');
this.items[i].value = 0;
}
this.value = val;
this.tipsValue ? this.tipsValue.innerHTML = val : null;
this.tipsStars ? this.tipsStars.innerHTML = this.stars : null;
this.hidden ? this.hidden.value = val : null;
}
get(attr) {
let obj = { stars: this.stars, value: this.value, count: this.options.count, multiplier: this.options.multiplier };
return obj[attr];
}
calculate(item, place, pop) {
let before = this.items.filter(i => i.id < item.id),
stars = before.length;
if (place == 'half') {
stars += 0.5;
} else if (place == 'full') {
stars++;
}
if (pop) {
pop.querySelector('[stars]').innerHTML = stars;
pop.querySelector('[value]').innerHTML = this.options.multiplier * stars;
} else {
this.value = this.options.multiplier * stars;
this.stars = stars;
}
}
renderRate() {
let fragment = document.createDocumentFragment(),
star = `<i class="${this.options.icon}"></i>`,
itemHTML = `<li class="ax-item">
${star.repeat(2)}
</li>`;
this.ul = axAddElem('ul');
this.tips = axAddElem('div', { class: 'ax-tips' }, this.options.tipsFormat);
this.tipsStars = this.tips.querySelector('[stars]');
this.tipsValue = this.tips.querySelector('[value]');
this.clear = axAddElem('i', { class: 'ax-iconfont ax-icon-close-o-f', clear: '' });
this.options.clearShow ? fragment.appendChild(this.clear) : null;
for (let i = 1; i <= this.options.count; i++) {
let itemDom = axStrToDom(itemHTML),
obj = {
id: i,
value: 0,
dom: itemDom,
};
this.items.push(obj);
this.ul.appendChild(itemDom);
}
fragment.appendChild(this.ul);
this.options.tipsShow ? fragment.appendChild(this.tips) : null;
if (this.options.size) {
this.parent.setAttribute('size', this.options.size);
}
this.parent.appendChild(fragment);
this.options.rendered && this.options.rendered.call(this);
'rendered' in this.handlers ? this.emit('rendered', '') : null;
}
movePlace(e, node) {
if (!this.options.half) {
return 'full';
}
let leftOffset = node.getBoundingClientRect().left,
rightOffset = node.getBoundingClientRect().right,
half = ((rightOffset - leftOffset) / 2),
halfOffset = leftOffset + ~~half,
placement = 'full';
if (e.clientX < halfOffset) {
placement = 'half';
}
return placement;
}
on(type, handler) {
axAddPlan(type, handler, this);
return this;
}
emit(type, ...params) {
axExePlan(type, this, ...params);
}
off(type, handler) {
axDelPlan(type, handler, this);
return this;
}
}
(() => {
document.querySelectorAll('[axRate]').forEach(element => {
new axRate(element);
});
})();

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,283 @@
@charset "utf-8";
/*!
*Last modified: 2023-06-11 12:34:54
*名称: ax-tree.css
*简介: tree树菜单的css文件
*用法: new axTree('#id',{参数})
*版本: v1.0.8
*演示: https://www.axui.cn/v2.0/ax-tree.php
*客服: 3217728223@qq.com
*交流: QQ群952502085
*作者: AXUI团队
*/
.ax-tree ul {
display: none;
}
.ax-tree .ax-node {
display: flex;
justify-content: flex-start;
align-items: center;
height: 2.8rem;
transition: all 200ms linear;
}
.ax-tree .ax-node:hover {
background-color: #f5f5f5;
}
.ax-tree [arrow] {
text-align: center;
width: 2.2rem;
height: 2.8rem;
line-height: 2.8rem;
background-position: center;
background-repeat: no-repeat;
background-size: 1.4rem;
position: relative;
}
.ax-tree [arrow]:not(.ax-none) {
cursor: pointer;
transition: all 200ms linear;
}
.ax-tree [arrow]:not(.ax-none).ax-different {
transform: none!important;
transition: none!important;
}
.ax-tree [arrow].ax-expand {
background-image: url(icons/expand.svg);
}
.ax-tree [arrow].ax-collapse {
background-image: url(icons/collapse.svg);
}
.ax-tree [arrow][loading]:before {
content: "";
display: inline-block;
width: 1.4rem;
height: 1.4rem;
background: var(--load) no-repeat scroll center;
background-size: cover;
}
.ax-tree [check] {
color: #666;
width: 2.2rem;
height: 2.2rem;
line-height: 2.2rem;
text-align: center;
cursor: pointer;
background-position: center;
background-size: 1.4rem;
background-repeat: no-repeat;
}
.ax-tree [check].ax-checkbox-unchecked {
background-image: url(icons/checkbox-unchecked.svg);
}
.ax-tree [check].ax-checkbox-checking {
background-image: url(icons/checkbox-checking.svg);
}
.ax-tree [check].ax-checkbox-checked {
background-image: url(icons/checkbox-checked.svg);
}
.ax-tree [check].ax-radio-unchecked {
background-image: url(icons/radio-unchecked.svg);
}
.ax-tree [check].ax-radio-checking {
background-image: url(icons/radio-checking.svg);
}
.ax-tree [check].ax-radio-checked {
background-image: url(icons/radio-checked.svg);
}
.ax-tree [legend] {
color: #666;
width: 2.2rem;
height: 2.2rem;
line-height: 2.2rem;
text-align: center;
background-position: center;
background-size: 1.4rem;
background-repeat: no-repeat;
}
.ax-tree [legend].ax-fold {
background-image: url(icons/fold.svg);
}
.ax-tree [legend].ax-unfold {
background-image: url(icons/unfold.svg);
}
.ax-tree [legend].ax-childless {
background-image: url(icons/childless.svg);
}
.ax-tree [label] {
line-height: 2.2rem;
padding: 0 0.4rem;
margin-right: 0.4rem;
white-space: nowrap;
position: relative;
cursor: pointer;
}
/*keyword highlighting搜索关键字高亮*/
.ax-tree [label] i {
color: #ff8400;
}
.ax-tree [toolsAction="hover"] [tools],
.ax-tree [toolsAction="click"] [tools] {
display: none;
}
.ax-tree [toolsAction="hover"]:hover [tools] {
display: inline-block;
}
.ax-tree [tools] {
height: 2.2rem;
line-height: 2.2rem;
}
.ax-tree [tools] i {
color: #666;
width: 2.2rem;
border-radius: 0.3rem;
text-align: center;
cursor: pointer;
transition: all 200ms linear;
}
.ax-tree [tools] i:hover {
color: #fff;
background-color: #198cff;
}
.ax-tree li select {
width: 9.2rem;
height: 2.2rem;
line-height: 2.2rem;
padding: 0 0 0 0.4rem;
}
.ax-tree .ax-node input[type*='text'] {
width: 9.2rem;
height: 2.2rem;
line-height: 2.2rem;
padding: 0 0.4rem;
}
.ax-tree [indent] i {
width: 2.2rem;
}
/*edit编辑*/
.ax-tree [editing] [label] {
padding: 0;
}
.ax-tree [editing] [tools] {
position: absolute;
left: -100000px;
}
/*expand展开*/
.ax-tree [expanded="true"] > [arrow]:not(.ax-none) {
color: #198cff;
transform: rotate(90deg);
}
/*checked勾选*/
.ax-tree [checked="true"] [check] {
color: #198cff;
}
/*selected已选择*/
.ax-tree [selected]:not([editing]) [label] {
color: #fff;
border-radius: 0.3rem;
background: #198cff;
}
/*disabled禁止勾选*/
.ax-tree [disabled] [check],
.ax-tree [disabled] [legend] {
cursor: not-allowed;
color: #b3b3b3;
}
/*draggable可拖拽*/
.ax-tree [draggable="true"] > div:hover {
cursor: grab;
}
/*readonly只读禁止编辑*/
.ax-tree [readonly] [tools] i,
.ax-tree [readonly] [tools] i:hover {
cursor: not-allowed;
color: #b3b3b3;
background: transparent;
}
/*focus聚焦新增和拖拽成为焦点如果本身是已选择状态则不做改变*/
.ax-tree .ax-node:focus:not([selected="true"]) [label] {
color: #198cff;
}
/*line节点连线*/
.ax-tree[line] [arrow].ax-none:before,
.ax-tree[line] [arrow].ax-none:after {
content: '';
width: calc(2.2rem / 2);
height: calc(2.8rem / 2);
position: absolute;
right: 0;
}
.ax-tree[line] [arrow].ax-none:before {
box-shadow: inset 1px -1px 0 0 #999;
top: 0;
}
.ax-tree[line] [arrow].ax-none:after {
box-shadow: inset 1px 0 0 0 #999;
bottom: 0;
}
.ax-tree[line] ul > li:last-child > div [arrow].ax-none:after {
display: none;
}
.ax-tree[line] > li:first-child > div [arrow].ax-none:before {
box-shadow: inset 0 -1px 0 0 #999;
}
.ax-tree[line] > li:last-child > div [arrow].ax-none:after {
display: none;
}
.ax-tree[line] ul > li [indent] {
line-height: 2.8rem;
position: relative;
}
.ax-tree[line] ul > li [indent] i {
line-height: 2.8rem;
height: 2.8rem;
position: relative;
}
.ax-tree[line] > li [indent] i:before,
.ax-tree[line] ul > li [indent] i:before {
content: '';
width: calc(2.2rem / 2);
height: 100%;
box-shadow: inset 1px 0 0 0 #999;
position: absolute;
top: 0;
right: 0;
}
/*drag拖拽节点*/
.ax-tree .ax-dragging > div [label] {
color: #198cff;
background: transparent;
}
.ax-tree .ax-dragging > div [label]:before {
content: '';
width: 0;
height: 0;
border-width: 4px;
border-style: solid;
border-color: transparent transparent transparent #198cff;
position: absolute;
left: -4px;
display: none;
}
.ax-tree .ax-dragging[insert="up"] > div [label]:before {
display: block;
top: -6px;
}
.ax-tree .ax-dragging[insert="down"] > div [label]:before {
display: block;
bottom: -6px;
}
.ax-tree .ax-dragging[insert="child"] > div [label]:before {
display: block;
top: 7px;
}
.ax-tree .ax-dragging[insert="child"] > div [label]:after {
content: '';
border: 1px solid #198cff;
border-radius: 0.3rem;
width: 100%;
height: 100%;
box-sizing: border-box;
position: absolute;
left: 0;
top: 0;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="1em" height="1em" viewBox="0 0 1024 1024">
<g>
<path fill="#198cff" d="M960,920c0,22.092-17.908,40-40,40H104c-22.091,0-40-17.908-40-40V104c0-22.091,17.909-40,40-40h816
c22.092,0,40,17.909,40,40V920z"/>
</g>
<path fill="#ffffff" d="M451.216,708.784c-10.609,0-20.783-4.214-28.284-11.716l-181.019-181.02
c-15.621-15.621-15.621-40.948,0-56.568c15.622-15.621,40.949-15.621,56.568,0l152.735,152.735l288.5-288.5
c15.621-15.621,40.947-15.621,56.568,0c15.621,15.621,15.621,40.947,0,56.568L479.5,697.068
C471.999,704.57,461.825,708.784,451.216,708.784z"/>
</svg>

After

Width:  |  Height:  |  Size: 623 B

View File

@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="1em" height="1em" viewBox="0 0 1024 1024">
<rect x="96" y="96" fill="#EFF6FC" width="832" height="832"/>
<path fill="#198cff" d="M880,144v736H144V144H880 M920,64H104c-22.091,0-40,17.909-40,40v816c0,22.092,17.909,40,40,40h816
c22.092,0,40-17.908,40-40V104C960,81.909,942.092,64,920,64L920,64z"/>
<path fill="#198cff" d="M451.216,708.784c-10.609,0-20.783-4.214-28.284-11.716l-181.019-181.02
c-15.621-15.621-15.621-40.948,0-56.568c15.622-15.621,40.949-15.621,56.568,0l152.735,152.735l288.5-288.5
c15.621-15.621,40.947-15.621,56.568,0c15.621,15.621,15.621,40.947,0,56.568L479.5,697.068
C471.999,704.57,461.825,708.784,451.216,708.784z"/>
</svg>

After

Width:  |  Height:  |  Size: 709 B

View File

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="1em" height="1em" viewBox="0 0 1024 1024">
<rect x="96" y="96" fill="#FFFFFF" width="832" height="832"/>
<path fill="#666666" d="M880,144v736H144V144H880 M920,64H104c-22.091,0-40,17.909-40,40v816c0,22.092,17.909,40,40,40h816
c22.092,0,40-17.908,40-40V104C960,81.909,942.092,64,920,64L920,64z"/>
</svg>

After

Width:  |  Height:  |  Size: 366 B

View File

@@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="1em" height="1em" viewBox="0 0 1024 1024">
<polygon fill="#FEF9EB" points="672,96 864,288 864,928 160,928 160,96 "/>
<g>
<path fill="#ffc107" d="M670.862,144L816,289.138V880H208V144H670.862 M704,64H164.923C144.531,64,128,83.286,128,107.077v809.846
C128,940.714,144.531,960,164.923,960h694.154C879.47,960,896,940.714,896,916.923V256L704,64L704,64z"/>
</g>
<g>
<rect x="320" y="376" fill="#ffc107" width="288" height="80"/>
<rect x="320" y="536" fill="#ffc107" width="384" height="80"/>
<rect x="320" y="696" fill="#ffc107" width="384" height="80"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 629 B

View File

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="1em" height="1em" viewBox="0 0 1024 1024">
<rect x="96" y="96" fill="#FFFFFF" width="832" height="832"/>
<path fill="#666666" d="M880,144v736H144V144H880 M920,64H104c-22.091,0-40,17.909-40,40v816c0,22.092,17.909,40,40,40h816
c22.092,0,40-17.908,40-40V104C960,81.909,942.092,64,920,64L920,64z"/>
<polygon fill="#666666" points="776,472 552,472 552,248 472,248 472,472 248,472 248,552 472,552 472,776 552,776 552,552 776,552
"/>
</svg>

After

Width:  |  Height:  |  Size: 500 B

View File

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="1em" height="1em" viewBox="0 0 1024 1024">
<rect x="96" y="96" fill="#FFFFFF" width="832" height="832"/>
<path fill="#666666" d="M880,144v736H144V144H880 M920,64H104c-22.091,0-40,17.909-40,40v816c0,22.092,17.909,40,40,40h816
c22.092,0,40-17.908,40-40V104C960,81.909,942.092,64,920,64L920,64z"/>
<rect x="248" y="472" fill="#666666" width="528" height="80"/>
</svg>

After

Width:  |  Height:  |  Size: 429 B

View File

@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="1em" height="1em" viewBox="0 0 1024 1024">
<path fill="#F3EBD5" d="M928,232c0-22.091-16.629-40-37.143-40H133.143C112.629,192,96,209.909,96,232v528
c0,22.092,16.629,40,37.143,40h757.714C911.371,800,928,782.092,928,760V232z"/>
<path fill="#E09F22" d="M928,504c0,22.092-16.629,40-37.143,40H133.143C112.629,544,96,526.092,96,504V169.484
c0-22.091,16.629-40,37.143-40c0,0,241.739,0,260,0c18.261,0,25.38,12.85,33.428,30.183C434.619,177,482.286,256,482.286,256
h408.572C911.371,256,928,273.909,928,296V504z"/>
<path fill="#F5BB1C" d="M928,298.105C928,274.851,911.371,256,890.857,256H133.143C112.629,256,96,274.851,96,298.105v555.789
C96,877.149,112.629,896,133.143,896h757.714C911.371,896,928,877.149,928,853.895V298.105z"/>
</svg>

After

Width:  |  Height:  |  Size: 792 B

View File

@@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="1em" height="1em" viewBox="0 0 1024 1024">
<circle fill="#EFF6FC" cx="512" cy="512" r="416"/>
<path fill="#198cff" d="M512,144c49.715,0,97.9,9.719,143.218,28.886c43.812,18.531,83.176,45.076,116.997,78.898
c33.822,33.822,60.368,73.186,78.898,116.998C870.281,414.1,880,462.285,880,512s-9.719,97.9-28.887,143.218
c-18.53,43.812-45.076,83.176-78.898,116.997c-33.821,33.822-73.186,60.368-116.997,78.898C609.9,870.281,561.715,880,512,880
s-97.9-9.719-143.218-28.887c-43.812-18.53-83.175-45.076-116.998-78.898c-33.822-33.821-60.368-73.186-78.898-116.997
C153.719,609.9,144,561.715,144,512s9.719-97.9,28.886-143.218c18.531-43.812,45.076-83.175,78.898-116.998
s73.186-60.368,116.998-78.898C414.1,153.719,462.285,144,512,144 M512,64C264.576,64,64,264.576,64,512s200.576,448,448,448
s448-200.576,448-448S759.424,64,512,64L512,64z"/>
<g>
<circle fill="#198cff" cx="512" cy="512" r="224"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 959 B

View File

@@ -0,0 +1,15 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
width="1em" height="1em" viewBox="0 0 1024 1024" >
<circle fill="#EFF6FC" cx="512" cy="512" r="416"/>
<path fill="#198cff" d="M512,144c49.715,0,97.9,9.719,143.218,28.886c43.812,18.531,83.176,45.076,116.997,78.898
c33.822,33.822,60.368,73.186,78.898,116.998C870.281,414.1,880,462.285,880,512s-9.719,97.9-28.887,143.218
c-18.53,43.812-45.076,83.176-78.898,116.997c-33.821,33.822-73.186,60.368-116.997,78.898C609.9,870.281,561.715,880,512,880
s-97.9-9.719-143.218-28.887c-43.812-18.53-83.175-45.076-116.998-78.898c-33.822-33.821-60.368-73.186-78.898-116.997
C153.719,609.9,144,561.715,144,512s9.719-97.9,28.886-143.218c18.531-43.812,45.076-83.175,78.898-116.998
s73.186-60.368,116.998-78.898C414.1,153.719,462.285,144,512,144 M512,64C264.576,64,64,264.576,64,512s200.576,448,448,448
s448-200.576,448-448S759.424,64,512,64L512,64z"/>
<path fill="#198cff" d="M512,368c38.464,0,74.626,14.979,101.824,42.177C641.021,437.375,656,473.536,656,512
c0,38.465-14.979,74.626-42.176,101.824C586.626,641.021,550.465,656,512,656c-38.464,0-74.625-14.979-101.823-42.176
C382.979,586.626,368,550.464,368,512s14.979-74.625,42.177-101.823S473.536,368,512,368 M512,288c-123.711,0-224,100.289-224,224
c0,123.713,100.289,224,224,224c123.713,0,224-100.287,224-224C736,388.289,635.713,288,512,288L512,288z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,11 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
width="1em" height="1em" viewBox="0 0 1024 1024">
<circle fill="#FFFFFF" cx="512" cy="512" r="416"/>
<path fill="#666666" d="M512,144c49.715,0,97.9,9.719,143.218,28.886c43.812,18.531,83.176,45.076,116.997,78.898
c33.822,33.822,60.368,73.186,78.898,116.998C870.281,414.1,880,462.285,880,512s-9.719,97.9-28.887,143.218
c-18.53,43.812-45.076,83.176-78.898,116.997c-33.821,33.822-73.186,60.368-116.997,78.898C609.9,870.281,561.715,880,512,880
s-97.9-9.719-143.218-28.887c-43.812-18.53-83.175-45.076-116.998-78.898c-33.822-33.821-60.368-73.186-78.898-116.997
C153.719,609.9,144,561.715,144,512s9.719-97.9,28.886-143.218c18.531-43.812,45.076-83.175,78.898-116.998
s73.186-60.368,116.998-78.898C414.1,153.719,462.285,144,512,144 M512,64C264.576,64,64,264.576,64,512s200.576,448,448,448
s448-200.576,448-448S759.424,64,512,64L512,64z"/>
</svg>

After

Width:  |  Height:  |  Size: 900 B

View File

@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
width="1em" height="1em" viewBox="0 0 1024 1024">
<path fill="#F3EBD5" d="M928,232c0-22.091-16.629-40-37.143-40H133.143C112.629,192,96,209.909,96,232v528
c0,22.092,16.629,40,37.143,40h757.714C911.371,800,928,782.092,928,760V232z"/>
<path fill="#E09F22" d="M928,504c0,22.092-16.629,40-37.143,40H133.143C112.629,544,96,526.092,96,504V169.484
c0-22.091,16.629-40,37.143-40c0,0,241.739,0,260,0c18.261,0,25.38,12.85,33.428,30.183C434.619,177,482.286,256,482.286,256
h408.572C911.371,256,928,273.909,928,296V504z"/>
<path fill="#F5BB1C" d="M1024,447.579c0-17.441-16.629-31.579-37.143-31.579H101.143C80.629,416,64,430.138,64,447.579l32,416.843
C96,881.861,112.629,896,133.143,896h757.714C911.371,896,928,881.861,928,864.422L1024,447.579z"/>
</svg>

After

Width:  |  Height:  |  Size: 804 B

View File

@@ -0,0 +1,120 @@
@charset "utf-8";
/*!
*Last modified: 2022-09-06 15:56:28
*名称: ax-scrollnav.css
*简介: scrollnav的css文件
*用法: scrollnav.init('#id',{参数})
*版本: v3.0.2
*演示: https://www.axui.cn/v2.0/ax-scrollnav.php
*客服: 3217728223@qq.com
*交流: QQ群952502085
*作者: AXUI团队
*/
.ax-scrollnav-v {
font-size: 1.2rem;
background-color: rgba(255, 255, 255, 0.1);
padding: 1.4rem;
line-height: 2.8rem;
max-height: calc(100vh - 12rem);
overflow: inherit;
position: fixed;
top: 6rem;
right: 1.4rem;
z-index: 610;
}
.ax-scrollnav-v .ax-close {
color: #198cff;
width: 3.8rem;
height: 3.8rem;
line-height: 3.8rem;
text-align: center;
border-radius: 3.8rem;
border: 1px solid #ebebeb;
background-color: rgba(255, 255, 255, 0.9);
box-sizing: border-box;
transition: all 200ms linear;
position: absolute;
right: 0;
bottom: calc(-3.8rem - 1.4rem);
}
.ax-scrollnav-v.ax-hide {
border-color: transparent;
background: transparent;
padding-left: 0;
padding-right: 0;
}
.ax-scrollnav-v.ax-hide .ax-scrollnav {
width: 0;
visibility: hidden;
}
.ax-scrollnav-v.ax-hide .ax-close {
color: #fff;
border-width: 0;
background-color: #198cff;
transform: rotate(180deg);
}
.ax-scrollnav-v:not(.ax-hide) .ax-close:hover {
border-color: #198cff;
background-color: #f0f7ff;
}
.ax-scrollnav-v li {
position: relative;
padding-left: 1.4rem;
white-space: nowrap;
border-left: 1px solid #f0f0f0;
}
.ax-scrollnav-v li.ax-active > a {
color: #198cff;
}
.ax-scrollnav-v li:before {
content: '';
height: 2.8rem;
width: 1px;
position: absolute;
left: -0.1rem;
top: 0;
}
.ax-scrollnav-v li.ax-active:before {
background-color: #198cff;
}
.ax-scrollnav-h {
background-color: #fff;
line-height: 3.8rem;
text-align: center;
position: relative;
z-index: 4;
}
.ax-scrollnav-h li {
margin: 0 1.4rem;
white-space: nowrap;
display: inline-block;
position: relative;
}
.ax-scrollnav-h li.ax-active > a {
color: #198cff;
}
.ax-scrollnav-h li:before {
content: '';
height: 0.2rem;
width: 100%;
transition: all 200ms linear;
position: absolute;
bottom: 0;
}
.ax-scrollnav-h li.ax-active:before {
background-color: #198cff;
}
/*Telephone & iPad*/
@media screen and (max-width: 900px) {
.ax-scrollnav-v {
background-color: rgba(255, 255, 255, 0.9);
border: 1px solid #ebebeb;
border-radius: 0.3rem;
top: auto;
bottom: 1.4rem;
}
.ax-scrollnav-v .ax-close {
top: calc(-3.8rem - 1.4rem);
bottom: auto;
}
}

View File

@@ -0,0 +1,146 @@
/*!
*Last modified: 2022-09-06 15:56:28
*名称: ax-scrollnav.css
*简介: scrollnav的css文件
*用法: scrollnav.init('#id',{参数})
*版本: v3.0.2
*演示: https://www.axui.cn/v2.0/ax-scrollnav.php
*客服: 3217728223@qq.com
*交流: QQ群952502085
*作者: AXUI团队
*/
@charset "utf-8";
@import (optional, reference) "../../../css/ax-fun.less";
.ax-scrollnav {}
.ax-scrollnav-v {
font-size: 1.2rem;
background-color: rgba(255, 255, 255, .1);
padding: @gutter-md;
line-height: @lineheight-body;
max-height: calc(100vh - 12.0rem);
overflow: inherit;
position: fixed;
top: 6.0rem;
right: @gutter-md;
z-index: 610;
}
.ax-scrollnav-v .ax-close {
color: @color-primary;
width: @height-input;
height: @height-input;
line-height: @height-input;
text-align: center;
border-radius: @height-input;
border: 1px solid @color-border;
background-color: rgba(255, 255, 255, 0.9);
box-sizing: border-box;
.tranNormal();
position: absolute;
right: 0;
bottom: calc(-@height-input - @break-md);
}
.ax-scrollnav-v.ax-hide {
border-color: transparent;
background: transparent;
padding-left: 0;
padding-right: 0;
}
.ax-scrollnav-v.ax-hide .ax-scrollnav {
width: 0;
visibility: hidden;
}
.ax-scrollnav-v.ax-hide .ax-close {
color: #fff;
border-width: 0;
background-color: @color-primary;
transform: rotate(180deg);
}
.ax-scrollnav-v:not(.ax-hide) .ax-close:hover {
border-color: @color-primary;
background-color: @color-primary-bg;
}
.ax-scrollnav-v ol {}
.ax-scrollnav-v li {
position: relative;
padding-left: @gutter-md;
white-space: nowrap;
border-left: 1px solid @color-ignbg;
}
.ax-scrollnav-v li.ax-active>a {
color: @color-primary;
}
.ax-scrollnav-v li:before {
content: '';
height: @lineheight-body;
width: 1px;
position: absolute;
left: -0.1rem;
top: 0;
}
.ax-scrollnav-v li.ax-active:before {
background-color: @color-primary;
}
.ax-scrollnav-h {
background-color: #fff;
line-height: @height-input;
text-align: center;
position: relative;
z-index: 4;
}
.ax-scrollnav-h ol {}
.ax-scrollnav-h li {
margin: 0 @gutter-md;
white-space: nowrap;
display: inline-block;
position: relative;
}
.ax-scrollnav-h li.ax-active>a {
color: @color-primary;
}
.ax-scrollnav-h li:before {
content: '';
height: .2rem;
width: 100%;
.tranNormal();
position: absolute;
bottom: 0;
}
.ax-scrollnav-h li.ax-active:before {
background-color: @color-primary;
}
/*Telephone & iPad*/
@media screen and (max-width: 900px) {
.ax-scrollnav-v {
background-color: rgba(255, 255, 255, 0.9);
.border-outer();
border-radius: @radius;
top: auto;
bottom: @gutter-md;
}
.ax-scrollnav-v .ax-close {
top: calc(-@height-input - @gutter-md);
bottom: auto;
}
}

View File

@@ -0,0 +1,255 @@
/*!
* 插件scrollnav使用方法scrollnav.init('#id',{参数})
* AXUI改版
* 1、插件中的样式均增加ax-前缀样式中的下划线_均替换为了短横线-。
* 2、支持两级锚点菜单分别是h2和h3。
* 3、修改了默认参数insertLocation为append。
*/
//对ax-scrollnav-v执行插件
const V_SCROLLNAV = document.querySelectorAll('.ax-scrollnav-v');
for (let i = 0; i < V_SCROLLNAV.length; i++) {
let _this = V_SCROLLNAV[i],
close = _this.querySelector('.ax-close');
if (close) {
close.addEventListener('click', () => {
if (_this.classList.contains('ax-hide')) {
_this.classList.remove('ax-hide');
axCookie.set('scrollnav', 'show');
} else {
_this.classList.add('ax-hide');
axCookie.set('scrollnav', 'hide');
}
}, false);
}
if (axCookie.get("scrollnav") === 'hide') {
_this.classList.add("ax-hide");
} else {
_this.classList.remove("ax-hide");
}
}
//
!function(f, h) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = h() : "function" == typeof define && define.amd ? define(h) : f.scrollnav = h()
} (this,
function() {
function f(f, h) {
var y, w = {};
for (y in f) Object.prototype.hasOwnProperty.call(f, y) && (w[y] = f[y]);
for (y in h) Object.prototype.hasOwnProperty.call(h, y) && (w[y] = h[y]);
return w
}
function h(f, h) {
if ("object" != typeof f) return Promise.reject(new Error("First argument must be an object"));
if ("object" != typeof(h = h || document.body)) return Promise.reject(new Error("Second argument must be an object"));
var y = h.getBoundingClientRect();
return f.getBoundingClientRect().top - y.top
}
function y(f, w, E) {
void 0 === E && (E = "ax-scrollnav");
var L = [];
return E += "-",
f.forEach(function(f, O) {
var x = [],
j = function(f, h) {
if ("object" != typeof f) return Promise.reject(new Error("First argument must be an object"));
var y = f.id;
if (!y) {
if ("string" != typeof h) return Promise.reject(new Error("Second argument must be a string"));
f.id = y = h
}
return y
} (f, E + (O + 1));
w.subSections && f.matches(w.sections) && (x = y(function(f, h, y) {
var w = [];
for (f = f.nextElementSibling; f && !f.matches(h);) ! y || f.matches(y) ? (w.push(f), f = f.nextElementSibling) : f = f.nextElementSibling;
return w
} (f, w.sections, w.subSections), w, j));
L.push({
id: j,
text: f.innerText || f.textContent,
offsetTop: h(f),
subSections: x
})
}),
L
}
function w(f) {
var h = document.createElement("div");//axui
return h.className = "ax-scrollnav",//axui
h.innerHTML = function f(h, y) {
void 0 === y && (y = !1);
var w = "ax-scrollnav" + (y ? "-sub-": "-"),
E = "\n " + h.map(function(h) {
return '<li class="' + w + 'item" data-section="' + h.id + '">\n <a class="' + w + 'link" href="#' + h.id + '">' + h.text + "</a>\n " + (h.subSections && h.subSections.length ? "" + f(h.subSections, !0) : "") + "\n </li>"
}).join("") + "\n ";
return '\n <ol class="' + w + 'list">\n ' + E + "\n </ol>\n " ;
} (f),
h
}
function E(f) {
return f.forEach(function(f) {
var y = document.querySelector("#" + f.id);
f.offsetTop = h(y),
f.subSections.length && (f.subSections = E(f.subSections))
}),
f
}
function L(f, h) {
var y = f.getAttribute("href");
return "#" === y.charAt(0) && (y = y.substr(1)),
function f(h, y) {
var w;
h.forEach(function(h) {
h.id === y && (w = h),
h.subSections && void 0 === w && (w = f(h.subSections, y))
});
return w
} (h, y).offsetTop
}
var O, x, j, _ = function(f) {
return function(h) {
return Math.pow(h, f)
}
},
I = function(f) {
return function(h) {
return 1 - Math.abs(Math.pow(h - 1, f))
}
},
Q = function(f) {
return function(h) {
return h < .5 ? _(f)(2 * h) / 2 : I(f)(2 * h - 1) / 2 + .5
}
},
C = {
linear: Q(1),
easeInQuad: _(2),
easeOutQuad: I(2),
easeInOutQuad: Q(2),
easeInCubic: _(3),
easeOutCubic: I(3),
easeInOutCubic: Q(3),
easeInQuart: _(4),
easeOutQuart: I(4),
easeInOutQuart: Q(4),
easeInQuint: _(5),
easeOutQuint: I(5),
easeInOutQuint: Q(5)
};
function M(f, h) {
return new Promise(function(y, w) {
if ("number" != typeof f) return w(new Error("First argument must be a number"));
if ("string" != typeof(h = h || "linear")) return w(new Error("Second argument must be a string"));
var E, L = window.pageYOffset,
O = f - L,
x = function(f) {
var h = Math.abs(f / 2);
return Math.min(Math.max(h, 250), 1200)
} (O),
j = 20,
_ = 0; !
function f() {
E = C[h]((_ += j) / x),
window.scroll(0, E * O + L),
_ < x ? setTimeout(f, j) : y(window.pageYOffset)
} ()
})
}
function q(f) {
function h() {
var h = window.scrollY || window.pageYOffset || document.body.scrollTop,
y = h + .4 * window.innerHeight,
w = function f(h, y, w) {
var E, L;
h.forEach(function(f) {
f.offsetTop > w ? !E && f.offsetTop < y && (E = f) : E = f
}),
E && E.subSections.length && (L = f(E.subSections, y, w)) && (E = L);
return E
} (f.data, h, y);
return function(f, h) {
var y = h.querySelector("[data-active]");
if (f) {
var w = h.querySelector("[data-section=" + f.id + "]");
w && w !== y && (y && (y.classList.remove("ax-active"), y.removeAttribute("data-active")), w.classList.add("ax-active"), w.setAttribute("data-active", !0))
} else y && (y.classList.remove("ax-active"), y.removeAttribute("data-active"))
} (w, f.nav),
w
}
return window.addEventListener("scroll", h),
h
}
function B(f) {
return f instanceof Element
}
return {
init: function(h, _) {
if (this.settings = f({
sections: "h2",
subSections: "h3",//axui
insertTarget: h,
insertLocation: "append",
easingStyle: "easeOutQuad",
updateHistory: !0
},
_), B(h)) if (!this.settings.insertTarget || B(this.settings.insertTarget)) if (["append", "prepend", "after", "before"].includes(this.settings.insertLocation)) {
var I, Q, C, F, R = h.querySelectorAll(this.settings.sections);
if (R.length) return this.data = y(R, this.settings),
this.nav = w(this.data),
Q = (I = this).settings.insertTarget,
"append" === (C = I.settings.insertLocation) ? Q.appendChild(I.nav) : "prepend" === C ? Q.insertBefore(I.nav, Q.firstChild) : "before" === C ? Q.parentNode.insertBefore(I.nav, Q) : "after" === C && Q.parentNode.insertBefore(I.nav, Q.nextSibling),
O = function(f) {
var h = f.settings;
function y(y) {
y.preventDefault();
var w = .39 * window.innerHeight;
return M(L(y.target, f.data) - w, h.easingStyle).then(function() {
h.updateHistory && history.replaceState({},
"", y.target.getAttribute("href")),
h.onScroll && h.onScroll()
})
}
return f.nav.querySelectorAll("a").forEach(function(f) {
f.addEventListener("click", y)
}),
y
} (this),
x = q(this),
j = function(f) {
function h() {
f.data = E(f.data)
}
return window.addEventListener("resize", h),
h
} (this),
this.settings.debug && ((F = document.createElement("div")).className = "snDebugger", F.setAttribute("style", "\n position: fixed;\n top: 40%;\n height: 0px;\n border-bottom:5px solid red;\n border-top: 5px solid blue;\n width: 100%;\n opacity: .5;\n pointer-events: none;\n "), document.body.appendChild(F)),
this.settings.onInit ? this.settings.onInit() : void 0;
this.settings.debug && console.error('\n scrollnav build failed, could not find any "' + this.settings.sections + '"\n elements inside of "' + h + '"\n ')
} else this.settings.debug && console.error('\n scrollnav build failed, options.insertLocation "' + this.settings.insertLocation + '" is not a valid option\n ');
else this.settings.debug && console.error('\n scrollnav build failed, options.insertTarget "' + h + '" is not an HTML Element\n ');
else this.settings.debug && console.error('\n scrollnav build failed, content argument "' + h + '" is not an HTML Element\n ')
},
destroy: function(h) {
if (this.settings = f(this.settings, h),
function(f, h) {
f.querySelectorAll("a").forEach(function(f) {
f.removeEventListener("click", h)
})
} (this.nav, O),
function(f) {
window.removeEventListener("scroll", f)
} (x),
function(f) {
window.removeEventListener("resize", f)
} (j), this.nav.remove(), this.settings.onDestroy) return this.settings.onDestroy()
},
updatePositions: function(h) {
if (this.settings = f(this.settings, h), this.data = E(this.data), this.settings.onUpdatePositions) return this.settings.onUpdatePositions()
}
}
});
//# sourceMappingURL=scrollnav.min.umd.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long