You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
4.0 KiB
96 lines
4.0 KiB
<?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:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
|
xmlns:local="clr-namespace:Views"
|
|
xmlns:model="clr-namespace:Model;assembly=Model"
|
|
x:Class="Views.Home"
|
|
x:Name="homepage">
|
|
|
|
<local:ContainerBase x:Name="container_base"
|
|
NeedReturn="False">
|
|
|
|
<!-- Flyout -->
|
|
<local:ContainerBase.MyFlyoutContent>
|
|
<VerticalStackLayout Grid.Row="1">
|
|
<!-- Research -->
|
|
<Label
|
|
Text="Recherche de recettes :" FontSize="14"
|
|
Margin="20, 0, 15, 0"/>
|
|
<SearchBar
|
|
Placeholder="Mots-clés (ex.: rapide, fromage)"
|
|
TextColor="Black"
|
|
BackgroundColor="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray300}}"
|
|
Margin="15, 10, 15, 40"
|
|
SearchButtonPressed="SearchBar_SearchButtonPressed"/>
|
|
|
|
<!-- Direct research -->
|
|
<Button
|
|
Text="Suggestions" x:Name="suggestions_button"
|
|
ImageSource="home_icon.png"
|
|
Style="{StaticResource button1}"
|
|
Clicked="Suggestions_Clicked"
|
|
IsVisible="{Binding CurrentConnected, Converter={toolkit:IsNotNullConverter}}"/>
|
|
<Button
|
|
Text="Toutes les recettes"
|
|
ImageSource="home_icon.png"
|
|
Style="{StaticResource button1}"
|
|
Clicked="AllRecipes_Clicked"/>
|
|
<Button
|
|
Text="Entrées"
|
|
ImageSource="flatware_icon.png"
|
|
Style="{StaticResource button1}"
|
|
Clicked="Entrees_Clicked"/>
|
|
<Button
|
|
Text="Plats"
|
|
ImageSource="room_service_icon.png"
|
|
Style="{StaticResource button1}"
|
|
Clicked="Plats_Clicked"/>
|
|
<Button
|
|
Text="Desserts"
|
|
ImageSource="coffee_icon.png"
|
|
Style="{StaticResource button1}"
|
|
Clicked="Desserts_Clicked"/>
|
|
</VerticalStackLayout>
|
|
</local:ContainerBase.MyFlyoutContent>
|
|
|
|
<!-- Master -->
|
|
<local:ContainerBase.MyContent>
|
|
<ScrollView>
|
|
<StackLayout
|
|
MinimumWidthRequest="400">
|
|
<!--Modification du prof apportée sur le stacklayout pour empecher l'affichage d'une seule case recipe-->
|
|
<Label
|
|
Text="{Binding RecipesDisplayed.Description}"
|
|
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource Gray100}}"
|
|
FontSize="24"
|
|
Padding="15"/>
|
|
|
|
<FlexLayout
|
|
Margin="0, 15"
|
|
Wrap="Wrap"
|
|
JustifyContent="Start"
|
|
AlignItems="Center"
|
|
AlignContent="SpaceEvenly"
|
|
HorizontalOptions="Center"
|
|
BindableLayout.ItemsSource="{Binding RecipesDisplayed}">
|
|
|
|
<BindableLayout.ItemTemplate>
|
|
<DataTemplate x:DataType="model:Recipe">
|
|
|
|
<local:RecipeCase
|
|
CaseImageSource="{Binding Image}"
|
|
RecipeTitle="{Binding Title}"/>
|
|
|
|
</DataTemplate>
|
|
</BindableLayout.ItemTemplate>
|
|
|
|
</FlexLayout>
|
|
</StackLayout>
|
|
</ScrollView>
|
|
</local:ContainerBase.MyContent>
|
|
|
|
</local:ContainerBase>
|
|
|
|
</ContentPage>
|