Skip to content

Commit 3a32dd8

Browse files
committed
feat: update subtitle, GitHub links, improve styles, add demo links to README
1 parent 9b1ff34 commit 3a32dd8

3 files changed

Lines changed: 29 additions & 16 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
<img src="https://img.shields.io/npm/v/@tombcato/smart-ticker?color=cb3837&logo=npm" alt="npm" />
2121
</p>
2222

23+
<p align="center">
24+
<a href="https://tombcato.github.io/smart-ticker/">📺 官网演示</a> ·
25+
<a href="https://www.npmjs.com/package/@tombcato/smart-ticker">📥 NPM</a>
26+
</p>
27+
2328
## ✨ 特性
2429

2530
- **智能差异动画** - 只有变化的字符会滚动,相同的字符保持静止

src/App.css

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,23 +169,31 @@ body {
169169
}
170170

171171
.hero-subtitle {
172-
font-size: 0.9rem;
173-
color: var(--accent);
172+
font-size: 0.85rem;
173+
color: var(--text-muted);
174174
margin-bottom: 1.5rem;
175-
font-weight: 600;
176-
letter-spacing: 1px;
177-
text-transform: uppercase;
178-
display: flex;
175+
font-weight: 500;
176+
letter-spacing: 0.5px;
177+
display: inline-flex;
179178
align-items: center;
180179
justify-content: center;
181-
gap: 0.5rem;
180+
gap: 0.4rem;
181+
text-decoration: none;
182+
transition: color 0.2s;
182183
}
183184

184-
.hero-subtitle span {
185-
background: var(--accent-glow);
186-
padding: 0.3rem 0.8rem;
187-
border-radius: 20px;
188-
border: 1px solid rgba(99, 102, 241, 0.2);
185+
.hero-subtitle:hover {
186+
color: var(--accent);
187+
}
188+
189+
.hero-subtitle .arrow-icon {
190+
opacity: 0.5;
191+
transition: opacity 0.2s, transform 0.2s;
192+
}
193+
194+
.hero-subtitle:hover .arrow-icon {
195+
opacity: 1;
196+
transform: translate(2px, -2px);
189197
}
190198

191199
.github-badge {

src/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function App() {
7979
const t = {
8080
zh: {
8181
title: 'SmartTicker',
82-
subtitle: '基于 Levenshtein diff 算法的高性能文本滚动组件,支持React/Vue',
82+
subtitle: '高性能智能文本差异滚动组件,支持React/Vue',
8383
price: '价格',
8484
duration: '动画时长',
8585
width: '字符宽度',
@@ -128,7 +128,7 @@ function App() {
128128
},
129129
en: {
130130
title: 'SmartTicker',
131-
subtitle: 'High-performance text scrolling based on Levenshtein Diff, supports React/Vue',
131+
subtitle: 'High-performance smart text diff scroller for React/Vue',
132132
price: 'Price',
133133
duration: 'Duration',
134134
width: 'Char Width',
@@ -261,7 +261,7 @@ function App() {
261261
</svg>
262262
</a>
263263

264-
<a href="https://github.com/yourusername/smart-ticker" className="icon-btn" target="_blank" title="View on GitHub">
264+
<a href="https://github.com/tombcato/smart-ticker" className="icon-btn" target="_blank" title="View on GitHub">
265265
<svg height="20" viewBox="0 0 16 16" version="1.1" width="20" aria-hidden="true" fill="currentColor">
266266
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
267267
</svg>
@@ -273,7 +273,7 @@ function App() {
273273

274274
{/* 实时价格展示 - 核心 Hero */}
275275
<div className="price-hero">
276-
<a href="#" className="hero-subtitle subtitle-link">
276+
<a href="https://github.com/tombcato/smart-ticker" className="hero-subtitle subtitle-link" target="_blank">
277277
<span>{t.subtitle}</span>
278278
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="arrow-icon">
279279
<line x1="7" y1="17" x2="17" y2="7"></line>

0 commit comments

Comments
 (0)