ADD : note page + start dark mode 🔥

homepage-05-09
Lou BRODA 1 year ago
parent a8b644e716
commit a3054f2d21

@ -14,13 +14,13 @@
ContentTemplate="{DataTemplate view:BibliothequeView}" ContentTemplate="{DataTemplate view:BibliothequeView}"
Icon="books_vertical_fill.png"/> Icon="books_vertical_fill.png"/>
<ShellContent Title="My Lists" <ShellContent Title="My Lists"
ContentTemplate="{DataTemplate view:FiltrageAuteurView}" ContentTemplate="{DataTemplate view:TousView}"
Icon="list_bullet.svg"/> Icon="list_bullet.svg"/>
<ShellContent Title="My Readings" <ShellContent Title="My Readings"
ContentTemplate="{DataTemplate view:DetailsLivreView}" ContentTemplate="{DataTemplate view:FiltrageAuteurView}"
Icon="bookmark_fill"/> Icon="bookmark_fill"/>
<ShellContent Title="Search" <ShellContent Title="Search"
ContentTemplate="{DataTemplate view:TousView}" ContentTemplate="{DataTemplate view:FiltrageDateView}"
Icon="magnifying_glass.png"/> Icon="magnifying_glass.png"/>
</TabBar> </TabBar>

@ -93,6 +93,9 @@
<MauiXaml Update="View\FiltrageDateView.xaml"> <MauiXaml Update="View\FiltrageDateView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="View\FiltrageNoteView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\HeaderHome.xaml"> <MauiXaml Update="View\HeaderHome.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>

@ -177,30 +177,51 @@
</Style> </Style>
<Style TargetType="Label" x:Key="HeaderTitle"> <Style TargetType="Label" x:Key="HeaderTitle">
<Setter Property="TextColor" Value="{DynamicResource Black}"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource Black}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Medium"/> <Setter Property="FontSize" Value="Medium"/>
<Setter Property="FontAttributes" Value="Bold"/> <Setter Property="FontAttributes" Value="Bold"/>
</Style> </Style>
<Style TargetType="Label" x:Key="HomeTitle"> <Style TargetType="Label" x:Key="HomeTitle">
<Setter Property="TextColor" Value="{DynamicResource Black}"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource Black}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="40"/> <Setter Property="FontSize" Value="40"/>
<Setter Property="FontAttributes" Value="Bold"/> <Setter Property="FontAttributes" Value="Bold"/>
</Style> </Style>
<Style TargetType="Label" x:Key="DetailsLivreTitle"> <Style TargetType="Label" x:Key="DetailsLivreTitle">
<Setter Property="TextColor" Value="{DynamicResource Black}"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource Black}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Small"/> <Setter Property="FontSize" Value="Small"/>
<Setter Property="FontAttributes" Value="Bold"/> <Setter Property="FontAttributes" Value="Bold"/>
</Style> </Style>
<Style TargetType="Label" x:Key="DetailsLivreBody"> <Style TargetType="Label" x:Key="DetailsLivreBody">
<Setter Property="TextColor" Value="{DynamicResource TextGray}"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource TextGray}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Body"/> <Setter Property="FontSize" Value="Body"/>
</Style> </Style>
<Style TargetType="Label" x:Key="DetailsButtonBody"> <Style TargetType="Label" x:Key="DetailsButtonBody">
<Setter Property="TextColor" Value="{DynamicResource TextGray}"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource TextGray}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Medium"/>
</Style>
<Style TargetType="Label" x:Key="MasterTitleBookText">
<Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource Black}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Medium"/>
<Setter Property="FontAttributes" Value="Bold"/>
</Style>
<Style TargetType="Label" x:Key="MasterAuthorBookText">
<Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource Black}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Small"/>
</Style>
<Style TargetType="Label" x:Key="MasterStateBookText">
<Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource TextGray}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Micro"/>
</Style>
<Style TargetType="Label" x:Key="HomeButtonText">
<Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource Black}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Medium"/> <Setter Property="FontSize" Value="Medium"/>
</Style> </Style>

@ -33,8 +33,10 @@
Style="{StaticResource HomeTitle}" Style="{StaticResource HomeTitle}"
Grid.Row="0"/> Grid.Row="0"/>
<VerticalStackLayout BackgroundColor="{DynamicResource LightGray}" <VerticalStackLayout Grid.Row="2">
Grid.Row="2"> <VerticalStackLayout.BackgroundColor>
<AppThemeBinding Light="{DynamicResource LightGray}" Dark="{StaticResource Black}" />
</VerticalStackLayout.BackgroundColor>
<contentView:SeparatorEntireView/> <contentView:SeparatorEntireView/>
@ -77,8 +79,10 @@
Style="{StaticResource HeaderTitle}" Style="{StaticResource HeaderTitle}"
Grid.Row="4"/> Grid.Row="4"/>
<VerticalStackLayout BackgroundColor="{DynamicResource LightGray}" <VerticalStackLayout Grid.Row="6">
Grid.Row="6"> <VerticalStackLayout.BackgroundColor>
<AppThemeBinding Light="{DynamicResource LightGray}" Dark="{StaticResource Black}" />
</VerticalStackLayout.BackgroundColor>
<contentView:SeparatorEntireView/> <contentView:SeparatorEntireView/>

@ -22,9 +22,11 @@
Grid.Column="0"/> Grid.Column="0"/>
<Label Text="{Binding ButtonTitle}" <Label Text="{Binding ButtonTitle}"
VerticalOptions="Center" VerticalOptions="Center"
Style="{StaticResource HomeButtonText}"
Grid.Column="2"/> Grid.Column="2"/>
<Label Text="{Binding ButtonNumber, FallbackValue=' '}" <Label Text="{Binding ButtonNumber, FallbackValue=' '}"
VerticalOptions="Center" VerticalOptions="Center"
Style="{StaticResource DetailsButtonBody}"
Grid.Column="4"/> Grid.Column="4"/>
<Image Source="chevron_right.png" <Image Source="chevron_right.png"
MaximumHeightRequest="15" MaximumHeightRequest="15"

@ -3,9 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LivreLand.View.ContentViews.SeparatorBigCutStartView"> x:Class="LivreLand.View.ContentViews.SeparatorBigCutStartView">
<Grid> <Grid>
<BoxView Color="{DynamicResource Gray}" <BoxView Margin="40,0,0,0"
Margin="40,0,0,0"
HeightRequest="1" HeightRequest="1"
HorizontalOptions="Fill"/> HorizontalOptions="Fill">
<BoxView.BackgroundColor>
<AppThemeBinding Light="{DynamicResource Gray}" Dark="{StaticResource White}" />
</BoxView.BackgroundColor>
</BoxView>
</Grid> </Grid>
</ContentView> </ContentView>

@ -3,9 +3,12 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LivreLand.View.ContentViews.SeparatorCutStartView"> x:Class="LivreLand.View.ContentViews.SeparatorCutStartView">
<Grid> <Grid>
<BoxView Color="{DynamicResource Gray}" <BoxView Margin="10,0,0,0"
Margin="10,0,0,0"
HeightRequest="1" HeightRequest="1"
HorizontalOptions="Fill"/> HorizontalOptions="Fill">
<BoxView.BackgroundColor>
<AppThemeBinding Light="{DynamicResource Gray}" Dark="{StaticResource White}" />
</BoxView.BackgroundColor>
</BoxView>
</Grid> </Grid>
</ContentView> </ContentView>

@ -5,6 +5,10 @@
<Grid> <Grid>
<BoxView Color="{DynamicResource HeaderSeparatorGray}" <BoxView Color="{DynamicResource HeaderSeparatorGray}"
HeightRequest="1" HeightRequest="1"
HorizontalOptions="Fill"/> HorizontalOptions="Fill">
<BoxView.BackgroundColor>
<AppThemeBinding Light="{DynamicResource Gray}" Dark="{StaticResource White}" />
</BoxView.BackgroundColor>
</BoxView>
</Grid> </Grid>
</ContentView> </ContentView>

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:view="clr-namespace:LivreLand.View"
xmlns:contentView="clr-namespace:LivreLand.View.ContentViews"
x:Class="LivreLand.View.FiltrageNoteView"
Title="FiltrageNoteView">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="10"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="10"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<view:HeaderPage Grid.Row="0"
HeaderTitle="Note"
HeaderBackButtonText="Mes livres"
HeaderPlusButtonVisible="False"
HeaderSwitchButtonVisible="True"/>
<VerticalStackLayout BackgroundColor="{DynamicResource Light}"
Grid.Row="2">
<contentView:SeparatorEntireView/>
<contentView:SearchBarView Grid.Row="2"/>
</VerticalStackLayout>
<ScrollView Grid.Row="4">
<VerticalStackLayout Grid.Row="2">
<contentView:SeparatorEntireView/>
<!--1 étoile-->
<contentView:HomeButtonView ButtonTitle="1 étoile"
ButtonIcon="star_fill.png"
ButtonNumber="2"/>
<contentView:SeparatorBigCutStartView/>
</VerticalStackLayout>
</ScrollView>
</Grid>
</ContentPage>

@ -0,0 +1,9 @@
namespace LivreLand.View;
public partial class FiltrageNoteView : ContentPage
{
public FiltrageNoteView()
{
InitializeComponent();
}
}

@ -34,9 +34,9 @@
TextColor="Red" TextColor="Red"
Style="{StaticResource HeaderTitle}" Style="{StaticResource HeaderTitle}"
Grid.Column="2"/> Grid.Column="2"/>
<!--<Grid.GestureRecognizers> <Grid.GestureRecognizers>
<TapGestureRecognizer Command=""/> <TapGestureRecognizer Tapped="OnBackButtonTapped"/>
</Grid.GestureRecognizers>--> </Grid.GestureRecognizers>
</Grid> </Grid>
<Button VerticalOptions="Center" <Button VerticalOptions="Center"
ImageSource="plus.png" ImageSource="plus.png"

@ -1,3 +1,4 @@
using Microsoft.Maui.ApplicationModel;
using Microsoft.Maui.Graphics; using Microsoft.Maui.Graphics;
namespace LivreLand.View; namespace LivreLand.View;
@ -43,4 +44,9 @@ public partial class HeaderPage : ContentView
{ {
InitializeComponent(); InitializeComponent();
} }
public void OnBackButtonTapped(object sender, EventArgs e)
{
App.Current.MainPage.Navigation.PopAsync();
}
} }

@ -19,7 +19,9 @@
HeaderSwitchButtonVisible="True" HeaderSwitchButtonVisible="True"
Grid.Row="0"/> Grid.Row="0"/>
<ScrollView Grid.Row="2"> <ScrollView Grid.Row="2">
<CollectionView ItemsSource="{Binding AllBooks}"> <CollectionView ItemsSource="{Binding AllBooks}"
SelectionMode="Single"
SelectionChanged="OnSelectionChanged">
<CollectionView.GroupHeaderTemplate> <CollectionView.GroupHeaderTemplate>
<DataTemplate> <DataTemplate>
<Grid BackgroundColor="{DynamicResource HeaderGray}"> <Grid BackgroundColor="{DynamicResource HeaderGray}">
@ -36,7 +38,9 @@
</CollectionView.GroupHeaderTemplate> </CollectionView.GroupHeaderTemplate>
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>
<Grid Margin="10"> <VerticalStackLayout Margin="10"
Spacing="20">
<Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/> <ColumnDefinition Width="10"/>
@ -55,17 +59,22 @@
Grid.Column="0" Grid.Column="0"
Grid.RowSpan="5"/> Grid.RowSpan="5"/>
<Label Text="{Binding Title}" <Label Text="{Binding Title}"
Style="{StaticResource MasterTitleBookText}"
Grid.Column="2" Grid.Column="2"
Grid.Row="0"/> Grid.Row="0"/>
<Label Text="{Binding Author}" <Label Text="{Binding Author}"
Style="{StaticResource MasterAuthorBookText}"
Grid.Column="2" Grid.Column="2"
Grid.Row="1"/> Grid.Row="1"/>
<Label Text="{Binding State}" <Label Text="{Binding State}"
Style="{StaticResource MasterStateBookText}"
Grid.Column="2" Grid.Column="2"
Grid.Row="2"/> Grid.Row="2"/>
<contentView:StarNotationView Grid.Column="2" <contentView:StarNotationView Grid.Column="2"
Grid.Row="4"/> Grid.Row="4"/>
</Grid> </Grid>
<contentView:SeparatorCutStartView/>
</VerticalStackLayout>
</DataTemplate> </DataTemplate>
</CollectionView.ItemTemplate> </CollectionView.ItemTemplate>
</CollectionView> </CollectionView>

@ -16,4 +16,9 @@ public partial class TousView : ContentPage
BindingContext = this; BindingContext = this;
InitializeComponent(); InitializeComponent();
} }
void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
App.Current.MainPage.Navigation.PushAsync(new DetailsLivreView());
}
} }
Loading…
Cancel
Save