fix conflicts

pull/33/head
Leo TUAILLON 2 years ago
commit b357890b43

@ -14,11 +14,21 @@
ContentTemplate="{DataTemplate pages:LoginPage}"
Route="Login" />
<ShellContent
Title="changePassword"
ContentTemplate="{DataTemplate pages:ChangePassword}"
Route="ChangePassword" />
<ShellContent
Title="Profile Page"
ContentTemplate="{DataTemplate pages:ProfilePage}"
Route="Profile" />
<ShellContent
Title="Home Page"
ContentTemplate="{DataTemplate pages:HomePage}"
Route="HomePage" />
<ShellContent
Title="Search Page"
ContentTemplate="{DataTemplate pages:SearchPage}"
@ -43,9 +53,20 @@
Title="Favorites Page"
ContentTemplate="{DataTemplate pages:FavoritesPage}"
Route="Favorites" />
<ShellContent
Title="Confirm Email"
ContentTemplate="{DataTemplate pages:ConfirmMail}"
Route="ConfirmMail" />
<ShellContent
Title="Forgot Password"
ContentTemplate="{DataTemplate pages:ForgotPassword}"
Route="Forgot Password" />
<ShellContent
Title="My Recipes Page"
ContentTemplate="{DataTemplate pages:MyRecipesPage}"
Route="MyRecipes" />
</TabBar>
</Shell>

@ -14,10 +14,10 @@ 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-Regular.ttf", "Poppins");
fonts.AddFont("Poppins-Medium.ttf", "PoppinsMedium");
fonts.AddFont("Poppins-Regular.ttf", "Poppins");
});
#if DEBUG
builder.Logging.AddDebug();
#endif

@ -0,0 +1,146 @@
<?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.Pages.ChangePassword"
Title="ChangePassword"
BackgroundColor="{StaticResource BackgroundPrimary}">
<ScrollView>
<Grid
Margin="20"
RowDefinitions="Auto, Auto, Auto, *">
<!-- Change Password label and return button -->
<Grid
Grid.Row="0"
RowDefinitions="Auto, *"
ColumnDefinitions="*, 3*"
Margin="0, 0, 0, 40">
<HorizontalStackLayout>
<ImageButton
Grid.Column="0"
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"/>
</HorizontalStackLayout>
<Label
Grid.Column="1"
FontSize="24"
TextColor="{StaticResource TextColorPrimary}"
Text="Change Password"
FontFamily="PoppinsBold"
VerticalOptions="Center"/>
</Grid>
<!-- User inputs -->
<Grid
Grid.Row="2"
Margin="0, 20, 0, 0"
RowDefinitions="Auto, *, Auto, *,Auto,*">
<VerticalStackLayout>
<Label
Grid.Row="0"
Text="Old Password Here :"
FontFamily="PoppinsBold"
TextColor="{StaticResource TextColorSecondary}"/>
<Border
Style="{StaticResource SecondaryBorder}"
Margin="0,30,10,20">
<Grid
Padding="5"
BackgroundColor="{StaticResource BackgroundSecondary}"
ColumnDefinitions="Auto,Auto,*">
<Image
Grid.Column="1"
Source="password_icon.svg">
</Image>
<Entry
Style="{StaticResource UserInput}"
Grid.Column="2"
Placeholder="Old Password"/>
</Grid>
</Border>
<Label
Grid.Row="0"
Text="New Password Here :"
FontFamily="PoppinsBold"
TextColor="{StaticResource TextColorSecondary}"/>
<Border
Style="{StaticResource SecondaryBorder}"
Margin="0,30,0,20">
<Grid
Padding="5"
BackgroundColor="{StaticResource BackgroundSecondary}"
ColumnDefinitions="Auto,Auto,*">
<Image
Grid.Column="1"
Source="password_icon.svg">
</Image>
<Entry
Style="{StaticResource UserInput}"
Grid.Column="2"
Placeholder="New Password"/>
</Grid>
</Border>
<Label
Grid.Row="0"
Text="Confirm New Password Here :"
FontFamily="PoppinsBold"
Margin="0,0,0,0"
TextColor="{StaticResource TextColorSecondary}"/>
<Border
Style="{StaticResource SecondaryBorder}"
Margin="0,30,0,20">
<Grid
Padding="5"
BackgroundColor="{StaticResource BackgroundSecondary}"
ColumnDefinitions="Auto,Auto,*">
<Image
Grid.Column="1"
Source="password_icon.svg">
</Image>
<Entry
Style="{StaticResource UserInput}"
Grid.Column="2"
Placeholder="New Password"/>
</Grid>
</Border>
</VerticalStackLayout>
</Grid>
<!-- Save button -->
<VerticalStackLayout
Grid.Row="3"
VerticalOptions="End">
<Border
Margin="0, 30, 0, 0"
Stroke="{StaticResource BackgroundPrimary}"
StrokeShape="RoundRectangle 12">
<Button
HeightRequest="50"
Style="{StaticResource UserButton}"
BackgroundColor="{StaticResource ActionButton}"
Text="SAVE"/>
</Border>
</VerticalStackLayout>
</Grid>
</ScrollView>
</ContentPage>

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

