The default icon in the search modal

This commit is contained in:
fechin committed 2022-12-22 17:47:28 +08:00
1 parent d07c72072a
commit f78926739f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -14,7 +14,7 @@ hexo.extend.generator.register('json', function (locals) {
temp_data.index = index;
temp_data.title = data.title;
temp_data.path = data.permalink.replace(hexo.config.url, "");
temp_data.icon = data.icon;
temp_data.icon = data.icon || "icon-placeholder";
temp_data.background = data.background;
temp_data.intro = data.intro;
+1 -1
View File
@@ -423,7 +423,7 @@ window.addEventListener('load', () => {
<a href="${hit.path}" class="flex justify-between items-center rounded-lg py-1 px-4 transition-colors duration-100 ease-in-out overflow-hidden">
<div class="flex items-start">
<div class="flex justify-center items-center w-5 mr-5 mt-2 flex-none">
<i class="icon ${hit.icon === undefined ? "icon-placeholder" : hit.icon} text-2xl"></i>
<i class="icon ${hit.icon} text-2xl"></i>
</div>
<div class="flex flex-col truncate">
<span class="font-semibold dark:text-slate-300 dark:group-hover:text-white">${hit.title}</span>