Skip to content

Commit

Permalink
I am no designer, but i needet that little piece of sticky footer som…
Browse files Browse the repository at this point in the history
…ehow.
  • Loading branch information
Wiktor Przybylski committed Feb 10, 2024
1 parent 947e16f commit 2570f90
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 42 deletions.
83 changes: 43 additions & 40 deletions src/app/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,25 +230,6 @@ export function Summary({
<div className="absolute right-0 top-0">
<ModeToggle />
</div>
<div className="flex gap-4 justify-end mt-4 ">
<Select
value={currentYear}
onValueChange={(value) => updateYear(value)}
>
<SelectTrigger className="w-[180px]">
<SelectValue placeholder={`Rok: ${currentYear}`} />
</SelectTrigger>
<SelectContent>
<SelectGroup>
{availableYears.map((year, index) => (
<SelectItem value={year} key={year}>
Rok: {year}
</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>
</div>

<div
id="alert-additional-content-4"
Expand Down Expand Up @@ -390,27 +371,6 @@ export function Summary({
</div>

<div className="flex flex-1 flex-col gap-4">
<div className="flex justify-end">
<Select
value={currentMonth}
onValueChange={(value) => {
setCurrentMonth(value);
}}
>
<SelectTrigger className="w-[180px]">
<SelectValue placeholder={`Rok: ${currentMonth}`} />
</SelectTrigger>
<SelectContent>
<SelectGroup>
{years[currentYear].map((month, index) => (
<SelectItem value={month} key={month}>
Miesiąc: {month}.{currentYear}
</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>
</div>
<Tabs defaultValue="incomes_and_costs">
<TabsList>
<TabsTrigger value="incomes_and_costs">Wpływy i koszty</TabsTrigger>
Expand Down Expand Up @@ -938,6 +898,49 @@ export function Summary({
</Card>
</TabsContent>
</Tabs>
<footer className="sticky right-0 bottom-0">
<div className="justify-end bg-sky-500/10 m-4">
<div className="flex gap-4 justify-end pr-4 pt-4 pl-4">
<Select
value={currentYear}
onValueChange={(value) => updateYear(value)}
>
<SelectTrigger className="w-[180px]">
<SelectValue placeholder={`Rok: ${currentYear}`} />
</SelectTrigger>
<SelectContent>
<SelectGroup>
{availableYears.map((year, index) => (
<SelectItem value={year} key={year}>
Rok: {year}
</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>
</div>
<div className="flex justify-end pr-4 pb-4 pl-4">
<Select
value={currentMonth}
onValueChange={(value) => {
setCurrentMonth(value);
}}
>
<SelectTrigger className="w-[180px]">
<SelectValue placeholder={`Rok: ${currentMonth}`} />
</SelectTrigger>
<SelectContent>
<SelectGroup>
{years[currentYear].map((month, index) => (
<SelectItem value={month} key={month}>
Miesiąc: {month}.{currentYear}
</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>
</div></div>
</footer>
</div>
</div>
);
Expand Down
Binary file modified src/app/favicon.ico
Binary file not shown.
4 changes: 2 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { ThemeProvider } from "@/components/theme-provider";
const inter = Inter({ subsets: ["latin"] });

export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: "Podsumowanie Finansowe - Hackerspace Kraków",
description: "Automatycznie generowane statystyki finansowe Fundacji, liczone i kategoryzowanie automatycznie, z ręcznie opisywanymi wyjątkami. Statystyki mają charakter poglądowy",
};

export default function RootLayout({
Expand Down

0 comments on commit 2570f90

Please sign in to comment.