🎨 add night colors

pull/20/head
Alexandre Agostinho 2 years ago
parent 9372282356
commit 0e8b12077d

@ -28,8 +28,11 @@ namespace Views
#endif #endif
}); });
MainPage = new MyPosts(); MainPage = new Home();
Application.Current.UserAppTheme = AppTheme.Light;
Application.Current.UserAppTheme = AppTheme.Dark;
} }
} }
} }

@ -4,7 +4,7 @@
xmlns:local="clr-namespace:Views" xmlns:local="clr-namespace:Views"
x:Class="Views.ContainerFlyout" x:Class="Views.ContainerFlyout"
x:Name="fl" x:Name="fl"
BackgroundColor="{StaticResource Secondary}"> BackgroundColor="{AppThemeBinding Light={StaticResource Secondary}, Dark={StaticResource Gray600}}">
<Grid RowDefinitions="250, *, 100"> <Grid RowDefinitions="250, *, 100">
<VerticalStackLayout Grid.Row="0"> <VerticalStackLayout Grid.Row="0">

@ -2,13 +2,14 @@
<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"
x:Class="Views.CustomHeader" x:Class="Views.CustomHeader"
BackgroundColor="{StaticResource Primary}"> BackgroundColor="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Gray900}}">
<Grid ColumnDefinitions="*"> <Grid ColumnDefinitions="*">
<Label Text="Ma cuisine trop géniale" <Label Text="Ma cuisine trop géniale"
FontAttributes="Bold" FontSize="30" FontFamily="Forte" FontAttributes="Bold" FontSize="30" FontFamily="Forte"
TextColor="Black" Margin="20, 10, 0, 0" TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"
Margin="20, 10, 0, 0"
VerticalOptions="Start" HorizontalOptions="Start"/> VerticalOptions="Start" HorizontalOptions="Start"/>
</Grid> </Grid>

@ -15,7 +15,8 @@
MaximumHeightRequest="20" MaximumHeightRequest="20"
Style="{StaticResource button1}"/> Style="{StaticResource button1}"/>
<SearchBar Placeholder="Mots-clés (ex.: rapide, fromage)" FontAttributes="Italic" <SearchBar Placeholder="Mots-clés (ex.: rapide, fromage)" FontAttributes="Italic"
BackgroundColor="White" Margin="15, 10, 15, 40"/> BackgroundColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray300}}"
Margin="15, 10, 15, 40"/>
<!-- Direct research --> <!-- Direct research -->
<Button Text="Entrées" ImageSource="flatware_icon.png" <Button Text="Entrées" ImageSource="flatware_icon.png"
@ -31,15 +32,16 @@
<local:ContainerBase.MyContent> <local:ContainerBase.MyContent>
<ScrollView> <ScrollView>
<StackLayout> <StackLayout>
<Label Text="Suggestions" TextColor="Black" <Label Text="Suggestions" TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
FontSize="24" Padding="15"/> FontSize="24" Padding="15"/>
<FlexLayout <FlexLayout
Margin="0, 15" Margin="0, 15"
Wrap="Wrap" Wrap="Wrap"
JustifyContent="SpaceEvenly" JustifyContent="Start"
AlignItems="Center" AlignItems="Center"
AlignContent="SpaceEvenly"> AlignContent="SpaceEvenly"
HorizontalOptions="Center">
<local:RecipeCase CaseImageSource="room_service_icon.png"/> <local:RecipeCase CaseImageSource="room_service_icon.png"/>
<local:RecipeCase CaseImageSource="room_service_icon.png"/> <local:RecipeCase CaseImageSource="room_service_icon.png"/>
@ -50,12 +52,14 @@
<local:RecipeCase CaseImageSource="room_service_icon.png"/> <local:RecipeCase CaseImageSource="room_service_icon.png"/>
<local:RecipeCase CaseImageSource="room_service_icon.png"/> <local:RecipeCase CaseImageSource="room_service_icon.png"/>
<local:RecipeCase CaseImageSource="room_service_icon.png"/> <local:RecipeCase CaseImageSource="room_service_icon.png"/>
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
<local:RecipeCase CaseImageSource="room_service_icon.png"/>
</FlexLayout> </FlexLayout>
</StackLayout> </StackLayout>
</ScrollView> </ScrollView>
</local:ContainerBase.MyContent> </local:ContainerBase.MyContent>
</local:ContainerBase> </local:ContainerBase>
</ContentPage> </ContentPage>