@ -11,21 +11,26 @@
<!-- Header label and return button -->
<Grid
Grid.Row="0"
ColumnDefinitions="Auto, *"
Padding="10, 20, 0, 30">
Padding="20, 40, 0, 30"
ColumnDefinitions="*"
MaximumHeightRequest="60">
<ImageButton
Grid.Column="0"
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"/>
Source="arrow_back.svg"
HorizontalOptions="Start"/>
<Label
Grid.Column="1"
Grid.Column="0"
FontSize="24"
TextColor="{StaticResource TextColorPrimary}"
Text="Favorites recipes"
Text="Favorites Recipes"
MaximumHeightRequest="60"
FontFamily="PoppinsBold"
HorizontalOptions="Center"/>
HorizontalOptions="Center"
VerticalOptions="Center"/>
</Grid>
<!-- Favorite items -->

@ -0,0 +1,170 @@
<?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.Pages.ForgotPassword"
Title="ForgotPassword"
BackgroundColor="{StaticResource BackgroundPrimary}">
<ScrollView>
<Grid
Padding="20"
RowDefinitions="Auto, Auto, Auto, *">
<!-- Profile label and return button -->
<Grid
Grid.Row="0"
RowDefinitions="Auto, *"
ColumnDefinitions="*, 1.5*"
Margin="0, 0, 0, 40">
<HorizontalStackLayout>
<ImageButton
Grid.Column="0"
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"/>
</HorizontalStackLayout>
<Label
Margin="-40,10,0,0"
Grid.Column="1"
FontSize="24"
TextColor="{StaticResource TextColorPrimary}"
Text="Forgot Password"
FontFamily="PoppinsBold"
VerticalOptions="Start"/>
</Grid>
<!-- Email entry -->
<Grid
Grid.Row="1"
RowDefinitions="*, Auto, Auto"
>
<Label
Grid.Row="0"
FontSize="15"
TextColor="{StaticResource TextColorSecondary}"
Text="Enter your email here : "
FontFamily="PoppinsBold"
VerticalOptions="Center"/>
<Border
Grid.Row="1"
Style="{StaticResource SecondaryBorder}"
Margin="0,30,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="User Name"/>
</Grid>
</Border>
<VerticalStackLayout
Grid.Row="2"
VerticalOptions="End">
<Border
Margin="0, 30, 0, 0"
Stroke="{StaticResource BackgroundPrimary}"
StrokeShape="RoundRectangle 12">
<Button
BackgroundColor="{StaticResource ActionButton}"
FontFamily="PoppinsMedium"
TextColor="White"
Text="Recup my Password"/>
</Border>
</VerticalStackLayout>
</Grid>
<Grid>
</Grid>
<!-- Sendmail grid -->
<Grid
Grid.Row="2"
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto"
RowSpacing="10">
<Label
Grid.Row="0"
Margin="20"
Text="A recuperation code as been send to your email address ! "
FontFamily="PoppinsBold"
TextColor="LightGreen"/>
<Label
Grid.Row="1"
Text="Enter the code here"
FontFamily="PoppinsBold"
TextColor="{StaticResource TextColorSecondary}"/>
<Border
Grid.Row="2"
Style="{StaticResource SecondaryBorder}"
>
<Grid
Padding="5"
BackgroundColor="{StaticResource BackgroundSecondary}"
ColumnDefinitions="Auto,Auto,*">
<Image
Grid.Column="1"
Source="code.png">
</Image>
<Entry
Style="{StaticResource UserInput}"
Grid.Column="2"
Placeholder="Code"/>
</Grid>
</Border>
<Label
Grid.Row="3"
Text="Enter new Password here"
FontFamily="PoppinsBold"
TextColor="{StaticResource TextColorSecondary}"/>
<Border
Grid.Row="4"
Style="{StaticResource SecondaryBorderShadow}">
<Entry
Style="{StaticResource UserInput}"
Placeholder="New password"/>
</Border>
<Label
Grid.Row="5"
Text="Confirm your new Password here"
FontFamily="PoppinsBold"
TextColor="{StaticResource TextColorSecondary}"/>
<Border
Grid.Row="6"
Style="{StaticResource SecondaryBorderShadow}">
<Entry
Style="{StaticResource UserInput}"
Placeholder="New password"/>
</Border>
</Grid>
<!-- Save button -->
<VerticalStackLayout
Grid.Row="3"
VerticalOptions="End">
<Border
Margin="0, 30, 0, 0"
Stroke="{StaticResource BackgroundPrimary}"
StrokeShape="RoundRectangle 12">
<Button
BackgroundColor="{StaticResource ActionButton}"
FontFamily="PoppinsMedium"
TextColor="White"
Text="Save Change"/>
</Border>
</VerticalStackLayout>
</Grid>
</ScrollView>
</ContentPage>

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

