diff --git a/AppShell.xaml b/AppShell.xaml
index 64dfc90..cc6ad48 100644
--- a/AppShell.xaml
+++ b/AppShell.xaml
@@ -23,5 +23,10 @@
Title="Search Page"
ContentTemplate="{DataTemplate views:SearchPage}"
Route="Search" />
+
+
\ No newline at end of file
diff --git a/MainPage.xaml b/MainPage.xaml
deleted file mode 100644
index 3c3aa3e..0000000
--- a/MainPage.xaml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/MainPage.xaml.cs b/MainPage.xaml.cs
deleted file mode 100644
index 6d3cc71..0000000
--- a/MainPage.xaml.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-namespace ShoopNCook;
-
-public partial class MainPage : ContentPage
-{
- int count = 0;
-
- public MainPage()
- {
- InitializeComponent();
- }
-
- private void OnCounterClicked(object sender, EventArgs e)
- {
- count++;
-
- if (count == 1)
- CounterBtn.Text = $"Clicked {count} time";
- else
- CounterBtn.Text = $"Clicked {count} times !!!";
-
- SemanticScreenReader.Announce(CounterBtn.Text);
- }
-
- private void OnRedirectionClicked(object sender, EventArgs e)
- {
- //komen onfé
- }
-}
-
diff --git a/MauiProgram.cs b/MauiProgram.cs
index 760acb4..5a4fcfa 100644
--- a/MauiProgram.cs
+++ b/MauiProgram.cs
@@ -13,7 +13,8 @@ public static class MauiProgram
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
- fonts.AddFont("Poppins-bold.ttf", "PoppinsBold");
+ fonts.AddFont("Poppins-Bold.ttf", "PoppinsBold");
+ fonts.AddFont("Poppins-Medium.ttf", "PoppinsMedium");
});
#if DEBUG
diff --git a/Resources/Fonts/Poppins-Medium.ttf b/Resources/Fonts/Poppins-Medium.ttf
new file mode 100644
index 0000000..937b1e9
Binary files /dev/null and b/Resources/Fonts/Poppins-Medium.ttf differ
diff --git a/Resources/Images/hearth_off.svg b/Resources/Images/hearth_off.svg
new file mode 100644
index 0000000..a82521b
--- /dev/null
+++ b/Resources/Images/hearth_off.svg
@@ -0,0 +1,3 @@
+
diff --git a/Resources/Images/hearth_on.svg b/Resources/Images/hearth_on.svg
new file mode 100644
index 0000000..07e11a5
--- /dev/null
+++ b/Resources/Images/hearth_on.svg
@@ -0,0 +1,3 @@
+
diff --git a/Resources/Images/minus.svg b/Resources/Images/minus.svg
new file mode 100644
index 0000000..6c136aa
--- /dev/null
+++ b/Resources/Images/minus.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/Resources/Images/password_icon.svg b/Resources/Images/password_icon.svg
index 6c50cb6..e242a3d 100644
--- a/Resources/Images/password_icon.svg
+++ b/Resources/Images/password_icon.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/Resources/Images/plus.svg b/Resources/Images/plus.svg
new file mode 100644
index 0000000..ffcb182
--- /dev/null
+++ b/Resources/Images/plus.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/Resources/Images/star_empty.svg b/Resources/Images/star_empty.svg
new file mode 100644
index 0000000..2ee298f
--- /dev/null
+++ b/Resources/Images/star_empty.svg
@@ -0,0 +1,3 @@
+
diff --git a/Resources/Images/star_full.svg b/Resources/Images/star_full.svg
new file mode 100644
index 0000000..58bea28
--- /dev/null
+++ b/Resources/Images/star_full.svg
@@ -0,0 +1,3 @@
+
diff --git a/Resources/Styles/Styles.xaml b/Resources/Styles/Styles.xaml
index bc5804d..6c67804 100644
--- a/Resources/Styles/Styles.xaml
+++ b/Resources/Styles/Styles.xaml
@@ -6,7 +6,7 @@
@@ -15,7 +15,7 @@
x:Key="UserInput">
-
+
@@ -23,10 +23,36 @@
+
+
+
+
+
+
diff --git a/ShoopNCook - Backup (1).csproj b/ShoopNCook - Backup (1).csproj
new file mode 100644
index 0000000..9ca6f83
--- /dev/null
+++ b/ShoopNCook - Backup (1).csproj
@@ -0,0 +1,87 @@
+
+
+
+ net7.0-android;net7.0-ios;net7.0-maccatalyst
+ $(TargetFrameworks);net7.0-windows10.0.19041.0
+
+
+ Exe
+ ShoopNCook
+ true
+ true
+ enable
+
+
+ ShoopNCook
+
+
+ com.companyname.shoopncook
+ bf17e1fe-a722-42f6-a24d-3327d351c924
+
+
+ 1.0
+ 1
+
+ 11.0
+ 13.1
+ 21.0
+ 10.0.17763.0
+ 10.0.17763.0
+ 6.5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+ MSBuild:Compile
+
+
+
+
+
+
diff --git a/ShoopNCook.csproj b/ShoopNCook.csproj
index 024478d..ff78320 100644
--- a/ShoopNCook.csproj
+++ b/ShoopNCook.csproj
@@ -49,10 +49,18 @@
+
+
+
+
+
+
+
+
@@ -71,12 +79,21 @@
+
+ MSBuild:Compile
+
MSBuild:Compile
+
+ MSBuild:Compile
+
MSBuild:Compile
+
+ MSBuild:Compile
+
MSBuild:Compile
diff --git a/Views/IngredientView.xaml b/Views/IngredientView.xaml
new file mode 100644
index 0000000..693cdde
--- /dev/null
+++ b/Views/IngredientView.xaml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Views/IngredientView.xaml.cs b/Views/IngredientView.xaml.cs
new file mode 100644
index 0000000..01288d8
--- /dev/null
+++ b/Views/IngredientView.xaml.cs
@@ -0,0 +1,41 @@
+namespace ShoopNCook.Views;
+
+public partial class IngredientView : ContentView
+{
+
+ public static readonly BindableProperty NameProperty =
+ BindableProperty.Create(nameof(Name), typeof(string), typeof(IngredientView), default(string));
+
+ public static readonly BindableProperty QuantityProperty =
+ BindableProperty.Create(nameof(Quantity), typeof(float), typeof(IngredientView), default(float));
+
+ public static readonly BindableProperty UnitProperty =
+ BindableProperty.Create(nameof(Unit), typeof(string), typeof(IngredientView), default(string));
+
+ public string Name
+ {
+ get => (string)GetValue(NameProperty);
+ set => SetValue(NameProperty, value);
+ }
+
+ public float Quantity
+ {
+ get => (float)GetValue(QuantityProperty);
+ set => SetValue(QuantityProperty, value);
+ }
+
+ public string Unit
+ {
+ get => (string)GetValue(UnitProperty);
+ set => SetValue(UnitProperty, value);
+ }
+
+ public IngredientView(string name, float quantity, string unit)
+ {
+ InitializeComponent();
+
+ Name = name;
+ Quantity = quantity;
+ Unit = unit;
+ }
+}
\ No newline at end of file
diff --git a/Views/LoginPage.xaml b/Views/LoginPage.xaml
index 37205d0..5f5714e 100644
--- a/Views/LoginPage.xaml
+++ b/Views/LoginPage.xaml
@@ -44,7 +44,6 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Views/RecipePage.xaml.cs b/Views/RecipePage.xaml.cs
new file mode 100644
index 0000000..e5a8424
--- /dev/null
+++ b/Views/RecipePage.xaml.cs
@@ -0,0 +1,115 @@
+using Microsoft.Maui.Controls;
+using System.Windows.Input;
+
+namespace ShoopNCook.Views;
+
+public partial class RecipePage : ContentPage
+{
+
+ private uint note;
+ private uint nbPers;
+ private bool isFavorite;
+
+ public ICommand StarCommand => new Command(count =>
+ {
+ SetNote(uint.Parse(count));
+ });
+
+ public RecipePage() :
+ this("Recipe Sample", 32, 250,
+ true, 2, 0,
+ new List {
+ new IngredientView("Chocolate", 25, "g"),
+ new IngredientView("Flour", 250, "g"),
+ new IngredientView("Sugar", 0.5F, "kg")
+ },
+ new List { "This is the first preparation step", "add to furnace and wait", "Enjoy !" }
+ )
+ {}
+
+ public RecipePage(
+ string name,
+ uint cookTime,
+ uint energy,
+ bool isFavorite,
+ uint nbPers,
+ uint note,
+ List ingredients,
+ List steps
+ )
+ {
+ InitializeComponent();
+ SetNbPers(nbPers);
+ SetFavorite(isFavorite);
+ SetNote(note);
+
+ CookTime.Text = cookTime.ToString();
+ Energy.Text = energy.ToString();
+ RecipeName.Text = name;
+
+ foreach (IngredientView iv in ingredients)
+ IngredientList.Add(iv);
+
+ var styles = Application.Current.Resources.MergedDictionaries.ElementAt(1);
+
+ int count = 0;
+ foreach (string step in steps) {
+ Label label = new Label();
+ label.Style = (Style)styles["Small"];
+ label.Text = "Step " + ++count + ": " + step;
+ StepList.Add(label);
+ }
+ }
+
+ private void SetNote(uint note)
+ {
+ this.note = note;
+ int i = 1;
+ foreach (ImageButton img in Stars.Children)
+ {
+ if (i <= note)
+ {
+ img.Source = ImageSource.FromFile("star_full.svg");
+ i++;
+ }
+ else
+ {
+ img.Source = ImageSource.FromFile("star_empty.svg");
+ }
+ }
+ }
+
+ private void OnFavorite(object o, EventArgs e)
+ {
+ SetFavorite(!isFavorite);
+ }
+
+ private void SetFavorite(bool isFavorite)
+ {
+ this.isFavorite = isFavorite;
+ if (isFavorite)
+ {
+ Favorite.Source = ImageSource.FromFile("hearth_on.svg");
+ }
+ else
+ {
+ Favorite.Source = ImageSource.FromFile("hearth_off.svg");
+ }
+ }
+
+ private void OnPlus(object o, EventArgs e)
+ {
+ SetNbPers(nbPers + 1);
+ }
+
+ private void OnMinus(object o, EventArgs e)
+ {
+ SetNbPers(nbPers - 1);
+ }
+
+ private void SetNbPers(uint nbPers)
+ {
+ this.nbPers = nbPers <= 1 ? 1 : nbPers;
+ NbPersLabel.Text = this.nbPers.ToString();
+ }
+}
\ No newline at end of file
diff --git a/Views/SearchPage.xaml b/Views/SearchPage.xaml
index 696c3b0..7668ea6 100644
--- a/Views/SearchPage.xaml
+++ b/Views/SearchPage.xaml
@@ -72,13 +72,13 @@
Grid.Row="3"
ColumnSpacing="10"
ColumnDefinitions="*, *">
+