Skip to content

Commit

Permalink
202405241517
Browse files Browse the repository at this point in the history
  • Loading branch information
Remote committed May 24, 2024
1 parent 679b166 commit 140a42a
Show file tree
Hide file tree
Showing 20 changed files with 65 additions and 432 deletions.
1 change: 1 addition & 0 deletions article-add.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<link rel="stylesheet" href="https://pardnchiu.github.io/markdown-editor/css/md-viewer.css">
<!-- script -->
<script src="https://pardnchiu.github.io/PDExtension-js/v3/PDExtension.min.js" copyright="Pardn Ltd" defer></script>
<script src="./js/index.js"></script>
<script type="module" src="./js/article-add.js"></script>
<!-- inline-style -->
<style>
Expand Down
2 changes: 1 addition & 1 deletion css/index.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/index.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions database-add.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css">
<!-- script -->
<script src="https://pardnchiu.github.io/PDExtension-js/v3/PDExtension.min.js" copyright="Pardn Ltd" defer></script>
<script src="./js/index.js"></script>
<script src="./js/database-add.js"></script>
<!-- inline-style -->
<style>
Expand Down
1 change: 1 addition & 0 deletions database-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css">
<!-- script -->
<script src="https://pardnchiu.github.io/PDExtension-js/v3/PDExtension.min.js" copyright="Pardn Ltd" defer></script>
<script src="./js/index.js"></script>
<script src="./js/database-list.js"></script>
<!-- inline-style -->
<style>
Expand Down
1 change: 1 addition & 0 deletions file-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<link rel="stylesheet" href="https://pardnchiu.github.io/markdown-editor/css/md-viewer.css">
<!-- script -->
<script src="https://pardnchiu.github.io/PDExtension-js/v3/PDExtension.min.js" copyright="Pardn Ltd" defer></script>
<script src="./js/index.js"></script>
<script type="module" src="./js/file-edit.js"></script>
<!-- inline-style -->
<style>
Expand Down
74 changes: 3 additions & 71 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<link rel="stylesheet" href="./css/index.css">
<!-- script -->
<script src="https://pardnchiu.github.io/PDExtension-js/v3/PDExtension.min.js" copyright="Pardn Ltd" defer></script>
<script src="./js/index.js"></script>
<!-- inline-style -->
<style>
.dom-temp {
Expand Down Expand Up @@ -53,7 +54,7 @@ <h1>{{ login.title }}</h1>
</section>
<script>
document.addEventListener("DOMContentLoaded", function () {
const page = new $dom({
page = new $dom({
id: "body",
data: {
is_guest: false,
Expand All @@ -74,78 +75,9 @@ <h1>{{ login.title }}</h1>
},
},
event: {
init: function () {
// if ("section.body-left".$) {
// "section.body-left".$.$childAll.forEach(e => {
// e._class("r" + e.$child(-1).$childAll.length)
// });
// };
},
show: function () {
const isShow = this.$parent(0).$$class("show");
this.__class(`fa-solid ${isShow ? "fa-eye-slash" : "fa-eye"}`);
this.$pre(0).$child(0).type = isShow ? "password" : "text";
this.$parent(0).$$class_(isShow, "show");
},
login: function () {
page.dom.$child(0)._class("show");

setTimeout(() => {
page.data.is_guest = false;

setTimeout(_ => {
page.event.init();
}, 100);
}, 1000);
},
logout: function () {
page.data.is_guest = true;
},
body_left_show: function (e) {
const dom = "section.body-left".$;

if (dom == null) {
return;
};

const is_show = dom.$$class("show");
dom.$$class_(is_show, "show");
},
body_left_type: function (e) {
const dom = "section.body-left".$;

if (dom == null) {
return;
};

console.log(dom.dataset)
const is_min = dom.dataset.min === "true";
dom.dataset.min = is_min ? "false" : "true";
_cookie("is_body_left_min", is_min ? "false" : "true")
},
tab_show: function (e) {
const parent = this.$parent(0);
const is_show = parent.$$class("show") || parent.$sel("a[data-selected='true']");
const is_hide = parent.$$class("hide");

if (is_hide) {
parent._class("show").class_("hide");
}
else if (is_show) {
parent._class("hide").class_("show");
}
else {
parent._class("show");
}

}
...default_events,
},
next: () => {
page.event.init();
// const url = new URL(location.href);

// login.data.email = url.searchParams.get("user_email");
// history.replaceState(null, null, "/management/login");
}
});
});
Expand Down
61 changes: 2 additions & 59 deletions js/article-add.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ document.addEventListener("DOMContentLoaded", function () {
delay: 50
});

const page = new $dom({
page = new $dom({
id: "body",
data: {
is_guest: false,
Expand Down Expand Up @@ -44,64 +44,7 @@ document.addEventListener("DOMContentLoaded", function () {
],
},
event: {
show: function () {
const isShow = this.$parent(0).$$class("show");
this.__class(`fa-solid ${isShow ? "fa-eye-slash" : "fa-eye"}`);
this.$pre(0).$child(0).type = isShow ? "password" : "text";
this.$parent(0).$$class_(isShow, "show");
},
login: function () {
page.dom.$child(0)._class("show");

setTimeout(() => {
page.data.is_guest = false;

setTimeout(_ => {
page.event.init();
}, 100);
}, 1000);
},
logout: function () {
page.data.is_guest = true;
},
body_left_show: function (e) {
const dom = "section.body-left".$;

if (dom == null) {
return;
};

const is_show = dom.$$class("show");
dom.$$class_(is_show, "show");
},
body_left_type: function (e) {
const dom = "section.body-left".$;

if (dom == null) {
return;
};

console.log(dom.dataset)
const is_min = dom.dataset.min === "true";
dom.dataset.min = is_min ? "false" : "true";
_cookie("is_body_left_min", is_min ? "false" : "true")
},
tab_show: function (e) {
const parent = this.$parent(0);
const is_show = parent.$$class("show") || parent.$sel("a[data-selected='true']");
const is_hide = parent.$$class("hide");

if (is_hide) {
parent._class("show").class_("hide");
}
else if (is_show) {
parent._class("hide").class_("show");
}
else {
parent._class("show");
}

},
...default_events,
go_back: function () {
editor.goBack();
},
Expand Down
73 changes: 2 additions & 71 deletions js/database-add.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
document.addEventListener("DOMContentLoaded", function () {
const page = new $dom({
page = new $dom({
id: "body",
data: {
is_guest: false,
Expand Down Expand Up @@ -84,78 +84,9 @@ document.addEventListener("DOMContentLoaded", function () {
},
},
event: {
init: function () {
if ("section.body-left".$) {
"section.body-left".$.$childAll.forEach(e => {
e._class("r" + e.$child(-1).$childAll.length)
});
};
},
show: function () {
const isShow = this.$parent(0).$$class("show");
this.__class(`fa-solid ${isShow ? "fa-eye-slash" : "fa-eye"}`);
this.$pre(0).$child(0).type = isShow ? "password" : "text";
this.$parent(0).$$class_(isShow, "show");
},
login: function () {
page.dom.$child(0)._class("show");

setTimeout(() => {
page.data.is_guest = false;

setTimeout(_ => {
page.event.init();
}, 100);
}, 1000);
},
logout: function () {
page.data.is_guest = true;
},
body_left_show: function (e) {
const dom = "section.body-left".$;

if (dom == null) {
return;
};

const is_show = dom.$$class("show");
dom.$$class_(is_show, "show");
},
body_left_type: function (e) {
const dom = "section.body-left".$;

if (dom == null) {
return;
};

console.log(dom.dataset)
const is_min = dom.dataset.min === "true";
dom.dataset.min = is_min ? "false" : "true";
_cookie("is_body_left_min", is_min ? "false" : "true")
},
tab_show: function (e) {
const parent = this.$parent(0);
const is_show = parent.$$class("show") || parent.$sel("a[data-selected='true']");
const is_hide = parent.$$class("hide");

if (is_hide) {
parent._class("show").class_("hide");
}
else if (is_show) {
parent._class("hide").class_("show");
}
else {
parent._class("show");
}

}
...default_events,
},
next: () => {
page.event.init();
// const url = new URL(location.href);

// login.data.email = url.searchParams.get("user_email");
// history.replaceState(null, null, "/management/login");
}
});
});
73 changes: 2 additions & 71 deletions js/database-list.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
document.addEventListener("DOMContentLoaded", function () {
const page = new $dom({
page = new $dom({
id: "body",
data: {
is_guest: false,
Expand Down Expand Up @@ -169,78 +169,9 @@ document.addEventListener("DOMContentLoaded", function () {
}
},
event: {
init: function () {
if ("section.body-left".$) {
"section.body-left".$.$childAll.forEach(e => {
e._class("r" + e.$child(-1).$childAll.length)
});
};
},
show: function () {
const isShow = this.$parent(0).$$class("show");
this.__class(`fa-solid ${isShow ? "fa-eye-slash" : "fa-eye"}`);
this.$pre(0).$child(0).type = isShow ? "password" : "text";
this.$parent(0).$$class_(isShow, "show");
},
login: function () {
page.dom.$child(0)._class("show");

setTimeout(() => {
page.data.is_guest = false;

setTimeout(_ => {
page.event.init();
}, 100);
}, 1000);
},
logout: function () {
page.data.is_guest = true;
},
body_left_show: function (e) {
const dom = "section.body-left".$;

if (dom == null) {
return;
};

const is_show = dom.$$class("show");
dom.$$class_(is_show, "show");
},
body_left_type: function (e) {
const dom = "section.body-left".$;

if (dom == null) {
return;
};

console.log(dom.dataset)
const is_min = dom.dataset.min === "true";
dom.dataset.min = is_min ? "false" : "true";
_cookie("is_body_left_min", is_min ? "false" : "true")
},
tab_show: function (e) {
const parent = this.$parent(0);
const is_show = parent.$$class("show") || parent.$sel("a[data-selected='true']");
const is_hide = parent.$$class("hide");

if (is_hide) {
parent._class("show").class_("hide");
}
else if (is_show) {
parent._class("hide").class_("show");
}
else {
parent._class("show");
}

}
...default_events,
},
next: () => {
page.event.init();
// const url = new URL(location.href);

// login.data.email = url.searchParams.get("user_email");
// history.replaceState(null, null, "/management/login");
}
});
});
Loading

0 comments on commit 140a42a

Please sign in to comment.