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
+86 -94
View File
@@ -1,100 +1,92 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="cfs_tracker.Views.MonthPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Name="ThisPage"
Title="Monat">
<ContentPage x:Class="cfs_tracker.Views.MonthPage"
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:MonthViewModel"
Title="Monat"
BackgroundColor="{DynamicResource AppBackground}">
<Grid RowDefinitions="Auto,Auto,*" Padding="16">
<ScrollView>
<VerticalStackLayout Padding="16" Spacing="16">
<Grid ColumnDefinitions="Auto,*,Auto"
VerticalOptions="Center">
<Button Text="←"
Style="{StaticResource PrimaryButtonStyle}"
Command="{Binding PreviousMonthCommand}" />
<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 NextMonthCommand}" />
</Grid>
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto" Margin="0,0,0,12">
<Button
Grid.Column="0"
Text="◀"
WidthRequest="52"
HeightRequest="44"
Command="{Binding PreviousMonthCommand}" />
<Grid 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>
<Label
Grid.Column="1"
Text="{Binding SelectedMonthText}"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
FontSize="24"
FontAttributes="Bold" />
<Grid ColumnDefinitions="*,*,*,*,*,*,*"
ColumnSpacing="4">
<Label Text="Mo" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
<Label Grid.Column="1" Text="Di" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
<Label Grid.Column="2" Text="Mi" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
<Label Grid.Column="3" Text="Do" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
<Label Grid.Column="4" Text="Fr" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
<Label Grid.Column="5" Text="Sa" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
<Label Grid.Column="6" Text="So" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
</Grid>
<Button
Grid.Column="2"
Text="Heute"
Margin="8,0,0,0"
Command="{Binding TodayCommand}" />
<CollectionView ItemsSource="{Binding Cells}"
SelectionMode="None">
<CollectionView.ItemsLayout>
<GridItemsLayout Orientation="Vertical"
Span="7" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="viewModels:MonthCellViewModel">
<Border Margin="2"
Padding="6"
Stroke="{Binding BorderColor}"
BackgroundColor="{DynamicResource SurfaceBackground}"
StrokeShape="RoundRectangle 10">
<Border.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.OpenDayCommand}"
CommandParameter="{Binding .}" />
</Border.GestureRecognizers>
<Button
Grid.Column="3"
Text="▶"
WidthRequest="52"
HeightRequest="44"
Margin="8,0,0,0"
Command="{Binding NextMonthCommand}" />
</Grid>
<Grid Grid.Row="1" ColumnDefinitions="*,*,*,*,*,*,*" Margin="0,0,0,8">
<Label Grid.Column="0" Text="Mo" HorizontalTextAlignment="Center" FontAttributes="Bold" />
<Label Grid.Column="1" Text="Di" HorizontalTextAlignment="Center" FontAttributes="Bold" />
<Label Grid.Column="2" Text="Mi" HorizontalTextAlignment="Center" FontAttributes="Bold" />
<Label Grid.Column="3" Text="Do" HorizontalTextAlignment="Center" FontAttributes="Bold" />
<Label Grid.Column="4" Text="Fr" HorizontalTextAlignment="Center" FontAttributes="Bold" />
<Label Grid.Column="5" Text="Sa" HorizontalTextAlignment="Center" FontAttributes="Bold" />
<Label Grid.Column="6" Text="So" HorizontalTextAlignment="Center" FontAttributes="Bold" />
</Grid>
<CollectionView
Grid.Row="2"
ItemsSource="{Binding Days}"
SelectionMode="None">
<CollectionView.ItemsLayout>
<GridItemsLayout Orientation="Vertical" Span="7" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="3">
<Border
HeightRequest="74"
BackgroundColor="{Binding BackgroundColor}"
Stroke="{Binding BorderColor}"
StrokeThickness="1"
StrokeShape="RoundRectangle 10">
<Grid Padding="6">
<Grid.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding Source={x:Reference ThisPage}, Path=BindingContext.OpenDayCommand}"
CommandParameter="{Binding .}" />
</Grid.GestureRecognizers>
<VerticalStackLayout
IsVisible="{Binding IsRealDay}"
Spacing="4">
<Label
Text="{Binding DayNumberText}"
TextColor="{Binding TextColor}"
FontAttributes="Bold"
FontSize="16" />
<Label
Text="{Binding CountText}"
TextColor="{Binding TextColor}"
FontSize="12" />
</VerticalStackLayout>
</Grid>
</Border>
</Grid>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</Grid>
</ContentPage>
<VerticalStackLayout Spacing="4">
<Label Text="{Binding DayNumberText}"
FontAttributes="Bold"
TextColor="{Binding TextColor}" />
<Border Padding="4"
StrokeThickness="0"
StrokeShape="RoundRectangle 8"
BackgroundColor="{Binding StateColor}">
<Label Text="{Binding AverageStateText}"
FontSize="11"
HorizontalTextAlignment="Center"
TextColor="White" />
</Border>
</VerticalStackLayout>
</Border>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</VerticalStackLayout>
</ScrollView>
</ContentPage>