@ -3,7 +3,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Views" xmlns:local="clr-namespace:Views"
x:Class="Views.MyPosts" x:Class="Views.MyPosts"
Title="MyPosts"> Title="MyPosts"
BackgroundColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray500}}">
<local:ContainerBase <local:ContainerBase
IsNotConnected="False" IsNotConnected="False"
@ -24,9 +25,10 @@
<ScrollView> <ScrollView>
<StackLayout> <StackLayout>
<Label Text="Mon profil" TextColor="Black" FontAttributes="Bold" <Label Text="Mon profil" TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
FontAttributes="Bold"
FontSize="24" Padding="15, 15, 20, 5"/> FontSize="24" Padding="15, 15, 20, 5"/>
<Label Text="Mes publications" TextColor="Black" <Label Text="Mes publications" TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
FontSize="20" Padding="15"/> FontSize="20" Padding="15"/>
<FlexLayout <FlexLayout

@ -7,7 +7,7 @@
<!-- Personal styles --> <!-- Personal styles -->
<Style x:Key="recipeCase" TargetType="Border"> <Style x:Key="recipeCase" TargetType="Border">
<Setter Property="BackgroundColor" Value="LightGray"/> <Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
<Setter Property="WidthRequest" Value="250"/> <Setter Property="WidthRequest" Value="250"/>
<Setter Property="HeightRequest" Value="200"/> <Setter Property="HeightRequest" Value="200"/>
<Setter Property="StrokeShape" Value="{RoundRectangle CornerRadius='10'}"/> <Setter Property="StrokeShape" Value="{RoundRectangle CornerRadius='10'}"/>
@ -15,16 +15,16 @@
</Style> </Style>
<Style x:Key="button1" TargetType="Button"> <Style x:Key="button1" TargetType="Button">
<Setter Property="TextColor" Value="{StaticResource Black}"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
<Setter Property="BackgroundColor" Value="{StaticResource Tertiary}"/> <Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Tertiary}, Dark={StaticResource Gray500}}"/>
<Setter Property="CornerRadius" Value="5"/> <Setter Property="CornerRadius" Value="5"/>
<Setter Property="MaximumHeightRequest" Value="20"/> <Setter Property="MaximumHeightRequest" Value="20"/>
<Setter Property="Margin" Value="15, 5"/> <Setter Property="Margin" Value="15, 5"/>
</Style> </Style>
<Style x:Key="button2" TargetType="Button"> <Style x:Key="button2" TargetType="Button">
<Setter Property="TextColor" Value="{StaticResource White}"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}"/>
<Setter Property="BackgroundColor" Value="{StaticResource Primary}"/> <Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Gray400}}"/>
<Setter Property="CornerRadius" Value="5"/> <Setter Property="CornerRadius" Value="5"/>
<Setter Property="MaximumHeightRequest" Value="20"/> <Setter Property="MaximumHeightRequest" Value="20"/>
<Setter Property="Margin" Value="15, 5"/> <Setter Property="Margin" Value="15, 5"/>

@ -7,7 +7,7 @@
<Border <Border
MaximumWidthRequest="100" MaximumWidthRequest="100"
MaximumHeightRequest="45" MaximumHeightRequest="45"
BackgroundColor="{StaticResource Tertiary}" BackgroundColor="{AppThemeBinding Light={StaticResource Tertiary}, Dark={StaticResource Gray400}}"
IsEnabled="{Binding NeedReturn, Source={x:Reference rb}}" IsEnabled="{Binding NeedReturn, Source={x:Reference rb}}"
IsVisible="{Binding NeedReturn, Source={x:Reference rb}}"> IsVisible="{Binding NeedReturn, Source={x:Reference rb}}">
<Border.StrokeShape> <Border.StrokeShape>

Loading…
Cancel
Save