Skip to content

Commit f254f3a

Browse files
Digidaiclaude
andcommitted
fix: 将面包屑样式移至全局 SCSS 文件
移除内联 style 标签(可能被 CSP 阻止), 使用 CSS 变量确保主题一致性 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9fe0a71 commit f254f3a

2 files changed

Lines changed: 45 additions & 53 deletions

File tree

_includes/breadcrumb.html

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -49,57 +49,4 @@
4949
{%- endfor -%}
5050
</ol>
5151
</nav>
52-
53-
<style>
54-
.breadcrumb-nav {
55-
padding: 1rem 0;
56-
margin-bottom: 1rem;
57-
border-bottom: 1px solid #e5e7eb;
58-
}
59-
60-
.breadcrumb-list {
61-
display: flex;
62-
flex-wrap: wrap;
63-
list-style: none;
64-
margin: 0;
65-
padding: 0;
66-
gap: 0.5rem;
67-
}
68-
69-
.breadcrumb-item {
70-
display: flex;
71-
align-items: center;
72-
font-size: 0.875rem;
73-
color: #6b7280;
74-
}
75-
76-
.breadcrumb-item a {
77-
color: #2563eb;
78-
text-decoration: none;
79-
transition: color 0.2s;
80-
}
81-
82-
.breadcrumb-item a:hover {
83-
color: #1d4ed8;
84-
text-decoration: underline;
85-
}
86-
87-
.breadcrumb-item:not(:last-child)::after {
88-
content: '/';
89-
margin-left: 0.5rem;
90-
color: #9ca3af;
91-
}
92-
93-
.breadcrumb-item:last-child {
94-
color: #1f2937;
95-
font-weight: 500;
96-
}
97-
98-
@media (max-width: 640px) {
99-
.breadcrumb-nav {
100-
padding: 0.75rem 0;
101-
font-size: 0.8125rem;
102-
}
103-
}
104-
</style>
10552
{%- endif -%}

_sass/_components.scss

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,51 @@
9393
margin-top: 16px;
9494
}
9595

96+
// Breadcrumb Navigation
97+
.breadcrumb-nav {
98+
padding: 16px 0;
99+
margin-bottom: 16px;
100+
border-bottom: 1px solid var(--divider-color);
101+
}
102+
103+
.breadcrumb-list {
104+
display: flex;
105+
flex-wrap: wrap;
106+
list-style: none;
107+
margin: 0;
108+
padding: 0;
109+
gap: 8px;
110+
}
111+
112+
.breadcrumb-item {
113+
display: flex;
114+
align-items: center;
115+
font-size: 14px;
116+
color: var(--text-secondary);
117+
118+
a {
119+
color: var(--accent-color);
120+
text-decoration: none;
121+
transition: color var(--transition);
122+
123+
&:hover {
124+
color: var(--text-primary);
125+
text-decoration: underline;
126+
}
127+
}
128+
129+
&:not(:last-child)::after {
130+
content: '/';
131+
margin-left: 8px;
132+
color: var(--text-tertiary);
133+
}
134+
135+
&:last-child {
136+
color: var(--text-primary);
137+
font-weight: 500;
138+
}
139+
}
140+
96141
// Buttons
97142
.btn {
98143
display: inline-flex;

0 commit comments

Comments
 (0)