Skip to content

Commit

Permalink
Add instructions for people who fail to make the sample code work
Browse files Browse the repository at this point in the history
  • Loading branch information
Tao-VanJS committed Sep 7, 2024
1 parent 5467001 commit ab9eec3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion sitegen/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import common from "./common.ts"
import { HTMLDocument } from "https://deno.land/x/[email protected]/deno-dom-wasm.ts"

export default (doc: HTMLDocument) => {
const {tags: {div, p}} = van.vanWithDoc(doc)
const {tags: {div, i, p}} = van.vanWithDoc(doc)
const {Demo, Download, H1, H2, H3, Html, InlineHtml, Js, Link, Shell, SymLink, Symbol, Ts, VanJS} = common(doc)

const version = Deno.readTextFileSync("code/van.version")
Expand Down Expand Up @@ -62,6 +62,7 @@ van.add(document.body, Hello())
p(Demo()),
p({id: "demo-hello-fun"}),
p({id: "jsfiddle-hello-fun"}),
p(i("If you encounter problems after pasting the code above to your HTML file, be mindful of where to place your script. See ", Link("#9", "https://github.com/vanjs-org/vanjs-org.github.io/pull/9"), " for a detailed discussion.")),
H2({id: "download-table"}, "Download Table"),
div({id: "download-table-div"}),
)
Expand Down
2 changes: 1 addition & 1 deletion start.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h1 class="w3-padding-16 w3-xxxlarge">
}

van.add(document.body, Hello())
</code></pre><p><b>Demo:</b></p><p id="demo-hello-fun"></p><p><a href="https://jsfiddle.net/gh/get/library/pure/vanjs-org/vanjs-org.github.io/tree/master/jsfiddle/start/hello-fun">Try on jsfiddle</a></p><h2 class="w3-xxlarge w3-text-red" id="download-table"><a class="self-link" href="#download-table">Download Table</a></h2><hr style="width:50px;border:5px solid red" class="w3-round"><div id="download-table-div"></div></div>
</code></pre><p><b>Demo:</b></p><p id="demo-hello-fun"></p><p><a href="https://jsfiddle.net/gh/get/library/pure/vanjs-org/vanjs-org.github.io/tree/master/jsfiddle/start/hello-fun">Try on jsfiddle</a></p><p><i>If you encounter problems after pasting the code above to your HTML file, be mindful of where to place your script. See <a href="https://github.com/vanjs-org/vanjs-org.github.io/pull/9" class="w3-hover-opacity">#9</a> for a detailed discussion.</i></p><h2 class="w3-xxlarge w3-text-red" id="download-table"><a class="self-link" href="#download-table">Download Table</a></h2><hr style="width:50px;border:5px solid red" class="w3-round"><div id="download-table-div"></div></div>
<aside id="toc"><ul><li><a href="#npm-integration" class="w3-hover-opacity">NPM Integration</a></li><li><a href="#typescript-support-for-non-npm-integration" class="w3-hover-opacity">TypeScript Support for Non-NPM Integration</a><ul><li><a href="#for-esm-modules" class="w3-hover-opacity">For ESM Modules</a></li><li><a href="#for-script-tag" class="w3-hover-opacity">For Script Tag</a></li></ul></li><li><a href="#test-it-out" class="w3-hover-opacity">Test It Out</a></li><li><a href="#download-table" class="w3-hover-opacity">Download Table</a></li></ul></aside>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion start/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h1 class="w3-padding-16 w3-xxxlarge">
}

van.add(document.body, Hello())
</code></pre><p><b>Demo:</b></p><p id="demo-hello-fun"></p><p><a href="https://jsfiddle.net/gh/get/library/pure/vanjs-org/vanjs-org.github.io/tree/master/jsfiddle/start/hello-fun">Try on jsfiddle</a></p><h2 class="w3-xxlarge w3-text-red" id="download-table"><a class="self-link" href="#download-table">Download Table</a></h2><hr style="width:50px;border:5px solid red" class="w3-round"><div id="download-table-div"></div></div>
</code></pre><p><b>Demo:</b></p><p id="demo-hello-fun"></p><p><a href="https://jsfiddle.net/gh/get/library/pure/vanjs-org/vanjs-org.github.io/tree/master/jsfiddle/start/hello-fun">Try on jsfiddle</a></p><p><i>If you encounter problems after pasting the code above to your HTML file, be mindful of where to place your script. See <a href="https://github.com/vanjs-org/vanjs-org.github.io/pull/9" class="w3-hover-opacity">#9</a> for a detailed discussion.</i></p><h2 class="w3-xxlarge w3-text-red" id="download-table"><a class="self-link" href="#download-table">Download Table</a></h2><hr style="width:50px;border:5px solid red" class="w3-round"><div id="download-table-div"></div></div>
<aside id="toc"><ul><li><a href="#npm-integration" class="w3-hover-opacity">NPM Integration</a></li><li><a href="#typescript-support-for-non-npm-integration" class="w3-hover-opacity">TypeScript Support for Non-NPM Integration</a><ul><li><a href="#for-esm-modules" class="w3-hover-opacity">For ESM Modules</a></li><li><a href="#for-script-tag" class="w3-hover-opacity">For Script Tag</a></li></ul></li><li><a href="#test-it-out" class="w3-hover-opacity">Test It Out</a></li><li><a href="#download-table" class="w3-hover-opacity">Download Table</a></li></ul></aside>
</div>
</div>
Expand Down

0 comments on commit ab9eec3

Please sign in to comment.