-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4995aa4
commit 229e950
Showing
10 changed files
with
33 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<html lang="en"><head><title>About Hox</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta content="Hox Documentation" property="og:site_name"><meta content="Hox was inspired by the JS ecosystem, here's a short text explaining the motivation behind Hox." name="og:description"><meta content="About Hox" property="og:title"><meta content="website" property="og:type"><style>:root { | ||
<html lang="en"><head><title>About Hox</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta property="og:site_name" content="Hox Documentation"><meta content="Hox was inspired by the JS ecosystem, here's a short text explaining the motivation behind Hox." name="og:description"><meta property="og:title" content="About Hox"><meta property="og:type" content="website"><style>:root { | ||
--hox-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | ||
--hox-font-size: 16px; | ||
|
@@ -36,7 +36,7 @@ | |
--hox-card-box-shadow: 0 5px 5px 4px rgba(199, 156, 76, 0.5), | ||
0 4px 4px 0 rgba(199, 156, 76, 0.4); | ||
} | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymouys" async=""></script><script type="importmap">{ | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script crossorigin="anonymouys" src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" async=""></script><script type="importmap">{ | ||
"imports": { | ||
"hox": "/assets/script.js", | ||
"highlight.js": "https://ga.jspm.io/npm:[email protected]/es/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<html lang="en"><head><title>C# and VB.NET</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta content="Hox Documentation" property="og:site_name"><meta content="Hox can be used from C# and VB.NET." name="og:description"><meta content="C# and VB.NET" property="og:title"><meta content="website" property="og:type"><style>:root { | ||
<html lang="en"><head><title>C# and VB.NET</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta property="og:site_name" content="Hox Documentation"><meta content="Hox can be used from C# and VB.NET." name="og:description"><meta property="og:title" content="C# and VB.NET"><meta property="og:type" content="website"><style>:root { | ||
--hox-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | ||
--hox-font-size: 16px; | ||
|
@@ -36,7 +36,7 @@ | |
--hox-card-box-shadow: 0 5px 5px 4px rgba(199, 156, 76, 0.5), | ||
0 4px 4px 0 rgba(199, 156, 76, 0.4); | ||
} | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymouys" async=""></script><script type="importmap">{ | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script crossorigin="anonymouys" src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" async=""></script><script type="importmap">{ | ||
"imports": { | ||
"hox": "/assets/script.js", | ||
"highlight.js": "https://ga.jspm.io/npm:[email protected]/es/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<html lang="en"><head><title>Declarative Shadow DOM</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta content="Hox Documentation" property="og:site_name"><meta content="How to render declarative shadow DOM with Hox and the built-ins for that." name="og:description"><meta content="Declarative Shadow DOM" property="og:title"><meta content="website" property="og:type"><style>:root { | ||
<html lang="en"><head><title>Declarative Shadow DOM</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta property="og:site_name" content="Hox Documentation"><meta content="How to render declarative shadow DOM with Hox and the built-ins for that." name="og:description"><meta property="og:title" content="Declarative Shadow DOM"><meta property="og:type" content="website"><style>:root { | ||
--hox-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | ||
--hox-font-size: 16px; | ||
|
@@ -36,7 +36,7 @@ | |
--hox-card-box-shadow: 0 5px 5px 4px rgba(199, 156, 76, 0.5), | ||
0 4px 4px 0 rgba(199, 156, 76, 0.4); | ||
} | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymouys" async=""></script><script type="importmap">{ | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script crossorigin="anonymouys" src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" async=""></script><script type="importmap">{ | ||
"imports": { | ||
"hox": "/assets/script.js", | ||
"highlight.js": "https://ga.jspm.io/npm:[email protected]/es/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<html lang="en"><head><title>Usage</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta content="Hox Documentation" property="og:site_name"><meta content="How to use render and create Hox nodes to use in your application." name="og:description"><meta content="Usage" property="og:title"><meta content="website" property="og:type"><style>:root { | ||
<html lang="en"><head><title>Usage</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta property="og:site_name" content="Hox Documentation"><meta content="How to use render and create Hox nodes to use in your application." name="og:description"><meta property="og:title" content="Usage"><meta property="og:type" content="website"><style>:root { | ||
--hox-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | ||
--hox-font-size: 16px; | ||
|
@@ -36,7 +36,7 @@ | |
--hox-card-box-shadow: 0 5px 5px 4px rgba(199, 156, 76, 0.5), | ||
0 4px 4px 0 rgba(199, 156, 76, 0.4); | ||
} | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymouys" async=""></script><script type="importmap">{ | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script crossorigin="anonymouys" src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" async=""></script><script type="importmap">{ | ||
"imports": { | ||
"hox": "/assets/script.js", | ||
"highlight.js": "https://ga.jspm.io/npm:[email protected]/es/index.js", | ||
|
@@ -141,13 +141,14 @@ <h3 id="attributes">Attributes</h3> | |
let combined = h("div#main.is-primary[data-name=main]", h("span", "Hello World")) | ||
</code></pre> | ||
<p>The syntax is as follows:</p> | ||
<p><code><element-name><#id><.class><[attribute=value]>...</code></p> | ||
<p><code><element-name><#id><.class><[attribute=value]>'> <element-definition>'...</code></p> | ||
<p>Where:</p> | ||
<ul> | ||
<li><code>element-name</code> is the name of the element, element names should follow the HTML spec to define tag names.</li> | ||
<li><code>#id</code> is specified with a <code>#</code> followed by the value of said id, if more than one id attribute is present only the first one will be picked up.</li> | ||
<li><code>.class</code> is specified with a <code>.</code> followed by the value of said class.</li> | ||
<li><code>[attribute=value]</code> is specified with a <code>[</code> followed by the name of the attribute, followed by a required <code>=</code> even for no-value atributes (like <code>checked</code>), after te <code>=</code> symbol anything will be taken as the string until a <code>]</code> is found, even break line characters.</li> | ||
<li><code>> <element-definition></code> child element definition</li> | ||
</ul> | ||
<p>You can specify attributes in any order or with spaces and break lines in between the attribute declarations, example:</p> | ||
<ul> | ||
|
@@ -157,6 +158,17 @@ <h3 id="attributes">Attributes</h3> | |
<p>Those examples above are equivalent and will produce the following structure</p> | ||
<pre><code class="language-html"><div id="main" class="is-primary"></div> | ||
</code></pre> | ||
<p>For the case of children:</p> | ||
<ul> | ||
<li><code>div#main.is-primary > button.is-danger > span.is-large</code></li> | ||
</ul> | ||
<p>Will produce the following structure</p> | ||
<pre><code class="language-html"><div id="main" class="is-primary"> | ||
<button class="is-danger"> | ||
<span class="is-large"></span> | ||
</button> | ||
</div> | ||
</code></pre> | ||
<p>Attributes will always render in the following order "id", "class" and the rest in the order they were specified, as an example:</p> | ||
<pre><code class="language-fsharp">open Hox | ||
let node = | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<html lang="en"><head><title>Render Others With Hox</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta content="Hox Documentation" property="og:site_name"><meta content="How to write a small interop layer to render other DSLs with Hox." name="og:description"><meta content="Render Others With Hox" property="og:title"><meta content="website" property="og:type"><style>:root { | ||
<html lang="en"><head><title>Render Others With Hox</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta property="og:site_name" content="Hox Documentation"><meta content="How to write a small interop layer to render other DSLs with Hox." name="og:description"><meta property="og:title" content="Render Others With Hox"><meta property="og:type" content="website"><style>:root { | ||
--hox-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | ||
--hox-font-size: 16px; | ||
|
@@ -36,7 +36,7 @@ | |
--hox-card-box-shadow: 0 5px 5px 4px rgba(199, 156, 76, 0.5), | ||
0 4px 4px 0 rgba(199, 156, 76, 0.4); | ||
} | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymouys" async=""></script><script type="importmap">{ | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script crossorigin="anonymouys" src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" async=""></script><script type="importmap">{ | ||
"imports": { | ||
"hox": "/assets/script.js", | ||
"highlight.js": "https://ga.jspm.io/npm:[email protected]/es/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<html lang="en"><head><title>Using Feliz</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta content="Hox Documentation" property="og:site_name"><meta content="F# Users rejoice! Hox can be used with Feliz." name="og:description"><meta content="Using Feliz" property="og:title"><meta content="website" property="og:type"><style>:root { | ||
<html lang="en"><head><title>Using Feliz</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta property="og:site_name" content="Hox Documentation"><meta content="F# Users rejoice! Hox can be used with Feliz." name="og:description"><meta property="og:title" content="Using Feliz"><meta property="og:type" content="website"><style>:root { | ||
--hox-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | ||
--hox-font-size: 16px; | ||
|
@@ -36,7 +36,7 @@ | |
--hox-card-box-shadow: 0 5px 5px 4px rgba(199, 156, 76, 0.5), | ||
0 4px 4px 0 rgba(199, 156, 76, 0.4); | ||
} | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymouys" async=""></script><script type="importmap">{ | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script crossorigin="anonymouys" src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" async=""></script><script type="importmap">{ | ||
"imports": { | ||
"hox": "/assets/script.js", | ||
"highlight.js": "https://ga.jspm.io/npm:[email protected]/es/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<html lang="en"><head><title>Write Your Own DSL</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta content="Hox Documentation" property="og:site_name"><meta content="Hox is more than just an HTML DSL, it has a set of primitives that can be used to write your own DSL." name="og:description"><meta content="Write Your Own DSL" property="og:title"><meta content="website" property="og:type"><style>:root { | ||
<html lang="en"><head><title>Write Your Own DSL</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta property="og:site_name" content="Hox Documentation"><meta content="Hox is more than just an HTML DSL, it has a set of primitives that can be used to write your own DSL." name="og:description"><meta property="og:title" content="Write Your Own DSL"><meta property="og:type" content="website"><style>:root { | ||
--hox-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | ||
--hox-font-size: 16px; | ||
|
@@ -36,7 +36,7 @@ | |
--hox-card-box-shadow: 0 5px 5px 4px rgba(199, 156, 76, 0.5), | ||
0 4px 4px 0 rgba(199, 156, 76, 0.4); | ||
} | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymouys" async=""></script><script type="importmap">{ | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script crossorigin="anonymouys" src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" async=""></script><script type="importmap">{ | ||
"imports": { | ||
"hox": "/assets/script.js", | ||
"highlight.js": "https://ga.jspm.io/npm:[email protected]/es/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<html lang="en"><head><title>Hox</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta content="Hox Documentation" property="og:site_name"><meta content="Hox, An Async HTML Rendering Library for the .NET Ecosystem" name="og:description"><meta content="Hox" property="og:title"><meta content="website" property="og:type"><style>:root { | ||
<html lang="en"><head><title>Hox</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta property="og:site_name" content="Hox Documentation"><meta content="Hox, An Async HTML Rendering Library for the .NET Ecosystem" name="og:description"><meta property="og:title" content="Hox"><meta property="og:type" content="website"><style>:root { | ||
--hox-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | ||
--hox-font-size: 16px; | ||
|
@@ -36,7 +36,7 @@ | |
--hox-card-box-shadow: 0 5px 5px 4px rgba(199, 156, 76, 0.5), | ||
0 4px 4px 0 rgba(199, 156, 76, 0.4); | ||
} | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><link rel="stylesheet" href="/assets/index.css"><base href="/"><script src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymouys" async=""></script><script type="importmap">{ | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><link rel="stylesheet" href="/assets/index.css"><base href="/"><script crossorigin="anonymouys" src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" async=""></script><script type="importmap">{ | ||
"imports": { | ||
"hox": "/assets/script.js", | ||
"highlight.js": "https://ga.jspm.io/npm:[email protected]/es/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<html lang="en"><head><title>Nodes</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta content="Hox Documentation" property="og:site_name"><meta content="Let's talk about nodes, part of the Hox's core." name="og:description"><meta content="Nodes" property="og:title"><meta content="website" property="og:type"><style>:root { | ||
<html lang="en"><head><title>Nodes</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta property="og:site_name" content="Hox Documentation"><meta content="Let's talk about nodes, part of the Hox's core." name="og:description"><meta property="og:title" content="Nodes"><meta property="og:type" content="website"><style>:root { | ||
--hox-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | ||
--hox-font-size: 16px; | ||
|
@@ -36,7 +36,7 @@ | |
--hox-card-box-shadow: 0 5px 5px 4px rgba(199, 156, 76, 0.5), | ||
0 4px 4px 0 rgba(199, 156, 76, 0.4); | ||
} | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymouys" async=""></script><script type="importmap">{ | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script crossorigin="anonymouys" src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" async=""></script><script type="importmap">{ | ||
"imports": { | ||
"hox": "/assets/script.js", | ||
"highlight.js": "https://ga.jspm.io/npm:[email protected]/es/index.js", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<html lang="en"><head><title>Rendering</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta content="Hox Documentation" property="og:site_name"><meta content="Let's talk in detail about Hox's rendering." name="og:description"><meta content="Rendering" property="og:title"><meta content="website" property="og:type"><style>:root { | ||
<html lang="en"><head><title>Rendering</title><meta content="width=device-width,initial-scale=1" name="viewport"><meta property="og:site_name" content="Hox Documentation"><meta content="Let's talk in detail about Hox's rendering." name="og:description"><meta property="og:title" content="Rendering"><meta property="og:type" content="website"><style>:root { | ||
--hox-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; | ||
--hox-font-size: 16px; | ||
|
@@ -36,7 +36,7 @@ | |
--hox-card-box-shadow: 0 5px 5px 4px rgba(199, 156, 76, 0.5), | ||
0 4px 4px 0 rgba(199, 156, 76, 0.4); | ||
} | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" crossorigin="anonymouys" async=""></script><script type="importmap">{ | ||
}</style><link rel="stylesheet" href="/assets/styles.css"><link rel="stylesheet" href="/assets/links.css"><base href="/"><script crossorigin="anonymouys" src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" async=""></script><script type="importmap">{ | ||
"imports": { | ||
"hox": "/assets/script.js", | ||
"highlight.js": "https://ga.jspm.io/npm:[email protected]/es/index.js", | ||
|