mirror of
https://github.com/yv1ing/MollyBlog.git
synced 2025-09-16 14:53:45 +08:00
new: Added post search module
This commit is contained in:
4
templates/default/assets/js/archive.js
Normal file
4
templates/default/assets/js/archive.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function search() {
|
||||
const keyword = document.getElementById("archive-search-input").value;
|
||||
window.location.href = "/search?keyword=" + keyword;
|
||||
}
|
||||
4
templates/default/assets/js/index.js
Normal file
4
templates/default/assets/js/index.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function search() {
|
||||
const keyword = document.getElementById("index-search-input").value;
|
||||
window.location.href = "/search?keyword=" + keyword;
|
||||
}
|
||||
@@ -43,6 +43,10 @@ function goto(path) {
|
||||
window.location.href = path;
|
||||
}
|
||||
|
||||
function back() {
|
||||
window.history.back();
|
||||
}
|
||||
|
||||
function backToTop() {
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
|
||||
4
templates/default/assets/js/search.js
Normal file
4
templates/default/assets/js/search.js
Normal file
@@ -0,0 +1,4 @@
|
||||
function search() {
|
||||
const keyword = document.getElementById("search-search-input").value;
|
||||
window.location.href = "/search?keyword=" + keyword;
|
||||
}
|
||||
Reference in New Issue
Block a user