💄 fin de la page de la main page, debut de navigation et de la page Tous

master
Lucas EVARD 2 years ago
parent 03ff4d307b
commit 0b6c21521b

@ -0,0 +1,14 @@
<?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"
x:Class="PocketBook.Auteur"
Title="Auteur">
<ScrollView>
<VerticalStackLayout>
<Label
Text="Welcome to .NET MAUI!"
VerticalOptions="Center"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -0,0 +1,9 @@
namespace PocketBook;
public partial class Auteur : ContentPage
{
public Auteur()
{
InitializeComponent();
}
}

@ -5,7 +5,7 @@
<VerticalStackLayout> <VerticalStackLayout>
<Border Stroke="#E6E6E6" BackgroundColor="#F8F8F8" Scale="1.1"> <Border Stroke="#E6E6E6" BackgroundColor="#F8F8F8" Scale="1.1">
<StackLayout Orientation="Horizontal" Padding="0,5,0,5"> <StackLayout Orientation="Horizontal" Padding="0,5,0,5">
<Image x:Name="filterImage" Margin="30,0,0,0" Scale="0.65"/> <Image WidthRequest="30" HeightRequest="30" x:Name="filterImage" Margin="30,0,0,0" Scale="0.65"/>
<Label x:Name="filterNameLabel" Margin="5,0,0,0" VerticalTextAlignment="Center" HorizontalOptions="StartAndExpand"/> <Label x:Name="filterNameLabel" Margin="5,0,0,0" VerticalTextAlignment="Center" HorizontalOptions="StartAndExpand"/>
<Label x:Name="filterNumLabel" VerticalTextAlignment="Center" TextColor="#AFAFAF"/> <Label x:Name="filterNumLabel" VerticalTextAlignment="Center" TextColor="#AFAFAF"/>
<Image Source="chevron_right.svg" Scale="0.5" HorizontalOptions="End" Margin="0,0,20,0"/> <Image Source="chevron_right.svg" Scale="0.5" HorizontalOptions="End" Margin="0,0,20,0"/>

@ -28,6 +28,9 @@ public partial class ContentViewFilter : ContentView
public ContentViewFilter() public ContentViewFilter()
{ {
InitializeComponent(); InitializeComponent();
filterImage.SetBinding(Image.SourceProperty, new Binding(nameof(FilterImageName), source: this));
filterNameLabel.SetBinding(Label.TextProperty, new Binding(nameof(FilterName), source: this));
filterNumLabel.SetBinding(Label.TextProperty, new Binding(nameof(FilterNum), source: this));
} }
} }

@ -13,13 +13,31 @@
<Label Padding="15,0,0,0" Text="Mes Livres" FontSize="38" FontAttributes="Bold" Margin="0,0,0,10"/> <Label Padding="15,0,0,0" Text="Mes Livres" FontSize="38" FontAttributes="Bold" Margin="0,0,0,10"/>
<local:ContentViewFilter FilterImageName="tray_second_fill.svg" <local:ContentViewFilter FilterImageName="tray_second_fill.svg"
FilterName="Tous" FilterName="Tous"
FilterNum="41" /> FilterNum="45">
<local:ContentViewFilter.GestureRecognizers>
<TapGestureRecognizer Tapped="OnContentViewFilterTappedTous"/>
</local:ContentViewFilter.GestureRecognizers>
</local:ContentViewFilter>
<local:ContentViewFilter FilterImageName="person_badge_clock_fill.svg" <local:ContentViewFilter FilterImageName="person_badge_clock_fill.svg"
FilterName="En prêt" FilterName="En prêt"
FilterNum="1"/> FilterNum="1"/>
<local:ContentViewFilter FilterImageName="arrow_forward.svg" <local:ContentViewFilter FilterImageName="arrow_forward.svg"
FilterName="En prêt" FilterName="A lire plus tard"/>
FilterNum="1"/> <local:ContentViewFilter FilterImageName="eyeglasses.svg"
FilterName="Statut de lecture"/>
<local:ContentViewFilter FilterImageName="heart_fill.svg"
FilterName="Favoris"/>
<Label Text="Filtres" FontSize="20" Margin="20,20,0,20" FontAttributes="Bold"/>
<local:ContentViewFilter FilterImageName="person_fill.svg"
FilterName="Auteur">
<local:ContentViewFilter.GestureRecognizers>
<TapGestureRecognizer Tapped="OnContentViewFilterTappedAuteur"/>
</local:ContentViewFilter.GestureRecognizers>
</local:ContentViewFilter>
<local:ContentViewFilter FilterImageName="calendar.svg"
FilterName="Date de publication"/>
<local:ContentViewFilter FilterImageName="sparkles.svg"
FilterName="Note"/>
</VerticalStackLayout> </VerticalStackLayout>
</ScrollView> </ScrollView>

