Skip to content

Commit d64e793

Browse files
committed
feat: 更新blog 样式
1 parent 28b0278 commit d64e793

File tree

1 file changed

+28
-59
lines changed

1 file changed

+28
-59
lines changed

tailwind.config.ts

Lines changed: 28 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ const config = {
7777
color: theme('colors.red.500'),
7878
padding: theme('spacing.1'),
7979
borderRadius: theme('borderRadius.sm'),
80-
fontWeight: theme('fontWeight.medium')
80+
fontWeight: theme('fontWeight.medium'),
81+
wordBreak: 'break-all'
8182
},
8283
'code::before': {
8384
content: '""'
@@ -158,12 +159,32 @@ const config = {
158159

159160
// Quotes
160161
blockquote: {
161-
paddingLeft: theme('spacing.6'),
162-
borderLeftWidth: theme('borderWidth.2'),
163-
borderLeftColor: 'var(--tw-prose-quote-borders)',
164-
fontStyle: 'italic'
162+
borderLeft: '4px solid #8b5cf6', // 紫色边框
163+
backgroundColor: '#f5f3ff', // 浅紫色背景
164+
padding: '1rem 1.5rem',
165+
margin: '1.5rem 0',
166+
borderRadius: '0.375rem', // 圆角
167+
boxShadow:
168+
'0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)', // 轻微阴影
169+
fontStyle: 'italic',
170+
color: '#4c1d95', // 深紫色文字
171+
'& p:first-of-type::before': {
172+
content: '"\u201C"', // 左引号
173+
fontSize: '2em',
174+
lineHeight: '0.1em',
175+
marginRight: '0.25em',
176+
verticalAlign: '-0.4em',
177+
color: '#8b5cf6' // 紫色引号
178+
},
179+
'& p:last-of-type::after': {
180+
content: '"\u201D"', // 右引号
181+
fontSize: '2em',
182+
lineHeight: '0.1em',
183+
marginLeft: '0.25em',
184+
verticalAlign: '-0.4em',
185+
color: '#8b5cf6' // 紫色引号
186+
}
165187
},
166-
167188
// Figures
168189
figcaption: {
169190
color: 'var(--tw-prose-captions)',
@@ -311,62 +332,10 @@ const config = {
311332
DEFAULT: 'hsl(var(--card))',
312333
foreground: 'hsl(var(--card-foreground))'
313334
}
314-
},
315-
borderRadius: {
316-
lg: 'var(--radius)',
317-
md: 'calc(var(--radius) - 2px)',
318-
sm: 'calc(var(--radius) - 4px)'
319-
},
320-
keyframes: {
321-
'accordion-down': {
322-
from: { height: '0' },
323-
to: { height: 'var(--radix-accordion-content-height)' }
324-
},
325-
'accordion-up': {
326-
from: { height: 'var(--radix-accordion-content-height)' },
327-
to: { height: '0' }
328-
}
329-
},
330-
extend: {
331-
aspectRatio: {
332-
'4/3': '4 / 3'
333-
}
334-
},
335-
animation: {
336-
'accordion-down': 'accordion-down 0.2s ease-out',
337-
'accordion-up': 'accordion-up 0.2s ease-out'
338335
}
339336
}
340337
},
341-
safelist: [
342-
{
343-
pattern:
344-
/^(bg-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,
345-
variants: ['hover', 'ui-selected']
346-
},
347-
{
348-
pattern:
349-
/^(text-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,
350-
variants: ['hover', 'ui-selected']
351-
},
352-
{
353-
pattern:
354-
/^(border-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/,
355-
variants: ['hover', 'ui-selected']
356-
},
357-
{
358-
pattern:
359-
/^(ring-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/
360-
},
361-
{
362-
pattern:
363-
/^(stroke-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/
364-
},
365-
{
366-
pattern:
367-
/^(fill-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950))$/
368-
}
369-
],
338+
370339
plugins: [
371340
require('tailwindcss-animate'),
372341
require('@tailwindcss/forms'),

0 commit comments

Comments
 (0)