Files
gitea-themes/styles/components/repo/repo.ts
T
chuan 434161de5b
Release / release (push) Failing after 13s
Refactor theme management and update documentation
- Removed `.github-theme` from .gitignore as it is no longer needed.
- Updated `official-style-map.md` to clarify the maintenance of GitHub Light style increments within the current repository.
- Revised `rules.md` to reflect the new approach to maintaining GitHub Light theme increments.
- Changed test script in `package.json` to verify generated theme instead of GitHub migration.
- Added `verify-generated-theme.ts` script to validate the generated theme files.
- Migrated various styles from `.github-theme` to the new structure, updating comments and references accordingly.
2026-05-18 01:26:17 +08:00

92 lines
2.4 KiB
TypeScript

export const repoHeader = `
.page-content.repository .repo-header {
/* 点星/关注/克隆/RSS 按钮 */
.ui.compact.button {
padding: 3px 12px;
}
/* 仓库名称 */
.flex-item {
.flex-item-title {
/* 间隔线颜色 */
color: var(--color-text-light-1);
/* 仓库名称 */
a {
display: flex;
align-items: center;
color: var(--color-text);
font-size: 18px;
text-decoration: none !important;
min-width: 3ch;
padding: 0px 6px;
border-radius: var(--border-radius);
margin-top: 0.5rem;
margin-bottom: 0.5rem;
&:hover {
background: var(--github-control-transparent-bgColor-hover);
}
&.muted:not(.tw-font-normal) {
font-weight: 600;
}
}
}
/* 默认的 hover 为 primary 颜色, 修正 */
a:not(.label, .button):hover {
color: var(--color-text) !important;
}
}
}
`;
export const repoMenu = `
.page-content.repository {
.repository-summary .repository-menu {
background-color: var(--color-box-header);
.item {
color: var(--color-text-light-1);
height: 31px; /* 文件列表下与右侧输入框对齐 */
b {
color: var(--color-text);
margin: 0 2px;
}
&.active {
background-color: var(--color-active);
color: var(--color-text);
font-weight: 500;
svg {
color: var(--color-text-light-1);
}
}
}
}
}
`;
export const repoTopic = `
/* 理应只能覆盖探索/组织/用户下仓库的 topic 标签 */
/* 避免渲染到仓库的类型标签 */
.flex-item-main > .label-list .ui.label,
/* 仓库文件列表下的 topic 标签 */
#repo-topics .ui.label.repo-topic {
border-radius: 9999px;
font-size: 12px;
font-weight: 500;
padding: 0px 10px;
line-height: 22px;
background-color: var(--github-bgColor-accent-muted);
color: var(--github-fgColor-accent);
&:hover {
background-color: var(--github-bgColor-accent-emphasis);
color: var(--color-white);
}
}
`;
export const closedIssueTableCell = `
.stats-table .table-cell.tw-bg-red[href="#closed-issues"] {
background-color: var(--color-purple) !important;
}
`;
export const stylesheet = [repoHeader, repoMenu, repoTopic, closedIssueTableCell].join("\n\n");