Spaces:
Runtime error
Runtime error
collapse about on mobile
Browse files
frontend/src/lib/Buttons/AboutButton.svelte
CHANGED
|
@@ -1,24 +1,39 @@
|
|
| 1 |
<script lang="ts">
|
|
|
|
| 2 |
import ShareWithCommunity from './ShareWithCommunity.svelte';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
</script>
|
| 4 |
|
| 5 |
<div class="md:w-[210px] text-sm md:flex flex-col order-last md:order-none">
|
| 6 |
-
<
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
| 24 |
</div>
|
|
|
|
| 1 |
<script lang="ts">
|
| 2 |
+
import { onMount } from 'svelte';
|
| 3 |
import ShareWithCommunity from './ShareWithCommunity.svelte';
|
| 4 |
+
let open = true;
|
| 5 |
+
onMount(() => {
|
| 6 |
+
autoOpen();
|
| 7 |
+
window.addEventListener('resize', autoOpen);
|
| 8 |
+
return () => {
|
| 9 |
+
window.removeEventListener('resize', autoOpen);
|
| 10 |
+
};
|
| 11 |
+
});
|
| 12 |
+
function autoOpen() {
|
| 13 |
+
open = window.innerWidth > 768;
|
| 14 |
+
}
|
| 15 |
</script>
|
| 16 |
|
| 17 |
<div class="md:w-[210px] text-sm md:flex flex-col order-last md:order-none">
|
| 18 |
+
<details {open}>
|
| 19 |
+
<summary class="md:hidden">More</summary>
|
| 20 |
+
<p class="inline">
|
| 21 |
+
Instructions: move the <span class="text-blue-700 bg-blue-300/60 px-0.5">blue square</span>,
|
| 22 |
+
click "π Paint".
|
| 23 |
+
</p>
|
| 24 |
+
<div class="flex justify-between py-2 gap-3">
|
| 25 |
+
<button on:click class="items-center inline-flex">
|
| 26 |
+
<svg width=".9em" height=".9em" viewBox="0 0 24 24" class="mr-1"
|
| 27 |
+
><path
|
| 28 |
+
fill="currentColor"
|
| 29 |
+
fill-rule="evenodd"
|
| 30 |
+
d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10s10-4.477 10-10S17.523 2 12 2zm0 7a1 1 0 0 0-1 1a1 1 0 1 1-2 0a3 3 0 1 1 4.44 2.633a1.404 1.404 0 0 0-.383.288a.303.303 0 0 0-.057.085v.494a1 1 0 1 1-2 0V13c0-.58.253-1.047.539-1.38c.281-.33.63-.572.94-.742A1 1 0 0 0 12 9zm.999 4.011v-.004v.005zM12 15a1 1 0 1 0 0 2h.01a1 1 0 1 0 0-2H12z"
|
| 31 |
+
clip-rule="evenodd"
|
| 32 |
+
/></svg
|
| 33 |
+
>
|
| 34 |
+
About
|
| 35 |
+
</button>
|
| 36 |
+
<ShareWithCommunity classList={''} />
|
| 37 |
+
</div>
|
| 38 |
+
</details>
|
| 39 |
</div>
|