ADD : fonts, start vertical alphabet, fix dark mode problems

(ToDo : OnClickBookButton Orange, finish vertical alphabet, Plus Popup Lines)
homepage-05-09
Lou BRODA 1 year ago
parent ba008b71e5
commit 804529aa0b

@ -61,15 +61,24 @@
<MauiXaml Update="View\BibliothequeView.xaml"> <MauiXaml Update="View\BibliothequeView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="View\ContentViews\AlphabetVerticalMenuView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ContentViews\DetailsLivreButtonView.xaml"> <MauiXaml Update="View\ContentViews\DetailsLivreButtonView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<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\LetterVerticalMenuView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ContentViews\PopupHomePlusButtonView.xaml"> <MauiXaml Update="View\ContentViews\PopupHomePlusButtonView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="View\ContentViews\PopupLetterView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\ContentViews\SearchBarView.xaml"> <MauiXaml Update="View\ContentViews\SearchBarView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>

@ -13,8 +13,8 @@ public static class MauiProgram
.UseMauiCommunityToolkit() .UseMauiCommunityToolkit()
.ConfigureFonts(fonts => .ConfigureFonts(fonts =>
{ {
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); fonts.AddFont("SF-Compact-Display-Black.otf", "SFCompactDisplayBlack");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); fonts.AddFont("SF-Compact-Display-Bold.otf", "SFCompactDisplayBold");
}); });
#if DEBUG #if DEBUG

@ -301,7 +301,7 @@
</Style> </Style>
<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 Gray500}}" />
<Setter Property="Placeholder" Value="Rechercher" /> <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}" />

@ -0,0 +1,36 @@
<?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"
xmlns:contentView="clr-namespace:LivreLand.View.ContentViews"
x:Class="LivreLand.View.ContentViews.AlphabetVerticalMenuView">
<VerticalStackLayout Margin="0,0,5,0">
<contentView:LetterVerticalMenuView ButtonLetter="A"/>
<contentView:LetterVerticalMenuView ButtonLetter="B"/>
<contentView:LetterVerticalMenuView ButtonLetter="C"/>
<contentView:LetterVerticalMenuView ButtonLetter="D"/>
<contentView:LetterVerticalMenuView ButtonLetter="E"/>
<contentView:LetterVerticalMenuView ButtonLetter="F"/>
<contentView:LetterVerticalMenuView ButtonLetter="G"/>
<contentView:LetterVerticalMenuView ButtonLetter="H"/>
<contentView:LetterVerticalMenuView ButtonLetter="I"/>
<contentView:LetterVerticalMenuView ButtonLetter="J"/>
<contentView:LetterVerticalMenuView ButtonLetter="K"/>
<contentView:LetterVerticalMenuView ButtonLetter="L"/>
<contentView:LetterVerticalMenuView ButtonLetter="M"/>
<contentView:LetterVerticalMenuView ButtonLetter="N"/>
<contentView:LetterVerticalMenuView ButtonLetter="O"/>
<contentView:LetterVerticalMenuView ButtonLetter="P"/>
<contentView:LetterVerticalMenuView ButtonLetter="Q"/>
<contentView:LetterVerticalMenuView ButtonLetter="R"/>
<contentView:LetterVerticalMenuView ButtonLetter="S"/>
<contentView:LetterVerticalMenuView ButtonLetter="T"/>
<contentView:LetterVerticalMenuView ButtonLetter="U"/>
<contentView:LetterVerticalMenuView ButtonLetter="V"/>
<contentView:LetterVerticalMenuView ButtonLetter="W"/>
<contentView:LetterVerticalMenuView ButtonLetter="X"/>
<contentView:LetterVerticalMenuView ButtonLetter="Y"/>
<contentView:LetterVerticalMenuView ButtonLetter="Z"/>
</VerticalStackLayout>
</ContentView>

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

@ -32,7 +32,7 @@
IsVisible="{Binding ButtonBlackIconVisible}" IsVisible="{Binding ButtonBlackIconVisible}"
Grid.Column="0"> Grid.Column="0">
<Image.Behaviors> <Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{StaticResource Black}"/> <toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
</Image.Behaviors> </Image.Behaviors>
</Image> </Image>
<Label Text="{Binding ButtonTitle}" <Label Text="{Binding ButtonTitle}"
@ -46,7 +46,12 @@
<Image Source="chevron_right.png" <Image Source="chevron_right.png"
MaximumHeightRequest="15" MaximumHeightRequest="15"
MaximumWidthRequest="15" MaximumWidthRequest="15"
Grid.Column="6"/> Grid.Column="6">
<Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
</Image.Behaviors>
</Image>
<Grid.GestureRecognizers> <Grid.GestureRecognizers>
<TapGestureRecognizer Command="{Binding ButtonCommand}"/> <TapGestureRecognizer Command="{Binding ButtonCommand}"/>
</Grid.GestureRecognizers> </Grid.GestureRecognizers>

