Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yawaramin committed Jan 24, 2024
1 parent 73c0fc3 commit 6f1d5e9
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .metals/metals.lock.db
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#FileLock
#Tue Jan 09 01:23:07 EST 2024
hostName=localhost
id=18ce603afa073ac2464bbb514f7dfbb031d2cbc0ad4
method=file
server=localhost\:50928
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"files.watcherExclude": {
"**/target": true
}
}
2 changes: 1 addition & 1 deletion dream-html/Dream_html/HTML/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>HTML (dream-html.Dream_html.HTML)</title><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.2"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a><a href="../../index.html">dream-html</a> &#x00BB; <a href="../index.html">Dream_html</a> &#x00BB; HTML</nav><header class="odoc-preamble"><h1>Module <code><span>Dream_html.HTML</span></code></h1><p>All standard HTML attributes and tags. Some attributes and tags have the same name, e.g. <code>style</code>. To disambiguate them, attributes have a <code>_</code> (underscore) suffix.</p></header><nav class="odoc-toc"><ul><li><a href="#attributes">Attributes</a></li><li><a href="#tags">Tags</a></li></ul></nav><div class="odoc-content"><h4 id="attributes"><a href="#attributes" class="anchor"></a>Attributes</h4><p>Standard, most non-deprecated attributes from <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes">https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes</a>. Where an attribute name conflicts with an OCaml keyword, the name is suffixed with <code>_</code>. Most attributes are constructed by passing in a value of some type.</p><p>All string-valued attributes allow formatting (interpolation):</p><pre class="language-ocaml"><code>div [id &quot;section-%d&quot; section_id] []</code></pre><p>Or plain strings:</p><pre class="language-ocaml"><code>p [id &quot;toast&quot;] []</code></pre><p>Most boolean attributes are plain values and don't need to be constructed with function calls:</p><pre class="language-ocaml"><code>input [required]</code></pre><p>However, boolean attributes which may be inherited and toggled on/off in children, are constructed by passing in a value:</p><pre class="language-ocaml"><code>div
[contenteditable true]
[p [] [txt &quot;Edit me!&quot;]; p [contenteditable false] [txt &quot;Can't edit me!&quot;]]</code></pre><p>Enumerated attributes accept specific values:</p><pre class="language-ocaml"><code>input [inputmode `tel]</code></pre><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 1.0.0.</li></ul><div class="odoc-spec"><div class="spec type anchored" id="type-enctype"><a href="#type-enctype" class="anchor"></a><code><span><span class="keyword">type</span> enctype</span><span> = </span><span>[ </span></code><ol><li id="type-enctype.urlencoded" class="def constructor anchored"><a href="#type-enctype.urlencoded" class="anchor"></a><code><span>| </span></code><code><span>`urlencoded</span></code></li><li id="type-enctype.formdata" class="def constructor anchored"><a href="#type-enctype.formdata" class="anchor"></a><code><span>| </span></code><code><span>`formdata</span></code></li><li id="type-enctype.text_plain" class="def constructor anchored"><a href="#type-enctype.text_plain" class="anchor"></a><code><span>| </span></code><code><span>`text_plain</span></code></li></ol><code><span> ]</span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-method_"><a href="#type-method_" class="anchor"></a><code><span><span class="keyword">type</span> method_</span><span> = </span><span>[ </span></code><ol><li id="type-method_.GET" class="def constructor anchored"><a href="#type-method_.GET" class="anchor"></a><code><span>| </span></code><code><span>`GET</span></code></li><li id="type-method_.POST" class="def constructor anchored"><a href="#type-method_.POST" class="anchor"></a><code><span>| </span></code><code><span>`POST</span></code></li></ol><code><span> ]</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-null_"><a href="#val-null_" class="anchor"></a><code><span><span class="keyword">val</span> null_ : <a href="../index.html#type-attr">attr</a></span></code></div><div class="spec-doc"><p>An attribute that will not be rendered in the markup. Useful for conditional logic where you sometimes want to render an attribute and sometimes not.</p><pre class="language-ocaml"><code>p[if should_show then null_ else style_ &quot;display:none&quot;][
[p [] [txt &quot;Edit me!&quot;]; p [contenteditable false] [txt &quot;Can't edit me!&quot;]]</code></pre><p>Enumerated attributes accept specific values:</p><pre class="language-ocaml"><code>input [inputmode `tel]</code></pre><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 1.0.0.</li></ul><div class="odoc-spec"><div class="spec type anchored" id="type-enctype"><a href="#type-enctype" class="anchor"></a><code><span><span class="keyword">type</span> enctype</span><span> = </span><span>[ </span></code><ol><li id="type-enctype.urlencoded" class="def constructor anchored"><a href="#type-enctype.urlencoded" class="anchor"></a><code><span>| </span></code><code><span>`urlencoded</span></code></li><li id="type-enctype.formdata" class="def constructor anchored"><a href="#type-enctype.formdata" class="anchor"></a><code><span>| </span></code><code><span>`formdata</span></code></li><li id="type-enctype.text_plain" class="def constructor anchored"><a href="#type-enctype.text_plain" class="anchor"></a><code><span>| </span></code><code><span>`text_plain</span></code></li></ol><code><span> ]</span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-method_"><a href="#type-method_" class="anchor"></a><code><span><span class="keyword">type</span> method_</span><span> = </span><span>[ </span></code><ol><li id="type-method_.GET" class="def constructor anchored"><a href="#type-method_.GET" class="anchor"></a><code><span>| </span></code><code><span>`GET</span></code></li><li id="type-method_.POST" class="def constructor anchored"><a href="#type-method_.POST" class="anchor"></a><code><span>| </span></code><code><span>`POST</span></code></li><li id="type-method_.dialog" class="def constructor anchored"><a href="#type-method_.dialog" class="anchor"></a><code><span>| </span></code><code><span>`dialog</span></code><div class="def-doc"><span class="comment-delim">(*</span><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 2.1.0</li></ul><span class="comment-delim">*)</span></div></li></ol><code><span> ]</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-null_"><a href="#val-null_" class="anchor"></a><code><span><span class="keyword">val</span> null_ : <a href="../index.html#type-attr">attr</a></span></code></div><div class="spec-doc"><p>An attribute that will not be rendered in the markup. Useful for conditional logic where you sometimes want to render an attribute and sometimes not.</p><pre class="language-ocaml"><code>p[if should_show then null_ else style_ &quot;display:none&quot;][
txt &quot;Show and tell&quot;]</code></pre></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-accept"><a href="#val-accept" class="anchor"></a><code><span><span class="keyword">val</span> accept : <span><span class="type-var">_</span> <a href="../index.html#type-string_attr">string_attr</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-accept_charset"><a href="#val-accept_charset" class="anchor"></a><code><span><span class="keyword">val</span> accept_charset : <span><span class="type-var">_</span> <a href="../index.html#type-string_attr">string_attr</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-accesskey"><a href="#val-accesskey" class="anchor"></a><code><span><span class="keyword">val</span> accesskey : <span><span class="type-var">_</span> <a href="../index.html#type-string_attr">string_attr</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-action"><a href="#val-action" class="anchor"></a><code><span><span class="keyword">val</span> action : <span><span class="type-var">_</span> <a href="../index.html#type-string_attr">string_attr</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-align"><a href="#val-align" class="anchor"></a><code><span><span class="keyword">val</span> align : <span><span class="type-var">_</span> <a href="../index.html#type-string_attr">string_attr</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-allow"><a href="#val-allow" class="anchor"></a><code><span><span class="keyword">val</span> allow : <span><span class="type-var">_</span> <a href="../index.html#type-string_attr">string_attr</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-alt"><a href="#val-alt" class="anchor"></a><code><span><span class="keyword">val</span> alt : <span><span class="type-var">_</span> <a href="../index.html#type-string_attr">string_attr</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-async"><a href="#val-async" class="anchor"></a><code><span><span class="keyword">val</span> async : <a href="../index.html#type-attr">attr</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-autocapitalize"><a href="#val-autocapitalize" class="anchor"></a><code><span><span class="keyword">val</span> autocapitalize :
<span><span>[&lt; `off <span>| `none</span> <span>| `on</span> <span>| `sentences</span> <span>| `words</span> <span>| `characters</span> ]</span> <a href="../index.html#type-to_attr">to_attr</a></span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-autocomplete"><a href="#val-autocomplete" class="anchor"></a><code><span><span class="keyword">val</span> autocomplete :
<span><span>[&lt; `off
Expand Down
Loading

0 comments on commit 6f1d5e9

Please sign in to comment.