-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Showing
10 changed files
with
215 additions
and
130 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
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
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,20 @@ | ||
<a | ||
class="lg:btn lg:btn-square lg:btn-ghost" | ||
href="https://github.com/mszula/visual-sorting" | ||
target="_blank" | ||
> | ||
<svg | ||
class="w-[24px] h-[24px]" | ||
aria-hidden="true" | ||
fill="currentColor" | ||
viewBox="0 0 20 20" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
clip-rule="evenodd" | ||
d="M10 .333A9.911 9.911 0 0 0 6.866 19.65c.5.092.678-.215.678-.477 0-.237-.01-1.017-.014-1.845-2.757.6-3.338-1.169-3.338-1.169a2.627 2.627 0 0 0-1.1-1.451c-.9-.615.07-.6.07-.6a2.084 2.084 0 0 1 1.518 1.021 2.11 2.11 0 0 0 2.884.823c.044-.503.268-.973.63-1.325-2.2-.25-4.516-1.1-4.516-4.9A3.832 3.832 0 0 1 4.7 7.068a3.56 3.56 0 0 1 .095-2.623s.832-.266 2.726 1.016a9.409 9.409 0 0 1 4.962 0c1.89-1.282 2.717-1.016 2.717-1.016.366.83.402 1.768.1 2.623a3.827 3.827 0 0 1 1.02 2.659c0 3.807-2.319 4.644-4.525 4.889a2.366 2.366 0 0 1 .673 1.834c0 1.326-.012 2.394-.012 2.72 0 .263.18.572.681.475A9.911 9.911 0 0 0 10 .333Z" | ||
fill-rule="evenodd" | ||
/> | ||
</svg> | ||
<span class="lg:hidden inline">https://github.com/mszula/visual-sorting</span> | ||
</a> |
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
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,23 @@ | ||
<script lang="ts"> | ||
export let selectAlgorithm: (algo: AlgorithmDefinition) => void; | ||
import { algorithms } from '../../sort-algorithms/algorithms'; | ||
import type { AlgorithmDefinition } from '../../sort-algorithms/types'; | ||
const change = (value: string) => { | ||
const [group, index] = value.split(','); | ||
selectAlgorithm(algorithms[Number(group)][Number(index)]); | ||
}; | ||
</script> | ||
|
||
<div class="flex bg-base-200 rounded-box mb-2 md:mb-0 md:mr-5"> | ||
<select | ||
class="select select-ghost w-full" | ||
on:change={(e) => change(e.currentTarget.value)} | ||
> | ||
{#each algorithms as algos, group} | ||
{#each algos as algo, index} | ||
<option value={[group, index]}>{algo.name}</option> | ||
{/each} | ||
{/each} | ||
</select> | ||
</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,45 @@ | ||
<script lang="ts"> | ||
import HeaderSoundControl from '../HeaderSoundControl.svelte'; | ||
import { type OscillatorType } from '../../sound'; | ||
import HeaderThemeControl from '../HeaderThemeControl.svelte'; | ||
import HeaderGitHubButton from '../HeaderGitHubButton.svelte'; | ||
export let selectedTheme: string; | ||
export let oscillatorType: OscillatorType; | ||
let isMenuOpen = false; | ||
const toggleMenu = () => { | ||
isMenuOpen = !isMenuOpen; | ||
}; | ||
</script> | ||
|
||
<div class="flex-none md:hidden"> | ||
<button class="btn btn-ghost" on:click={toggleMenu}> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
class="inline-block w-6 h-6 stroke-current" | ||
> | ||
<path | ||
stroke-linecap="round" | ||
stroke-linejoin="round" | ||
stroke-width="2" | ||
d="M4 6h16M4 12h16M4 18h16" | ||
></path> | ||
</svg> | ||
</button> | ||
</div> | ||
|
||
{#if isMenuOpen} | ||
<div | ||
class="z-10 absolute top-full left-0 right-0 bg-base-100 shadow-md md:hidden" | ||
> | ||
<ul class="menu p-2 items-center w-full"> | ||
<li class="w-full"><HeaderSoundControl bind:oscillatorType /></li> | ||
<li class="w-full"><HeaderThemeControl bind:selectedTheme /></li> | ||
<li class="w-full"><HeaderGitHubButton /></li> | ||
</ul> | ||
</div> | ||
{/if} |
Oops, something went wrong.