Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The examples on top of the website should have a heading #146

Closed
Snailedlt opened this issue Nov 2, 2022 · 4 comments · Fixed by #148
Closed

The examples on top of the website should have a heading #146

Snailedlt opened this issue Nov 2, 2022 · 4 comments · Fixed by #148
Labels
docs Improvements or additions to documentation

Comments

@Snailedlt
Copy link
Contributor

The exampels at the top of the website currently have no heading. This means that it's not easy to navigate to it if we were to scroll to the bottom of the website. A new heading should be added:

Before:
image

After:
image

Couldn't find the code for the website, but here's the code that should be added:

<h2 id="examples" class="">Examples<a aria-hidden="true" tabindex="-1" href="#examples"><svg width="16" height="16" viewBox="0 0 16 16"><use xlink:href="#octicon-link"></use></svg></a></h2>
@janosh
Copy link
Owner

janosh commented Nov 2, 2022

Thanks for all the doc improvement suggestions btw. Much appreciated! 👍

@janosh janosh added the docs Improvements or additions to documentation label Nov 2, 2022
@Snailedlt
Copy link
Contributor Author

@janosh Happy to help! Especially when you're so insanely quick at fixing the issues!

I wanted to make a PR for some of the improvements, but couldn't find the website code, is it open sourced... if so, got a link?

@janosh
Copy link
Owner

janosh commented Nov 3, 2022

Yes, all code relevant to this project lives in this repo. Except for the REPLs.

The stuff you see on https://svelte-multiselect.netlify.app is mostly in
https://github.com/janosh/svelte-multiselect/tree/main/src/components
and
https://github.com/janosh/svelte-multiselect/tree/main/src/routes.

The landing page just imports the readme and inserts two slot components for the examples and nav bar below it.

import Readme from '../../readme.md'
import Examples from '../components/Examples.svelte'
import { demo_routes } from './+layout'
</script>
<main>
<Readme>
<Examples slot="examples" />
<svelte:fragment slot="nav">
<h2>More examples</h2>
<nav>
{#each demo_routes as route, idx}
{#if idx > 0}<strong>&bull;</strong>{/if}
<a href={route}>{route}</a>
{/each}
</nav>
</svelte:fragment>
</Readme>
</main>

@Snailedlt
Copy link
Contributor Author

Nice, thanks! Will keep that in mind for future contributions :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants