ADD : note page + start dark mode 🔥

homepage-05-09
Lou BRODA 1 year ago
parent a8b644e716
commit a3054f2d21

@ -14,13 +14,13 @@
ContentTemplate="{DataTemplate view:BibliothequeView}"
Icon="books_vertical_fill.png"/>
<ShellContent Title="My Lists"
ContentTemplate="{DataTemplate view:FiltrageAuteurView}"
ContentTemplate="{DataTemplate view:TousView}"
Icon="list_bullet.svg"/>
<ShellContent Title="My Readings"
ContentTemplate="{DataTemplate view:DetailsLivreView}"
ContentTemplate="{DataTemplate view:FiltrageAuteurView}"
Icon="bookmark_fill"/>
<ShellContent Title="Search"
ContentTemplate="{DataTemplate view:TousView}"
ContentTemplate="{DataTemplate view:FiltrageDateView}"
Icon="magnifying_glass.png"/>
</TabBar>

@ -93,6 +93,9 @@
<MauiXaml Update="View\FiltrageDateView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\FiltrageNoteView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="View\HeaderHome.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>

@ -177,30 +177,51 @@
</Style>
<Style TargetType="Label" x:Key="HeaderTitle">
<Setter Property="TextColor" Value="{DynamicResource Black}"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource Black}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Medium"/>
<Setter Property="FontAttributes" Value="Bold"/>
</Style>
<Style TargetType="Label" x:Key="HomeTitle">
<Setter Property="TextColor" Value="{DynamicResource Black}"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource Black}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="40"/>
<Setter Property="FontAttributes" Value="Bold"/>
</Style>
<Style TargetType="Label" x:Key="DetailsLivreTitle">
<Setter Property="TextColor" Value="{DynamicResource Black}"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource Black}, Dark={StaticResource White}}"/>
<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="TextColor" Value="{AppThemeBinding Light={DynamicResource TextGray}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Body"/>
</Style>
<Style TargetType="Label" x:Key="DetailsButtonBody">
<Setter Property="TextColor" Value="{DynamicResource TextGray}"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource TextGray}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Medium"/>
</Style>
<Style TargetType="Label" x:Key="MasterTitleBookText">
<Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource Black}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Medium"/>
<Setter Property="FontAttributes" Value="Bold"/>
</Style>
<Style TargetType="Label" x:Key="MasterAuthorBookText">
<Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource Black}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Small"/>
</Style>
<Style TargetType="Label" x:Key="MasterStateBookText">
<Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource TextGray}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Micro"/>
</Style>
<Style TargetType="Label" x:Key="HomeButtonText">
<Setter Property="TextColor" Value="{AppThemeBinding Light={DynamicResource Black}, Dark={StaticResource White}}"/>
<Setter Property="FontSize" Value="Medium"/>
</Style>

@ -33,8 +33,10 @@
Style="{StaticResource HomeTitle}"
Grid.Row="0"/>
<VerticalStackLayout BackgroundColor="{DynamicResource LightGray}"
Grid.Row="2">
<VerticalStackLayout Grid.Row="2">
<VerticalStackLayout.BackgroundColor>
<AppThemeBinding Light="{DynamicResource LightGray}" Dark="{StaticResource Black}" />
</VerticalStackLayout.BackgroundColor>
<contentView:SeparatorEntireView/>
@ -77,8 +79,10 @@
Style="{StaticResource HeaderTitle}"
Grid.Row="4"/>
<VerticalStackLayout BackgroundColor="{DynamicResource LightGray}"
Grid.Row="6">
<VerticalStackLayout Grid.Row="6">
<VerticalStackLayout.BackgroundColor>
<AppThemeBinding Light="{DynamicResource LightGray}" Dark="{StaticResource Black}" />
</VerticalStackLayout.BackgroundColor>
<contentView:SeparatorEntireView/>

@ -22,9 +22,11 @@
Grid.Column="0"/>
<Label Text="{Binding ButtonTitle}"
VerticalOptions="Center"
Style="{StaticResource HomeButtonText}"
Grid.Column="2"/>
<Label Text="{Binding ButtonNumber, FallbackValue=' '}"
VerticalOptions="Center"
Style="{StaticResource DetailsButtonBody}"
Grid.Column="4"/>
<Image Source="chevron_right.png"
MaximumHeightRequest="15"

@ -3,9 +3,12 @@
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"
<BoxView Margin="40,0,0,0"
HeightRequest="1"
HorizontalOptions="Fill"/>
HorizontalOptions="Fill">
<BoxView.BackgroundColor>
<AppThemeBinding Light="{DynamicResource Gray}" Dark="{StaticResource White}" />
</BoxView.BackgroundColor>
</BoxView>
</Grid>
</ContentView>

@ -3,9 +3,12 @@
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"
<BoxView Margin="10,0,0,0"
HeightRequest="1"
HorizontalOptions="Fill"/>
HorizontalOptions="Fill">
<BoxView.BackgroundColor>
<AppThemeBinding Light="{DynamicResource Gray}" Dark="{StaticResource White}" />
</BoxView.BackgroundColor>
</BoxView>
</Grid>
</ContentView>

@ -5,6 +5,10 @@
<Grid>
<BoxView Color="{DynamicResource HeaderSeparatorGray}"
HeightRequest="1"
HorizontalOptions="Fill"/>
HorizontalOptions="Fill">
<BoxView.BackgroundColor>
<AppThemeBinding Light="{DynamicResource Gray}" Dark="{StaticResource White}" />
</BoxView.BackgroundColor>
</BoxView>
</Grid>
</ContentView>

@ -0,0 +1,45 @@
<?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.FiltrageNoteView"
Title="FiltrageNoteView">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="10"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="10"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<view:HeaderPage Grid.Row="0"
HeaderTitle="Note"
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/>
<!--1 étoile-->
<contentView:HomeButtonView ButtonTitle="1 étoile"
ButtonIcon="star_fill.png"
ButtonNumber="2"/>
<contentView:SeparatorBigCutStartView/>
</VerticalStackLayout>
</ScrollView>
</Grid>
</ContentPage>

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

@ -34,9 +34,9 @@
TextColor="Red"
Style="{StaticResource HeaderTitle}"
Grid.Column="2"/>
<!--<Grid.GestureRecognizers>
<TapGestureRecognizer Command=""/>
</Grid.GestureRecognizers>-->
<Grid.GestureRecognizers>
<TapGestureRecognizer Tapped="OnBackButtonTapped"/>
</Grid.GestureRecognizers>
</Grid>
<Button VerticalOptions="Center"
ImageSource="plus.png"

@ -1,3 +1,4 @@
using Microsoft.Maui.ApplicationModel;
using Microsoft.Maui.Graphics;
namespace LivreLand.View;
@ -43,4 +44,9 @@ public partial class HeaderPage : ContentView
{
InitializeComponent();
}
public void OnBackButtonTapped(object sender, EventArgs e)
{
App.Current.MainPage.Navigation.PopAsync();
}
}

@ -19,7 +19,9 @@
HeaderSwitchButtonVisible="True"
Grid.Row="0"/>
<ScrollView Grid.Row="2">
<CollectionView ItemsSource="{Binding AllBooks}">
<CollectionView ItemsSource="{Binding AllBooks}"
SelectionMode="Single"
SelectionChanged="OnSelectionChanged">
<CollectionView.GroupHeaderTemplate>
<DataTemplate>
<Grid BackgroundColor="{DynamicResource HeaderGray}">
@ -36,36 +38,43 @@
</CollectionView.GroupHeaderTemplate>
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Image Source="book_cover.png"
WidthRequest="100"
HeightRequest="100"
Grid.Column="0"
Grid.RowSpan="5"/>
<Label Text="{Binding Title}"
Grid.Column="2"
Grid.Row="0"/>
<Label Text="{Binding Author}"
Grid.Column="2"
Grid.Row="1"/>
<Label Text="{Binding State}"
Grid.Column="2"
Grid.Row="2"/>
<contentView:StarNotationView Grid.Column="2"
Grid.Row="4"/>
</Grid>
<VerticalStackLayout Margin="10"
Spacing="20">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Image Source="book_cover.png"
WidthRequest="100"
HeightRequest="100"
Grid.Column="0"
Grid.RowSpan="5"/>
<Label Text="{Binding Title}"
Style="{StaticResource MasterTitleBookText}"
Grid.Column="2"
Grid.Row="0"/>
<Label Text="{Binding Author}"
Style="{StaticResource MasterAuthorBookText}"
Grid.Column="2"
Grid.Row="1"/>
<Label Text="{Binding State}"
Style="{StaticResource MasterStateBookText}"
Grid.Column="2"
Grid.Row="2"/>
<contentView:StarNotationView Grid.Column="2"
Grid.Row="4"/>
</Grid>
<contentView:SeparatorCutStartView/>
</VerticalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>

@ -16,4 +16,9 @@ public partial class TousView : ContentPage
BindingContext = this;
InitializeComponent();
}
void OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
App.Current.MainPage.Navigation.PushAsync(new DetailsLivreView());
}
}
Loading…
Cancel
Save