🎨 add night colors

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

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

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

@ -2,13 +2,14 @@
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Views.CustomHeader"
BackgroundColor="{StaticResource Primary}">
BackgroundColor="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Gray900}}">
<Grid ColumnDefinitions="*">
<Label Text="Ma cuisine trop géniale"
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"/>
</Grid>

@ -15,7 +15,8 @@
MaximumHeightRequest="20"
Style="{StaticResource button1}"/>
<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 -->
<Button Text="Entrées" ImageSource="flatware_icon.png"
@ -31,15 +32,16 @@
<local:ContainerBase.MyContent>
<ScrollView>
<StackLayout>
<Label Text="Suggestions" TextColor="Black"
<Label Text="Suggestions" TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
FontSize="24" Padding="15"/>
<FlexLayout
Margin="0, 15"
Wrap="Wrap"
JustifyContent="SpaceEvenly"
AlignItems="Center"
AlignContent="SpaceEvenly">
Margin="0, 15"
Wrap="Wrap"
JustifyContent="Start"
AlignItems="Center"
AlignContent="SpaceEvenly"
HorizontalOptions="Center">
<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"/>
</FlexLayout>
</StackLayout>
</ScrollView>
</local:ContainerBase.MyContent>
</local:ContainerBase>
</ContentPage>

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

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

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

Loading…
Cancel
Save