-
Notifications
You must be signed in to change notification settings - Fork 1
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
8588d13
commit 74a2968
Showing
3 changed files
with
63 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<script lang="ts"> | ||
import Qr from "./QR.svelte"; | ||
import { Pane, PaneGroup, PaneResizer } from "paneforge"; | ||
</script> | ||
|
||
<div class="h-screen w-screen"> | ||
<PaneGroup direction="horizontal"> | ||
<Pane minSize={10} defaultSize={20}> | ||
<div class="h-full w-full flex flex-col select-none gap-5 ws-nowrap p-5"> | ||
<div class="flex flex-col items-center gap-2 rounded-md bg-white/4 p-3 not-hover:op-80"> | ||
<Qr url="/" scale={2} /> | ||
<h3>扫码体验 Python Agent 🤖</h3> | ||
</div> | ||
<div class="flex flex-col items-center gap-2 rounded-md bg-white/4 p-3 not-hover:op-80"> | ||
<Qr url="https://github.com/promplate/reasonify" scale={2} /> | ||
<h3>GitHub 仓库求 ⭐</h3> | ||
</div> | ||
<div class="flex flex-row gap-2"> | ||
<div class="flex flex-col items-center gap-2 rounded-md bg-white/4 p-3 not-hover:op-80"> | ||
<Qr url="https://promplate.dev/" /> | ||
<h3>体验提示工程框架</h3> | ||
</div> | ||
<div class="flex flex-col items-center gap-2 rounded-md bg-white/4 p-3 not-hover:op-80"> | ||
<Qr url="https://docs.py.promplate.dev/" /> | ||
<h3>提示工程框架文档</h3> | ||
</div> | ||
</div> | ||
</div> | ||
</Pane> | ||
<PaneResizer class="group"> | ||
<div | ||
class="mx-1 h-full w-0.11em bg-white/10 transition group-active:bg-current group-hover:bg-white/30" | ||
/> | ||
</PaneResizer> | ||
<Pane minSize={20}> | ||
<iframe class="h-full w-full" title="demo" src="/" frameborder="0" /> | ||
</Pane> | ||
</PaneGroup> | ||
</div> |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script lang="ts"> | ||
// @ts-ignore | ||
import QRious from "qrious"; | ||
import { onMount } from "svelte"; | ||
export let url: string; | ||
export let scale = 1; | ||
let qr: QRious; | ||
onMount(() => { | ||
qr = new QRious({ | ||
value: new URL(url, location.href).href, | ||
background: "#00000000", | ||
foreground: "#ffffff", | ||
size: 345 * scale, | ||
level: ["L", "M", "Q", "H"][scale], | ||
}); | ||
}); | ||
</script> | ||
|
||
<img src={qr?.toDataURL("image/svg")} alt="qr code" /> |