mirror of
https://github.com/vim/vim.git
synced 2026-10-29 13:15:53 +01:00
closes: #20874 Signed-off-by: Brian Carbone <brian@briancarbone.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
49 lines
1.4 KiB
Plaintext
49 lines
1.4 KiB
Plaintext
<!doctype html>
|
|
<!-- html mode: tags, attributes, embedded languages -->
|
|
import { formatPrice } from "./util"
|
|
static const VERSION = 1
|
|
|
|
<style/styles>
|
|
.price { color: green }
|
|
</style>
|
|
<let/count=1/>
|
|
<const/[width, , ...dims]=box/>
|
|
<div.card#main class="cart" total:=sum ...rest ...(a ? b : c)>
|
|
<if=tag === "select" || count > 0>
|
|
<my-button size="lg" onClick=(e) => buy(e)>${count + 1}</my-button>
|
|
</if>
|
|
<else-if=fallback ?? choices/>
|
|
<for|item, index| of=items>
|
|
<span>${formatPrice(item.price)}</span>
|
|
</for>
|
|
<generic-list<Config<string>> a=1/>
|
|
<${dynamicTag} title="dynamic">body</${dynamicTag}>
|
|
</div>
|
|
<link
|
|
rel="canonical"
|
|
href=translated
|
|
? localizeUrl(url, { locale }).href
|
|
: baseHref
|
|
>
|
|
<audio-player ratio=total / count volume=Math.max(
|
|
0,
|
|
settings.findIndex((s) => s.active),
|
|
)/>
|
|
<h${size} id:scoped>heading</>
|
|
<${"hello"}-world/>
|
|
<badge#item-${id}.tone-${kind} café="façade" x=`a${`b ${c}`}d`/>
|
|
<form onSubmit<T>(e) { go<T>(e) } action(a, b) msg="say \"hi\""/>
|
|
<effect() { cleanup() }>body prose</effect>
|
|
<await(promise)>
|
|
<@then|result|>${result}</@then>
|
|
</await>
|
|
<macro renderPrice|amount|>${formatPrice(amount)}</macro>
|
|
<div
|
|
class="multiline"
|
|
data-x=1
|
|
>text with & entity and \${an escaped placeholder}</div>
|
|
<textarea rows=3>literal <b>text</b> with ${count}</textarea>
|
|
<script>
|
|
const el = document.querySelector(".price");
|
|
</script>
|