-
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.
Implement web components integration for <rg-tag>
- Loading branch information
1 parent
64aa398
commit 05d4138
Showing
8 changed files
with
165 additions
and
34 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,24 +1,97 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="icon" type="image/svg+xml" href="{{ path '/favicon/favicon.svg' }}"> | ||
<link rel="icon" type="image/png" href="{{ path '/favicon/favicon.png' }}"> | ||
<link rel="stylesheet" href="{{ path '/css/reactive-graph.css' }}"> | ||
<title>Preview</title> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="icon" type="image/svg+xml" href="{{ path '/favicon/favicon.svg' }}"> | ||
<link rel="icon" type="image/png" href="{{ path '/favicon/favicon.png' }}"> | ||
<link rel="stylesheet" href="{{ path '/css/reactive-graph.css' }}"> | ||
<title>Preview</title> | ||
<link rel="preload" href="{{ path '/reactive-graph-design_bg.wasm' }}" crossorigin="anonymous" as="fetch" type="application/wasm"> | ||
<link rel="modulepreload" href="{{ path '/reactive-graph-design.js' }}" crossorigin="anonymous"> | ||
</head> | ||
<body> | ||
<main> | ||
<main> | ||
<details open> | ||
<summary> | ||
<span class="font-black"><p> | ||
{{#if _target.context.renderAsCss}}CSS Styled{{/if}} | ||
{{#if _target.context.renderAsWebComponents}}Web Components{{/if}} | ||
</span> | ||
</summary> | ||
<p>This is a {{{ yield }}} tag</p> | ||
</details> | ||
<details open> | ||
<summary> | ||
<span class="font-black"><h6> | ||
{{#if _target.context.renderAsCss}}CSS Styled{{/if}} | ||
{{#if _target.context.renderAsWebComponents}}Web Components{{/if}} | ||
</span> | ||
</summary> | ||
<h6>This is a {{{ yield }}} tag</h6> | ||
</details> | ||
<details open> | ||
<summary> | ||
<span class="font-black"><h5> | ||
{{#if _target.context.renderAsCss}}CSS Styled{{/if}} | ||
{{#if _target.context.renderAsWebComponents}}Web Components{{/if}} | ||
</span> | ||
</summary> | ||
<h5>This is a {{{ yield }}} tag</h5> | ||
</details> | ||
<details open> | ||
<summary> | ||
<span class="font-black"><h4> | ||
{{#if _target.context.renderAsCss}}CSS Styled{{/if}} | ||
{{#if _target.context.renderAsWebComponents}}Web Components{{/if}} | ||
</span> | ||
</summary> | ||
<h4>This is a {{{ yield }}} tag</h4> | ||
</details> | ||
<details open> | ||
<summary> | ||
<span class="font-black"><h3> | ||
{{#if _target.context.renderAsCss}}CSS Styled{{/if}} | ||
{{#if _target.context.renderAsWebComponents}}Web Components{{/if}} | ||
</span> | ||
</summary> | ||
<h3>This is a {{{ yield }}} tag</h3> | ||
</details> | ||
<details open> | ||
<summary> | ||
<span class="font-black"><h2> | ||
{{#if _target.context.renderAsCss}}CSS Styled{{/if}} | ||
{{#if _target.context.renderAsWebComponents}}Web Components{{/if}} | ||
</span> | ||
</summary> | ||
<h2>This is a {{{ yield }}} tag</h2> | ||
</details> | ||
<details open> | ||
<summary> | ||
<span class="font-black"><h1> | ||
{{#if _target.context.renderAsCss}}CSS Styled{{/if}} | ||
{{#if _target.context.renderAsWebComponents}}Web Components{{/if}} | ||
</span> | ||
</summary> | ||
<h1>This is a {{{ yield }}} tag</h1> | ||
</details> | ||
<details open> | ||
<summary> | ||
<span class="font-black"><blockquote> <p> | ||
{{#if _target.context.renderAsCss}}CSS Styled{{/if}} | ||
{{#if _target.context.renderAsWebComponents}}Web Components{{/if}} | ||
</span> | ||
</summary> | ||
<blockquote> | ||
<p>This is a {{{ yield }}} tag</p> | ||
<h6>This is a {{{ yield }}} tag</h6> | ||
<h5>This is a {{{ yield }}} tag</h5> | ||
<h4>This is a {{{ yield }}} tag</h4> | ||
<h3>This is a {{{ yield }}} tag</h3> | ||
<h2>This is a {{{ yield }}} tag</h2> | ||
<h1>This is a {{{ yield }}} tag</h1> | ||
<blockquote><p>This is a {{{ yield }}} tag</p></blockquote> | ||
</main> | ||
</blockquote> | ||
</details> | ||
</main> | ||
<script type="module"> | ||
import init, * as bindings from "{{ path '/reactive-graph-design.js' }}"; | ||
init("{{ path '/reactive-graph-design_bg.wasm' }}"); | ||
window.wasmBindings = bindings; | ||
</script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 +1,6 @@ | ||
<span class="tag string">{{tag}}</span> | ||
{{#if renderAsCss}} | ||
<span class="tag rg-{{ty}}">{{text}}</span> | ||
{{/if}} | ||
{{#if renderAsWebComponents}} | ||
<rg-tag ty="{{ty}}">{{text}}</rg-tag> | ||
{{/if}} |