ADD : Forme de la page Détails du livre (à affiner)

homepage-05-09
Lou BRODA 1 year ago
parent 394c438adc
commit 0a62c5f3e5

@ -17,7 +17,7 @@
ContentTemplate="{DataTemplate view:TousView}"
Icon="list_bullet.svg"/>
<ShellContent Title="My Readings"
ContentTemplate="{DataTemplate view:BibliothequeView}"
ContentTemplate="{DataTemplate view:DetailsLivreView}"
Icon="bookmark_fill"/>
<ShellContent Title="Search"
ContentTemplate="{DataTemplate view:BibliothequeView}"

@ -61,9 +61,15 @@
<MauiXaml Update="View\BibliothequeView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ContentViews\DetailsLivreButtonView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ContentViews\HomeButtonView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ContentViews\SeparatorCutStartView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\DetailsLivreView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>

@ -44,128 +44,30 @@
ButtonIcon="tray_2_fill.png"
ButtonNumber="45"/>
<BoxView Color="{DynamicResource Gray}"
Margin="10,0,0,0"
HeightRequest="1"
HorizontalOptions="Fill"/>
<contentView:SeparatorCutStartView/>
<!--En prêt-->
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Image Source="person_badge_clock_fill.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="0"/>
<Label Text="En prêt"
VerticalOptions="Center"
Grid.Column="2"/>
<Label Text="1"
VerticalOptions="Center"
Grid.Column="4"/>
<Image Source="chevron_right.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="6"/>
</Grid>
<contentView:HomeButtonView ButtonTitle="En prêt"
ButtonIcon="person_badge_clock_fill.png"
ButtonNumber="1"/>
<BoxView Color="{DynamicResource Gray}"
Margin="10,0,0,0"
HeightRequest="1"
HorizontalOptions="Fill"/>
<contentView:SeparatorCutStartView/>
<!--À lire plus tard-->
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Image Source="arrow_forward.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="0"/>
<Label Text="À lire plus tard"
VerticalOptions="Center"
Grid.Column="2"/>
<Image Source="chevron_right.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="6"/>
</Grid>
<contentView:HomeButtonView ButtonTitle="À lire plus tard"
ButtonIcon="arrow_forward.png"/>
<BoxView Color="{DynamicResource Gray}"
Margin="10,0,0,0"
HeightRequest="1"
HorizontalOptions="Fill"/>
<contentView:SeparatorCutStartView/>
<!--Statut de lecture-->
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Image Source="eyeglasses.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="0"/>
<Label Text="Statut de lecture"
VerticalOptions="Center"
Grid.Column="2"/>
<Image Source="chevron_right.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="6"/>
</Grid>
<contentView:HomeButtonView ButtonTitle="Statut de lecture"
ButtonIcon="eyeglasses.png"/>
<BoxView Color="{DynamicResource Gray}"
Margin="10,0,0,0"
HeightRequest="1"
HorizontalOptions="Fill"/>
<contentView:SeparatorCutStartView/>
<!--Favoris-->
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Image Source="heart_fill.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="0"/>
<Label Text="Favoris"
VerticalOptions="Center"
Grid.Column="2"/>
<Image Source="chevron_right.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="6"/>
</Grid>
<contentView:HomeButtonView ButtonTitle="Favoris"
ButtonIcon="heart_fill.png"/>
<BoxView Color="{DynamicResource Gray}"
HeightRequest="1"
@ -178,96 +80,27 @@
Grid.Row="4"/>
<VerticalStackLayout BackgroundColor="{DynamicResource LightGray}"
Grid.Row="6">
Grid.Row="6">
<BoxView Color="{DynamicResource Gray}"
HeightRequest="1"
HorizontalOptions="Fill"/>
<!--Auteur-->
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Image Source="person_fill.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="0"/>
<Label Text="Auteur"
VerticalOptions="Center"
Grid.Column="2"/>
<Image Source="chevron_right.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="6"/>
</Grid>
<contentView:HomeButtonView ButtonTitle="Auteur"
ButtonIcon="person_fill.png"/>
<BoxView Color="{DynamicResource Gray}"
Margin="10,0,0,0"
HeightRequest="1"
HorizontalOptions="Fill"/>
<contentView:SeparatorCutStartView/>
<!--Date de publication-->
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Image Source="calendar.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="0"/>
<Label Text="Date de publication"
VerticalOptions="Center"
Grid.Column="2"/>
<Image Source="chevron_right.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="6"/>
</Grid>
<contentView:HomeButtonView ButtonTitle="Date de publication"
ButtonIcon="calendar.png"/>
<BoxView Color="{DynamicResource Gray}"
Margin="10,0,0,0"
HeightRequest="1"
HorizontalOptions="Fill"/>
<contentView:SeparatorCutStartView/>
<!--Note-->
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Image Source="sparkles.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="0"/>
<Label Text="Note"
VerticalOptions="Center"
Grid.Column="2"/>
<Image Source="chevron_right.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="6"/>
</Grid>
<contentView:HomeButtonView ButtonTitle="Note"
ButtonIcon="sparkles.png"/>
<BoxView Color="{DynamicResource Gray}"
HeightRequest="1"

@ -0,0 +1,25 @@
<?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.DetailsLivreButtonView"
x:Name="this">
<Grid BindingContext="{x:Reference this}"
Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding ButtonIcon}"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="0"/>
<Label Text="{Binding ButtonTitle}"
TextColor="Red"
VerticalOptions="Center"
Grid.Column="2"/>
</Grid>
</ContentView>

