added ProfilePage

pull/12/head
maxime.BATISTA@etu.uca.fr 2 years ago
parent 966e257fc1
commit ddb6a0e46c

@ -5,7 +5,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:ShoopNCook" xmlns:local="clr-namespace:ShoopNCook"
xmlns:views="clr-namespace:ShoopNCook.Views" xmlns:views="clr-namespace:ShoopNCook.Views"
Shell.FlyoutBehavior="Disabled"> Shell.FlyoutBehavior="Disabled"
Shell.NavBarIsVisible="False">
<TabBar> <TabBar>
<ShellContent <ShellContent
@ -14,8 +15,8 @@
Route="MainPage" /> Route="MainPage" />
<ShellContent <ShellContent
Title="Test Page" Title="Profile Page"
ContentTemplate="{DataTemplate local:MainPage}" ContentTemplate="{DataTemplate views:ProfilePage}"
Route="MainPage" /> Route="Profile" />
</TabBar> </TabBar>
</Shell> </Shell>

@ -1,15 +0,0 @@
namespace ShoopNCook;
public class MainPage : ContentPage
{
public MainPage()
{
Content = new VerticalStackLayout
{
Children = {
new Label { HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.Center, Text = "Welcome to .NET MAUI!"
}
}
};
}
}

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M373 956 18 601q-5-5-8-11.5T7 575q0-7 3-13.5t8-11.5l355-355q13-13 32-13t32 13q14 14 14 33t-14 33L123 575l315 315q13 14 13 33t-13 32q-14 14-33.5 14T373 956Z"/></svg>

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

@ -41,4 +41,10 @@
<Color x:Key="Blue200Accent">#72ACF1</Color> <Color x:Key="Blue200Accent">#72ACF1</Color>
<Color x:Key="Blue300Accent">#A7CBF6</Color> <Color x:Key="Blue300Accent">#A7CBF6</Color>
<Color x:Key="BackgroundPrimary">#f0e7e7</Color>
<Color x:Key="BackgroundSecondary">White</Color>
<Color x:Key="TextColorPrimary">Black</Color>
<Color x:Key="TextColorSecondary">#6d6d6d</Color>
<Color x:Key="ActionButton">#ff8988</Color>
</ResourceDictionary> </ResourceDictionary>

@ -4,6 +4,17 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" 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">
<Border
x:Key="UserInput"
Grid.Row="3"
StrokeShape="RoundRectangle 15"
Stroke="{StaticResource BackgroundSecondary}">
<Entry
TextColor="{StaticResource TextColorPrimary}"
PlaceholderColor="{StaticResource TextColorSecondary}"
BackgroundColor="{StaticResource BackgroundSecondary}"/>
</Border>
<Style TargetType="ActivityIndicator"> <Style TargetType="ActivityIndicator">
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" /> <Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
</Style> </Style>

@ -48,12 +48,23 @@
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" /> <MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup> </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> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Views\" /> <MauiXaml Update="Views\ProfilePage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -0,0 +1,123 @@
<?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.ProfilePage"
Title="ProfilePage"
BackgroundColor="{StaticResource BackgroundPrimary}">
<Grid
Margin="20"
RowDefinitions="Auto, *, Auto, Auto">
<!-- Profile 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
Grid.Column="1"
FontSize="24"
TextColor="{StaticResource TextColorPrimary}"
Text="Profile"
VerticalOptions="Center"/>
</Grid>
<!-- Profile picture and name -->
<Grid
Grid.Row="1"
RowDefinitions="*, Auto, Auto">
<Border
Grid.Row="0"
StrokeShape="RoundRectangle 10000"
MaximumHeightRequest="150"
HorizontalOptions="Center"
Stroke="{StaticResource BackgroundPrimary}"
BackgroundColor="{StaticResource BackgroundSecondary}">
<ImageButton
Grid.Row="0"
Source="default_profile_picture.png"/>
</Border>
<Label
Grid.Row="1"
FontSize="30"
HorizontalOptions="Center"
TextColor="{StaticResource TextColorPrimary}"
Text="%Profile_Name%"/>
<Label
Grid.Row="2"
FontSize="16"
HorizontalOptions="Center"
TextColor="{StaticResource TextColorSecondary}"
Text="Profile settings"/>
</Grid>
<Grid
Grid.Row="2"
Margin="0, 20, 0, 0"
RowDefinitions="Auto, *, Auto, *">
<Label
Grid.Row="0"
Text="Name"
TextColor="{StaticResource TextColorSecondary}"/>
<Border
Grid.Row="1"
StrokeShape="RoundRectangle 12"
Stroke="{StaticResource BackgroundSecondary}">
<Entry
TextColor="{StaticResource TextColorPrimary}"
PlaceholderColor="{StaticResource TextColorSecondary}"
BackgroundColor="{StaticResource BackgroundSecondary}"
Text="%Profile_Name%"
Placeholder="Place your name here"/>
</Border>
<Label
Grid.Row="2"
Text="Your Email"
TextColor="{StaticResource TextColorSecondary}"/>
<Border
Grid.Row="3"
StrokeShape="RoundRectangle 12"
Stroke="{StaticResource BackgroundSecondary}">
<Entry
TextColor="{StaticResource TextColorPrimary}"
PlaceholderColor="{StaticResource TextColorSecondary}"
BackgroundColor="{StaticResource BackgroundSecondary}"
Text="%Profile_Mail%"
Placeholder="Place your mail address here"/>
</Border>
</Grid>
<Border
Grid.Row="4"
Margin="0, 30, 0, 0"
Stroke="{StaticResource BackgroundPrimary}"
StrokeShape="RoundRectangle 12">
<Label
HeightRequest="50"
BackgroundColor="{StaticResource ActionButton}"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center">
LOG IN</Label>
</Border>
</Grid>
</ContentPage>

@ -0,0 +1,9 @@
namespace ShoopNCook.Views;
public partial class ProfilePage : ContentPage
{
public ProfilePage()
{
InitializeComponent();
}
}
Loading…
Cancel
Save