This is the code that runs https://bandolier.learnjsthehardway.com/ for you to review. It uses the https://git.learnjsthehardway.com/learn-javascript-the-hard-way/bandolier-template to create the documentation for the project.
https://bandolier.learnjsthehardway.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
499 B
15 lines
499 B
<script>
|
|
import SnapImage from "$/client/components/SnapImage.svelte";
|
|
|
|
const image = "https://learnjsthehardway.com/media/sample_image.jpg";
|
|
let source = "";
|
|
const colors = [[44, 77, 26], [127, 187, 60], [189, 160, 115], [88, 153, 44], [25, 31, 14], [124, 151, 61], [89, 115, 43], [65, 122, 34], [108, 149, 173], [89, 119, 109]];
|
|
|
|
</script>
|
|
|
|
|
|
<SnapImage width="1600" height="900" colors={ colors } src={ source } />
|
|
|
|
<br />
|
|
|
|
<button on:click={ () => source = image }>Click to Load</button>
|
|
|