@ -2,11 +2,18 @@
public partial class MainPage : ContentPage public partial class MainPage : ContentPage
{ {
int count = 0;
public MainPage() public MainPage()
{ {
InitializeComponent(); InitializeComponent();
} }
private async void OnContentViewFilterTappedTous(object sender, EventArgs e)
{
await Navigation.PushAsync(new TousPage());
}
private async void OnContentViewFilterTappedAuteur(object sender, EventArgs e)
{
await Navigation.PushAsync(new Auteur());
}
} }

@ -53,12 +53,18 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<MauiXaml Update="Auteur.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="ContentViewFilter.xaml"> <MauiXaml Update="ContentViewFilter.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="NewContent1.xaml"> <MauiXaml Update="NewContent1.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="TousPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18 3.99997C18 3.44769 17.5523 2.99998 17 2.99998C16.4477 2.99999 16 3.44771 16 4L16.0002 17.586L13.7071 15.2929C13.3166 14.9024 12.6834 14.9024 12.2929 15.2929C11.9024 15.6834 11.9024 16.3166 12.2929 16.7071L16.2929 20.7071C16.4163 20.8305 16.5639 20.9149 16.7204 20.9603C16.7777 20.977 16.837 20.9886 16.898 20.9948C16.9316 20.9982 16.9657 21 17.0002 21C17.018 21 17.0357 20.9995 17.0533 20.9986C17.3143 20.985 17.5488 20.8712 17.7192 20.695L21.7071 16.7071C22.0976 16.3166 22.0976 15.6834 21.7071 15.2929C21.3166 14.9024 20.6834 14.9024 20.2929 15.2929L18.0002 17.5856L18 3.99997Z" fill="#000000"/>
<path d="M8 20L8 6.41421L10.2929 8.7071C10.6834 9.09763 11.3166 9.09763 11.7071 8.7071C12.0976 8.31658 12.0976 7.68341 11.7071 7.29289L7.70711 3.29289C7.31658 2.90237 6.68342 2.90237 6.29289 3.29289L2.29289 7.29289C1.90237 7.68341 1.90237 8.31658 2.29289 8.7071C2.68342 9.09763 3.31658 9.09763 3.70711 8.7071L6 6.41421L6 20C6 20.5523 6.44772 21 7 21C7.55229 21 8 20.5523 8 20Z" fill="#000000"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>
</svg>

After

Width:  |  Height:  |  Size: 289 B

@ -0,0 +1,19 @@
<?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:local="clr-namespace:PocketBook"
x:Class="PocketBook.TousPage">
<ScrollView>
<VerticalStackLayout>
<StackLayout Orientation="Horizontal" Padding="5,0">
<Image Source="chevron_left.svg"/>
<Label VerticalTextAlignment="Center" Text="Mes livres" FontAttributes="Bold" HorizontalOptions="StartAndExpand" TextColor="{StaticResource Primary}" FontSize="15" Margin="5,0,0,0"/>
<Label Text="Tous" FontAttributes="Bold" FontSize="18" VerticalTextAlignment="Center" HorizontalOptions="Center"/>
<StackLayout HorizontalOptions="EndAndExpand" Orientation="Horizontal">
<Label VerticalTextAlignment="Center" Text="+" TextColor="{StaticResource Primary}" FontSize="30" />
<Image Margin="15,0,0,0" x:Name="imageArrows" WidthRequest="25" HeightRequest="25" Source="arrows.svg"/>
</StackLayout>
</StackLayout>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -0,0 +1,10 @@
namespace PocketBook;
public partial class TousPage : ContentPage
{
public TousPage()
{
InitializeComponent();
}
}
Loading…
Cancel
Save