merge from master

pull/29/head
maxime.BATISTA@etu.uca.fr 2 years ago
commit c8dbf858ba

@ -28,5 +28,20 @@
Title="Search Page" Title="Search Page"
ContentTemplate="{DataTemplate views:SearchPage}" ContentTemplate="{DataTemplate views:SearchPage}"
Route="Search" /> Route="Search" />
<ShellContent
Title="Register Page"
ContentTemplate="{DataTemplate views:RegisterPage}"
Route="Register" />
<ShellContent
Title="Recipe Page"
ContentTemplate="{DataTemplate views:RecipePage}"
Route="Recipe" />
<ShellContent
Title="Favorites Page"
ContentTemplate="{DataTemplate views:FavoritesPage}"
Route="Favorites" />
</TabBar> </TabBar>
</Shell> </Shell>

@ -1,48 +0,0 @@
<?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"
x:Class="ShoopNCook.MainPage">
<ScrollView>
<VerticalStackLayout
Spacing="25"
Padding="30,0"
VerticalOptions="Center">
<Image
Source="dotnet_bot.png"
SemanticProperties.Description="Cute dot net bot waving hi to you!"
HeightRequest="200"
HorizontalOptions="Center" />
<Label
Text="Hello, World!"
SemanticProperties.HeadingLevel="Level1"
FontSize="32"
HorizontalOptions="Center" />
<Label
Text="Welcome to .NET Multi-platform App UI"
SemanticProperties.HeadingLevel="Level2"
SemanticProperties.Description="Welcome to dot net Multi platform App U I"
FontSize="18"
HorizontalOptions="Center" />
<Button
x:Name="CounterBtn"
Text="Click me !"
SemanticProperties.Hint="Counts the number of times you click"
Clicked="OnCounterClicked"
HorizontalOptions="Center" />
<Button
x:Name="RedirectBtn"
Text="Goto page 2"
SemanticProperties.Hint="Goto page 2"
Clicked="OnCounterClicked"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -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é
}
}

@ -15,6 +15,7 @@ public static class MauiProgram
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
fonts.AddFont("Poppins-Bold.ttf", "PoppinsBold"); fonts.AddFont("Poppins-Bold.ttf", "PoppinsBold");
fonts.AddFont("Poppins-Regular.ttf", "Poppins"); fonts.AddFont("Poppins-Regular.ttf", "Poppins");
fonts.AddFont("Poppins-Medium.ttf", "PoppinsMedium");
}); });
#if DEBUG #if DEBUG
builder.Logging.AddDebug(); builder.Logging.AddDebug();

@ -1 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M140.109 912.674q-30.746 0-54.025-23.447-23.28-23.447-23.28-53.857V316.63q0-30.509 23.28-54.026 23.279-23.517 54.025-23.517h679.782q30.845 0 54.194 23.517 23.35 23.517 23.35 54.026v518.74q0 30.41-23.35 53.857-23.349 23.447-54.194 23.447H140.109ZM480 609.304 140.109 387.065V835.37h679.782V387.065L480 609.304Zm0-73.152L818.696 316.63H142.304L480 536.152ZM137.304 387.065V316.63v518.74H140.109h-2.805V387.065Z"/></svg> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.4" d="M14.3898 7.13428L10.8353 9.99617C10.1626 10.5236 9.21964 10.5236 8.54696 9.99617L4.96191 7.13428" stroke="#6A6A6A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.73997 2.5H13.5966C14.7294 2.51271 15.8076 2.99161 16.5801 3.82517C17.3526 4.65873 17.7519 5.77419 17.6851 6.91176V12.3517C17.7519 13.4892 17.3526 14.6047 16.5801 15.4383C15.8076 16.2718 14.7294 16.7507 13.5966 16.7634H5.73997C3.30672 16.7634 1.66675 14.7839 1.66675 12.3517V6.91176C1.66675 4.47954 3.30672 2.5 5.73997 2.5Z" stroke="#6A6A6A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 512 B

After

Width:  |  Height:  |  Size: 770 B

@ -0,0 +1,3 @@
<svg width="34" height="31" viewBox="0 0 34 31" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M18.8484 28.1694C18.0823 28.659 17.4449 29.0352 17.0002 29.2883C16.5554 29.0351 15.9179 28.6587 15.1518 28.1689C13.6037 27.179 11.5458 25.7356 9.4949 23.9185C5.32576 20.2247 1.50035 15.2682 1.50035 9.65054H1.5004L1.50029 9.63777C1.48259 7.55869 2.26883 5.55225 3.69638 4.03595C5.1148 2.52935 7.05796 1.62189 9.1264 1.5001C10.4583 1.50706 11.7649 1.86407 12.9144 2.53526C14.0756 3.21319 15.0344 4.1871 15.693 5.35661L17 7.67793L18.3071 5.35661C18.9654 4.18738 19.924 3.21365 21.0848 2.53573C22.234 1.86456 23.5402 1.5074 24.8717 1.50011C26.9405 1.62143 28.8841 2.52869 30.3029 4.03534C31.7309 5.55169 32.5174 7.5584 32.4997 9.63779L32.4997 9.63779V9.65054C32.4997 15.2705 28.6741 20.227 24.5052 23.9201C22.4543 25.7369 20.3964 27.1799 18.8484 28.1694Z" stroke="#FF8988" stroke-width="3"/>
</svg>

After

Width:  |  Height:  |  Size: 900 B

