hexo-theme-keep/source/js/main.js

14 lines
509 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

console.log('this is main.js');
(() => {
// 选择分页器元素里面的 a 标签,但不包含 .page-number给指定元素追加类 btn 和 设置属性 role=navigation
document.querySelectorAll('.article-post .paginator a:not(.page-number)').forEach(e => {
e.classList.add('btn');
e.setAttribute('role', 'navigation');
});
})();
// app.locals.structureArchiveList = function (posts) {
// posts.forEach(post => {
// console.log('post: ', post);
// });
// };