From e56c1caf010267111c209a9b3fed5ba7a7aa4a48 Mon Sep 17 00:00:00 2001 From: xjh22222228 Date: Thu, 17 Dec 2020 19:02:48 +0800 Subject: [PATCH] fix: img logo --- config/index.ts | 2 +- data/frontend/javascript.ts | 6 ++++++ data/utilityTool/devops.ts | 5 +++++ src/utils/index.ts | 7 ++++++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/config/index.ts b/config/index.ts index 1c3c0a6..4d49a4d 100644 --- a/config/index.ts +++ b/config/index.ts @@ -60,7 +60,7 @@ export const GIT_REPO_URL = 'https://github.com/xjh22222228/nav' // 错误图标, 图标地址访问不了时显示 // 建议使用网络地址,放在您任何服务器上, 减少入侵 -export const ERROR_ICON = 'assets/img/transparent.gif' +export const ERROR_ICON = '' // 网站底部描述, 可以是 HTML // 可以是版权信息,备案号 diff --git a/data/frontend/javascript.ts b/data/frontend/javascript.ts index fc89702..efc2c86 100644 --- a/data/frontend/javascript.ts +++ b/data/frontend/javascript.ts @@ -814,6 +814,12 @@ export default { 'https://github.com/apache/incubator-echarts' ] }, + { + icon: 'https://avatars1.githubusercontent.com/u/1562726?s=200&v=4', + name: 'd3', + desc: '借助SVG,Canvas和HTML使数据栩栩如生。', + url: 'https://github.com/d3/d3', + }, ] }, { diff --git a/data/utilityTool/devops.ts b/data/utilityTool/devops.ts index 8d656b2..d0ea67b 100644 --- a/data/utilityTool/devops.ts +++ b/data/utilityTool/devops.ts @@ -5,6 +5,11 @@ const nav = { { title: '开发神器', nav: [ + { + name: 'releasly', + desc: '在新的开源版本发布时收到通知,直接发送到您的电子邮件中。', + url: 'https://www.releasly.co/', + }, { name: 'Convert cURL', desc: '将curl命令转换为Python,JavaScript,PHP,R,Go,Rust,Dart,JSON,Ansible,Elixir。', diff --git a/src/utils/index.ts b/src/utils/index.ts index 02c4b47..6c3f3b7 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -110,7 +110,12 @@ export function randomBgImg() { } export function onImgError(e: any) { - e.target.src = ERROR_ICON + if (ERROR_ICON) { + e.target.src = ERROR_ICON + } else { + const el = e.target + el.parentNode.removeChild(el) + } } export function queryString() { -- GitLab