@ -0,0 +1,3 @@
<svg width="34" height="31" viewBox="0 0 34 31" fill="#FF8988" xmlns="http://www.w3.org/2000/svg">
<path d="M17.4833 30.164C17.282 30.2785 17.1191 30.3685 17.0001 30.4332C16.881 30.3684 16.7181 30.2784 16.5168 30.1639C16.0585 29.9031 15.4019 29.5157 14.6132 29.0114C13.0346 28.0021 10.932 26.5278 8.83175 24.667C4.60876 20.9254 0.500347 15.715 0.500365 9.65054L0.500329 9.64628C0.480433 7.30919 1.36427 5.05421 2.96829 3.35047C4.56927 1.64996 6.76472 0.629282 9.09953 0.500009C10.6178 0.50227 12.1082 0.906582 13.4186 1.67168C14.7329 2.43903 15.8186 3.54158 16.5643 4.86597L17 5.63975L17.4357 4.86597C18.1812 3.5419 19.2666 2.43954 20.5804 1.67221C21.8904 0.907138 23.3805 0.502649 24.8983 0.500013C27.2335 0.628758 29.4295 1.64921 31.0309 3.34977C32.6354 5.05357 33.5195 7.30884 33.4997 9.64629V9.65054C33.4997 15.7173 29.3912 20.9277 25.1683 24.6686C23.068 26.5292 20.9654 28.003 19.3869 29.012C18.5982 29.5161 17.9416 29.9034 17.4833 30.164Z" stroke="#FF8988"/>
</svg>

After

Width:  |  Height:  |  Size: 972 B

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="#FFFFFF" height="48" viewBox="0 96 960 960" width="48"><path d="M230 606q-12.75 0-21.375-8.675-8.625-8.676-8.625-21.5 0-12.825 8.625-21.325T230 546h500q12.75 0 21.375 8.675 8.625 8.676 8.625 21.5 0 12.825-8.625 21.325T730 606H230Z"/></svg>

After

Width:  |  Height:  |  Size: 285 B

@ -1 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M220.63 997.043q-32.19 0-54.747-22.556-22.557-22.557-22.557-54.748v-432.5q0-32.624 22.557-55.084 22.557-22.459 54.747-22.459h56.805v-90.739q0-85.228 59.245-144.636 59.246-59.408 143.234-59.408 83.989 0 143.32 59.408 59.331 59.408 59.331 144.636v90.739h56.805q32.289 0 54.916 22.459 22.627 22.46 22.627 55.084v432.5q0 32.191-22.627 54.748-22.627 22.556-54.916 22.556H220.63Zm0-77.304h518.74v-432.5H220.63v432.5Zm259.618-133.522q34.035 0 57.817-23.514 23.783-23.514 23.783-56.534 0-32.082-24.031-57.984-24.03-25.902-58.065-25.902t-57.817 25.947q-23.783 25.947-23.783 58.48 0 32.631 24.031 56.069 24.03 23.438 58.065 23.438ZM354.739 409.696h250.522v-90.684q0-53.389-36.478-89.972-36.478-36.583-88.727-36.583-52.248 0-88.782 36.583-36.535 36.583-36.535 89.972v90.684ZM220.63 919.739v-432.5 432.5Z"/></svg> <svg width="22" height="28" viewBox="0 0 22 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.33333 9.45H5C2.79086 9.45 1 11.2409 1 13.45V23C1 25.2091 2.79086 27 5 27H17C19.2091 27 21 25.2091 21 23V13.45C21 11.2409 19.2091 9.45 17 9.45H15.6667M6.33333 9.45V5.66667C6.33333 3.08934 8.42267 1 11 1V1C13.5773 1 15.6667 3.08934 15.6667 5.66667V9.45M6.33333 9.45H15.6667" stroke="#6A6A6A"/>
<ellipse cx="11.0003" cy="18.2248" rx="3.33333" ry="3.25" stroke="#6A6A6A"/>
</svg>

Before

Width:  |  Height:  |  Size: 896 B

After

Width:  |  Height:  |  Size: 485 B

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="#FFFFFF" height="48" viewBox="0 96 960 960" width="48">
<path d="M479.825 856Q467 856 458.5 847.375T450 826V606H230q-12.75 0-21.375-8.675-8.625-8.676-8.625-21.5 0-12.825 8.625-21.325T230 546h220V326q0-12.75 8.675-21.375 8.676-8.625 21.5-8.625 12.825 0 21.325 8.625T510 326v220h220q12.75 0 21.375 8.675 8.625 8.676 8.625 21.5 0 12.825-8.625 21.325T730 606H510v220q0 12.75-8.675 21.375-8.676 8.625-21.5 8.625Z"/>
</svg>

After

Width:  |  Height:  |  Size: 464 B

