Closed Dev-Zhao closed 5 months ago
move images/assets to /static
is just the regular js way of doing things, use svelte to get this done in a cleaner way
ex. https://svelte.dev/repl/af08522f04c74850959f00c978db00f7?version=3.29.0
could you explain replace image with bad image is doing, as well as the handle profile image error
is just the regular js way of doing things, use svelte to get this done in a cleaner way
ex. https://svelte.dev/repl/af08522f04c74850959f00c978db00f7?version=3.29.0
The point of the function is to hide the menu when something on the page is clicked that's not the menu or the menu trigger button. The method you linked doesn't do that.
move images/assets to
/static
done
could you explain replace image with bad image is doing, as well as the handle profile image error
The point of using on:error is to replace a bad profile image (doesn't load) with the default one. It sometimes doesn't get called for the very first image load: https://github.com/sveltejs/kit/issues/8271
We utilize the use: directive to call the replaceBadImageWithDefault function after the image loads, and we check if the image actually loaded or not (loaded image width/height is 0). If not, we replace the bad image with the default one.
/docs/images/people/profile-picture-3.jpg
<tag class:someclass={boolean_var} />
other than that, looks great
Created a responsive website nav that supports both light and dark mode.
Features:
Most links don't work atm, they are just placeholder, same with the search.