ADD : more images, colors icons, separator collectionView

homepage-05-09
Lou BRODA 1 year ago
parent ca267e7af5
commit ba008b71e5

@ -0,0 +1,4 @@
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21.1875 24.687L27.0938 18.6284C27.3047 18.4292 27.4219 18.1245 27.4219 17.855C27.4219 17.2339 27 16.8237 26.3906 16.8237C26.0859 16.8237 25.8633 16.9175 25.6641 17.1167L23.2266 19.6362L21.3398 21.8277L21.4453 19.1206V4.06202C21.4453 3.45264 21.0117 3.00732 20.4023 3.00732C19.7812 3.00732 19.3477 3.45264 19.3477 4.06202V19.1206L19.4648 21.8277L17.5781 19.6362L15.1406 17.1167C14.9414 16.9175 14.707 16.8237 14.4141 16.8237C13.8047 16.8237 13.3711 17.2339 13.3711 17.855C13.3711 18.1245 13.5 18.4292 13.7109 18.6284L19.6172 24.687C20.0508 25.1441 20.7305 25.1558 21.1875 24.687Z" fill="black" fill-opacity="0.85"/>
<path d="M6.24609 3.35888L0.328125 9.39404C0.128906 9.60497 0 9.90966 0 10.1675C0 10.7886 0.421875 11.2104 1.03125 11.2104C1.33594 11.2104 1.57031 11.105 1.76953 10.9058L4.20703 8.38622L6.09375 6.20654L5.97656 8.91357V23.9722C5.97656 24.5933 6.41016 25.0269 7.03125 25.0269C7.64062 25.0269 8.07422 24.5933 8.07422 23.9722V8.91357L7.96875 6.20654L9.84375 8.38622L12.293 10.9058C12.4922 11.105 12.7148 11.2104 13.0195 11.2104C13.6289 11.2104 14.0508 10.7886 14.0508 10.1675C14.0508 9.90966 13.9336 9.60497 13.7227 9.39404L7.81641 3.35888C7.38281 2.90185 6.69141 2.87841 6.24609 3.35888Z" fill="black" fill-opacity="0.85"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -0,0 +1,10 @@
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_2124_88468)">
<path d="M1 22.8164C1 23.7773 1.63281 24.1523 2.32422 24.1523C2.72266 24.1523 3.0625 23.918 3.50781 23.6484C4.79688 22.7695 6.39062 22.2305 8.01953 22.2422C9.70703 22.2539 11.3828 22.875 12.6953 24.1406C13.2109 24.6094 13.5859 24.7617 14.0195 24.7617C14.4414 24.7617 14.8281 24.6094 15.332 24.1406C16.6445 22.8867 18.3203 22.2539 20.0195 22.2422C21.6484 22.2305 23.2305 22.7695 24.5195 23.6484C24.9648 23.918 25.3047 24.1523 25.7148 24.1523C26.3945 24.1523 27.0273 23.7773 27.0273 22.8164V6.91406C27.0273 6.71484 27.0156 6.55078 26.8867 6.35156C25.8438 4.53516 23.1953 3 19.9727 3C17.418 3 15.2031 4.01953 14.0195 5.46094C12.8359 4.01953 10.6094 3 8.06641 3C4.83203 3 2.18359 4.53516 1.14062 6.35156C1.02344 6.55078 1 6.71484 1 6.91406V22.8164ZM2.88672 21.8203V7.18359C3.83594 5.8125 5.89844 4.88672 8.06641 4.88672C10.293 4.88672 12.2383 5.82422 13.0703 7.25391V22.0195C11.875 21.0703 10.0117 20.3555 8.06641 20.3555C6.02734 20.3555 4.12891 20.9297 2.88672 21.8203ZM14.957 22.0195V7.25391C15.7891 5.82422 17.7461 4.88672 19.9727 4.88672C22.1289 4.88672 24.1914 5.8125 25.1406 7.18359V21.8203C23.8984 20.9297 22 20.3555 19.9727 20.3555C18.0156 20.3555 16.1523 21.0703 14.957 22.0195Z" fill="black" fill-opacity="0.85"/>
</g>
<defs>
<clipPath id="clip0_2124_88468">
<rect width="26.0273" height="21.7852" fill="white" transform="translate(1 3)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="511.624px" height="511.623px" viewBox="0 0 511.624 511.623" style="enable-background:new 0 0 511.624 511.623;"
xml:space="preserve">
<g>
<g>
<path d="M9.135,200.996h392.862v54.818c0,2.475,0.9,4.613,2.707,6.424c1.811,1.81,3.953,2.713,6.427,2.713
c2.666,0,4.856-0.855,6.563-2.569l91.365-91.362c1.707-1.713,2.563-3.903,2.563-6.565c0-2.667-0.856-4.858-2.57-6.567
l-91.07-91.078c-2.286-1.906-4.572-2.856-6.858-2.856c-2.662,0-4.853,0.856-6.563,2.568c-1.711,1.715-2.566,3.901-2.566,6.567
v54.818H9.135c-2.474,0-4.615,0.903-6.423,2.712S0,134.568,0,137.042v54.818c0,2.474,0.903,4.615,2.712,6.423
S6.661,200.996,9.135,200.996z"/>
<path d="M502.49,310.637H109.632v-54.82c0-2.474-0.905-4.615-2.712-6.423c-1.809-1.809-3.951-2.712-6.424-2.712
c-2.667,0-4.854,0.856-6.567,2.568L2.568,340.607C0.859,342.325,0,344.509,0,347.179c0,2.471,0.855,4.568,2.568,6.275
l91.077,91.365c2.285,1.902,4.569,2.851,6.854,2.851c2.473,0,4.615-0.903,6.423-2.707c1.807-1.813,2.712-3.949,2.712-6.427V383.72
H502.49c2.478,0,4.613-0.899,6.427-2.71c1.807-1.811,2.707-3.949,2.707-6.427v-54.816c0-2.475-0.903-4.613-2.707-6.42
C507.103,311.54,504.967,310.637,502.49,310.637z"/>
</g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

