feat(ui): show preview image in home page

This commit is contained in:
Cotes Chung
2023-03-18 06:28:44 +08:00
parent ee88cec270
commit 97b8dfeed6
39 changed files with 347 additions and 284 deletions

View File

@@ -174,13 +174,7 @@ function displayPageviews(data) {
let hasInit = getInitStatus();
const rows = data.rows; /* could be undefined */
if ($('#post-list').length > 0) {
/* the Home page */
$('.post-preview').each(function () {
const path = $(this).find('a').attr('href');
tacklePV(rows, path, $(this).find('.pageviews'), hasInit);
});
} else if ($('.post').length > 0) {
if ($('.post').length > 0) {
/* the post */
const path = window.location.pathname;
tacklePV(rows, path, $('#pv'), hasInit);