@ -0,0 +1,125 @@
<?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.Pages.HomePage"
xmlns:views="clr-namespace:ShoopNCook.Views"
Title="HomePage"
BackgroundColor="{StaticResource BackgroundPrimary}">
<ScrollView>
<Grid RowDefinitions="Auto,Auto,Auto,*">
<FlexLayout
Grid.Row="0"
JustifyContent="SpaceBetween"
AlignItems="Center"
AlignContent="Center"
Margin="20,35,20,20"
>
<Border
Style="{StaticResource SecondaryBorder}"
BackgroundColor="{StaticResource BackgroundSecondary}"
StrokeShape="RoundRectangle 1500"
>
<ImageButton
Source="default_profile_picture.png"
WidthRequest="65"
HeightRequest="65"/>
</Border>
</FlexLayout>
<Grid
ColumnDefinitions="*,Auto"
Grid.Row="1"
Margin="20">
<Border
Margin="0,10,10,7"
Style="{StaticResource SecondaryBorder}">
<Entry
Style="{StaticResource UserInput}"
Grid.Column="0"
Placeholder="Search here..."/>
</Border>
<ImageButton
Grid.Column="1"
Source="syncalt.svg"
Padding="5"
BackgroundColor="{StaticResource ActionButton}"
WidthRequest="65"
HeightRequest="65"
CornerRadius="15"
Margin="0,5,5,0">
</ImageButton>
</Grid>
<VerticalStackLayout
Grid.Row="2">
<FlexLayout
JustifyContent="SpaceBetween"
AlignItems="Center"
Margin="20"
HeightRequest="30">
<Label
Text="Popular recipe"
Style="{StaticResource h2}"/>
<Label
Text="Show All"
TextColor="{StaticResource TextColorSecondary}"/>
</FlexLayout>
<ScrollView
Orientation="Horizontal">
<HorizontalStackLayout
Spacing="10"
Padding="0,0,0,40">
<views:RecipeView/>
<views:RecipeView/>
<views:RecipeView/>
<views:RecipeView/>
<views:RecipeView/>
</HorizontalStackLayout>
</ScrollView>
</VerticalStackLayout>
<VerticalStackLayout
Grid.Row="3">
<FlexLayout
JustifyContent="SpaceBetween"
AlignItems="Center"
Margin="20,0,20,20"
HeightRequest="30"
>
<Label
Text="Recommended for you"
Style="{StaticResource h2}"/>
<Label
Text="Show All"
TextColor="{StaticResource TextColorSecondary}"/>
</FlexLayout>
<ScrollView>
<FlexLayout
JustifyContent="Center"
AlignItems="Start"
AlignContent="Start"
Direction="Row"
Wrap="Wrap">
<views:RecipeView Margin="2.5"/>
<views:RecipeView Margin="2.5"/>
<views:RecipeView Margin="2.5"/>
<views:RecipeView Margin="2.5"/>
<views:RecipeView Margin="2.5"/>
<views:RecipeView Margin="2.5"/>
<views:RecipeView Margin="2.5"/>
</FlexLayout>
</ScrollView>
</VerticalStackLayout>
</Grid>
</ScrollView>
</ContentPage>

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

