start reviews recipe view

pull/34/head
Alexandre AGOSTINHO 2 years ago
parent 44e64db510
commit 5b741fa016

@ -30,7 +30,8 @@ namespace Views
/* - Comment(ctrl-k + ctrl-c)/Uncomment(ctrl-k + ctrl-u) to change page - */
MainPage = new MyProfil();
UserAppTheme = AppTheme.Light;
MainPage = new RecipeReviews();
//MainPage = new MyPosts();
}
}

@ -0,0 +1,39 @@
<?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"
xmlns:local="clr-namespace:Views"
x:Class="Views.RecipeReviews"
Title="RecipeReviews">
<VerticalStackLayout>
<local:MiniHeader
TitleMini="Liste des avis de la recette n°5616548"
NeedReturn="True"
HeightRequest="100"/>
<Grid RowDefinitions="*, 300">
<ScrollView>
<VerticalStackLayout>
<local:UserReview>
<local:UserReview.Comment>
Recette facile, non prise de tête et agréable à réaliser avec ses grand-parents. Le résultat est délicieux, ma famille a adorée.
</local:UserReview.Comment>
</local:UserReview>
<local:UserReview>
<local:UserReview.Comment>
Très bonne recette à lexeption près quil est compliqué doffrir ces cookies à des enfants. En effet, ils ne sont pas très friant de fruit ou de légumes... Mais ils ont eu beaucoup de succès auprès de mes vieux !
</local:UserReview.Comment>
</local:UserReview>
<local:UserReview>
<local:UserReview.Comment>
Je suis plutôt vin blanc.
</local:UserReview.Comment>
</local:UserReview>
</VerticalStackLayout>
</ScrollView>
</Grid>
</VerticalStackLayout>
</ContentPage>

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

@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="256" height="256" viewBox="0 0 256 256" xml:space="preserve">
<defs>
</defs>
<g style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: none; fill-rule: nonzero; opacity: 1;" transform="translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)" >
<path d="M 89.95 34.92 c -0.135 -0.411 -0.519 -0.688 -0.95 -0.688 H 56.508 L 45.948 2.814 C 45.811 2.408 45.43 2.133 45 2.133 s -0.811 0.274 -0.948 0.681 l -10.56 31.417 H 1 c -0.432 0 -0.815 0.277 -0.95 0.688 s 0.009 0.861 0.357 1.117 l 26.246 19.314 l -10 31.21 c -0.131 0.409 0.014 0.856 0.36 1.11 c 0.348 0.257 0.817 0.261 1.168 0.012 L 45 68.795 l 26.818 18.889 c 0.173 0.122 0.375 0.183 0.576 0.183 c 0.208 0 0.416 -0.064 0.592 -0.194 c 0.347 -0.254 0.491 -0.701 0.36 -1.11 l -10 -31.21 l 26.246 -19.314 C 89.94 35.781 90.085 35.331 89.95 34.92 z" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(255,212,0); fill-rule: nonzero; opacity: 1;" transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,38 @@
<?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"
xmlns:local="clr-namespace:Views"
x:Class="Views.UserReview"
x:Name="nUserRef">
<Grid
ColumnDefinitions="250, *"
RowDefinitions="200">
<!-- Stars, user profile picture and name -->
<Grid Grid.Column="0"
ColumnDefinitions="50, 50, 50, 50"
RowDefinitions="50, 50">
<Image Source="star_icon.png" Grid.Column="0"/>
<Image Source="star_icon.png" Grid.Column="1"/>
<Image Source="star_icon.png" Grid.Column="2"/>
<Image Source="star_icon.png" Grid.Column="3"/>
<Image Source="person_default.png" Grid.Row="1"/>
<Label Text="Charles Jacob"
Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1"
HorizontalOptions="StartAndExpand" VerticalOptions="Center"
HorizontalTextAlignment="Center"/>
</Grid>
<!-- Comment content -->
<Label Text="{Binding Comment, Source={x:Reference nUserRef}}"
Grid.Column="2"
BackgroundColor="{AppThemeBinding Light={StaticResource Secondary}, Dark={StaticResource Gray400}}"
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
</Grid>
</ContentView>

@ -0,0 +1,18 @@
namespace Views;
public partial class UserReview : ContentView
{
public UserReview()
{
InitializeComponent();
}
public static readonly BindableProperty CommentProperty =
BindableProperty.Create("Comment", typeof(string), typeof(Label), "");
public string Comment
{
get => (string)GetValue(CommentProperty);
set => SetValue(CommentProperty, value);
}
}

@ -80,9 +80,15 @@
<MauiXaml Update="RecipeCase.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="RecipeReviews.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="ReturnButton.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="UserReview.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="ViewRecette.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>

Loading…
Cancel
Save