@ -0,0 +1,3 @@
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M51.5995 80.3367L50 79.3286L48.4005 80.3367L22.2873 96.7941L22.2659 96.8076L22.2446 96.8215C21.9992 96.9821 21.8349 97.0077 21.6743 96.9984C21.3995 96.9824 21.2189 96.9085 21.0502 96.7824C20.8413 96.6262 20.6768 96.4268 20.5477 96.1179C20.486 95.9704 20.4227 95.7098 20.5093 95.2285L27.3779 64.1254L27.7519 62.4318L26.4707 61.2626L3.45013 40.2535C3.44969 40.2531 3.44925 40.2527 3.44882 40.2523C3.09118 39.9244 3.05657 39.7374 3.0485 39.6896C2.97181 39.2347 2.98924 38.8339 3.07836 38.4608C3.1053 38.348 3.15083 38.2442 3.32949 38.0972C3.4795 37.9739 3.69984 37.8554 4.10721 37.8104L34.5497 35.0206L36.3769 34.8532L37.0602 33.1504L48.8398 3.79549C48.9872 3.45789 49.1405 3.3261 49.2757 3.24647C49.6382 3.03307 49.8673 3 50 3C50.1327 3 50.3618 3.03307 50.7243 3.24647C50.8595 3.32611 51.0128 3.45791 51.1602 3.79559L62.9398 33.1504L63.6231 34.8532L65.4502 35.0206L95.8928 37.8104C96.3002 37.8554 96.5205 37.9739 96.6705 38.0972C96.8492 38.2442 96.8947 38.348 96.9216 38.4608C97.0108 38.8339 97.0282 39.2347 96.9515 39.6896C96.9434 39.7375 96.9088 39.9248 96.5502 40.2533C96.5501 40.2533 96.55 40.2534 96.5499 40.2535L73.5293 61.2626L72.2481 62.4318L72.6221 64.1254L79.4907 95.2285C79.5774 95.7098 79.514 95.9704 79.4523 96.1179C79.3232 96.4268 79.1587 96.6262 78.9498 96.7824C78.7811 96.9085 78.6005 96.9824 78.3257 96.9984C78.1651 97.0077 78.0008 96.9821 77.7554 96.8215L77.7341 96.8076L77.7127 96.7941L51.5995 80.3367Z" stroke="#FFD600" stroke-width="6"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,3 @@
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M50 82.8747L23.8869 99.3321C23.1381 99.8219 22.3426 100.042 21.5002 99.9933C20.6578 99.9443 19.9091 99.6749 19.2539 99.1851C18.5987 98.6953 18.1074 98.0586 17.7798 97.2749C17.4522 96.4912 17.382 95.6096 17.5692 94.63L24.4485 63.4785L1.42399 42.4659C0.675224 41.7802 0.230646 41.021 0.0902527 40.1883C-0.0501404 39.3557 -0.0267415 38.5475 0.160449 37.7638C0.34764 36.9801 0.768819 36.3189 1.42399 35.7801C2.07916 35.2413 2.87472 34.923 3.81067 34.825L34.276 32.0331L46.069 2.64494C46.4434 1.76329 47.0049 1.10206 47.7537 0.661234C48.5025 0.220411 49.2512 0 50 0C50.7488 0 51.4975 0.220411 52.2463 0.661234C52.9951 1.10206 53.5566 1.76329 53.931 2.64494L65.724 32.0331L96.1893 34.825C97.1253 34.923 97.9209 35.2413 98.576 35.7801C99.2312 36.3189 99.6524 36.9801 99.8396 37.7638C100.027 38.5475 100.05 39.3557 99.9098 40.1883C99.7694 41.021 99.3248 41.7802 98.576 42.4659L75.5516 63.4785L82.4308 94.63C82.618 95.6096 82.5478 96.4912 82.2202 97.2749C81.8926 98.0586 81.4013 98.6953 80.7461 99.1851C80.0909 99.6749 79.3422 99.9443 78.4998 99.9933C77.6574 100.042 76.8619 99.8219 76.1131 99.3321L50 82.8747Z" fill="#FFD600"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,4 @@
<svg width="20" height="22" viewBox="0 0 20 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 5C15 7.76142 12.7614 11.25 10 11.25C7.23858 11.25 5 7.76142 5 5C5 2.23858 7.23858 0 10 0C12.7614 0 15 2.23858 15 5ZM13.5 5C13.5 6.01681 13.0706 7.27163 12.3317 8.26571C11.5816 9.27479 10.7261 9.75 10 9.75C9.27389 9.75 8.41837 9.27479 7.66833 8.26571C6.92944 7.27163 6.5 6.01681 6.5 5C6.5 3.067 8.067 1.5 10 1.5C11.933 1.5 13.5 3.067 13.5 5Z" fill="#6A6A6A"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 21.1818C0 16.6631 3.66313 13 8.18182 13H11.9474C16.3947 13 20 16.6053 20 21.0526C20 21.5758 19.5758 22 19.0526 22H0.818182C0.366313 22 0 21.6337 0 21.1818ZM8.18182 14.5H11.9474C15.3802 14.5 18.1964 17.1397 18.477 20.5H1.53436C1.87591 17.13 4.72173 14.5 8.18182 14.5Z" fill="#6A6A6A"/>
</svg>

After

Width:  |  Height:  |  Size: 852 B

@ -43,6 +43,7 @@
<Color x:Key="BackgroundPrimary">#efefef</Color> <Color x:Key="BackgroundPrimary">#efefef</Color>
<Color x:Key="BackgroundSecondary">White</Color> <Color x:Key="BackgroundSecondary">White</Color>
<Color x:Key="ButtonText">White</Color>
<Color x:Key="TextColorPrimary">Black</Color> <Color x:Key="TextColorPrimary">Black</Color>
<Color x:Key="TextColorSecondary">#6d6d6d</Color> <Color x:Key="TextColorSecondary">#6d6d6d</Color>

@ -6,11 +6,28 @@
<Style TargetType="Border" <Style TargetType="Border"
x:Key="SecondaryBorder"> x:Key="SecondaryBorder">
<Setter Property="StrokeShape" Value="RoundRectangle 12"/>
<Setter Property="Stroke" Value="Transparent"/> <Setter Property="Stroke" Value="Transparent"/>
<Setter Property="StrokeShape" Value="RoundRectangle 20"/>
<Setter Property="BackgroundColor" Value="{StaticResource BackgroundSecondary}"/> <Setter Property="BackgroundColor" Value="{StaticResource BackgroundSecondary}"/>
</Style> </Style>
<Style TargetType="Border"
x:Key="SecondaryBorderShadow">
<Setter Property="StrokeShape" Value="RoundRectangle 25"/>
<Setter Property="Stroke" Value="{StaticResource BackgroundSecondary}"/>
<Setter Property="BackgroundColor" Value="{StaticResource BackgroundSecondary}"/>
<Setter Property="Shadow">
<Setter.Value>
<Shadow
Brush="Gray"
Offset="20, 20"
Radius="40"
Opacity="0.5"/>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Entry" <Style TargetType="Entry"
x:Key="UserInput"> x:Key="UserInput">
<Setter Property="TextColor" Value="{StaticResource TextColorPrimary}"/> <Setter Property="TextColor" Value="{StaticResource TextColorPrimary}"/>
@ -23,8 +40,34 @@
<Style <Style
TargetType="Button" TargetType="Button"
x:Key="UserButton"> x:Key="UserButton">
<Setter Property="FontFamily" Value="PoppinsBold"/> <Setter Property="FontFamily" Value="PoppinsMedium"/>
<Setter Property="FontSize" Value="20"/>
</Style>
<Style
TargetType="Label"
x:Key="h1">
<Setter Property="FontFamily" Value="PoppinsMedium"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="TextColor" Value="{StaticResource TextColorPrimary}"/>
<Setter Property="FontAttributes" Value="Bold"/>
</Style>
<Style
TargetType="Label"
x:Key="h2">
<Setter Property="FontFamily" Value="PoppinsMedium"/>
<Setter Property="FontSize" Value="20"/> <Setter Property="FontSize" Value="20"/>
<Setter Property="TextColor" Value="{StaticResource TextColorPrimary}"/>
<Setter Property="FontAttributes" Value="Bold"/>
</Style>
<Style
TargetType="Label"
x:Key="Small">
<Setter Property="FontFamily" Value="PoppinsMedium"/>
<Setter Property="FontSize" Value="17"/>
<Setter Property="TextColor" Value="{StaticResource TextColorSecondary}"/>
</Style> </Style>
<Style TargetType="ActivityIndicator"> <Style TargetType="ActivityIndicator">