@ -0,0 +1,65 @@
<?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.Pages.MyRecipesPage"
Title="MyRecipesPage"
xmlns:views="clr-namespace:ShoopNCook.Views"
BackgroundColor="{StaticResource BackgroundPrimary}">
<Grid
RowDefinitions="Auto, *, Auto">
<!-- Header label and return button -->
<Grid
Grid.Row="0"
Padding="10, 20, 0, 30">
<ImageButton
Grid.Column="0"
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"
HorizontalOptions="Start"/>
<Label
Grid.Column="0"
FontSize="24"
TextColor="{StaticResource TextColorPrimary}"
Text="My Recipes"
FontFamily="PoppinsBold"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</Grid>
<!-- Favorite items -->
<ScrollView
Grid.Row="1">
<FlexLayout
JustifyContent="Center"
AlignItems="Start"
AlignContent="Start"
Direction="Row"
Wrap="Wrap">
<views:OwnedRecipeView Margin="5" Note="4.5" Title="Spaghetti Bolognese"/>
<views:OwnedRecipeView Margin="5" Note="3" Title="Chickend Curry"/>
<views:OwnedRecipeView Margin="5" Note="0.2" Title="Beef Stroganoff"/>
<views:OwnedRecipeView Margin="5" Note="1.6" Title="Fish And Ships"/>
<views:OwnedRecipeView Margin="5" Note="5" Title="Caesar Salad"/>
<views:OwnedRecipeView Margin="5" Note="3.5" Title="Vegetables"/>
<views:OwnedRecipeView Margin="5" Note="4.6" Title="Guacamole"/>
<views:OwnedRecipeView Margin="5" Note="4" Title="Pad Thai"/>
<views:OwnedRecipeView Margin="5" Note="3" Title="French Toast"/>
<views:OwnedRecipeView Margin="5" Note="2" Title="Margherita Pizza"/>
</FlexLayout>
</ScrollView>
<Border
Margin="20, 0, 20, 5"
Grid.Row="2"
Style="{StaticResource SecondaryBorder}">
<Button
Style="{StaticResource UserButton}"
BackgroundColor="{StaticResource Selected}"
Text="Add a new recipe"/>
</Border>
</Grid>
</ContentPage>

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

@ -13,23 +13,25 @@
<!-- Profile label and return button -->
<Grid
Grid.Row="0"
RowDefinitions="Auto, *"
ColumnDefinitions="*, 1.5*"
Margin="0, 0, 0, 40">
<HorizontalStackLayout>
<ImageButton
Grid.Column="0"
Padding="10, 20, 0, 30"
ColumnDefinitions="*"
MaximumHeightRequest="60">
<ImageButton
Grid.Column="0"
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"
HorizontalOptions="Start"/>
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"/>
</HorizontalStackLayout>
<Label
Grid.Column="1"
Grid.Column="0"
FontSize="24"
TextColor="{StaticResource TextColorPrimary}"
Text="Profile"
MaximumHeightRequest="60"
FontFamily="PoppinsBold"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</Grid>

@ -140,9 +140,7 @@
HorizontalOptions="Center"
Text="Submit"/>
</Border>
</HorizontalStackLayout>
</Grid>
</ScrollView>

@ -12,26 +12,31 @@
<!-- Search label and return button -->
<Grid
RowDefinitions="Auto, *"
ColumnDefinitions="*, 1.5*"
Margin="0, 0, 0, 30">
Grid.Row="0"
Padding="10, 20, 0, 30"
ColumnDefinitions="*"
MaximumHeightRequest="60">
<ImageButton
Grid.Column="0"
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"
HorizontalOptions="Start"/>
<HorizontalStackLayout>
<ImageButton
Grid.Column="0"
HeightRequest="50"
WidthRequest="50"
Source="arrow_back.svg"/>
</HorizontalStackLayout>
<Label
Grid.Column="1"
Grid.Column="0"
FontSize="24"
TextColor="{StaticResource TextColorPrimary}"
Text="Search"
MaximumHeightRequest="60"
FontFamily="PoppinsBold"
HorizontalOptions="Center"
VerticalOptions="Center"/>
</Grid>
<!-- Search input and filter button -->
<Grid
@ -100,7 +105,6 @@
AlignContent="Start"
Direction="Row"
Wrap="Wrap">
<views:RecipeView Margin="5"/>
<views:RecipeView Margin="5"/>
<views:RecipeView Margin="5"/>

