Skip to content

Commit

Permalink
Merge pull request #232 from theme-nexmoe/dev
Browse files Browse the repository at this point in the history
chore: use js api
  • Loading branch information
nexmoe authored Sep 29, 2022
2 parents f970004 + 7f2dfa0 commit 313ea11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion source/css/style.styl
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ body {

.nexmoe-post-right .nexmoe-fixed {
position: fixed;
z-index: 99999;
z-index: 9999;
height: 100vh;
display: inline-block;
top: 0;
Expand Down
12 changes: 5 additions & 7 deletions source/js/app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// 表格相册
// tabble gallery
$("table")
.has("img")
.addClass("nexmoe-album");

// 搜索
// search
function search() {
window.open($("#search_form").attr("action_e") + " " + $("#search_value").val());
return false;
Expand All @@ -13,11 +13,9 @@ function search() {
$(document).ready(function () {
$("a.toc-link").click(function (ev) {
ev.preventDefault();
$("html, body").animate({
scrollTop: $(decodeURI($(this).attr("href"))).offset().top - 25
}, {
duration: 500,
easing: "swing"
window.scroll({
top: $(decodeURI($(this).attr("href"))).offset().top - 24,
behavior: 'smooth'
});
});
});
Expand Down

0 comments on commit 313ea11

Please sign in to comment.