@ -0,0 +1,87 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>ShoopNCook</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Display name -->
<ApplicationTitle>ShoopNCook</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.companyname.shoopncook</ApplicationId>
<ApplicationIdGuid>bf17e1fe-a722-42f6-a24d-3327d351c924</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\Fonts\Poppins-Bold.ttf" />
<None Remove="Resources\Images\email_icon.svg" />
<None Remove="Resources\Images\facebook_logo.svg" />
<None Remove="Resources\Images\password_icon.svg" />
<None Remove="Resources\Images\search_options.svg" />
<None Remove="Resources\Images\visibility_off.svg" />
<None Remove="Resources\Images\visibility_on.svg" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\Fonts\arrow_back_ios_FILL0_wght400_GRAD200_opsz48.svg" />
<None Remove="Resources\Images\default_profile_picture.png" />
</ItemGroup>
<ItemGroup>
<MauiFont Include="Resources\Images\arrow_back.svg" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<MauiXaml Update="Views\ProfilePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\RecipeView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\SearchPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties XamarinHotReloadDebuggerTimeoutExceptionShoopNCookHideInfoBar="True" XamarinHotReloadUnhandledDeviceExceptionShoopNCookHideInfoBar="True" /></VisualStudio></ProjectExtensions>
</Project>

@ -0,0 +1,104 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>ShoopNCook</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Display name -->
<ApplicationTitle>ShoopNCook</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.companyname.shoopncook</ApplicationId>
<ApplicationIdGuid>bf17e1fe-a722-42f6-a24d-3327d351c924</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\Fonts\Poppins-Bold.ttf" />
<None Remove="Resources\Fonts\Poppins-Medium.ttf" />
<None Remove="Resources\Images\email_icon.svg" />
<None Remove="Resources\Images\facebook_logo.svg" />
<None Remove="Resources\Images\hearth_off.svg" />
<None Remove="Resources\Images\hearth_on.svg" />
<None Remove="Resources\Images\minus.svg" />
<None Remove="Resources\Images\password_icon.svg" />
<None Remove="Resources\Images\plus.svg" />
<None Remove="Resources\Images\search_options.svg" />
<None Remove="Resources\Images\star_empty.svg" />
<None Remove="Resources\Images\star_full.svg" />
<None Remove="Resources\Images\user.svg" />
<None Remove="Resources\Images\visibility_off.svg" />
<None Remove="Resources\Images\visibility_on.svg" />
</ItemGroup>
<ItemGroup>
<None Remove="Resources\Fonts\arrow_back_ios_FILL0_wght400_GRAD200_opsz48.svg" />
<None Remove="Resources\Images\default_profile_picture.png" />
</ItemGroup>
<ItemGroup>
<MauiFont Include="Resources\Images\arrow_back.svg" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<MauiXaml Update="Views\IngredientView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\ProfilePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\RecipePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\RecipeView.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\RegisterPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\SearchPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties XamarinHotReloadDebuggerTimeoutExceptionShoopNCookHideInfoBar="True" XamarinHotReloadUnhandledDeviceExceptionShoopNCookHideInfoBar="True" /></VisualStudio></ProjectExtensions>
</Project>

@ -72,6 +72,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<MauiXaml Update="Views\FavoritesPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\ProfilePage.xaml"> <MauiXaml Update="Views\ProfilePage.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>

@ -0,0 +1,54 @@
<?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"
x:Class="ShoopNCook.Views.FavoritesPage"
Title="FavoritesPage"
xmlns:views="clr-namespace:ShoopNCook.Views"
BackgroundColor="{StaticResource BackgroundPrimary}">
<Grid
RowDefinitions="Auto, *">
<!-- Header label and return button -->
<Grid
Grid.Row="0"
ColumnDefinitions="Auto, *"
Padding="10, 20, 0, 30">
<ImageButton
Grid.Column="0"
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"/>
<Label
Grid.Column="1"
FontSize="24"
TextColor="{StaticResource TextColorPrimary}"
Text="Favorites recipes"
FontFamily="PoppinsBold"
HorizontalOptions="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,9 @@
namespace ShoopNCook.Views;
public partial class FavoritesPage : ContentPage
{
public FavoritesPage()
{
InitializeComponent();
}
}

@ -0,0 +1,24 @@
<?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.IngredientView"
x:Name="Ingredient">
<HorizontalStackLayout
Spacing="2">
<Label
Text="•"
Style="{StaticResource Small}"/>
<Label
Text="{Binding Name, Source={x:Reference Ingredient}}"
Style="{StaticResource Small}"/>
<Label
Text="{Binding Quantity, Source={x:Reference Ingredient}}"
Style="{StaticResource Small}"/>
<Label
Text="{Binding Unit, Source={x:Reference Ingredient}}"
Style="{StaticResource Small}"/>
</HorizontalStackLayout>
</ContentView>

@ -0,0 +1,41 @@
namespace ShoopNCook.Views;
public partial class IngredientView : ContentView
{
private readonly BindableProperty NameProperty =
BindableProperty.Create(nameof(Name), typeof(string), typeof(IngredientView), default(string));
private readonly BindableProperty QuantityProperty =
BindableProperty.Create(nameof(Quantity), typeof(float), typeof(IngredientView), default(float));
private 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;
}
}