@ -1 +1,2 @@
# ShopNCook
Leo TUAILLON

@ -0,0 +1,3 @@
<svg width="66" height="77" viewBox="0 0 66 77" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.4156 77C8.76563 77 7.32188 76.3583 6.08438 75.075C4.84688 73.7917 4.22813 72.2944 4.22813 70.5833V9.625H3.09375C2.21719 9.625 1.48242 9.31575 0.889453 8.69726C0.296484 8.07869 0 7.31226 0 6.39795C0 5.48358 0.296484 4.72338 0.889453 4.11736C1.48242 3.51134 2.21719 3.20833 3.09375 3.20833H19.3875C19.3875 2.28148 19.684 1.51505 20.277 0.909028C20.8699 0.303009 21.6047 0 22.4813 0H43.5188C44.3953 0 45.1301 0.307465 45.7231 0.922396C46.316 1.53733 46.6125 2.29931 46.6125 3.20833H62.9062C63.7828 3.20833 64.5176 3.51758 65.1105 4.13608C65.7035 4.75464 66 5.52108 66 6.43538C66 7.34976 65.7035 8.10995 65.1105 8.71597C64.5176 9.32199 63.7828 9.625 62.9062 9.625H61.7719V70.5833C61.7719 72.2944 61.1531 73.7917 59.9156 75.075C58.6781 76.3583 57.2344 77 55.5844 77H10.4156ZM21.3469 58.1778C21.3469 59.0868 21.6451 59.8488 22.2415 60.4637C22.838 61.0786 23.577 61.3861 24.4587 61.3861C25.3404 61.3861 26.0734 61.0786 26.6578 60.4637C27.2422 59.8488 27.5344 59.0868 27.5344 58.1778V21.9236C27.5344 21.0146 27.2362 20.2526 26.6398 19.6377C26.0433 19.0227 25.3042 18.7153 24.4226 18.7153C23.5409 18.7153 22.8078 19.0227 22.2234 19.6377C21.6391 20.2526 21.3469 21.0146 21.3469 21.9236V58.1778ZM38.4656 58.1778C38.4656 59.0868 38.7638 59.8488 39.3602 60.4637C39.9567 61.0786 40.6958 61.3861 41.5774 61.3861C42.4591 61.3861 43.1922 61.0786 43.7766 60.4637C44.3609 59.8488 44.6531 59.0868 44.6531 58.1778V21.9236C44.6531 21.0146 44.3549 20.2526 43.7585 19.6377C43.162 19.0227 42.423 18.7153 41.5413 18.7153C40.6596 18.7153 39.9266 19.0227 39.3422 19.6377C38.7578 20.2526 38.4656 21.0146 38.4656 21.9236V58.1778Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 920 B

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" fill="#FFFFFF" width="48"><path d="M120 816v-60h240v60H120Zm0-210v-60h480v60H120Zm0-210v-60h720v60H120Z"/></svg>

After

Width:  |  Height:  |  Size: 187 B

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" fill="#FFFFFF" viewBox="0 96 960 960" width="48"><path d="M271 936 80 745l192-192 42 42-120 120h649v60H194l119 119-42 42Zm418-337-42-42 119-119H117v-60h649L646 258l42-42 192 192-191 191Z"/></svg>

After

Width:  |  Height:  |  Size: 247 B

@ -17,6 +17,7 @@
<Color x:Key="Gray600">#404040</Color>
<Color x:Key="Gray900">#212121</Color>
<Color x:Key="Gray950">#141414</Color>
<Color x:Key="ValidationColor">#2ADE0A</Color>
<SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource Primary}"/>
<SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource Secondary}"/>
<SolidColorBrush x:Key="TertiaryBrush" Color="{StaticResource Tertiary}"/>
@ -31,6 +32,7 @@
<SolidColorBrush x:Key="Gray900Brush" Color="{StaticResource Gray900}"/>
<SolidColorBrush x:Key="Gray950Brush" Color="{StaticResource Gray950}"/>
<Color x:Key="Yellow100Accent">#F7B548</Color>
<Color x:Key="Yellow200Accent">#FFD590</Color>
<Color x:Key="Yellow300Accent">#FFE5B9</Color>

