-
-
Notifications
You must be signed in to change notification settings - Fork 132
docs: fix right sidebar sponsors #1477
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,16 +8,16 @@ const containerIsVisible = useElementVisibility(container) | |
|
|
||
| const { sponsors } = useSponsors(containerIsVisible) | ||
|
|
||
| const normalSponsors = computed(() => sponsors.value.filter(s => s.rideSidebarSize === 'normal')) | ||
| const smallSponsors = computed(() => sponsors.value.filter(s => s.rideSidebarSize === 'small')) | ||
| const normalSponsors = computed(() => sponsors.value.filter(s => s.rightSidebarSize === 'normal')) | ||
| const smallSponsors = computed(() => sponsors.value.filter(s => s.rightSidebarSize === 'small')) | ||
| </script> | ||
|
|
||
| <template> | ||
| <div ref="container" class="aside-container"> | ||
| <a class="aside-sponsors-title" href="https://github.com/sponsors/dinwwwh" target="_blank" rel="noopener">SPONSORS</a> | ||
|
|
||
| <div class="aside-sponsors-list"> | ||
| <a v-for="sponsor in normalSponsors" :key="sponsor.login" class="aside-sponsor" target="_blank" :href="sponsor.rideSidebarLink"> | ||
| <a v-for="sponsor in normalSponsors" :key="sponsor.login" class="aside-sponsor" target="_blank" :href="sponsor.rightSidebarLink"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| <img :src="sponsor.rightSidebarLogo" :alt="sponsor.name"> | ||
| </a> | ||
|
|
||
|
|
@@ -26,7 +26,7 @@ const smallSponsors = computed(() => sponsors.value.filter(s => s.rideSidebarSiz | |
| </a> | ||
|
|
||
| <div class="aside-sponsors-small"> | ||
| <a v-for="sponsor in smallSponsors" :key="sponsor.login" class="aside-sponsor" target="_blank" :href="sponsor.rideSidebarLink"> | ||
| <a v-for="sponsor in smallSponsors" :key="sponsor.login" class="aside-sponsor" target="_blank" :href="sponsor.rightSidebarLink"> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| <img :src="sponsor.rightSidebarLogo" :alt="sponsor.name"> | ||
| </a> | ||
| </div> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using string literals like
'normal'and'small'for filtering can be error-prone and harder to maintain. Consider defining these values as constants or an enum incomposables/sponsors.tsalongside theJSONSponsorinterface and importing them here. This improves type safety and makes future changes easier.