@ -225,6 +225,12 @@
<Setter Property="FontSize" Value="Medium"/> <Setter Property="FontSize" Value="Medium"/>
</Style> </Style>
<Style TargetType="Label" x:Key="HeaderCollectionViewText">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextGray}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Medium"/>
<Setter Property="FontAttributes" Value="Bold"/>
</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}}" />

@ -44,32 +44,42 @@
<contentView:HomeButtonView ButtonTitle="Tous" <contentView:HomeButtonView ButtonTitle="Tous"
ButtonIcon="tray_2_fill.png" ButtonIcon="tray_2_fill.png"
ButtonNumber="45" ButtonNumber="45"
ButtonCommand="{Binding FiltreAuteurCommand}"/> ButtonCommand="{Binding FiltreAuteurCommand}"
ButtonRedIconVisible="False"
ButtonBlackIconVisible="True"/>
<contentView:SeparatorCutStartView/> <contentView:SeparatorCutStartView/>
<!--En prêt--> <!--En prêt-->
<contentView:HomeButtonView ButtonTitle="En prêt" <contentView:HomeButtonView ButtonTitle="En prêt"
ButtonIcon="person_badge_clock_fill.png" ButtonIcon="person_badge_clock_fill.png"
ButtonNumber="1"/> ButtonNumber="1"
ButtonRedIconVisible="False"
ButtonBlackIconVisible="True"/>
<contentView:SeparatorCutStartView/> <contentView:SeparatorCutStartView/>
<!--À lire plus tard--> <!--À lire plus tard-->
<contentView:HomeButtonView ButtonTitle="À lire plus tard" <contentView:HomeButtonView ButtonTitle="À lire plus tard"
ButtonIcon="arrow_forward.png"/> ButtonIcon="arrow_forward.png"
ButtonRedIconVisible="False"
ButtonBlackIconVisible="True"/>
<contentView:SeparatorCutStartView/> <contentView:SeparatorCutStartView/>
<!--Statut de lecture--> <!--Statut de lecture-->
<contentView:HomeButtonView ButtonTitle="Statut de lecture" <contentView:HomeButtonView ButtonTitle="Statut de lecture"
ButtonIcon="eyeglasses.png"/> ButtonIcon="eyeglasses.png"
ButtonRedIconVisible="False"
ButtonBlackIconVisible="True"/>
<contentView:SeparatorCutStartView/> <contentView:SeparatorCutStartView/>
<!--Favoris--> <!--Favoris-->
<contentView:HomeButtonView ButtonTitle="Favoris" <contentView:HomeButtonView ButtonTitle="Favoris"
ButtonIcon="heart_fill.png"/> ButtonIcon="heart_fill.png"
ButtonRedIconVisible="False"
ButtonBlackIconVisible="True"/>
<contentView:SeparatorEntireView/> <contentView:SeparatorEntireView/>
</VerticalStackLayout> </VerticalStackLayout>
@ -88,19 +98,25 @@
<!--Auteur--> <!--Auteur-->
<contentView:HomeButtonView ButtonTitle="Auteur" <contentView:HomeButtonView ButtonTitle="Auteur"
ButtonIcon="person_fill.png"/> ButtonIcon="person_fill.png"
ButtonRedIconVisible="False"
ButtonBlackIconVisible="True"/>
<contentView:SeparatorCutStartView/> <contentView:SeparatorCutStartView/>
<!--Date de publication--> <!--Date de publication-->
<contentView:HomeButtonView ButtonTitle="Date de publication" <contentView:HomeButtonView ButtonTitle="Date de publication"
ButtonIcon="calendar.png"/> ButtonIcon="calendar.png"
ButtonRedIconVisible="False"
ButtonBlackIconVisible="True"/>
<contentView:SeparatorCutStartView/> <contentView:SeparatorCutStartView/>
<!--Note--> <!--Note-->
<contentView:HomeButtonView ButtonTitle="Note" <contentView:HomeButtonView ButtonTitle="Note"
ButtonIcon="sparkles.png"/> ButtonIcon="sparkles.png"
ButtonRedIconVisible="False"
ButtonBlackIconVisible="True"/>
<contentView:SeparatorEntireView/> <contentView:SeparatorEntireView/>
</VerticalStackLayout> </VerticalStackLayout>

@ -20,9 +20,19 @@
<Image Source="{Binding ButtonIcon}" <Image Source="{Binding ButtonIcon}"
MaximumHeightRequest="20" MaximumHeightRequest="20"
MaximumWidthRequest="20" MaximumWidthRequest="20"
IsVisible="{Binding ButtonRedIconVisible}"
Grid.Column="0"> Grid.Column="0">
<Image.Behaviors> <Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{Binding ButtonIconColor}"/> <toolkit:IconTintColorBehavior TintColor="{StaticResource PinkOrange}"/>
</Image.Behaviors>
</Image>
<Image Source="{Binding ButtonIcon}"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
IsVisible="{Binding ButtonBlackIconVisible}"
Grid.Column="0">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{StaticResource Black}"/>
</Image.Behaviors> </Image.Behaviors>
</Image> </Image>
<Label Text="{Binding ButtonTitle}" <Label Text="{Binding ButtonTitle}"

@ -25,11 +25,18 @@ public partial class HomeButtonView : ContentView
set => SetValue(HomeButtonView.ButtonNumberProperty, value); set => SetValue(HomeButtonView.ButtonNumberProperty, value);
} }
public static readonly BindableProperty ButtonIconColorProperty = BindableProperty.Create(nameof(ButtonIconColor), typeof(Color), typeof(HomeButtonView), Colors.Black); public static readonly BindableProperty ButtonRedIconVisibleProperty = BindableProperty.Create(nameof(ButtonRedIconVisible), typeof(Boolean), typeof(HomeButtonView), true);
public Color ButtonIconColor public Boolean ButtonRedIconVisible
{ {
get => (Color)GetValue(HomeButtonView.ButtonIconColorProperty); get => (Boolean)GetValue(HomeButtonView.ButtonRedIconVisibleProperty);
set => SetValue(HomeButtonView.ButtonIconColorProperty, value); set => SetValue(HomeButtonView.ButtonRedIconVisibleProperty, value);
}
public static readonly BindableProperty ButtonBlackIconVisibleProperty = BindableProperty.Create(nameof(ButtonBlackIconVisible), typeof(Boolean), typeof(HomeButtonView), true);
public Boolean ButtonBlackIconVisible
{
get => (Boolean)GetValue(HomeButtonView.ButtonBlackIconVisibleProperty);
set => SetValue(HomeButtonView.ButtonBlackIconVisibleProperty, value);
} }
public static readonly BindableProperty ButtonCommandProperty = BindableProperty.Create(nameof(ButtonCommand), typeof(Command), typeof(HomeButtonView)); public static readonly BindableProperty ButtonCommandProperty = BindableProperty.Create(nameof(ButtonCommand), typeof(Command), typeof(HomeButtonView));

@ -6,9 +6,10 @@
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="10"/> <ColumnDefinition Width="10"/>
<ColumnDefinition Width="300"/> <ColumnDefinition Width="4*"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="10"/> <ColumnDefinition Width="10"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Frame CornerRadius="10" <Frame CornerRadius="10"
BorderColor="Transparent" BorderColor="Transparent"

@ -36,9 +36,10 @@
<!--Alain Damasio--> <!--Alain Damasio-->
<contentView:HomeButtonView ButtonTitle="Alain Damasio" <contentView:HomeButtonView ButtonTitle="Alain Damasio"
ButtonIcon="book_fill.png" ButtonIcon="book.png"
ButtonNumber="2" ButtonNumber="2"
ButtonIconColor="{StaticResource PinkOrange}"/> ButtonRedIconVisible="True"
ButtonBlackIconVisible="False"/>
<contentView:SeparatorBigCutStartView/> <contentView:SeparatorBigCutStartView/>
</VerticalStackLayout> </VerticalStackLayout>

@ -35,9 +35,10 @@
<!--2022--> <!--2022-->
<contentView:HomeButtonView ButtonTitle="2022" <contentView:HomeButtonView ButtonTitle="2022"
ButtonIcon="book_fill.png" ButtonIcon="book.png"
ButtonNumber="1" ButtonNumber="1"
ButtonIconColor="{DynamicResource PinkOrange}"/> ButtonRedIconVisible="True"
ButtonBlackIconVisible="False"/>
<contentView:SeparatorBigCutStartView/> <contentView:SeparatorBigCutStartView/>
</VerticalStackLayout> </VerticalStackLayout>

@ -36,9 +36,10 @@
<!--1 étoile--> <!--1 étoile-->
<contentView:HomeButtonView ButtonTitle="1 étoile" <contentView:HomeButtonView ButtonTitle="1 étoile"
ButtonIcon="star_fill.png" ButtonIcon="book.png"
ButtonNumber="2" ButtonNumber="2"
ButtonIconColor="{DynamicResource PinkOrange}"/> ButtonRedIconVisible="False"
ButtonBlackIconVisible="True"/>
<contentView:SeparatorBigCutStartView/> <contentView:SeparatorBigCutStartView/>
</VerticalStackLayout> </VerticalStackLayout>

@ -1,6 +1,7 @@
<?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"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="LivreLand.View.HeaderHome"> x:Class="LivreLand.View.HeaderHome">
<Grid ColumnDefinitions="auto, *, auto" <Grid ColumnDefinitions="auto, *, auto"
@ -8,13 +9,20 @@
<Grid> <Grid>
<Label Text="Modifier" <Label Text="Modifier"
VerticalOptions="Center" VerticalOptions="Center"
TextColor="Red" TextColor="{StaticResource PinkOrange}"
Style="{StaticResource HeaderTitle}" Style="{StaticResource HeaderTitle}"
Grid.Column="0"/> Grid.Column="0"/>
<!--<Grid.GestureRecognizers>
<TapGestureRecognizer Command=""/>
</Grid.GestureRecognizers>-->
</Grid> </Grid>
<ImageButton VerticalOptions="Center"
Source="plus.png"
BackgroundColor="Transparent"
MaximumHeightRequest="20"
MaximumWidthRequest="20"
Grid.Column="2">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{StaticResource PinkOrange}"/>
</ImageButton.Behaviors>
</ImageButton>
<Button VerticalOptions="Center" <Button VerticalOptions="Center"
ImageSource="plus.png" ImageSource="plus.png"
BackgroundColor="Transparent" BackgroundColor="Transparent"

@ -48,19 +48,18 @@
Clicked="OnPlusClicked" Clicked="OnPlusClicked"
Grid.Column="2"> Grid.Column="2">
<ImageButton.Behaviors> <ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{DynamicResource PinkOrange}"/> <toolkit:IconTintColorBehavior TintColor="{StaticResource PinkOrange}"/>
</ImageButton.Behaviors> </ImageButton.Behaviors>
</ImageButton> </ImageButton>
<ImageButton VerticalOptions="Center" <ImageButton VerticalOptions="Center"
Source="switch_fill.png" Source="arrow_up_arrow_down.png"
Rotation="90"
BackgroundColor="Transparent" BackgroundColor="Transparent"
MaximumHeightRequest="20" MaximumHeightRequest="20"
MaximumWidthRequest="20" MaximumWidthRequest="20"
IsVisible="{Binding HeaderSwitchButtonVisible}" IsVisible="{Binding HeaderSwitchButtonVisible}"
Grid.Column="4"> Grid.Column="4">
<ImageButton.Behaviors> <ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{DynamicResource PinkOrange}"/> <toolkit:IconTintColorBehavior TintColor="{StaticResource PinkOrange}"/>
</ImageButton.Behaviors> </ImageButton.Behaviors>
</ImageButton> </ImageButton>
</Grid> </Grid>

@ -19,23 +19,29 @@
HeaderSwitchButtonVisible="True" HeaderSwitchButtonVisible="True"
Grid.Row="0"/> Grid.Row="0"/>
<ScrollView Grid.Row="2"> <ScrollView Grid.Row="2">
<CollectionView ItemsSource="{Binding AllBooks}" <Grid>
SelectionMode="Single" <Grid.RowDefinitions>
SelectionChanged="OnSelectionChanged"> <RowDefinition Height="40"/>
<CollectionView.GroupHeaderTemplate> <RowDefinition Height="10"/>
<DataTemplate> <RowDefinition Height="auto"/>
<Grid BackgroundColor="{StaticResource HeaderGray}"> </Grid.RowDefinitions>
<Grid BackgroundColor="{StaticResource HeaderGray}"
Grid.Row="0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="10"/> <ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="{Binding Author}" <Label Text="Alain Damasio"
VerticalOptions="Center"
Style="{StaticResource HeaderCollectionViewText}"
Grid.Column="1"/> Grid.Column="1"/>
</Grid> </Grid>
</DataTemplate> <CollectionView ItemsSource="{Binding AllBooks}"
</CollectionView.GroupHeaderTemplate> SelectionMode="Single"
SelectionChanged="OnSelectionChanged"
Grid.Row="2">
<CollectionView.ItemTemplate> <CollectionView.ItemTemplate>
<DataTemplate> <DataTemplate>
<VerticalStackLayout Margin="10" <VerticalStackLayout Margin="10"
@ -78,6 +84,8 @@
</DataTemplate> </DataTemplate>
</CollectionView.ItemTemplate> </CollectionView.ItemTemplate>
</CollectionView> </CollectionView>
</Grid>
</ScrollView> </ScrollView>
</Grid> </Grid>
</ContentPage> </ContentPage>
Loading…
Cancel
Save