Skip to content

Commit

Permalink
Fix: Improve filter layout for mobile (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
GODrums authored Oct 16, 2024
1 parent 6a290c9 commit d08c7f4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion webapp/src/app/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="flex flex-col items-center">
<div class="">
<div class="grid grid-cols-1 xl:grid-cols-4 gap-4 xl:gap-8">
<div class="grid grid-cols-1 xl:grid-cols-4 gap-y-4 xl:gap-8">
<div class="space-y-2 col-span-1">
<div class="flex flex-col gap-2 mb-4">
<h1 class="text-3xl font-bold">Artemis Leaderboard</h1>
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/app/home/leaderboard/filter/filter.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="inline-flex flex-col gap-2 border rounded-md border-input bg-background p-4">
<div class="w-full xl:w-fit inline-flex flex-col gap-2 border rounded-md border-input bg-background p-4">
<span class="flex items-center pb-2 gap-2 text-muted-foreground">
<lucide-angular [img]="ListFilter" class="size-4" />
<h3 class="text-base font-semibold tracking-wide">Filter</h3>
</span>
<form ngForm class="flex xl:flex-col gap-4">
<form ngForm class="flex flex-wrap gap-4">
<app-leaderboard-filter-timeframe />
@if (repositories() && repositories()!.length > 1) {
<app-leaderboard-filter-repository [repositories]="repositories()!" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@ export class LeaderboardFilterRepositoryComponent {
});

options = computed(() => {
const options: SelectOption[] = !this.repositories()
? []
: this.repositories()!.map((name, index) => {
return {
id: index + 1,
value: name,
label: name
};
});
const options: SelectOption[] = this.repositories().map((name, index) => {
return {
id: index + 1,
value: name,
label: name
};
});
options.unshift({
id: 0,
value: 'all',
Expand Down

0 comments on commit d08c7f4

Please sign in to comment.