generated from cms/tibi-docs
This commit is contained in:
@@ -1,5 +1,14 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export let col: Column
|
export let col: Column
|
||||||
|
|
||||||
|
// A function to compare first names and sort the array
|
||||||
|
const sortByFirstName = (a, b) => {
|
||||||
|
const nameA = a.name.split(" ")[0] // Extracts the first name from "First Last"
|
||||||
|
const nameB = b.name.split(" ")[0]
|
||||||
|
return nameA.localeCompare(nameB)
|
||||||
|
}
|
||||||
|
|
||||||
|
col.boxList.boxes.sort(sortByFirstName) // Sorts the array in place
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="boxList">
|
<div class="boxList">
|
||||||
@@ -14,7 +23,6 @@
|
|||||||
@import "../../assets/css/main.less";
|
@import "../../assets/css/main.less";
|
||||||
|
|
||||||
.boxList {
|
.boxList {
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
@@ -24,6 +32,5 @@
|
|||||||
color: @font-color-secondary;
|
color: @font-color-secondary;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user