Compare commits
2 Commits
5af2b996d6
...
d86ac40602
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d86ac40602 | ||
|
|
395d77b71c |
4
app.py
4
app.py
@ -2,6 +2,10 @@ from flask import Flask, send_from_directory
|
|||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
|
@app.route("/")
|
||||||
|
def svelte_index():
|
||||||
|
return send_from_directory("webapp/build", "index.html")
|
||||||
|
|
||||||
@app.route("/<path:path>")
|
@app.route("/<path:path>")
|
||||||
def svelte_client(path):
|
def svelte_client(path):
|
||||||
return send_from_directory("webapp/build/", path)
|
return send_from_directory("webapp/build/", path)
|
||||||
@ -1,11 +1,15 @@
|
|||||||
<script>
|
<script>
|
||||||
export let open = false
|
export let open = false
|
||||||
|
|
||||||
|
function close() {
|
||||||
|
open = false
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<aside class="absolute w-full h-full bg-gray-200 border-r-2 shadow-lg" class:open>
|
<aside class="absolute w-full h-full bg-gray-200 border-r-2 shadow-lg" class:open>
|
||||||
<nav class="p-12 text-xl">
|
<nav class="p-12 text-xl">
|
||||||
<a class="block" href="/">Home</a>
|
<a class="block" href="/" on:click={close}>Home</a>
|
||||||
<a class="block" href="/about">About</a>
|
<a class="block" href="/about" on:click={close}>About</a>
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user