Skip to main content

SPINNER_SVG

Constant SPINNER_SVG 

Source
pub const SPINNER_SVG: &str = r#"<svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="yggSpinnerGrad"><stop offset="0%" stop-color="currentColor" stop-opacity="1"/><stop offset="100%" stop-color="currentColor" stop-opacity="0.25"/></linearGradient></defs><style>@keyframes yggSpin { to { transform: rotate(360deg); } } .ygg-spinner-circle { transform-origin: 50% 50%; stroke: url(#yggSpinnerGrad); fill: none; animation: yggSpin .5s infinite linear; }</style><circle cx="10" cy="10" r="8" class="ygg-spinner-circle" stroke-width="2"/></svg>"#;
Expand description

行内加载 spinner:环形渐变 + 自旋动画,用 currentColor 继承文字色。

内联 SVG(含 @keyframes),通过 dangerous_inner_html 注入;尺寸由外层 Tailwind 类(如 w-3.5 h-3.5)控制。源文件 public/icons/90-ring-with-gradient.svg