@ -0,0 +1,16 @@
<?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.LetterVerticalMenuView"
x:Name="this">
<Grid BindingContext="{x:Reference this}">
<Label x:Name="letterText"
Text="{Binding ButtonLetter}"
TextColor="{StaticResource Blue100Accent}"/>
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="OnLetterTapped"/>
</Grid.GestureRecognizers>
</Grid>
</ContentView>

@ -0,0 +1,24 @@
using CommunityToolkit.Maui.Views;
namespace LivreLand.View.ContentViews;
public partial class LetterVerticalMenuView : ContentView
{
public static readonly BindableProperty ButtonLetterProperty = BindableProperty.Create(nameof(ButtonLetter), typeof(string), typeof(LetterVerticalMenuView), string.Empty);
public string ButtonLetter
{
get => (string)GetValue(LetterVerticalMenuView.ButtonLetterProperty);
set => SetValue(LetterVerticalMenuView.ButtonLetterProperty, value);
}
public LetterVerticalMenuView()
{
InitializeComponent();
}
public void OnLetterTapped(object sender, TappedEventArgs e)
{
var plusPopup = new PopupLetterView(letterText.Text);
App.Current.MainPage.ShowPopup(plusPopup);
}
}

@ -9,7 +9,7 @@
Color="Transparent"> Color="Transparent">
<Border> <Border>
<Grid BackgroundColor="{DynamicResource PopupBackground}"> <Grid BackgroundColor="{AppThemeBinding Light={StaticResource PopupBackground}, Dark={StaticResource Black}}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
@ -33,9 +33,8 @@
<Grid Grid.Row="2" <Grid Grid.Row="2"
Margin="10,5,10,5"> Margin="10,5,10,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="9*"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Scanner un code-barres" <Label Text="Scanner un code-barres"
@ -44,9 +43,9 @@
<Image Source="qr_bar_code_fill.png" <Image Source="qr_bar_code_fill.png"
HeightRequest="20" HeightRequest="20"
WidthRequest="20" WidthRequest="20"
Grid.Column="2"> Grid.Column="1">
<Image.Behaviors> <Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="Black"/> <toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
</Image.Behaviors> </Image.Behaviors>
</Image> </Image>
</Grid> </Grid>
@ -56,20 +55,20 @@
<Grid Grid.Row="4" <Grid Grid.Row="4"
Margin="10,5,10,5"> Margin="10,5,10,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="9*"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Scanner des codes-barres" <Label Text="Scanner des codes-barres"
MaxLines="2"
Style="{StaticResource HomeButtonText}" Style="{StaticResource HomeButtonText}"
Grid.Column="0"/> Grid.Column="0"/>
<Image Source="bar_code_fill.png" <Image Source="bar_code_fill.png"
HeightRequest="20" HeightRequest="20"
WidthRequest="20" WidthRequest="20"
Grid.Column="2"> Grid.Column="1">
<Image.Behaviors> <Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="Black"/> <toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
</Image.Behaviors> </Image.Behaviors>
</Image> </Image>
</Grid> </Grid>
@ -80,9 +79,8 @@
<Grid Grid.Row="6" <Grid Grid.Row="6"
Margin="10,5,10,5"> Margin="10,5,10,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="9*"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Rechercher en ligne" <Label Text="Rechercher en ligne"
@ -91,9 +89,9 @@
<Image Source="magnifying_glass.png" <Image Source="magnifying_glass.png"
HeightRequest="20" HeightRequest="20"
WidthRequest="20" WidthRequest="20"
Grid.Column="2"> Grid.Column="1">
<Image.Behaviors> <Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="Black"/> <toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
</Image.Behaviors> </Image.Behaviors>
</Image> </Image>
</Grid> </Grid>
@ -103,9 +101,8 @@
<Grid Grid.Row="8" <Grid Grid.Row="8"
Margin="10,5,10,5"> Margin="10,5,10,5">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="9*"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label Text="Saisir l'ISBN" <Label Text="Saisir l'ISBN"
@ -114,9 +111,9 @@
<Image Source="keyboard_fill.png" <Image Source="keyboard_fill.png"
HeightRequest="20" HeightRequest="20"
WidthRequest="20" WidthRequest="20"
Grid.Column="2"> Grid.Column="1">
<Image.Behaviors> <Image.Behaviors>
<toolkit:IconTintColorBehavior TintColor="Black"/> <toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
</Image.Behaviors> </Image.Behaviors>
</Image> </Image>
</Grid> </Grid>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="LivreLand.View.ContentViews.PopupLetterView">
<Grid BackgroundColor="{StaticResource HeaderGray}">
<Label x:Name="letterText"
Style="{StaticResource HomeTitle}"/>
</Grid>
</toolkit:Popup>

@ -0,0 +1,12 @@
using CommunityToolkit.Maui.Views;
namespace LivreLand.View.ContentViews;
public partial class PopupLetterView : Popup
{
public PopupLetterView(string letter)
{
InitializeComponent();
letterText.Text = letter;
}
}

@ -10,7 +10,7 @@
<Label Text="Modifier" <Label Text="Modifier"
VerticalOptions="Center" VerticalOptions="Center"
TextColor="{StaticResource PinkOrange}" TextColor="{StaticResource PinkOrange}"
Style="{StaticResource HeaderTitle}" Style="{StaticResource HomeButtonText}"
Grid.Column="0"/> Grid.Column="0"/>
</Grid> </Grid>
<ImageButton VerticalOptions="Center" <ImageButton VerticalOptions="Center"
@ -18,6 +18,7 @@
BackgroundColor="Transparent" BackgroundColor="Transparent"
MaximumHeightRequest="20" MaximumHeightRequest="20"
MaximumWidthRequest="20" MaximumWidthRequest="20"
Clicked="OnPlusClicked"
Grid.Column="2"> Grid.Column="2">
<ImageButton.Behaviors> <ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{StaticResource PinkOrange}"/> <toolkit:IconTintColorBehavior TintColor="{StaticResource PinkOrange}"/>

@ -1,3 +1,6 @@
using CommunityToolkit.Maui.Views;
using LivreLand.View.ContentViews;
namespace LivreLand.View; namespace LivreLand.View;
public partial class HeaderHome : ContentView public partial class HeaderHome : ContentView
@ -6,4 +9,10 @@ public partial class HeaderHome : ContentView
{ {
InitializeComponent(); InitializeComponent();
} }
public void OnPlusClicked(object sender, EventArgs e)
{
var plusPopup = new PopupHomePlusButtonView();
App.Current.MainPage.ShowPopup(plusPopup);
}
} }

@ -5,7 +5,7 @@
x:Class="LivreLand.View.HeaderPage" x:Class="LivreLand.View.HeaderPage"
x:Name="this" x:Name="this"
BindingContext="{x:Reference this}" BindingContext="{x:Reference this}"
BackgroundColor="{AppThemeBinding Light={Binding HeaderColor}, Dark={StaticResource HeaderGray}}"> BackgroundColor="{AppThemeBinding Light={Binding HeaderColor}, Dark={StaticResource Black}}">
<Grid Margin="5"> <Grid Margin="5">
<Grid> <Grid>
@ -23,13 +23,17 @@
<ColumnDefinition Width="2"/> <ColumnDefinition Width="2"/>
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Button VerticalOptions="Center" <ImageButton VerticalOptions="Center"
ImageSource="chevron_right.png" Source="chevron_right.png"
Rotation="180" Rotation="180"
BackgroundColor="Transparent" BackgroundColor="Transparent"
MaximumHeightRequest="20" MaximumHeightRequest="20"
MaximumWidthRequest="20" MaximumWidthRequest="20"
Grid.Column="0"/> Grid.Column="0">
<ImageButton.Behaviors>
<toolkit:IconTintColorBehavior TintColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
</ImageButton.Behaviors>
</ImageButton>
<Label Text="{Binding HeaderBackButtonText}" <Label Text="{Binding HeaderBackButtonText}"
VerticalOptions="Center" VerticalOptions="Center"
TextColor="{DynamicResource PinkOrange}" TextColor="{DynamicResource PinkOrange}"

@ -25,7 +25,7 @@
<RowDefinition Height="10"/> <RowDefinition Height="10"/>
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid BackgroundColor="{StaticResource HeaderGray}" <Grid BackgroundColor="{AppThemeBinding Light={StaticResource HeaderGray}, Dark={StaticResource Gray900}}"
Grid.Row="0"> Grid.Row="0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="10"/> <ColumnDefinition Width="10"/>
@ -85,7 +85,11 @@
</CollectionView.ItemTemplate> </CollectionView.ItemTemplate>
</CollectionView> </CollectionView>
</Grid> </Grid>
</ScrollView> </ScrollView>
<Grid HorizontalOptions="End"
VerticalOptions="Center"
Grid.RowSpan="3">
<contentView:AlphabetVerticalMenuView/>
</Grid>
</Grid> </Grid>
</ContentPage> </ContentPage>
Loading…
Cancel
Save