From 678ab6bf84f97973861fd0135278427be15c581c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Tue, 14 May 2024 16:28:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20HTML5=20=E8=AF=AD=E4=B9=89?= =?UTF-8?q?=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.js | 214 +++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 215 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 341326f..ecbb4f9 100644 --- a/main.js +++ b/main.js @@ -15,6 +15,220 @@ export function createElement({ innerText, innerHTML, textContent, readOnly, chi return element } +/* HTML5 语义标签 */ +export function Header(options) { + return createElement(options, 'header') +} + +export function Nav(options) { + return createElement(options, 'nav') +} + +export function Main(options) { + return createElement(options, 'main') +} + +export function Article(options) { + return createElement(options, 'article') +} + +export function Section(options) { + return createElement(options, 'section') +} + +export function Aside(options) { + return createElement(options, 'aside') +} + +export function Footer(options) { + return createElement(options, 'footer') +} + +export function H1(options) { + return createElement(options, 'h1') +} + +export function H2(options) { + return createElement(options, 'h2') +} + +export function H3(options) { + return createElement(options, 'h3') +} + +export function H4(options) { + return createElement(options, 'h4') +} + +export function H5(options) { + return createElement(options, 'h5') +} + +export function H6(options) { + return createElement(options, 'h6') +} + +export function P(options) { + return createElement(options, 'p') +} + +export function A(options) { + return createElement(options, 'a') +} + +export function Strong(options) { + return createElement(options, 'strong') +} + +export function Em(options) { + return createElement(options, 'em') +} + +export function Small(options) { + return createElement(options, 'small') +} + +export function Mark(options) { + return createElement(options, 'mark') +} + +export function Del(options) { + return createElement(options, 'del') +} + +export function Ins(options) { + return createElement(options, 'ins') +} + +export function Pre(options) { + return createElement(options, 'pre') +} + +export function Code(options) { + return createElement(options, 'code') +} + +export function Blockquote(options) { + return createElement(options, 'blockquote') +} + +export function Q(options) { + return createElement(options, 'q') +} + +export function Cite(options) { + return createElement(options, 'cite') +} + +export function Br(options) { + return createElement(options, 'br') +} + +export function Hr(options) { + return createElement(options, 'hr') +} + +export function Ol(options) { + return createElement(options, 'ol') +} + +export function Ul(options) { + return createElement(options, 'ul') +} + +export function Li(options) { + return createElement(options, 'li') +} + +export function Dl(options) { + return createElement(options, 'dl') +} + +export function Dt(options) { + return createElement(options, 'dt') +} + +export function Dd(options) { + return createElement(options, 'dd') +} + +export function Figure(options) { + return createElement(options, 'figure') +} + +export function Figcaption(options) { + return createElement(options, 'figcaption') +} + +export function Div(options) { + return createElement(options, 'div') +} + +export function Table(options) { + return createElement(options, 'table') +} + +export function Caption(options) { + return createElement(options, 'caption') +} + +export function Thead(options) { + return createElement(options, 'thead') +} + +export function Tfoot(options) { + return createElement(options, 'tfoot') +} + +export function Tbody(options) { + return createElement(options, 'tbody') +} + +export function Tr(options) { + return createElement(options, 'tr') +} + +export function Th(options) { + return createElement(options, 'th') +} + +export function Td(options) { + return createElement(options, 'td') +} + +export function Col(options) { + return createElement(options, 'col') +} + +export function Colgroup(options) { + return createElement(options, 'colgroup') +} + +export function Td(options) { + return createElement(options, 'td') +} + +export function Th(options) { + return createElement(options, 'th') +} + +export function Thead(options) { + return createElement(options, 'thead') +} + +export function Tfoot(options) { + return createElement(options, 'tfoot') +} + +export function Tbody(options) { + return createElement(options, 'tbody') +} + +export function Tr(options) { + return createElement(options, 'tr') +} + +/* 扩展标签 */ export function List(options) { return createElement(options, 'ul') } diff --git a/package.json b/package.json index 9fae818..f04bdce 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@laniakeasupercluster/widgets", "description": "A simple widgets tracker", - "version": "1.0.1", + "version": "1.0.2", "type": "module", "main": "main.js", "author": "Laniakea Supercluster ",