Skip to content

add more standard html elements #554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 98 additions & 22 deletions src/idom/html.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
"""
**External sources**
**Dcument metadata**

- :func:`base`
- :func:`head`
- :func:`link`
- :func:`meta`
- :func:`style`
- :func:`title`

**Content sectioning**

**Content Sectioning**

- :func:`style`
- :func:`body`
- :func:`address`
- :func:`article`
- :func:`aside`
- :func:`footer`
- :func:`header`
- :func:`h1`
- :func:`h2`
- :func:`h3`
- :func:`h4`
- :func:`h5`
- :func:`h6`
- :func:`header`
- :func:`hgroup`
- :func:`main`
- :func:`nav`
- :func:`section`


**Text Content**
**Text content**

- :func:`blockquote`
- :func:`dd`
Expand All @@ -39,12 +42,13 @@
- :func:`pre`
- :func:`ul`


**Inline Text Semantics**
**Inline text semantics**

- :func:`a`
- :func:`abbr`
- :func:`b`
- :func:`bdi`
- :func:`bdo`
- :func:`br`
- :func:`cite`
- :func:`code`
Expand All @@ -54,6 +58,9 @@
- :func:`kbd`
- :func:`mark`
- :func:`q`
- :func:`rp`
- :func:`rt`
- :func:`ruby`
- :func:`s`
- :func:`samp`
- :func:`small`
Expand All @@ -64,17 +71,44 @@
- :func:`time`
- :func:`u`
- :func:`var`

- :func:`wbr`

**Image and video**

- :func:`img`
- :func:`area`
- :func:`audio`
- :func:`img`
- :func:`map`
- :func:`track`
- :func:`video`

**Embedded content**

- :func:`embed`
- :func:`iframe`
- :func:`object`
- :func:`param`
- :func:`picture`
- :func:`portal`
- :func:`source`

**SVG and MathML**

- :func:`svg`
- :func:`math`

**Scripting**

- :func:`canvas`
- :func:`noscript`
- :func:`script`

**Demarcating edits**

**Table Content**
- :func:`del_`
- :func:`ins`

**Table content**

- :func:`caption`
- :func:`col`
Expand All @@ -87,7 +121,6 @@
- :func:`thead`
- :func:`tr`


**Forms**

- :func:`button`
Expand All @@ -103,36 +136,45 @@
- :func:`select`
- :func:`textarea`


**Interactive Elements**
**Interactive elements**

- :func:`details`
- :func:`dialog`
- :func:`menu`
- :func:`menuitem`
- :func:`summary`

**Web components**

- :func:`slot`
- :func:`template`
"""

from .core.vdom import make_vdom_constructor


# External sources
link = make_vdom_constructor("link", allow_children=False)
# Dcument metadata
base = make_vdom_constructor("base")
head = make_vdom_constructor("head")
link = make_vdom_constructor("link")
meta = make_vdom_constructor("meta")
style = make_vdom_constructor("style")
title = make_vdom_constructor("title")

# Content sectioning
style = make_vdom_constructor("style")
body = make_vdom_constructor("body")
address = make_vdom_constructor("address")
article = make_vdom_constructor("article")
aside = make_vdom_constructor("aside")
footer = make_vdom_constructor("footer")
header = make_vdom_constructor("header")
h1 = make_vdom_constructor("h1")
h2 = make_vdom_constructor("h2")
h3 = make_vdom_constructor("h3")
h4 = make_vdom_constructor("h4")
h5 = make_vdom_constructor("h5")
h6 = make_vdom_constructor("h6")
header = make_vdom_constructor("header")
hgroup = make_vdom_constructor("hgroup")
main = make_vdom_constructor("main")
nav = make_vdom_constructor("nav")
section = make_vdom_constructor("section")

Expand All @@ -155,6 +197,8 @@
a = make_vdom_constructor("a")
abbr = make_vdom_constructor("abbr")
b = make_vdom_constructor("b")
bdi = make_vdom_constructor("bdi")
bdo = make_vdom_constructor("bdo")
br = make_vdom_constructor("br", allow_children=False)
cite = make_vdom_constructor("cite")
code = make_vdom_constructor("code")
Expand All @@ -164,6 +208,9 @@
kbd = make_vdom_constructor("kbd")
mark = make_vdom_constructor("mark")
q = make_vdom_constructor("q")
rp = make_vdom_constructor("rp")
rt = make_vdom_constructor("rt")
ruby = make_vdom_constructor("ruby")
s = make_vdom_constructor("s")
samp = make_vdom_constructor("samp")
small = make_vdom_constructor("small")
Expand All @@ -174,13 +221,38 @@
time = make_vdom_constructor("time")
u = make_vdom_constructor("u")
var = make_vdom_constructor("var")
wbr = make_vdom_constructor("wbr")

# Image and video
img = make_vdom_constructor("img", allow_children=False)
area = make_vdom_constructor("area", allow_children=False)
audio = make_vdom_constructor("audio")
img = make_vdom_constructor("img", allow_children=False)
map = make_vdom_constructor("map")
track = make_vdom_constructor("track")
video = make_vdom_constructor("video")

# Embedded content
embed = make_vdom_constructor("embed", allow_children=False)
iframe = make_vdom_constructor("iframe", allow_children=False)
object = make_vdom_constructor("object")
param = make_vdom_constructor("param")
picture = make_vdom_constructor("picture")
portal = make_vdom_constructor("portal", allow_children=False)
source = make_vdom_constructor("source", allow_children=False)

# SVG and MathML
svg = make_vdom_constructor("svg")
math = make_vdom_constructor("math")

# Scripting
canvas = make_vdom_constructor("canvas")
noscript = make_vdom_constructor("noscript")
script = make_vdom_constructor("script")

# Demarcating edits
del_ = make_vdom_constructor("del")
ins = make_vdom_constructor("ins")

# Table content
caption = make_vdom_constructor("caption")
col = make_vdom_constructor("col")
Expand Down Expand Up @@ -213,3 +285,7 @@
menu = make_vdom_constructor("menu")
menuitem = make_vdom_constructor("menuitem")
summary = make_vdom_constructor("summary")

# Web components
slot = make_vdom_constructor("slot")
template = make_vdom_constructor("template")