effb96537a
Thanks to @brunoprietog for advice https://github.com/basecamp/fizzy/pull/1927/files/9639e07ab88f628f5f37ad2aa9acee2b86d4fb1a#diff-24a46f2ca97f2964d4d8940123b7f76578694567df84256f576aa4bee221179e
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
<%= tag.div \
|
|
id: dom_id(card, "bubble"),
|
|
hidden: true,
|
|
class: "bubble",
|
|
data: {
|
|
controller: "bubble",
|
|
action: "turbo:morph-element->bubble#update:self",
|
|
bubble_entropy_value: entropy_bubble_options_for(card).to_json,
|
|
bubble_stalled_value: stalled_bubble_options_for(card)&.to_json
|
|
} do %>
|
|
|
|
<svg viewBox="0 0 200 100">
|
|
<path id="<%= dom_id(card, "bubble-top-half") %>" fill="transparent" d="M 20,100 A 80,80 0 0,1 180,100"/>
|
|
<text text-anchor="middle" fill="currentColor">
|
|
<textPath href="#<%= dom_id(card, "bubble-top-half") %>" startOffset="50%" dominant-baseline="middle" data-bubble-target="top"></textPath>
|
|
</text>
|
|
</svg>
|
|
|
|
<span class="bubble__number" data-bubble-target="center"></span>
|
|
|
|
<svg viewBox="0 0 200 100">
|
|
<path id="<%= dom_id(card, "bubble-bottom-half") %>" d="M 20,0 A 80,80 0 0,0 180,0" fill="transparent"/>
|
|
<text text-anchor="middle" fill="currentColor">
|
|
<textPath href="#<%= dom_id(card, "bubble-bottom-half") %>" startOffset="50%" dominant-baseline="middle" data-bubble-target="bottom"></textPath>
|
|
</text>
|
|
</svg>
|
|
<% end %>
|