Farbpalette vorladen lassen

Bootstraper läd jetzt die farbeinstellung sofort und nicht nachträglich

cleanup and rework

PDF switch to HTML

export fix

Colorsystem

Farben für knöpfe hinzugefügt als anpassung

button color

button color primary and secondary change
This commit is contained in:
2026-03-23 22:42:52 +01:00
parent d5649dc189
commit d85f2e0fb3
84 changed files with 4216 additions and 1814 deletions
+102 -115
View File
@@ -1,128 +1,115 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="cfs_tracker.Views.YearPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Name="ThisPage"
Title="Jahr">
<ContentPage x:Class="cfs_tracker.Views.YearPage"
x:Name="RootPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:viewModels="clr-namespace:cfs_tracker.ViewModels"
x:DataType="viewModels:YearViewModel"
Title="Jahr"
BackgroundColor="{DynamicResource AppBackground}">
<Grid RowDefinitions="Auto,*" Padding="16">
<Grid Padding="16"
RowSpacing="16"
RowDefinitions="Auto,Auto,*">
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto" Margin="0,0,0,12">
<Button
Grid.Column="0"
Text="◀"
WidthRequest="52"
HeightRequest="44"
Command="{Binding PreviousYearCommand}" />
<Label
Grid.Column="1"
Text="{Binding SelectedYearText}"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
FontSize="24"
FontAttributes="Bold" />
<Button
Grid.Column="2"
Text="Heute"
Margin="8,0,0,0"
Command="{Binding TodayCommand}" />
<Button
Grid.Column="3"
Text="▶"
WidthRequest="52"
HeightRequest="44"
Margin="8,0,0,0"
Command="{Binding NextYearCommand}" />
<Grid ColumnDefinitions="Auto,*,Auto"
VerticalOptions="Center">
<Button Text="←"
Style="{StaticResource PrimaryButtonStyle}"
Command="{Binding PreviousYearCommand}" />
<Label Grid.Column="1"
Text="{Binding HeaderText}"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
FontSize="20"
FontAttributes="Bold"
TextColor="{DynamicResource TextPrimary}" />
<Button Grid.Column="2"
Text="→"
Style="{StaticResource PrimaryButtonStyle}"
Command="{Binding NextYearCommand}" />
</Grid>
<ScrollView Grid.Row="1">
<VerticalStackLayout
Spacing="12"
BindableLayout.ItemsSource="{Binding Months}">
<Grid Grid.Row="1"
ColumnDefinitions="*,*"
ColumnSpacing="12">
<Button Text="Heute"
Style="{StaticResource PrimaryButtonStyle}"
Command="{Binding TodayCommand}" />
<Button Grid.Column="1"
Text="Export"
Style="{StaticResource PrimaryButtonStyle}"
Command="{Binding ExportPdfCommand}" />
</Grid>
<BindableLayout.ItemTemplate>
<DataTemplate>
<Border
Padding="12"
BackgroundColor="{DynamicResource PanelBackground}"
Stroke="{DynamicResource PanelBorder}"
StrokeThickness="1"
StrokeShape="RoundRectangle 12">
<CollectionView Grid.Row="2"
ItemsSource="{Binding Months}"
SelectionMode="None"
VerticalOptions="Fill"
HorizontalOptions="Fill"
ItemSizingStrategy="MeasureFirstItem">
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="viewModels:MonthSectionViewModel">
<Border Padding="12"
Margin="0,0,0,12"
Stroke="{DynamicResource Border}"
BackgroundColor="{DynamicResource SurfaceBackground}"
StrokeShape="RoundRectangle 14">
<VerticalStackLayout Spacing="10">
<Label Text="{Binding Title}"
FontSize="18"
FontAttributes="Bold"
TextColor="{DynamicResource TextPrimary}" />
<VerticalStackLayout Spacing="10">
<Label
Text="{Binding MonthText}"
FontSize="20"
FontAttributes="Bold"
TextColor="{DynamicResource TextPrimary}" />
<HorizontalStackLayout Spacing="4">
<Label Text="Mo" WidthRequest="44" HorizontalTextAlignment="Center" FontSize="12" />
<Label Text="Di" WidthRequest="44" HorizontalTextAlignment="Center" FontSize="12" />
<Label Text="Mi" WidthRequest="44" HorizontalTextAlignment="Center" FontSize="12" />
<Label Text="Do" WidthRequest="44" HorizontalTextAlignment="Center" FontSize="12" />
<Label Text="Fr" WidthRequest="44" HorizontalTextAlignment="Center" FontSize="12" />
<Label Text="Sa" WidthRequest="44" HorizontalTextAlignment="Center" FontSize="12" />
<Label Text="So" WidthRequest="44" HorizontalTextAlignment="Center" FontSize="12" />
</HorizontalStackLayout>
<FlexLayout
Direction="Row"
Wrap="Wrap"
JustifyContent="Start"
AlignItems="Start"
BindableLayout.ItemsSource="{Binding Days}">
<BindableLayout.ItemTemplate>
<DataTemplate>
<Border
WidthRequest="44"
HeightRequest="44"
Margin="2"
BackgroundColor="{Binding BackgroundColor}"
<FlexLayout Direction="Row"
Wrap="Wrap"
AlignItems="Start"
JustifyContent="Start"
BindableLayout.ItemsSource="{Binding Cells}">
<BindableLayout.ItemTemplate>
<DataTemplate x:DataType="viewModels:MonthCellViewModel">
<Border Margin="2"
Padding="4"
WidthRequest="46"
HeightRequest="46"
Stroke="{Binding BorderColor}"
StrokeThickness="1"
BackgroundColor="{DynamicResource SurfaceBackgroundAlt}"
StrokeShape="RoundRectangle 8">
<Border.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.OpenDayCommand}"
CommandParameter="{Binding .}" />
</Border.GestureRecognizers>
<Grid Padding="4">
<Grid.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding Source={x:Reference ThisPage}, Path=BindingContext.OpenDayCommand}"
CommandParameter="{Binding .}" />
</Grid.GestureRecognizers>
<VerticalStackLayout
IsVisible="{Binding IsRealDay}"
Spacing="1">
<Label
Text="{Binding DayNumberText}"
TextColor="{Binding TextColor}"
FontSize="11"
FontAttributes="Bold"
HorizontalTextAlignment="Center" />
<Label
Text="{Binding CountText}"
TextColor="{Binding TextColor}"
FontSize="9"
HorizontalTextAlignment="Center" />
</VerticalStackLayout>
</Grid>
</Border>
</DataTemplate>
</BindableLayout.ItemTemplate>
</FlexLayout>
</VerticalStackLayout>
</Border>
</DataTemplate>
</BindableLayout.ItemTemplate>
</VerticalStackLayout>
</ScrollView>
<Grid RowDefinitions="Auto,*">
<Label Text="{Binding DayNumberText}"
FontSize="11"
FontAttributes="Bold"
HorizontalTextAlignment="Center"
TextColor="{Binding TextColor}" />
<Border Grid.Row="1"
Margin="0,4,0,0"
Padding="2"
StrokeThickness="0"
StrokeShape="RoundRectangle 5"
BackgroundColor="{Binding StateColor}">
<Label Text="{Binding AverageStateText}"
FontSize="9"
LineBreakMode="TailTruncation"
MaxLines="1"
HorizontalTextAlignment="Center"
TextColor="White" />
</Border>
</Grid>
</Border>
</DataTemplate>
</BindableLayout.ItemTemplate>
</FlexLayout>
</VerticalStackLayout>
</Border>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Grid>
</ContentPage>