add MyRecipes page

pull/31/head
maxime.BATISTA@etu.uca.fr 2 years ago
parent 382bb13650
commit 7d840a486d

@ -77,6 +77,9 @@
<MauiXaml Update="Views\MyRecipesPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\OwnedRecipeView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\ProfilePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>

@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShoopNCook.Views.MyRecipesPage"
Title="MyRecipesPage"
xmlns:views="clr-namespace:ShoopNCook.Views"
BackgroundColor="{StaticResource BackgroundPrimary}">
<Grid
RowDefinitions="Auto, *">
@ -28,5 +29,28 @@
HorizontalOptions="Center"
VerticalOptions="Center"/>
</Grid>
<!-- Favorite items -->
<ScrollView
Grid.Row="1">
<FlexLayout
JustifyContent="Center"
AlignItems="Start"
AlignContent="Start"
Direction="Row"
Wrap="Wrap">
<views:RecipeView Margin="5" Note="4.5" Title="Spaghetti Bolognese" Subtitle="30 min"/>
<views:RecipeView Margin="5" Note="3" Title="Chickend Curry" Subtitle="45 min"/>
<views:RecipeView Margin="5" Note="0.2" Title="Beef Stroganoff" Subtitle="10 min"/>
<views:RecipeView Margin="5" Note="1.6" Title="Fish And Ships" Subtitle="15 min"/>
<views:RecipeView Margin="5" Note="5" Title="Caesar Salad" Subtitle="20 min"/>
<views:RecipeView Margin="5" Note="3.5" Title="Vegetables" Subtitle="60 min"/>
<views:RecipeView Margin="5" Note="4.6" Title="Guacamole" Subtitle="90 min"/>
<views:RecipeView Margin="5" Note="4" Title="Pad Thai" Subtitle="10 min"/>
<views:RecipeView Margin="5" Note="3" Title="French Toast" Subtitle="5 min"/>
<views:RecipeView Margin="5" Note="2" Title="Margherita Pizza" Subtitle="2 min"/>
</FlexLayout>
</ScrollView>
</Grid>
</ContentPage>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShoopNCook.Views.OwnedRecipeView">
</ContentView>

@ -0,0 +1,14 @@
namespace ShoopNCook.Views;
public partial class OwnedRecipeView : ContentView
{
private readonly RecipeView recipeView;
public OwnedRecipeView(float note, string title, string subtitle)
{
recipeView = new RecipeView(note, title, subtitle);
InitializeComponent();
}
}

@ -3,7 +3,6 @@ namespace ShoopNCook.Views;
public partial class RecipeView : ContentView
{
public RecipeView(): this(5, "Title", "Subtitle")
{}

Loading…
Cancel
Save