@ -2,7 +2,7 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShoopNCook.Views.LoginPage" x:Class="ShoopNCook.Views.LoginPage"
Title="LoginPage" Title="Login"
BackgroundColor="{StaticResource BackgroundPrimary}"> BackgroundColor="{StaticResource BackgroundPrimary}">
<VerticalStackLayout <VerticalStackLayout
Margin="20, 75, 20, 20"> Margin="20, 75, 20, 20">
@ -24,7 +24,7 @@
HorizontalOptions="Start" /> HorizontalOptions="Start" />
<Border <Border
Style="{StaticResource SecondaryBorder}" Style="{StaticResource SecondaryBorderShadow}"
Margin="0,30,0,20"> Margin="0,30,0,20">
<Grid <Grid
Padding="5" Padding="5"
@ -43,8 +43,7 @@
</Border> </Border>
<Border <Border
Style="{StaticResource SecondaryBorder}" Style="{StaticResource SecondaryBorderShadow}"
StrokeShape="RoundRectangle 12"
> >
<Grid <Grid
Padding="5" Padding="5"
@ -69,21 +68,19 @@
<Label <Label
TextColor="{StaticResource TextColorSecondary}" TextColor="{StaticResource TextColorSecondary}"
HorizontalOptions="End"> HorizontalOptions="End"
Forgot Password ? Text="Forgot Password ?"
</Label> BackgroundColor="Transparent"/>
<Border <Border
Margin="0, 30, 0, 0" Margin="0, 30, 0, 0"
Stroke="{StaticResource BackgroundPrimary}" Stroke="{StaticResource BackgroundPrimary}"
StrokeShape="RoundRectangle 12"> StrokeShape="RoundRectangle 12">
<Label <Button
HeightRequest="50" BackgroundColor="{StaticResource Selected}"
BackgroundColor="{StaticResource ActionButton}" FontFamily="PoppinsMedium"
HorizontalTextAlignment="Center" TextColor="{StaticResource ButtonText}"
VerticalTextAlignment="Center"> Text="LOG IN"/>
LOG IN</Label>
</Border> </Border>
<HorizontalStackLayout <HorizontalStackLayout

@ -2,12 +2,12 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShoopNCook.Views.ProfilePage" x:Class="ShoopNCook.Views.ProfilePage"
Title="ProfilePage" Title="Profile"
BackgroundColor="{StaticResource BackgroundPrimary}"> BackgroundColor="{StaticResource BackgroundPrimary}">
<ScrollView> <ScrollView>
<Grid <Grid
Margin="20" Padding="20"
RowDefinitions="Auto, Auto, Auto, *"> RowDefinitions="Auto, Auto, Auto, *">
<!-- Profile label and return button --> <!-- Profile label and return button -->
@ -72,7 +72,7 @@
<!-- User inputs --> <!-- User inputs -->
<Grid <Grid
Grid.Row="2" Grid.Row="2"
Margin="0, 20, 0, 0" Padding="0, 20, 0, 0"
RowDefinitions="Auto, *, Auto, *"> RowDefinitions="Auto, *, Auto, *">
<Label <Label
Grid.Row="0" Grid.Row="0"
@ -82,7 +82,7 @@
<Border <Border
Grid.Row="1" Grid.Row="1"
Style="{StaticResource SecondaryBorder}"> Style="{StaticResource SecondaryBorderShadow}">
<Entry <Entry
Style="{StaticResource UserInput}" Style="{StaticResource UserInput}"
Text="%Profile_Name%" Text="%Profile_Name%"
@ -97,7 +97,7 @@
<Border <Border
Grid.Row="3" Grid.Row="3"
Style="{StaticResource SecondaryBorder}"> Style="{StaticResource SecondaryBorderShadow}">
<Entry <Entry
Style="{StaticResource UserInput}" Style="{StaticResource UserInput}"
Text="%Profile_Mail%" Text="%Profile_Mail%"
@ -118,12 +118,10 @@
Margin="0, 30, 0, 0" Margin="0, 30, 0, 0"
Stroke="{StaticResource BackgroundPrimary}" Stroke="{StaticResource BackgroundPrimary}"
StrokeShape="RoundRectangle 12"> StrokeShape="RoundRectangle 12">
<Label <Button
HeightRequest="50"
BackgroundColor="{StaticResource ActionButton}" BackgroundColor="{StaticResource ActionButton}"
HorizontalTextAlignment="Center" FontFamily="PoppinsMedium"
VerticalTextAlignment="Center" TextColor="White"
FontFamily="PoppinsBold"
Text="SAVE"/> Text="SAVE"/>
</Border> </Border>
</VerticalStackLayout> </VerticalStackLayout>

