From 382bb13650e9a5e2561878171617ffe793a4acae Mon Sep 17 00:00:00 2001 From: "maxime.BATISTA@etu.uca.fr" Date: Wed, 19 Apr 2023 14:45:37 +0200 Subject: [PATCH 1/3] fix all headers to be centered --- AppShell.xaml | 6 ++++++ ShoopNCook.csproj | 3 +++ Views/FavoritesPage.xaml | 17 +++++++++++------ Views/MyRecipesPage.xaml | 32 ++++++++++++++++++++++++++++++++ Views/MyRecipesPage.xaml.cs | 9 +++++++++ Views/ProfilePage.xaml | 26 ++++++++++++++------------ Views/RecipePage.xaml | 5 +---- Views/SearchPage.xaml | 27 ++++++++++++++++----------- 8 files changed, 92 insertions(+), 33 deletions(-) create mode 100644 Views/MyRecipesPage.xaml create mode 100644 Views/MyRecipesPage.xaml.cs diff --git a/AppShell.xaml b/AppShell.xaml index 2f54421..260e05d 100644 --- a/AppShell.xaml +++ b/AppShell.xaml @@ -38,5 +38,11 @@ Title="Favorites Page" ContentTemplate="{DataTemplate views:FavoritesPage}" Route="Favorites" /> + + + \ No newline at end of file diff --git a/ShoopNCook.csproj b/ShoopNCook.csproj index d32645e..56b5262 100644 --- a/ShoopNCook.csproj +++ b/ShoopNCook.csproj @@ -74,6 +74,9 @@ MSBuild:Compile + + MSBuild:Compile + MSBuild:Compile diff --git a/Views/FavoritesPage.xaml b/Views/FavoritesPage.xaml index 5aa1b63..ef36e98 100644 --- a/Views/FavoritesPage.xaml +++ b/Views/FavoritesPage.xaml @@ -11,21 +11,26 @@ + Padding="20, 40, 0, 30" + ColumnDefinitions="*" + MaximumHeightRequest="60"> + Source="arrow_back.svg" + HorizontalOptions="Start"/> + diff --git a/Views/MyRecipesPage.xaml b/Views/MyRecipesPage.xaml new file mode 100644 index 0000000..09e1b98 --- /dev/null +++ b/Views/MyRecipesPage.xaml @@ -0,0 +1,32 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Views/MyRecipesPage.xaml.cs b/Views/MyRecipesPage.xaml.cs new file mode 100644 index 0000000..aaf6794 --- /dev/null +++ b/Views/MyRecipesPage.xaml.cs @@ -0,0 +1,9 @@ +namespace ShoopNCook.Views; + +public partial class MyRecipesPage : ContentPage +{ + public MyRecipesPage() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Views/ProfilePage.xaml b/Views/ProfilePage.xaml index 7f795ff..8426e3d 100644 --- a/Views/ProfilePage.xaml +++ b/Views/ProfilePage.xaml @@ -13,23 +13,25 @@ - - - + Padding="10, 20, 0, 30" + ColumnDefinitions="*" + MaximumHeightRequest="60"> + + + diff --git a/Views/RecipePage.xaml b/Views/RecipePage.xaml index 9423b7c..e763845 100644 --- a/Views/RecipePage.xaml +++ b/Views/RecipePage.xaml @@ -8,8 +8,7 @@ + Padding="10"> @@ -141,9 +140,7 @@ HorizontalOptions="Center" Text="Submit"/> - - diff --git a/Views/SearchPage.xaml b/Views/SearchPage.xaml index 5c4c873..baf00fb 100644 --- a/Views/SearchPage.xaml +++ b/Views/SearchPage.xaml @@ -12,26 +12,31 @@ + Grid.Row="0" + Padding="10, 20, 0, 30" + ColumnDefinitions="*" + MaximumHeightRequest="60"> + + - - - + Date: Thu, 20 Apr 2023 15:22:51 +0200 Subject: [PATCH 2/3] add MyRecipes page --- ShoopNCook.csproj | 3 +++ Views/MyRecipesPage.xaml | 24 ++++++++++++++++++++++++ Views/OwnedRecipeView.xaml | 6 ++++++ Views/OwnedRecipeView.xaml.cs | 14 ++++++++++++++ Views/RecipeView.xaml.cs | 1 - 5 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 Views/OwnedRecipeView.xaml create mode 100644 Views/OwnedRecipeView.xaml.cs diff --git a/ShoopNCook.csproj b/ShoopNCook.csproj index 56b5262..0974f50 100644 --- a/ShoopNCook.csproj +++ b/ShoopNCook.csproj @@ -77,6 +77,9 @@ MSBuild:Compile + + MSBuild:Compile + MSBuild:Compile diff --git a/Views/MyRecipesPage.xaml b/Views/MyRecipesPage.xaml index 09e1b98..e59de70 100644 --- a/Views/MyRecipesPage.xaml +++ b/Views/MyRecipesPage.xaml @@ -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}"> @@ -28,5 +29,28 @@ HorizontalOptions="Center" VerticalOptions="Center"/> + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Views/OwnedRecipeView.xaml b/Views/OwnedRecipeView.xaml new file mode 100644 index 0000000..adcf9e6 --- /dev/null +++ b/Views/OwnedRecipeView.xaml @@ -0,0 +1,6 @@ + + + + diff --git a/Views/OwnedRecipeView.xaml.cs b/Views/OwnedRecipeView.xaml.cs new file mode 100644 index 0000000..9f8f54f --- /dev/null +++ b/Views/OwnedRecipeView.xaml.cs @@ -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(); + } + +} \ No newline at end of file diff --git a/Views/RecipeView.xaml.cs b/Views/RecipeView.xaml.cs index 8dcd0ea..5051268 100644 --- a/Views/RecipeView.xaml.cs +++ b/Views/RecipeView.xaml.cs @@ -3,7 +3,6 @@ namespace ShoopNCook.Views; public partial class RecipeView : ContentView { - public RecipeView(): this(5, "Title", "Subtitle") {} From c8c58f29b7b24993ff2a9d7d257bf62b36e57980 Mon Sep 17 00:00:00 2001 From: "maxime.BATISTA@etu.uca.fr" Date: Thu, 20 Apr 2023 16:49:56 +0200 Subject: [PATCH 3/3] some fixes and add add recipe button --- Pages/MyRecipesPage.xaml | 15 ++++++++++--- Resources/Styles/Styles.xaml | 7 ++++-- ShoopNCook.csproj | 42 +++++++++++++++++++++++++++++++----- Views/OwnedRecipeView.xaml | 12 +++++------ 4 files changed, 60 insertions(+), 16 deletions(-) diff --git a/Pages/MyRecipesPage.xaml b/Pages/MyRecipesPage.xaml index 209977a..33ae85a 100644 --- a/Pages/MyRecipesPage.xaml +++ b/Pages/MyRecipesPage.xaml @@ -6,12 +6,11 @@ xmlns:views="clr-namespace:ShoopNCook.Views" BackgroundColor="{StaticResource BackgroundPrimary}"> + RowDefinitions="Auto, *, Auto"> + Padding="10, 20, 0, 30"> + + +