Add DarkTheme and loginPage

pull/1/head
Matheo HERSAN 2 years ago
parent b4f6c46055
commit c6c03bae96

@ -8,6 +8,7 @@
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" /> <ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" /> <ResourceDictionary Source="Resources/Styles/Styles.xaml" />
<ResourceDictionary Source="Resources/Theme/DarkTheme.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

@ -11,6 +11,10 @@
<ShellContent <ShellContent
ContentTemplate="{DataTemplate Views:homePage}" /> ContentTemplate="{DataTemplate Views:homePage}" />
</Tab> </Tab>
<Tab Title="signUpPage">
<ShellContent
ContentTemplate="{DataTemplate Views:signUpPage}" />
</Tab>
<Tab Title="loginPage"> <Tab Title="loginPage">
<ShellContent <ShellContent
ContentTemplate="{DataTemplate Views:loginPage}" /> ContentTemplate="{DataTemplate Views:loginPage}" />

@ -53,18 +53,24 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Views\loginPage.xaml.cs"> <Compile Update="Views\signUpPage.xaml.cs">
<DependentUpon>loginPage.xaml</DependentUpon> <DependentUpon>signUpPage.xaml</DependentUpon>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<MauiXaml Update="Resources\Theme\DarkTheme.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
<MauiXaml Update="Views\homePage.xaml"> <MauiXaml Update="Views\homePage.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="Views\loginPage.xaml"> <MauiXaml Update="Views\loginPage.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</MauiXaml> </MauiXaml>
<MauiXaml Update="Views\signUpPage.xaml">
<Generator>MSBuild:Compile</Generator>
</MauiXaml>
</ItemGroup> </ItemGroup>
</Project> </Project>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MangaMap.Resources.Theme.DarkTheme">
<ResourceDictionary>
<Color x:Key="TextColor">#FFFFFF</Color>
<Color x:Key="EntryPlaceholderColor">#C7C7CC</Color>
<Color x:Key="ButtonColor">#9370DB</Color>
</ResourceDictionary>
</ResourceDictionary>

@ -0,0 +1,9 @@
namespace MangaMap.Resources.Theme;
public partial class DarkTheme : ResourceDictionary
{
public DarkTheme()
{
InitializeComponent();
}
}

@ -5,22 +5,21 @@
Title="loginPage"> Title="loginPage">
<StackLayout VerticalOptions="Center" HorizontalOptions="Center"> <StackLayout VerticalOptions="Center" HorizontalOptions="Center" BackgroundColor="{StaticResource BackgroundColor}">
<Label Text="S'inscrire a MapManga" FontSize="Large" Margin="0,0,0,20"/> <Label Text="Se connecter a MapManga" FontSize="Large" Margin="0,0,0,20" TextColor="{StaticResource TextColor}" />
<Entry Placeholder="Email" Margin="0,0,0,10" /> <Entry Placeholder="Email" Margin="0,0,0,10" TextColor="{StaticResource TextColor}" PlaceholderColor="{StaticResource PlaceholderColor}" />
<Entry Placeholder="Nom d'utilisateur" Margin="0,0,0,10" /> <Entry Placeholder="Mot de passe" IsPassword="True" Margin="0,0,0,20" TextColor="{StaticResource TextColor}" PlaceholderColor="{StaticResource PlaceholderColor}" />
<Entry Placeholder="Mot de passe" IsPassword="True" Margin="0,0,0,10" /> <Button Text="Se connecter" Clicked="OnLoginClicked" BackgroundColor="{StaticResource ButtonBackgroundColor}" TextColor="{StaticResource ButtonTextColor}" />
<Entry Placeholder="Confirmer le mot de passe" IsPassword="True" Margin="0,0,0,20" />
<Button Text="S'inscire" Clicked="OnLoginClicked" BackgroundColor="MediumPurple"/>
<StackLayout VerticalOptions="End" HorizontalOptions="Center" Orientation="Horizontal">
<Label Text="Pas de compte ? " TextColor="{StaticResource TextColor}" />
<Label Text="S'inscrire" TextColor="{StaticResource ButtonBackgroundColor}" />
</StackLayout> </StackLayout>
</StackLayout>
</ContentPage> </ContentPage>

@ -0,0 +1,34 @@
<?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="MangaMap.Views.signUpPage"
Title="loginPage"
Background="#1E1E1E">
<StackLayout VerticalOptions="Center" HorizontalOptions="Center">
<Label Text="S'inscrire a MapManga" FontSize="Large" Margin="0,0,0,20"/>
<Entry Placeholder="Email" Margin="0,0,0,10" />
<Entry Placeholder="Nom d'utilisateur" Margin="0,0,0,10" />
<Entry Placeholder="Mot de passe" IsPassword="True" Margin="0,0,0,10" />
<Entry Placeholder="Confirmer le mot de passe" IsPassword="True" Margin="0,0,0,20" />
<Button Text="S'inscire" Clicked="OnLoginClicked" BackgroundColor="MediumPurple"/>
<StackLayout Orientation="Horizontal" HorizontalOptions="Center">
<Label Text="Pas de compte ? " />
<Label Text="S'inscrire" TextColor="MediumPurple">
</Label>
</StackLayout>
</StackLayout>
</ContentPage>

@ -0,0 +1,14 @@
namespace MangaMap.Views;
public partial class signUpPage : ContentPage
{
public signUpPage()
{
InitializeComponent();
}
private void OnLoginClicked(object sender, EventArgs e)
{
//
}
}
Loading…
Cancel
Save