@ -0,0 +1,213 @@
<?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"
x:Class="ShoopNCook.Views.RecipePage"
Title="RecipePage"
x:Name="RecipeViewPage"
BackgroundColor="{StaticResource BackgroundPrimary}">
<Grid
RowDefinitions="90*, 10*"
Padding="10"
>
<!--Main content-->
<ScrollView>
<Grid
RowDefinitions="*, Auto, Auto, 0.5*">
<FlexLayout
Grid.Row="0"
Direction="Row"
JustifyContent="SpaceBetween"
AlignContent="Center"
AlignItems="Center">
<ImageButton
Source="arrow_back.svg"/>
<Label
Style="{StaticResource h1}"
x:Name="RecipeName"
Text="Recipe name"/>
<ImageButton
x:Name="Favorite"
Source="hearth_off.svg"
Margin="0, 0, 5, 0"
Clicked="OnFavorite"/>
</FlexLayout>
<!--Recipe image-->
<Border
Grid.Row="1"
Margin="10"
Stroke="Transparent"
StrokeShape="RoundRectangle 20"
BackgroundColor="AliceBlue">
<Image
HeightRequest="250"/>
</Border>
<!--Steps-->
<VerticalStackLayout
Grid.Row="2"
Padding="30, 0, 30, 0">
<!--Cook time-->
<VerticalStackLayout>
<HorizontalStackLayout>
<Label
Style="{StaticResource Small}"
Text="Cooking time: "/>
<Label
Style="{StaticResource Small}"
x:Name="CookTime"/>
<Label
Style="{StaticResource Small}"
Text=" min"/>
</HorizontalStackLayout>
<!--Energy-->
<HorizontalStackLayout>
<Label
Style="{StaticResource Small}"
Text="Energy: "/>
<Label
Style="{StaticResource Small}"
x:Name="Energy"/>
<Label
Style="{StaticResource Small}"
Text="/pers"/>
</HorizontalStackLayout>
</VerticalStackLayout>
<!--Ingredient list-->
<Label
Style="{StaticResource h2}"
Text="Ingredients"/>
<VerticalStackLayout
x:Name="IngredientList"/>
<!--Step list-->
<Label
Style="{StaticResource h2}"
Text="Preparation steps"/>
<VerticalStackLayout
x:Name="StepList"/>
</VerticalStackLayout>
<!--Stars-->
<HorizontalStackLayout
Grid.Row="3">
<HorizontalStackLayout
x:Name="Stars"
Spacing="2"
Margin="10, 0, 0, 0">
<ImageButton
WidthRequest="30"
Command="{Binding StarCommand, Source={x:Reference RecipeViewPage}}"
CommandParameter="1"/>
<ImageButton
WidthRequest="30"
Command="{Binding StarCommand, Source={x:Reference RecipeViewPage}}"
CommandParameter="2"/>
<ImageButton
WidthRequest="30"
Command="{Binding StarCommand, Source={x:Reference RecipeViewPage}}"
CommandParameter="3"/>
<ImageButton
WidthRequest="30"
Command="{Binding StarCommand, Source={x:Reference RecipeViewPage}}"
CommandParameter="4"/>
<ImageButton
WidthRequest="30"
Command="{Binding StarCommand, Source={x:Reference RecipeViewPage}}"
CommandParameter="5"/>
</HorizontalStackLayout>
<Border
Margin="12, 0, 0, 0"
Stroke="Transparent"
StrokeShape="RoundRectangle 150">
<Button
FontFamily="PoppinsMedium"
TextColor="White"
BackgroundColor="{StaticResource Selected}"
VerticalOptions="Center"
HorizontalOptions="Center"
Text="Submit"/>
</Border>
</HorizontalStackLayout>
</Grid>
</ScrollView>
<!--Footer-->
<FlexLayout
Grid.Row="1"
Direction="Row"
JustifyContent="SpaceBetween"
AlignItems="Center"
>
<Grid
ColumnDefinitions="*, Auto, *">
<Border
Grid.Column="0"
Stroke="Transparent"
StrokeShape="RoundRectangle 100"
BackgroundColor="{StaticResource Selected}">
<ImageButton
Source="minus.svg"
WidthRequest="40"
HeightRequest="40"
Clicked="OnMinus"/>
</Border>
<HorizontalStackLayout
Grid.Column="1">
<Label
x:Name="NbPersLabel"
Text="1"
Margin="10, 0, 0, 0"
TextColor="{StaticResource TextColorPrimary}"
VerticalTextAlignment="Center"
FontFamily="PoppinsMedium"/>
<Label
Text=" pers"
Margin="0, 0, 10, 0"
TextColor="{StaticResource TextColorPrimary}"
VerticalTextAlignment="Center"
FontFamily="PoppinsMedium"/>
</HorizontalStackLayout>
<Border
Grid.Column="2"
Stroke="Transparent"
StrokeShape="RoundRectangle 100"
BackgroundColor="{StaticResource Selected}">
<ImageButton
Source="plus.svg"
WidthRequest="40"
HeightRequest="40"
Clicked="OnPlus"/>
</Border>
</Grid>
<Button
Grid.Column="1"
Text="Add to list"
Style="{StaticResource UserButton}"
TextColor="White"
BackgroundColor="Gray">
</Button>
</FlexLayout>
</Grid>
</ContentPage>

@ -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<string>(count =>
{
SetNote(uint.Parse(count));
});
public RecipePage() :
this("Recipe Sample", 32, 250,
true, 2, 0,
new List<IngredientView> {
new IngredientView("Chocolate", 25, "g"),
new IngredientView("Flour", 250, "g"),
new IngredientView("Sugar", 0.5F, "kg")
},
new List<string> { "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<IngredientView> ingredients,
List<string> 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();
}
}

@ -5,36 +5,55 @@
<Border <Border
StrokeShape="RoundRectangle 30" Style="{StaticResource SecondaryBorderShadow}"
Stroke="Transparent"> StrokeShape="RoundRectangle 30">
<Grid <Grid
BackgroundColor="{StaticResource BackgroundSecondary}" BackgroundColor="{StaticResource BackgroundSecondary}"
Padding="10" Padding="10"
MinimumHeightRequest="175" MinimumHeightRequest="175"
MinimumWidthRequest="150" MinimumWidthRequest="150"
RowDefinitions="*, Auto"> RowDefinitions="*, Auto">
<Border <Border
Grid.Row="0" Grid.Row="0"
Stroke="Transparent" Stroke="Transparent"
StrokeShape="RoundRectangle 20" StrokeShape="RoundRectangle 20"
BackgroundColor="AliceBlue"> BackgroundColor="AliceBlue">
<Image/> <Grid>
</Border> <Image />
<HorizontalStackLayout
<VerticalStackLayout Grid.Row="1"> x:Name="Stars"
<Label VerticalOptions="End"
TextColor="{StaticResource TextColorPrimary}" HorizontalOptions="End"
Text="Recipe Name"/> Margin="0, 0, 15, 2">
<Label <Image
TextColor="{StaticResource TextColorSecondary}" WidthRequest="10"
Text="Preparation time"/> Source="star_full.svg"/>
</VerticalStackLayout> <Image
WidthRequest="10"
Source="star_full.svg"/>
<Image
WidthRequest="10"
Source="star_full.svg"/>
<Image
WidthRequest="10"
Source="star_full.svg"/>
<Image
WidthRequest="10"
Source="star_full.svg"/>
</HorizontalStackLayout>
</Grid>
</Border>
<VerticalStackLayout Grid.Row="1">
<Label
TextColor="{StaticResource TextColorPrimary}"
x:Name="TitleLabel"/>
<Label
TextColor="{StaticResource TextColorSecondary}"
x:Name="SubtitleLabel"/>
</VerticalStackLayout>
</Grid> </Grid>
</Border> </Border>
</ContentView> </ContentView>

