diff --git a/layouts/_default/single.html b/layouts/_default/single.html index e27d028..0540369 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -13,7 +13,7 @@ - + @@ -129,4 +129,4 @@

{{ .Title }}

- \ No newline at end of file + diff --git a/layouts/index.html b/layouts/index.html index 080f86f..94bb5b8 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -13,7 +13,7 @@ - + @@ -269,15 +269,16 @@

- + $(".geticon").each(function(){ var url = $(this).find('a').attr('href'); - var apiUrl="https://api.iowen.cn/favicon/"+url.replace(/^https?:\/\//, '').replace(/\/.*$/, '')+".png" + var domain = url.replace(/^https?:\/\//, '').replace(/\/.*$/, ''); + var apiUrl = "https://api.faviconkit.com/" + domain + "/128"; // 使用 FaviconKit API if ($(this).find('img').attr('data-src').length === 0) { $(this).find('img').attr('data-src', apiUrl); } }) - + $(document).on('click', '.has-sub', function(){ var _this = $(this) @@ -385,4 +386,4 @@

{{ end }} - \ No newline at end of file + diff --git a/layouts/nav/single.html b/layouts/nav/single.html index 4835217..244c923 100644 --- a/layouts/nav/single.html +++ b/layouts/nav/single.html @@ -271,15 +271,16 @@

- + $(".geticon").each(function(){ var url = $(this).find('a').attr('href'); - var apiUrl="https://api.iowen.cn/favicon/"+url.replace(/^https?:\/\//, '').replace(/\/.*$/, '')+".png" + var domain = url.replace(/^https?:\/\//, '').replace(/\/.*$/, ''); + var apiUrl = "https://api.faviconkit.com/" + domain + "/128"; // 使用 FaviconKit API if ($(this).find('img').attr('data-src').length === 0) { $(this).find('img').attr('data-src', apiUrl); } }) - + $(document).on('click', '.has-sub', function(){ var _this = $(this) if(!$(this).hasClass('expanded')) { @@ -385,4 +386,4 @@

{{ end }} - \ No newline at end of file +