@ -0,0 +1,23 @@
namespace LivreLand.View.ContentViews;
public partial class DetailsLivreButtonView : ContentView
{
public static readonly BindableProperty ButtonTitleProperty = BindableProperty.Create(nameof(ButtonTitle), typeof(string), typeof(DetailsLivreButtonView), string.Empty);
public string ButtonTitle
{
get => (string)GetValue(DetailsLivreButtonView.ButtonTitleProperty);
set => SetValue(DetailsLivreButtonView.ButtonTitleProperty, value);
}
public static readonly BindableProperty ButtonIconProperty = BindableProperty.Create(nameof(ButtonIcon), typeof(string), typeof(DetailsLivreButtonView), string.Empty);
public string ButtonIcon
{
get => (string)GetValue(DetailsLivreButtonView.ButtonIconProperty);
set => SetValue(DetailsLivreButtonView.ButtonIconProperty, value);
}
public DetailsLivreButtonView()
{
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.SeparatorCutStartView">
<Grid>
<BoxView Color="{DynamicResource Gray}"
Margin="10,0,0,0"
HeightRequest="1"
HorizontalOptions="Fill"/>
</Grid>
</ContentView>

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

@ -1,32 +1,243 @@
<?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.DetailsLivreView"
Title="DetailsLivreView">
<Grid>
<ScrollView>
<VerticalStackLayout Margin="10">
<!--Informations générales-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
</Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="10"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<view:HeaderPage Grid.Row="0"/>
<ScrollView Grid.Row="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="100"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<VerticalStackLayout Grid.Row="0">
<!--Informations générales-->
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Label Text="La horde du contrevent"
Grid.Column="2"
Grid.Row="2"/>
</Grid>
<contentView:SeparatorCutStartView/>
<!--Informations en ligne-->
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Text="Infos en ligne"
FontAttributes="Bold"
VerticalOptions="Center"
Grid.Column="0"/>
<Image Source="chevron_right.png"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="2"/>
</Grid>
<contentView:SeparatorCutStartView/>
<!--Auteur-->
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Label Text="Auteur"
FontAttributes="Bold"
Grid.Row="0"/>
<Label Text="Alain Damasio"
Grid.Row="1"/>
</Grid>
<contentView:SeparatorCutStartView/>
<!--Maison d'édition-->
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Label Text="Maison d'édition"
FontAttributes="Bold"
Grid.Row="0"/>
<Label Text="Gallimard (2015)"
Grid.Row="1"/>
</Grid>
<contentView:SeparatorCutStartView/>
<!--Résumé-->
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Label Text="Résumé"
FontAttributes="Bold"
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."
Grid.Row="1"/>
</Grid>
<contentView:SeparatorCutStartView/>
<!--Détails-->
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Label Text="Détails"
FontAttributes="Bold"
Grid.Row="0"/>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Text="Nombre de pages"
Grid.Column="0"/>
<Label Text="700"
Grid.Column="2"/>
</Grid>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Text="Langue"
Grid.Column="0"/>
<Label Text="français"
Grid.Column="2"/>
</Grid>
<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Text="ISBN"
Grid.Column="0"/>
<Label Text="9782070464234"
Grid.Column="2"/>
</Grid>
</Grid>
<contentView:SeparatorCutStartView/>
<!--Statut de lecture-->
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Label Text="Statut de lecture"
FontAttributes="Bold"
Grid.Row="0"/>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Text="Statut"
Grid.Column="0"/>
<Label Text="Non lu"
Grid.Column="2"/>
</Grid>
</Grid>
<contentView:SeparatorCutStartView/>
<!--Bibliothèque-->
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Label Text="Bibliothèque"
FontAttributes="Bold"
Grid.Row="0"/>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Text="Ajouté le"
Grid.Column="0"/>
<Label Text="10 août 2023"
Grid.Column="2"/>
</Grid>
</Grid>
<contentView:SeparatorCutStartView/>
</VerticalStackLayout>
<VerticalStackLayout Grid.Row="2">
<contentView:SeparatorCutStartView/>
</VerticalStackLayout>
<contentView:DetailsLivreButtonView ButtonIcon=""
ButtonTitle="Déplacer le livre"/>
<contentView:SeparatorCutStartView/>
<contentView:DetailsLivreButtonView ButtonIcon=""
ButtonTitle="Ajouter à la liste À lire plus tard"/>
<contentView:SeparatorCutStartView/>
<contentView:DetailsLivreButtonView ButtonIcon="eyeglasses.png"
ButtonTitle="Changer le statut de lecture"/>
<contentView:SeparatorCutStartView/>
<contentView:DetailsLivreButtonView ButtonIcon="person.png"
ButtonTitle="Prêter le livre"/>
</VerticalStackLayout>
<!--Buttons-->
</Grid>
</ScrollView>
</Grid>
</ContentPage>

@ -10,7 +10,6 @@
VerticalOptions="Center"
TextColor="Red"
FontAttributes="Bold"
BackgroundColor="Transparent"
Grid.Column="0"/>
<!--<Grid.GestureRecognizers>
<TapGestureRecognizer Command=""/>

@ -2,10 +2,54 @@
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="LivreLand.View.HeaderPage">
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
<Grid Margin="5">
<Grid.ColumnDefinitions>
<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>
<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="Mes livres"
VerticalOptions="Center"
TextColor="Red"
Grid.Column="2"/>
<!--<Grid.GestureRecognizers>
<TapGestureRecognizer Command=""/>
</Grid.GestureRecognizers>-->
</Grid>
<Label Text="Tous"
FontAttributes="Bold"
Grid.Column="2"/>
<Button VerticalOptions="Center"
ImageSource="plus.png"
BackgroundColor="Transparent"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="4"/>
<Button VerticalOptions="Center"
ImageSource="plus.png"
BackgroundColor="Transparent"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="6"/>
</Grid>
</ContentView>

Loading…
Cancel
Save