open Spring

fun products ->

<div id=div1 
    class="abc ccc aaa" 
    disabled 
    { Ohtml.attribute ~name:"hx-swap" ~value:"outerHTML" }
    get=@{if true then "/products" else "/index"} 
		hx-sse=@"connect:/news_update">
  Hello 
  <span>world!</span>
	<h2>Products for sale</h2>
  <ol>
  { List.iter (fun product ->
			<li>
				@{if product = "apple" then "red apple" else product}
				<span>@product<text> hello</text>
				@product</span>
			</li>
    ) products
  }
  </ol>
</div>
