Skip to content
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

Fix: Improve filter layout for mobile #120

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading