diff --git a/.github/release.md b/.github/release.md index f68af0a..64e53bb 100644 --- a/.github/release.md +++ b/.github/release.md @@ -21,6 +21,7 @@ determined. - 优化小型按钮的高度 - 一些列表栏的元素位置居中 +- 优化仪表板热力图和动态样式 ##### 更符合 GitHub 风格 diff --git a/src/types/color/github.ts b/src/types/color/github.ts index 5aaf312..6ad785f 100644 --- a/src/types/color/github.ts +++ b/src/types/color/github.ts @@ -197,6 +197,9 @@ export const github = { /** 悬浮阴影 * @tippy `tippyBox` 悬浮框阴影 * @dropdown `dropdown` 下拉框阴影 + * @dashboard `dashboard` 仓库/组织切换按钮和列表边框和阴影 + * @heatmap `heatmap` 热力图阴影 + * @heatmap `activity` 动态活动阴影 */ small: null, }, diff --git a/styles/components/heatmap.ts b/styles/components/heatmap.ts index a477024..001ce3c 100644 --- a/styles/components/heatmap.ts +++ b/styles/components/heatmap.ts @@ -1,7 +1,10 @@ -import { css, otherThemeVars, themeVars } from "src/types/vars"; +import { css, themeVars } from "src/types/vars"; export const heatmap = css` #user-heatmap { + + .divider:not(.divider-text) { + margin: 16px 0; + } .total-contributions { left: 25px + 20px; bottom: 0 + 12px; @@ -12,8 +15,8 @@ export const heatmap = css` } .vch__container { padding: 12px 20px; - border: 1px solid ${themeVars.color.secondary.self}; - border-radius: ${otherThemeVars.border.radius}; + box-shadow: ${themeVars.github.shadow.floating.small}; + border-radius: 12px; // 覆盖热力图和图例的背景色 .vch__day__square, .vch__legend__wrapper rect { @@ -65,13 +68,12 @@ export const heatmap = css` // 动态 export const activity = css` - #activity-feed { - .flex-item { + .flex-list#activity-feed { + border-radius: 12px; + box-shadow: ${themeVars.github.shadow.floating.small}; + > .flex-item { gap: 12px; - padding: 16px 0; - &:first-child { - padding-top: 6px; - } + padding: 12px 8px 16px 12px; > .flex-item-main { gap: 8px !important; > div:not([class]) { @@ -89,5 +91,9 @@ export const activity = css` width: 20px; } } + > .page.buttons { + border-top: 1px solid ${themeVars.color.light.border}; + padding: 16px; + } } `;