ADD: shuffle network on page load
This commit is contained in:
parent
fabe4ac891
commit
9c57aa0125
1 changed files with 14 additions and 6 deletions
|
@ -27,11 +27,13 @@
|
|||
<p class="margin-top">Doch auch wenn ich mal voll ausgelastet bin - keine Sorge!
|
||||
Mein <span class="highlight">Netzwerk an Profis</span> kann dir sicher auch weiterhelfen.
|
||||
</p>
|
||||
<div class="network-list margin-top">
|
||||
<div class="scroll-container default-gap">
|
||||
<Person ref="persons" v-for="person in network" v-bind="person" />
|
||||
<client-only>
|
||||
<div class="network-list margin-top">
|
||||
<div class="scroll-container default-gap">
|
||||
<Person ref="persons" v-for="person in network" v-bind="person" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</client-only>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
@ -83,7 +85,13 @@ const services = [
|
|||
}
|
||||
]
|
||||
|
||||
const network = [
|
||||
|
||||
const shuffle = <T>(unshuffled : T[]) => unshuffled
|
||||
.map(value => ({ value, sort: Math.random() }))
|
||||
.sort((a, b) => a.sort - b.sort)
|
||||
.map(({ value }) => value)
|
||||
|
||||
const network = shuffle([
|
||||
{
|
||||
name: 'Robert Janus',
|
||||
img: '/img/network/robert.jpg',
|
||||
|
@ -109,5 +117,5 @@ const network = [
|
|||
flavour: 'Effizient und kommunikativ. "You build it, you run it."',
|
||||
link: 'https://masagu.dev',
|
||||
},
|
||||
]
|
||||
])
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue