ADD : Début code all pages 🔥

homepage-05-09
Lou BRODA 1 year ago
parent 0a62c5f3e5
commit 6733ddb544

@ -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:TousView}" ContentTemplate="{DataTemplate view:FiltrageAuteurView}"
Icon="list_bullet.svg"/> Icon="list_bullet.svg"/>
<ShellContent Title="My Readings" <ShellContent Title="My Readings"
ContentTemplate="{DataTemplate view:DetailsLivreView}" ContentTemplate="{DataTemplate view:DetailsLivreView}"
Icon="bookmark_fill"/> Icon="bookmark_fill"/>
<ShellContent Title="Search" <ShellContent Title="Search"
ContentTemplate="{DataTemplate view:BibliothequeView}" ContentTemplate="{DataTemplate view:FiltrageDateView}"
Icon="magnifying_glass.png"/> Icon="magnifying_glass.png"/>
</TabBar> </TabBar>

@ -67,9 +67,21 @@
<MauiXaml Update="View\ContentViews\HomeButtonView.xaml"> <MauiXaml Update="View\ContentViews\HomeButtonView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="View\ContentViews\PopupHomePlusButtonView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ContentViews\SearchBarView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ContentViews\SeparatorBigCutStartView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ContentViews\SeparatorCutStartView.xaml"> <MauiXaml Update="View\ContentViews\SeparatorCutStartView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="View\ContentViews\SeparatorEntireView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\DetailsLivreView.xaml"> <MauiXaml Update="View\DetailsLivreView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>

@ -5,8 +5,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
<Color x:Key="Gray">#e1e1e1</Color> <Color x:Key="Gray">#e1e1e1</Color>
<Color x:Key="TextGray">#5b5b5b</Color>
<Color x:Key="LightGray">#f8f8f8</Color> <Color x:Key="LightGray">#f8f8f8</Color>
<Color x:Key="HeaderGray">#f2f0f6</Color>
<Color x:Key="HeaderSeparatorGray">#c9c9cb</Color>
<Color x:Key="Primary">#512BD4</Color> <Color x:Key="Primary">#512BD4</Color>
<Color x:Key="Secondary">#DFD8F7</Color> <Color x:Key="Secondary">#DFD8F7</Color>
<Color x:Key="Tertiary">#2B0B98</Color> <Color x:Key="Tertiary">#2B0B98</Color>

@ -176,6 +176,28 @@
</Setter> </Setter>
</Style> </Style>
<Style TargetType="Label" x:Key="HeaderTitle">
<Setter Property="TextColor" Value="{DynamicResource Black}"/>
<Setter Property="FontSize" Value="Medium"/>
<Setter Property="FontAttributes" Value="Bold"/>
</Style>
<Style TargetType="Label" x:Key="DetailsLivreTitle">
<Setter Property="TextColor" Value="{DynamicResource Black}"/>
<Setter Property="FontSize" Value="Small"/>
<Setter Property="FontAttributes" Value="Bold"/>
</Style>
<Style TargetType="Label" x:Key="DetailsLivreBody">
<Setter Property="TextColor" Value="{DynamicResource TextGray}"/>
<Setter Property="FontSize" Value="Body"/>
</Style>
<Style TargetType="Label" x:Key="DetailsButtonBody">
<Setter Property="TextColor" Value="{DynamicResource TextGray}"/>
<Setter Property="FontSize" Value="Medium"/>
</Style>
<Style TargetType="ListView"> <Style TargetType="ListView">
<Setter Property="SeparatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" /> <Setter Property="SeparatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
<Setter Property="RefreshControlColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" /> <Setter Property="RefreshControlColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
@ -247,6 +269,7 @@
<Style TargetType="SearchBar"> <Style TargetType="SearchBar">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" /> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
<Setter Property="Placeholder" Value="Rechercher" />
<Setter Property="PlaceholderColor" Value="{StaticResource Gray500}" /> <Setter Property="PlaceholderColor" Value="{StaticResource Gray500}" />
<Setter Property="CancelButtonColor" Value="{StaticResource Gray500}" /> <Setter Property="CancelButtonColor" Value="{StaticResource Gray500}" />
<Setter Property="BackgroundColor" Value="Transparent" /> <Setter Property="BackgroundColor" Value="Transparent" />

@ -12,6 +12,7 @@
<RowDefinition Height="10"/> <RowDefinition Height="10"/>
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<view:HeaderHome Grid.Row="0"/> <view:HeaderHome Grid.Row="0"/>
<ScrollView Grid.Row="2"> <ScrollView Grid.Row="2">
<Grid> <Grid>
@ -35,9 +36,7 @@
<VerticalStackLayout BackgroundColor="{DynamicResource LightGray}" <VerticalStackLayout BackgroundColor="{DynamicResource LightGray}"
Grid.Row="2"> Grid.Row="2">
<BoxView Color="{DynamicResource Gray}" <contentView:SeparatorEntireView/>
HeightRequest="1"
HorizontalOptions="Fill"/>
<!--Tous--> <!--Tous-->
<contentView:HomeButtonView ButtonTitle="Tous" <contentView:HomeButtonView ButtonTitle="Tous"
@ -69,22 +68,18 @@
<contentView:HomeButtonView ButtonTitle="Favoris" <contentView:HomeButtonView ButtonTitle="Favoris"
ButtonIcon="heart_fill.png"/> ButtonIcon="heart_fill.png"/>
<BoxView Color="{DynamicResource Gray}" <contentView:SeparatorEntireView/>
HeightRequest="1"
HorizontalOptions="Fill"/>
</VerticalStackLayout> </VerticalStackLayout>
<Label Text="Filtres" <Label Text="Filtres"
Margin="10,0,0,0" Margin="10,0,0,0"
FontAttributes="Bold" Style="{StaticResource HeaderTitle}"
Grid.Row="4"/> Grid.Row="4"/>
<VerticalStackLayout BackgroundColor="{DynamicResource LightGray}" <VerticalStackLayout BackgroundColor="{DynamicResource LightGray}"
Grid.Row="6"> Grid.Row="6">
<BoxView Color="{DynamicResource Gray}" <contentView:SeparatorEntireView/>
HeightRequest="1"
HorizontalOptions="Fill"/>
<!--Auteur--> <!--Auteur-->
<contentView:HomeButtonView ButtonTitle="Auteur" <contentView:HomeButtonView ButtonTitle="Auteur"
@ -102,9 +97,7 @@
<contentView:HomeButtonView ButtonTitle="Note" <contentView:HomeButtonView ButtonTitle="Note"
ButtonIcon="sparkles.png"/> ButtonIcon="sparkles.png"/>
<BoxView Color="{DynamicResource Gray}" <contentView:SeparatorEntireView/>
HeightRequest="1"
HorizontalOptions="Fill"/>
</VerticalStackLayout> </VerticalStackLayout>
</Grid> </Grid>

@ -17,6 +17,7 @@
MaximumWidthRequest="20" MaximumWidthRequest="20"
Grid.Column="0"/> Grid.Column="0"/>
<Label Text="{Binding ButtonTitle}" <Label Text="{Binding ButtonTitle}"
Style="{StaticResource DetailsButtonBody}"
TextColor="Red" TextColor="Red"
VerticalOptions="Center" VerticalOptions="Center"
Grid.Column="2"/> Grid.Column="2"/>

@ -12,7 +12,7 @@
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
<ColumnDefinition Width="1"/> <ColumnDefinition Width="5"/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/> <ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
@ -27,9 +27,12 @@
VerticalOptions="Center" VerticalOptions="Center"
Grid.Column="4"/> Grid.Column="4"/>
<Image Source="chevron_right.png" <Image Source="chevron_right.png"
MaximumHeightRequest="20" MaximumHeightRequest="15"
MaximumWidthRequest="20" MaximumWidthRequest="15"
Grid.Column="6"/> Grid.Column="6"/>
<!--<Grid.GestureRecognizers>
<TapGestureRecognizer Command=""/>
</Grid.GestureRecognizers>-->
</Grid> </Grid>
</ContentView> </ContentView>

@ -23,6 +23,13 @@ public partial class HomeButtonView : ContentView
set => SetValue(HomeButtonView.ButtonNumberProperty, value); set => SetValue(HomeButtonView.ButtonNumberProperty, value);
} }
public static readonly BindableProperty ButtonCommandProperty = BindableProperty.Create(nameof(ButtonCommand), typeof(Command), typeof(HomeButtonView), string.Empty);
public Command ButtonCommand
{
get => (Command)GetValue(HomeButtonView.ButtonCommandProperty);
set => SetValue(HomeButtonView.ButtonCommandProperty, value);
}
public HomeButtonView() public HomeButtonView()
{ {
InitializeComponent(); InitializeComponent();

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LivreLand.View.ContentViews.PopupHomePlusButtonView">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="10 "/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Label Text="Ajouter un livre"/>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Text="Scanner un code-barres"
Grid.Column="0"/>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Text="Scanner des codes-barres"
Grid.Column="0"/>
</Grid>
<Grid BackgroundColor="{DynamicResource HeaderGray}"
Grid.Row="3"/>
<Grid Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Text="Rechercher en ligne"
Grid.Column="0"/>
<Image Source="magnifying_glass.png"
Grid.Column="2"/>
</Grid>
<Grid Grid.Row="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Text="Saisir l'ISBN"
Grid.Column="0"/>
</Grid>
</Grid>
</ContentView>

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

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LivreLand.View.ContentViews.SearchBarView">
<Grid>
<SearchBar/>
</Grid>
</ContentView>

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

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LivreLand.View.ContentViews.SeparatorBigCutStartView">
<Grid>
<BoxView Color="{DynamicResource Gray}"
Margin="40,0,0,0"
HeightRequest="1"
HorizontalOptions="Fill"/>
</Grid>
</ContentView>

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

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LivreLand.View.ContentViews.SeparatorEntireView">
<Grid>
<BoxView Color="{DynamicResource HeaderSeparatorGray}"
HeightRequest="1"
HorizontalOptions="Fill"/>
</Grid>
</ContentView>

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

@ -11,7 +11,16 @@
<RowDefinition Height="10"/> <RowDefinition Height="10"/>
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<view:HeaderPage Grid.Row="0"/>
<VerticalStackLayout Grid.Row="0">
<view:HeaderPage HeaderTitle="Détails du livre"
HeaderBackButtonText="Tous"
HeaderPlusButtonVisible="False"
HeaderSwitchButtonVisible="False"
HeaderColor="{DynamicResource HeaderGray}"/>
<contentView:SeparatorEntireView/>
</VerticalStackLayout>
<ScrollView Grid.Row="2"> <ScrollView Grid.Row="2">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
@ -68,9 +77,10 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Text="Auteur" <Label Text="Auteur"
FontAttributes="Bold" Style="{StaticResource DetailsLivreTitle}"
Grid.Row="0"/> Grid.Row="0"/>
<Label Text="Alain Damasio" <Label Text="Alain Damasio"
Style="{StaticResource DetailsLivreBody}"
Grid.Row="1"/> Grid.Row="1"/>
</Grid> </Grid>
@ -84,9 +94,10 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Text="Maison d'édition" <Label Text="Maison d'édition"
FontAttributes="Bold" Style="{StaticResource DetailsLivreTitle}"
Grid.Row="0"/> Grid.Row="0"/>
<Label Text="Gallimard (2015)" <Label Text="Gallimard (2015)"
Style="{StaticResource DetailsLivreBody}"
Grid.Row="1"/> Grid.Row="1"/>
</Grid> </Grid>
@ -100,9 +111,10 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Text="Résumé" <Label Text="Résumé"
FontAttributes="Bold" Style="{StaticResource DetailsLivreTitle}"
Grid.Row="0"/> Grid.Row="0"/>
<Label Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Et malesuada fames ac turpis egestas integer eget aliquet. Nunc sed id semper risus. Nisl purus in mollis nunc sed id semper risus. Egestas congue quisque egestas diam in arcu cursus euismod. Elementum integer enim neque volutpat ac tincidunt vitae. Amet luctus venenatis lectus magna fringilla urna porttitor rhoncus dolor. Sollicitudin tempor id eu nisl nunc. Eget mauris pharetra et ultrices neque. In vitae turpis massa sed elementum tempus. Posuere ac ut consequat semper viverra nam. Quisque non tellus orci ac auctor augue mauris augue. Cursus in hac habitasse platea dictumst. Pellentesque diam volutpat commodo sed egestas egestas fringilla phasellus faucibus. Vel fringilla est ullamcorper eget nulla facilisi etiam." <Label Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Et malesuada fames ac turpis egestas integer eget aliquet. Nunc sed id semper risus. Nisl purus in mollis nunc sed id semper risus. Egestas congue quisque egestas diam in arcu cursus euismod. Elementum integer enim neque volutpat ac tincidunt vitae. Amet luctus venenatis lectus magna fringilla urna porttitor rhoncus dolor. Sollicitudin tempor id eu nisl nunc. Eget mauris pharetra et ultrices neque. In vitae turpis massa sed elementum tempus. Posuere ac ut consequat semper viverra nam. Quisque non tellus orci ac auctor augue mauris augue. Cursus in hac habitasse platea dictumst. Pellentesque diam volutpat commodo sed egestas egestas fringilla phasellus faucibus. Vel fringilla est ullamcorper eget nulla facilisi etiam."
Style="{StaticResource DetailsLivreBody}"
Grid.Row="1"/> Grid.Row="1"/>
</Grid> </Grid>
@ -118,7 +130,7 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Text="Détails" <Label Text="Détails"
FontAttributes="Bold" Style="{StaticResource DetailsLivreTitle}"
Grid.Row="0"/> Grid.Row="0"/>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -128,8 +140,10 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Nombre de pages" <Label Text="Nombre de pages"
Style="{StaticResource DetailsLivreBody}"
Grid.Column="0"/> Grid.Column="0"/>
<Label Text="700" <Label Text="700"
Style="{StaticResource DetailsLivreBody}"
Grid.Column="2"/> Grid.Column="2"/>
</Grid> </Grid>
<Grid Grid.Row="2"> <Grid Grid.Row="2">
@ -140,8 +154,10 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Langue" <Label Text="Langue"
Style="{StaticResource DetailsLivreBody}"
Grid.Column="0"/> Grid.Column="0"/>
<Label Text="français" <Label Text="français"
Style="{StaticResource DetailsLivreBody}"
Grid.Column="2"/> Grid.Column="2"/>
</Grid> </Grid>
<Grid Grid.Row="3"> <Grid Grid.Row="3">
@ -152,8 +168,10 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="ISBN" <Label Text="ISBN"
Style="{StaticResource DetailsLivreBody}"
Grid.Column="0"/> Grid.Column="0"/>
<Label Text="9782070464234" <Label Text="9782070464234"
Style="{StaticResource DetailsLivreBody}"
Grid.Column="2"/> Grid.Column="2"/>
</Grid> </Grid>
</Grid> </Grid>
@ -168,7 +186,7 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Text="Statut de lecture" <Label Text="Statut de lecture"
FontAttributes="Bold" Style="{StaticResource DetailsLivreTitle}"
Grid.Row="0"/> Grid.Row="0"/>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -178,8 +196,10 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Statut" <Label Text="Statut"
Style="{StaticResource DetailsLivreBody}"
Grid.Column="0"/> Grid.Column="0"/>
<Label Text="Non lu" <Label Text="Non lu"
Style="{StaticResource DetailsLivreBody}"
Grid.Column="2"/> Grid.Column="2"/>
</Grid> </Grid>
</Grid> </Grid>
@ -194,7 +214,7 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Text="Bibliothèque" <Label Text="Bibliothèque"
FontAttributes="Bold" Style="{StaticResource DetailsLivreTitle}"
Grid.Row="0"/> Grid.Row="0"/>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
@ -204,8 +224,10 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Ajouté le" <Label Text="Ajouté le"
Style="{StaticResource DetailsLivreBody}"
Grid.Column="0"/> Grid.Column="0"/>
<Label Text="10 août 2023" <Label Text="10 août 2023"
Style="{StaticResource DetailsLivreBody}"
Grid.Column="2"/> Grid.Column="2"/>
</Grid> </Grid>
</Grid> </Grid>

@ -1,12 +1,45 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 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.FiltrageAuteurView" x:Class="LivreLand.View.FiltrageAuteurView"
Title="FiltrageAuteurView"> Title="FiltrageAuteurView">
<VerticalStackLayout>
<Label <Grid>
Text="Welcome to .NET MAUI!" <Grid.RowDefinitions>
VerticalOptions="Center" <RowDefinition Height="auto"/>
HorizontalOptions="Center" /> <RowDefinition Height="10"/>
</VerticalStackLayout> <RowDefinition Height="auto"/>
<RowDefinition Height="10"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<view:HeaderPage Grid.Row="0"
HeaderTitle="Auteur"
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/>
<!--Alain Damasio-->
<contentView:HomeButtonView ButtonTitle="Alain Damasio"
ButtonIcon="book_fill.png"
ButtonNumber="2"/>
<contentView:SeparatorBigCutStartView/>
</VerticalStackLayout>
</ScrollView>
</Grid>
</ContentPage> </ContentPage>

@ -1,12 +1,44 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 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.FiltrageDateView" x:Class="LivreLand.View.FiltrageDateView"
Title="FiltrageDateView"> Title="FiltrageDateView">
<VerticalStackLayout>
<Label <Grid>
Text="Welcome to .NET MAUI!" <Grid.RowDefinitions>
VerticalOptions="Center" <RowDefinition Height="auto"/>
HorizontalOptions="Center" /> <RowDefinition Height="10"/>
</VerticalStackLayout> <RowDefinition Height="auto"/>
<RowDefinition Height="10"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<view:HeaderPage Grid.Row="0"
HeaderTitle="Date de publication"
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/>
<!--2022-->
<contentView:HomeButtonView ButtonTitle="2022"
ButtonIcon="book_fill.png"
ButtonNumber="1"/>
<contentView:SeparatorBigCutStartView/>
</VerticalStackLayout>
</ScrollView>
</Grid>
</ContentPage> </ContentPage>

@ -9,7 +9,7 @@
<Label Text="Modifier" <Label Text="Modifier"
VerticalOptions="Center" VerticalOptions="Center"
TextColor="Red" TextColor="Red"
FontAttributes="Bold" Style="{StaticResource HeaderTitle}"
Grid.Column="0"/> Grid.Column="0"/>
<!--<Grid.GestureRecognizers> <!--<Grid.GestureRecognizers>
<TapGestureRecognizer Command=""/> <TapGestureRecognizer Command=""/>

@ -1,55 +1,70 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LivreLand.View.HeaderPage"> x:Class="LivreLand.View.HeaderPage"
x:Name="this"
BindingContext="{x:Reference this}"
BackgroundColor="{Binding HeaderColor}">
<Grid Margin="5"> <Grid Margin="5">
<Grid.ColumnDefinitions> <Grid>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="2"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
<ColumnDefinition Width="2"/> <ColumnDefinition Width="2"/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="2"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Button VerticalOptions="Center"
ImageSource="chevron_right.png"
Rotation="180"
BackgroundColor="Transparent"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="0"/>
<Label Text="{Binding HeaderBackButtonText}"
VerticalOptions="Center"
TextColor="Red"
Style="{StaticResource HeaderTitle}"
Grid.Column="2"/>
<!--<Grid.GestureRecognizers>
<TapGestureRecognizer Command=""/>
</Grid.GestureRecognizers>-->
</Grid>
<Button VerticalOptions="Center"
ImageSource="plus.png"
BackgroundColor="Transparent"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
IsVisible="{Binding HeaderPlusButtonVisible}"
Grid.Column="2"/>
<Button VerticalOptions="Center" <Button VerticalOptions="Center"
ImageSource="chevron_right.png" ImageSource="plus.png"
Rotation="180"
BackgroundColor="Transparent" BackgroundColor="Transparent"
MaximumHeightRequest="20" MaximumHeightRequest="20"
MaximumWidthRequest="20" MaximumWidthRequest="20"
Grid.Column="0"/> IsVisible="{Binding HeaderSwitchButtonVisible}"
<Label Text="Mes livres" Grid.Column="4"/>
VerticalOptions="Center"
TextColor="Red"
Grid.Column="2"/>
<!--<Grid.GestureRecognizers>
<TapGestureRecognizer Command=""/>
</Grid.GestureRecognizers>-->
</Grid> </Grid>
<Label Text="Tous"
FontAttributes="Bold" <Grid>
Grid.Column="2"/> <Grid.ColumnDefinitions>
<Button VerticalOptions="Center" <ColumnDefinition Width="*"/>
ImageSource="plus.png" <ColumnDefinition Width="auto"/>
BackgroundColor="Transparent" <ColumnDefinition Width="*"/>
MaximumHeightRequest="20" </Grid.ColumnDefinitions>
MaximumWidthRequest="20" <Label Text="{Binding HeaderTitle}"
Grid.Column="4"/> Style="{StaticResource HeaderTitle}"
<Button VerticalOptions="Center" Grid.Column="1"/>
ImageSource="plus.png" </Grid>
BackgroundColor="Transparent"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="6"/>
</Grid> </Grid>
</ContentView> </ContentView>

@ -1,8 +1,45 @@
using Microsoft.Maui.Graphics;
namespace LivreLand.View; namespace LivreLand.View;
public partial class HeaderPage : ContentView public partial class HeaderPage : ContentView
{ {
public HeaderPage() public static readonly BindableProperty HeaderTitleProperty = BindableProperty.Create(nameof(HeaderTitle), typeof(string), typeof(HeaderPage), string.Empty);
public string HeaderTitle
{
get => (string)GetValue(HeaderPage.HeaderTitleProperty);
set => SetValue(HeaderPage.HeaderTitleProperty, value);
}
public static readonly BindableProperty HeaderBackButtonTextProperty = BindableProperty.Create(nameof(HeaderBackButtonText), typeof(string), typeof(HeaderPage), string.Empty);
public string HeaderBackButtonText
{
get => (string)GetValue(HeaderPage.HeaderBackButtonTextProperty);
set => SetValue(HeaderPage.HeaderBackButtonTextProperty, value);
}
public static readonly BindableProperty HeaderPlusButtonVisibleProperty = BindableProperty.Create(nameof(HeaderPlusButtonVisible), typeof(bool), typeof(HeaderPage), true);
public bool HeaderPlusButtonVisible
{
get => (bool)GetValue(HeaderPage.HeaderPlusButtonVisibleProperty);
set => SetValue(HeaderPage.HeaderPlusButtonVisibleProperty, value);
}
public static readonly BindableProperty HeaderSwitchButtonVisibleProperty = BindableProperty.Create(nameof(HeaderSwitchButtonVisible), typeof(bool), typeof(HeaderPage), true);
public bool HeaderSwitchButtonVisible
{
get => (bool)GetValue(HeaderPage.HeaderSwitchButtonVisibleProperty);
set => SetValue(HeaderPage.HeaderSwitchButtonVisibleProperty, value);
}
public static readonly BindableProperty HeaderColorProperty = BindableProperty.Create(nameof(HeaderColor), typeof(Color), typeof(HeaderPage), Colors.White);
public Color HeaderColor
{
get => (Color)GetValue(HeaderPage.HeaderColorProperty);
set => SetValue(HeaderPage.HeaderColorProperty, value);
}
public HeaderPage()
{ {
InitializeComponent(); InitializeComponent();
} }

Loading…
Cancel
Save