@ -2,8 +2,46 @@ namespace ShoopNCook.Views;
public partial class RecipeView : ContentView public partial class RecipeView : ContentView
{ {
public RecipeView()
public RecipeView(): this(5, "Title", "Subtitle")
{}
public RecipeView(float note, string title, string subtitle)
{ {
InitializeComponent(); InitializeComponent();
Note = note;
Title = title;
Subtitle = subtitle;
} }
public float Note
{
set => SetNote(value);
}
public string Title
{
set => TitleLabel.Text = value;
}
public string Subtitle
{
set => SubtitleLabel.Text = value;
}
private void SetNote(float note)
{
int i = 1;
foreach (Image img in Stars.Children)
{
if (i <= note)
{
img.Opacity = 0;
i++;
}
else img.Opacity = 1;
}
}
} }

@ -0,0 +1,165 @@
<?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"
x:Class="ShoopNCook.Views.RegisterPage"
Title="Register"
BackgroundColor="{StaticResource BackgroundPrimary}">
<ScrollView>
<VerticalStackLayout
Padding="20, 50, 20, 20">
<Label
FontFamily="PoppinsBold"
Text="Register Account"
FontSize="32"
TextColor="{StaticResource TextColorPrimary}"
FontAttributes="Bold"
VerticalOptions="Start"
HorizontalOptions="Start" />
<Label
Text="Fill in your credentials or continue with social media"
FontFamily="PoppinsBold"
FontSize="20"
TextColor="{StaticResource TextColorSecondary}"
VerticalOptions="Start"
HorizontalOptions="Start" />
<Border
Style="{StaticResource SecondaryBorderShadow}"
Margin="0,30,0,20">
<Grid
Padding="5"
BackgroundColor="{StaticResource BackgroundSecondary}"
ColumnDefinitions="Auto,Auto,*">
<Image
Grid.Column="1"
Source="user.svg">
</Image>
<Entry
Style="{StaticResource UserInput}"
Grid.Column="2"
Placeholder="User Name"/>
</Grid>
</Border>
<Border
Style="{StaticResource SecondaryBorderShadow}"
Margin="0,0,0,20">
<Grid
Padding="5"
BackgroundColor="{StaticResource BackgroundSecondary}"
ColumnDefinitions="Auto,Auto,*">
<Image
Grid.Column="1"
Source="email_icon.svg">
</Image>
<Entry
Style="{StaticResource UserInput}"
Grid.Column="2"
Placeholder="Mail address"/>
</Grid>
</Border>
<Border
Style="{StaticResource SecondaryBorderShadow}">
<Grid
Padding="5"
BackgroundColor="{StaticResource BackgroundSecondary}"
ColumnDefinitions="Auto,Auto,*,Auto">
<Image
Grid.Column="1"
Source="password_icon.svg"/>
<Entry
Style="{StaticResource UserInput}"
Grid.Column="2"
Placeholder="Password"/>
<ImageButton
Grid.Column="3"
Source="visibility_off.svg"
HeightRequest="30"/>
</Grid>
</Border>
<Label
TextColor="{StaticResource TextColorSecondary}"
HorizontalOptions="End">
Forgot Password ?
</Label>
<Border
Margin="0, 30, 0, 0"
Stroke="{StaticResource BackgroundPrimary}"
StrokeShape="RoundRectangle 12">
<Button
BackgroundColor="{StaticResource ActionButton}"
FontFamily="PoppinsMedium"
TextColor="White"
Text="SIGN UP"/>
</Border>
<HorizontalStackLayout
HorizontalOptions="Center"
Margin="0, 20, 0, 0"
Spacing="6">
<Rectangle
BackgroundColor="Gray"
WidthRequest="15"
HeightRequest="3"/>
<Label
TextColor="{StaticResource TextColorSecondary}">
Or continue with</Label>
<Rectangle
BackgroundColor="Gray"
WidthRequest="15"
HeightRequest="3"/>
</HorizontalStackLayout>
<HorizontalStackLayout
Margin="0, 20, 0, 0"
Spacing="15"
HorizontalOptions="Center">
<Border
HeightRequest="75"
WidthRequest="75"
BackgroundColor="#e9f4ff"
StrokeShape="RoundRectangle 25 25 25 25"
Stroke="{StaticResource BackgroundPrimary}">
<Image
HeightRequest="50"
Source="google_logo.svg"/>
</Border>
<Border
HeightRequest="75"
WidthRequest="75"
BackgroundColor="#4460a0"
StrokeShape="RoundRectangle 25 25 25 25"
Stroke="{StaticResource BackgroundPrimary}">
<Image
WidthRequest="40"
Source="facebook_logo.svg"/>
</Border>
</HorizontalStackLayout>
<HorizontalStackLayout
Spacing="4"
HorizontalOptions="Center"
Margin="0, 20, 0, 0">
<Label
TextColor="{StaticResource TextColorPrimary}">
Already have an account ?</Label>
<Label
FontAttributes="Bold"
TextColor="{StaticResource TextColorPrimary}">
Log In</Label>
</HorizontalStackLayout>
</VerticalStackLayout>
</ScrollView>
</ContentPage>

@ -0,0 +1,9 @@
namespace ShoopNCook.Views;
public partial class RegisterPage : ContentPage
{
public RegisterPage()
{
InitializeComponent();
}
}

