PulseLoginView.xaml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.PulseLoginView">
  4. <UserControl.Styles>
  5. <!-- Primary button style -->
  6. <Style Selector="Button.primary">
  7. <Setter Property="HorizontalAlignment" Value="Stretch"/>
  8. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  9. <Setter Property="VerticalContentAlignment" Value="Center"/>
  10. <Setter Property="Height" Value="48"/>
  11. <Setter Property="CornerRadius" Value="12"/>
  12. <Setter Property="Background" Value="#256af4"/>
  13. <Setter Property="Foreground" Value="White"/>
  14. <Setter Property="FontWeight" Value="Bold"/>
  15. <Setter Property="FontSize" Value="14"/>
  16. </Style>
  17. <Style Selector="Button.primary:pointerover /template/ ContentPresenter">
  18. <Setter Property="Background" Value="#1d5ad4"/>
  19. <Setter Property="TextElement.Foreground" Value="White"/>
  20. </Style>
  21. <Style Selector="Button.primary:pressed /template/ ContentPresenter">
  22. <Setter Property="Background" Value="#1a4fbf"/>
  23. <Setter Property="TextElement.Foreground" Value="White"/>
  24. </Style>
  25. <!-- Social button style -->
  26. <Style Selector="Button.social">
  27. <Setter Property="HorizontalAlignment" Value="Stretch"/>
  28. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  29. <Setter Property="VerticalContentAlignment" Value="Center"/>
  30. <Setter Property="Height" Value="48"/>
  31. <Setter Property="CornerRadius" Value="12"/>
  32. <Setter Property="Background" Value="#1e293b"/>
  33. <Setter Property="Foreground" Value="#94a3b8"/>
  34. <Setter Property="BorderThickness" Value="1"/>
  35. <Setter Property="BorderBrush" Value="#1e293b"/>
  36. <Setter Property="FontSize" Value="16"/>
  37. <Setter Property="Padding" Value="0"/>
  38. </Style>
  39. <Style Selector="Button.social:pointerover /template/ ContentPresenter">
  40. <Setter Property="Background" Value="#253352"/>
  41. <Setter Property="TextElement.Foreground" Value="White"/>
  42. </Style>
  43. <Style Selector="Button.social:pressed /template/ ContentPresenter">
  44. <Setter Property="Background" Value="#1e293b"/>
  45. <Setter Property="TextElement.Foreground" Value="White"/>
  46. </Style>
  47. <!-- Dark text box -->
  48. <Style Selector="TextBox.dark">
  49. <Setter Property="Height" Value="48"/>
  50. <Setter Property="FontSize" Value="13"/>
  51. <Setter Property="Padding" Value="14,0"/>
  52. <Setter Property="VerticalContentAlignment" Value="Center"/>
  53. <Setter Property="CornerRadius" Value="12"/>
  54. <Setter Property="BorderThickness" Value="1"/>
  55. <Setter Property="(TextElement.Foreground)" Value="White"/>
  56. <Setter Property="Background" Value="#1e293b"/>
  57. <Setter Property="BorderBrush" Value="#1e293b"/>
  58. <Setter Property="CaretBrush" Value="White"/>
  59. </Style>
  60. <Style Selector="TextBox.dark:pointerover /template/ Border#PART_BorderElement">
  61. <Setter Property="Background" Value="#253352"/>
  62. <Setter Property="BorderBrush" Value="#2d3f60"/>
  63. </Style>
  64. <Style Selector="TextBox.dark:focus">
  65. <Setter Property="Foreground" Value="White"/>
  66. </Style>
  67. <Style Selector="TextBox.dark:focus /template/ Border#PART_BorderElement">
  68. <Setter Property="Background" Value="#1e293b"/>
  69. <Setter Property="BorderBrush" Value="#256af4"/>
  70. <Setter Property="BorderThickness" Value="1"/>
  71. </Style>
  72. <Style Selector="TextBox.dark">
  73. <Setter Property="PlaceholderForeground" Value="#64748b"/>
  74. </Style>
  75. </UserControl.Styles>
  76. <ScrollViewer VerticalScrollBarVisibility="Auto">
  77. <StackPanel Spacing="20" Margin="32,48,32,32" MaxWidth="400"
  78. HorizontalAlignment="Center">
  79. <!-- Logo Row -->
  80. <StackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Center">
  81. <Border Width="36" Height="36" CornerRadius="8" Background="#256af4"
  82. HorizontalAlignment="Center" VerticalAlignment="Center">
  83. <PathIcon Data="M7 2v11h3v9l7-12h-4l4-8z"
  84. Width="16" Height="16" Foreground="White"/>
  85. </Border>
  86. <TextBlock Text="PULSE." FontSize="20" FontWeight="Bold" Foreground="White"
  87. VerticalAlignment="Center"/>
  88. </StackPanel>
  89. <!-- Spacer -->
  90. <Border Height="16"/>
  91. <!-- Welcome Text -->
  92. <TextBlock Text="Welcome Back" FontSize="26" FontWeight="Bold" Foreground="White"
  93. HorizontalAlignment="Center"/>
  94. <TextBlock Text="Train harder than yesterday." FontSize="13" Foreground="#cbd5e1"
  95. HorizontalAlignment="Center" Margin="0,-12,0,0"/>
  96. <!-- Spacer -->
  97. <Border Height="8"/>
  98. <!-- Email -->
  99. <TextBlock Text="Email Address" FontSize="12" FontWeight="Medium" Foreground="#cbd5e1"/>
  100. <TextBox Classes="dark" PlaceholderText="[email protected]"/>
  101. <!-- Password Header -->
  102. <Grid ColumnDefinitions="*,Auto">
  103. <TextBlock Text="Password" FontSize="12" FontWeight="Medium" Foreground="#cbd5e1"
  104. VerticalAlignment="Center"/>
  105. <TextBlock Grid.Column="1" Text="Forgot?" FontSize="11" FontWeight="SemiBold"
  106. Foreground="#256af4" VerticalAlignment="Center"/>
  107. </Grid>
  108. <TextBox Classes="dark" PlaceholderText="Password" PasswordChar="&#x2022;"/>
  109. <!-- Login Button -->
  110. <Button x:Name="LoginButton" Classes="primary" Content="Login" Click="OnLoginClicked"/>
  111. <!-- Divider -->
  112. <Grid ColumnDefinitions="*,Auto,*" Margin="0,4">
  113. <Border Height="1" Background="#1e293b" VerticalAlignment="Center"/>
  114. <TextBlock Grid.Column="1" Text="OR CONTINUE WITH" FontSize="10" FontWeight="Medium"
  115. Foreground="#94a3b8" LetterSpacing="2" Margin="12,0"/>
  116. <Border Grid.Column="2" Height="1" Background="#1e293b" VerticalAlignment="Center"/>
  117. </Grid>
  118. <!-- Social Buttons -->
  119. <Grid ColumnDefinitions="*,*,*">
  120. <Button Classes="social" Content="G" Margin="0,0,6,0"/>
  121. <Button Grid.Column="1" Classes="social" Content="&#xf8ff;" Margin="6,0"/>
  122. <Button Grid.Column="2" Classes="social" Content="f" Margin="6,0,0,0"/>
  123. </Grid>
  124. <!-- Footer -->
  125. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="4">
  126. <TextBlock Text="New here?" FontSize="12" Foreground="#cbd5e1"/>
  127. <TextBlock Text="Create an account" FontSize="12" FontWeight="Bold" Foreground="#256af4"/>
  128. </StackPanel>
  129. </StackPanel>
  130. </ScrollViewer>
  131. </UserControl>