File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11class Shared::Spinner < BaseComponent
22 needs text : String
3+ needs width : String ?
34
45 def render
56 div class: " f-col align-items:center" do
6- img(
7+ opts = {
78 class: " htmx-indicator" ,
8- src: asset(" svgs/spinning-circles.svg" ),
9- alt: text
10- )
9+ src: asset(" svgs/spinning-circles.svg" ),
10+ alt: text,
11+ }
12+
13+ if width
14+ opts = opts.merge(style: " width: #{ width } ;" )
15+ end
16+
17+ p! opts
18+
19+ img(opts)
1120 end
1221 end
1322end
Original file line number Diff line number Diff line change @@ -9,7 +9,12 @@ class Home::IndexPage < MainLayout
99 hx_get: Home ::Htmx ::CrystalLatestRelease .path_without_query_params,
1010 hx_swap: " outerHTML" ,
1111 ) do
12- mount Shared ::Spinner , text: " 获取最新版本..."
12+ a href: " " do
13+ span class: " f-row align-items:center" do
14+ text " Latest release:"
15+ mount Shared ::Spinner , text: " 获取最新版本..." , width: " 10px"
16+ end
17+ end
1318 end
1419
1520 tag(
You can’t perform that action at this time.
0 commit comments