@ -7,7 +7,8 @@
<Style TargetType="Border"
x:Key="SecondaryBorder">
<Setter Property="StrokeShape" Value="RoundRectangle 25"/>
<Setter Property="Stroke" Value="{StaticResource BackgroundSecondary}"/>
<Setter Property="Stroke" Value="Transparent"/>
<Setter Property="StrokeThickness" Value="0"/>
<Setter Property="BackgroundColor" Value="{StaticResource BackgroundSecondary}"/>
</Style>
@ -15,7 +16,8 @@
x:Key="SecondaryBorderShadow">
<Setter Property="StrokeShape" Value="RoundRectangle 25"/>
<Setter Property="Stroke" Value="{StaticResource BackgroundSecondary}"/>
<Setter Property="Stroke" Value="Transparent"/>
<Setter Property="StrokeThickness" Value="0"/>
<Setter Property="BackgroundColor" Value="{StaticResource BackgroundSecondary}"/>
<Setter Property="Shadow">
<Setter.Value>
@ -32,7 +34,7 @@
x:Key="UserInput">
<Setter Property="TextColor" Value="{StaticResource TextColorPrimary}"/>
<Setter Property="PlaceholderColor" Value="{StaticResource TextColorSecondary}"/>
<Setter Property="FontFamily" Value="PoppinsMedium"/>
<Setter Property="FontFamily" Value="Poppins"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Margin" Value="7, 0, 0, 0"/>
</Style>
@ -42,6 +44,7 @@
x:Key="UserButton">
<Setter Property="FontFamily" Value="PoppinsMedium"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="TextColor" Value="{StaticResource ButtonText}"/>
</Style>
<Style

@ -0,0 +1,79 @@
<?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">
<Border
Style="{StaticResource SecondaryBorderShadow}"
StrokeShape="RoundRectangle 30">
<Grid
BackgroundColor="{StaticResource BackgroundSecondary}"
Padding="10"
MinimumHeightRequest="175"
MinimumWidthRequest="150"
RowDefinitions="*, Auto">
<Border
Grid.Row="0"
Stroke="Transparent"
StrokeShape="RoundRectangle 20"
BackgroundColor="AliceBlue">
<Grid>
<Image />
<HorizontalStackLayout
x:Name="Stars"
VerticalOptions="End"
HorizontalOptions="End"
Margin="0, 0, 15, 2">
<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"/>
<Image
WidthRequest="10"
Source="star_full.svg"/>
</HorizontalStackLayout>
</Grid>
</Border>
<VerticalStackLayout Grid.Row="1">
<Label
TextColor="{StaticResource TextColorPrimary}"
x:Name="TitleLabel"/>
<Border
BackgroundColor="{StaticResource Selected}"
Stroke="Transparent"
StrokeShape="RoundRectangle 250"
Margin="8, 0, 8, 0">
<Grid
ColumnDefinitions="Auto, *"
Padding="10, 3, 10, 3"
ColumnSpacing="4"
HorizontalOptions="Center"
>
<Grid.GestureRecognizers>
<TapGestureRecognizer
Tapped="TapGestureRecognizer_Tapped"
NumberOfTapsRequired="1"/>
</Grid.GestureRecognizers>
<Image
Grid.Column="0"
Source="bin.svg"
MaximumHeightRequest="15"/>
<Label
Grid.Column="1"
Text="Delete"/>
</Grid>
</Border>
</VerticalStackLayout>
</Grid>
</Border>
</ContentView>

@ -0,0 +1,44 @@
namespace ShoopNCook.Views;
public partial class OwnedRecipeView : ContentView
{
public OwnedRecipeView() : this(5, "Title")
{ }
public OwnedRecipeView(float note, string title)
{
InitializeComponent();
Note = note;
Title = title;
}
public float Note
{
set => SetNote(value);
}
public string Title
{
set => TitleLabel.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;
}
}
private void TapGestureRecognizer_Tapped(object sender, TappedEventArgs e)
{
Console.WriteLine("This is a test");
}
}

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

Loading…
Cancel
Save