Skip to content

Commit

Permalink
Merge pull request #88 from sublimetext-io/fix/contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
TerminalFi authored Oct 29, 2023
2 parents 6f88424 + 9df72c0 commit 52b2db7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 23 deletions.
55 changes: 33 additions & 22 deletions docs/.vitepress/components/Contributors.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
<template>
<div>
<h1>Contributors ({{ contributors.length }})</h1>
<h1>Contributors ({{ contributors.length }})</h1>

<input type="checkbox" id="showMoreToggle" class="hidden">
<input type="checkbox" id="showMoreToggle" class="hidden">

<!-- Displayed contributors -->
<VPTeamMembers size="small" :members="contributors.slice(0, maxVisible)" />
<!-- Displayed contributors -->

<!-- More contributors -->
<div class="moreContributors">
<VPTeamMembers size="small" :members="contributors.slice(maxVisible)" />
<VPTeamMembers class="contributors" size="small" :members="contributors.slice(0, maxVisible)" />

<!-- More contributors -->
<VPTeamMembers class="moreContributors" size="small" :members="contributors" />

<!-- Toggle button -->
<label for="showMoreToggle" class="toggleButton">
<div class="icon-container">
<svg class="show" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="m6 9 6 6 6-6" />
</svg>
<svg class="hide" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="m18 15-6-6-6 6" />
</svg>
</div>
</label>

<!-- Toggle button -->
<label for="showMoreToggle" class="toggleButton">
<div class="icon-container">
<svg class="show" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="m6 9 6 6 6-6" />
</svg>
<svg class="hide" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor">
<path d="m18 15-6-6-6 6" />
</svg>
</div>
</label>

<p v-if="error" class="error-message">{{ error }}</p>
</div>
<p v-if="error" class="error-message">{{ error }}</p>
</template>

<style>
Expand All @@ -44,6 +41,10 @@
display: none;
}
#showMoreToggle:checked~.contributors {
display: none;
}
#showMoreToggle:checked~.moreContributors {
display: block;
}
Expand All @@ -52,6 +53,16 @@
#showMoreToggle:not(:checked)~.toggleButton .hide {
display: none;
}
.VPTeamMembers>.container {
display: flex;
flex-wrap: wrap;
/* Allows items to wrap to the next line if there's not enough space */
justify-content: center;
/* Centers items horizontally */
gap: 1rem;
/* Space between members. Adjust as needed */
}
</style>


Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const head: HeadConfig[] = [
['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }],
['meta', { name: 'author', content: 'sublime text community' }],
['meta', { name: 'keywords', content: 'sublime text,sublime,documentation' }],
['meta', { name: 'theme-color', content: '#ff6600' }],
['meta', { name: 'theme-color', content: '#E79823' }],
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
['meta', { name: 'apple-mobile-web-app-status-bar-style', content: 'black' }],
['meta', { name: 'msapplication-TileColor', content: '#000000' }],
Expand Down

0 comments on commit 52b2db7

Please sign in to comment.