Skip to content

Commit

Permalink
demo: Add Solid demo and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
laymonage committed Dec 18, 2022
1 parent bbf0e4b commit 209717a
Show file tree
Hide file tree
Showing 31 changed files with 4,109 additions and 1,233 deletions.
4 changes: 2 additions & 2 deletions demo/build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rm -rf dist && mkdir dist
cp {index.html,styles.css} dist/

for framework in preact react vue svelte web
for framework in preact react vue svelte solid web
do
cd $framework && npm run build && cd ..
cd $framework && npm run build && mv dist ../dist/$framework && cd ..
done
109 changes: 63 additions & 46 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -1,54 +1,71 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link
rel="icon"
type="image/svg+xml"
href="https://giscus.app/favicon.ico"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="This is a demo for the official giscus script."
/>
<title>giscus client.js demo</title>
<style>
main {
max-width: 760px;
margin: 2rem auto;
font-family: sans-serif;
}
</style>
<link rel="stylesheet" href="/styles.css" />
</head>

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="https://giscus.app/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="This is a demo for the official giscus script." />
<title>giscus client.js demo</title>
<style>
main {
max-width: 760px;
margin: 2rem auto;
font-family: sans-serif;
}
</style>
<link rel="stylesheet" href="/styles.css" />
</head>
<body>
<main>
<h1><a href="/">giscus-component</a></h1>

<body>
<main>
<h1><a href="/">giscus-component</a></h1>
<p>This page is running the official giscus script.</p>

<p>This page is running the official giscus script.</p>
<p>Click the links below to see the component library in action:</p>

<p>Click the links below to see the component library in action:</p>

<ul>
<li>
<a href="/web">Web Component (Lit)</a>
</li>
<li>
<a href="/preact">Preact</a>
</li>
<li>
<a href="/react">React</a>
</li>
<li>
<a href="/vue">Vue</a>
</li>
<li>
<a href="/svelte">Svelte</a>
</li>
</ul>

<div id="comments" class="giscus"></div>
</main>
<script src="https://giscus.app/client.js" data-repo="giscus/giscus" data-repo-id="MDEwOlJlcG9zaXRvcnkzNTE5NTgwNTM="
data-category-id="MDE4OkRpc2N1c3Npb25DYXRlZ29yeTMyNzk2NTc1" data-mapping="specific" data-term="Welcome to giscus!"
data-theme="light" data-reactions-enabled="1" data-emit-metadata="0" data-input-position="bottom"
data-lang="en"></script>
</body>
<ul>
<li>
<a href="/web">Web Component (Lit)</a>
</li>
<li>
<a href="/preact">Preact</a>
</li>
<li>
<a href="/react">React</a>
</li>
<li>
<a href="/vue">Vue</a>
</li>
<li>
<a href="/svelte">Svelte</a>
</li>
<li>
<a href="/solid">Solid</a>
</li>
</ul>

<div id="comments" class="giscus"></div>
</main>
<script
src="https://giscus.app/client.js"
data-repo="giscus/giscus"
data-repo-id="MDEwOlJlcG9zaXRvcnkzNTE5NTgwNTM="
data-category-id="MDE4OkRpc2N1c3Npb25DYXRlZ29yeTMyNzk2NTc1"
data-mapping="specific"
data-term="Welcome to giscus!"
data-theme="light"
data-reactions-enabled="1"
data-emit-metadata="0"
data-input-position="bottom"
data-lang="en"
></script>
</body>
</html>
2 changes: 1 addition & 1 deletion demo/install.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
for framework in preact react vue svelte web
for framework in preact react vue svelte solid web
do
cd $framework && npm i && npm upgrade && cd ..
done
82 changes: 43 additions & 39 deletions demo/preact/index.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,51 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="This is a demo for the @giscus/preact component."
/>
<title>@giscus/preact demo</title>
<style>
main {
max-width: 760px;
margin: 2rem auto;
font-family: sans-serif;
}
</style>
</head>

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="This is a demo for the @giscus/preact component." />
<title>@giscus/preact demo</title>
<style>
main {
max-width: 760px;
margin: 2rem auto;
font-family: sans-serif;
}
</style>
</head>
<body>
<main>
<h1><a href="/">giscus-component</a></h1>

<body>
<main>
<h1><a href="/">giscus-component</a></h1>
<p>This page is running the @giscus/react library on Preact.</p>

<p>This page is running the @giscus/react library on Preact.</p>
<p>Click the links below to see the component library in action:</p>

<p>Click the links below to see the component library in action:</p>

<ul>
<li>
<a href="/web">Web Component (Lit)</a>
</li>
<li>
<a href="/react">React</a>
</li>
<li>
<a href="/vue">Vue</a>
</li>
<li>
<a href="/svelte">Svelte</a>
</li>
</ul>

<div id="app"></div>
</main>
<script type="module" src="/src/main.tsx"></script>
</body>
<ul>
<li>
<a href="/web">Web Component (Lit)</a>
</li>
<li>
<a href="/react">React</a>
</li>
<li>
<a href="/vue">Vue</a>
</li>
<li>
<a href="/svelte">Svelte</a>
</li>
<li>
<a href="/solid">Solid</a>
</li>
</ul>

<div id="app"></div>
</main>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading

0 comments on commit 209717a

Please sign in to comment.