@ -6,30 +6,30 @@
Title="SearchPage" Title="SearchPage"
BackgroundColor="{StaticResource BackgroundPrimary}"> BackgroundColor="{StaticResource BackgroundPrimary}">
<Grid <Grid
Margin="20" Margin="20, 20, 20, 0"
RowDefinitions="Auto, Auto, Auto, Auto, *" RowDefinitions="Auto, Auto, Auto, Auto, *"
RowSpacing="10"> RowSpacing="10">
<!-- Search label and return button --> <!-- Search label and return button -->
<Grid <Grid
RowDefinitions="Auto, *" RowDefinitions="Auto, *"
ColumnDefinitions="*, 1.5*" ColumnDefinitions="*, 1.5*"
Margin="0, 0, 0, 30"> Margin="0, 0, 0, 30">
<HorizontalStackLayout> <HorizontalStackLayout>
<ImageButton <ImageButton
Grid.Column="0" Grid.Column="0"
HeightRequest="50" HeightRequest="50"
WidthRequest="50" WidthRequest="50"
Source="arrow_back.svg"/> Source="arrow_back.svg"/>
</HorizontalStackLayout> </HorizontalStackLayout>
<Label <Label
Grid.Column="1" Grid.Column="1"
FontSize="24" FontSize="24"
TextColor="{StaticResource TextColorPrimary}" TextColor="{StaticResource TextColorPrimary}"
Text="Search" Text="Search"
FontFamily="PoppinsBold" FontFamily="PoppinsBold"
VerticalOptions="Center"/> VerticalOptions="Center"/>
</Grid> </Grid>
<!-- Search input and filter button --> <!-- Search input and filter button -->
@ -40,14 +40,14 @@
ColumnDefinitions="5*, *"> ColumnDefinitions="5*, *">
<Border <Border
Grid.Column="0" Grid.Column="0"
Style="{StaticResource SecondaryBorder}"> Style="{StaticResource SecondaryBorderShadow}">
<Entry <Entry
Style="{StaticResource UserInput}" Style="{StaticResource UserInput}"
Placeholder="Cake, Lasagna, Vegetarian..."/> Placeholder="Cake, Lasagna, Vegetarian..."/>
</Border> </Border>
<Border <Border
Style="{StaticResource SecondaryBorder}" Style="{StaticResource SecondaryBorderShadow}"
Grid.Column="1" Grid.Column="1"
BackgroundColor="{StaticResource ActionButton}" BackgroundColor="{StaticResource ActionButton}"
Stroke="{StaticResource ActionButton}"> Stroke="{StaticResource ActionButton}">
@ -72,13 +72,13 @@
Grid.Row="3" Grid.Row="3"
ColumnSpacing="10" ColumnSpacing="10"
ColumnDefinitions="*, *"> ColumnDefinitions="*, *">
<Button <Button
Grid.Column="0" Grid.Column="0"
Text="Most Relevent" Text="Most Relevent"
Style="{StaticResource UserButton}" Style="{StaticResource UserButton}"
TextColor="{StaticResource White}" TextColor="{StaticResource White}"
BackgroundColor="{StaticResource Selected}"> BackgroundColor="{StaticResource Selected}">
</Button> </Button>
<Button <Button
@ -87,14 +87,11 @@
Style="{StaticResource UserButton}" Style="{StaticResource UserButton}"
TextColor="{StaticResource TextColorSecondary}" TextColor="{StaticResource TextColorSecondary}"
BackgroundColor="{StaticResource BackgroundSecondary}"> BackgroundColor="{StaticResource BackgroundSecondary}">
</Button> </Button>
</Grid> </Grid>
<!-- Search result items --> <!-- Search result items -->
<ScrollView <ScrollView
Grid.Row="4"> Grid.Row="4">
<FlexLayout <FlexLayout

@ -1,53 +0,0 @@
# Diagramme de séquence Shop&Cook
## Interactions entre Utilisateur, Shop&Cook et API
```mermaid
sequenceDiagram
participant Utilisateur
participant Shop&Cook
participant API
Utilisateur->>+Shop&Cook: Ouvre l'application
Shop&Cook->>+Utilisateur: Affiche l'écran de connexion
Utilisateur->>+Shop&Cook: Se connecte / S'inscrit
Shop&Cook->>+API: Valide les informations de connexion / inscription
API-->>-Shop&Cook: Retourne le résultat de la validation
Shop&Cook-->>-Utilisateur: Affiche l'écran d'accueil ou un message d'erreur
Utilisateur->>+Shop&Cook: Recherche des recettes avec filtres
Shop&Cook->>+API: Récupère les recettes filtrées
API-->>-Shop&Cook: Retourne les recettes filtrées
Shop&Cook-->>-Utilisateur: Affiche les recettes filtrées
Utilisateur->>+Shop&Cook: Aime/Ajoute aux favoris une recette
Shop&Cook->>+API: Met à jour le statut de la recette
API-->>-Shop&Cook: Confirme la mise à jour
Shop&Cook-->>-Utilisateur: Met à jour l'affichage de la recette
Utilisateur->>+Shop&Cook: Accède aux paramètres
Shop&Cook-->>-Utilisateur: Affiche les options de paramètres
Utilisateur->>+Shop&Cook: Change le thème/le mot de passe
Shop&Cook->>+API: Enregistre les modifications
API-->>-Shop&Cook: Confirme l'enregistrement
Shop&Cook-->>-Utilisateur: Met à jour l'affichage et confirme les modifications
Utilisateur->>+Shop&Cook: Clique sur une recette
Shop&Cook->>+API: Récupère les détails de la recette
API-->>-Shop&Cook: Retourne les détails de la recette
Shop&Cook-->>-Utilisateur: Affiche les détails de la recette
Utilisateur->>+Shop&Cook: Choisit le nombre de personnes et ajoute au panier
Shop&Cook-->>-Utilisateur: Met à jour le panier
Utilisateur->>+Shop&Cook: Planifie un repas pour un jour de la semaine
Shop&Cook-->>-Utilisateur: Met à jour le planning
Utilisateur->>+Shop&Cook: Génère la liste de courses
Shop&Cook->>+API: Récupère les ingrédients nécessaires
API-->>-Shop&Cook: Retourne la liste des ingrédients
Shop&Cook-->>-Utilisateur: Affiche la liste de courses
```

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 KiB

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 KiB

After

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 KiB

After

Width:  |  Height:  |  Size: 684 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 799 KiB

After

Width:  |  Height:  |  Size: 782 KiB

@ -1,21 +0,0 @@
![image](sketchs/ShopNCooKDebutSketch.png)
<br>
![image](sketchs/Splash.png)
<br>
![image](sketchs/Login.png)
<br>
![image](sketchs/SignUp.png)
<br>
![image](sketchs/Home.png)
<br>
![image](sketchs/Recipe.png)
<br>
![image](sketchs/Splash.png)
<br>
![image](sketchs/Search.png)
<br>
![image](sketchs/SearchFilter.png)
<br>
![image](sketchs/Menu.png)
<br>
![image](sketchs/Profile.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Loading…
Cancel
Save