PulseHomeView.xaml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. x:Class="ControlCatalog.Pages.PulseHomeView">
  4. <UserControl.Styles>
  5. <Style Selector="Button.icon-btn">
  6. <Setter Property="Width" Value="40"/>
  7. <Setter Property="Height" Value="40"/>
  8. <Setter Property="CornerRadius" Value="20"/>
  9. <Setter Property="Background" Value="#1a1a1a"/>
  10. <Setter Property="Foreground" Value="#94a3b8"/>
  11. <Setter Property="Padding" Value="8"/>
  12. <Setter Property="BorderBrush" Value="#4D256af4"/>
  13. <Setter Property="BorderThickness" Value="1"/>
  14. </Style>
  15. </UserControl.Styles>
  16. <ScrollViewer VerticalScrollBarVisibility="Auto">
  17. <StackPanel Spacing="0">
  18. <!-- Header: avatar + greeting + bell -->
  19. <Grid ColumnDefinitions="Auto,*,Auto" Margin="16,20,16,8">
  20. <Border Width="44" Height="44" CornerRadius="22"
  21. BorderBrush="#4D256af4" BorderThickness="2"
  22. ClipToBounds="True">
  23. <Image Source="avares://ControlCatalog/Assets/Pulse/profile_avatar.jpg"
  24. Stretch="UniformToFill"
  25. Margin="-2"/>
  26. </Border>
  27. <StackPanel Grid.Column="1" Margin="12,0,0,0" VerticalAlignment="Center">
  28. <TextBlock Text="WELCOME BACK" FontSize="10" FontWeight="Medium"
  29. Foreground="#64748b" LetterSpacing="2"/>
  30. <TextBlock Text="Alex Johnson" FontSize="18" FontWeight="Bold" Foreground="White"/>
  31. </StackPanel>
  32. <Button Grid.Column="2" Classes="icon-btn" VerticalAlignment="Center">
  33. <Path Data="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"
  34. Fill="#94a3b8" Width="18" Height="18" Stretch="Uniform"/>
  35. </Button>
  36. </Grid>
  37. <!-- Category chips -->
  38. <ScrollViewer HorizontalScrollBarVisibility="Auto"
  39. VerticalScrollBarVisibility="Disabled"
  40. Margin="0,8,0,16">
  41. <StackPanel Orientation="Horizontal" Spacing="10" Margin="16,0">
  42. <Border CornerRadius="999" Background="#256af4" Padding="18,10">
  43. <TextBlock Text="All Workouts" FontSize="13" FontWeight="SemiBold" Foreground="White"/>
  44. </Border>
  45. <Border CornerRadius="999" Background="#1a1a1a"
  46. BorderBrush="#1e293b" BorderThickness="1" Padding="18,10">
  47. <TextBlock Text="Beginner" FontSize="13" FontWeight="Medium" Foreground="#94a3b8"/>
  48. </Border>
  49. <Border CornerRadius="999" Background="#1a1a1a"
  50. BorderBrush="#1e293b" BorderThickness="1" Padding="18,10">
  51. <TextBlock Text="15-30 min" FontSize="13" FontWeight="Medium" Foreground="#94a3b8"/>
  52. </Border>
  53. <Border CornerRadius="999" Background="#1a1a1a"
  54. BorderBrush="#1e293b" BorderThickness="1" Padding="18,10">
  55. <TextBlock Text="Equipment" FontSize="13" FontWeight="Medium" Foreground="#94a3b8"/>
  56. </Border>
  57. </StackPanel>
  58. </ScrollViewer>
  59. <!-- Categories header -->
  60. <Grid ColumnDefinitions="*,Auto" Margin="16,0,16,12">
  61. <TextBlock Text="Categories" FontSize="18" FontWeight="Bold" Foreground="White"/>
  62. <TextBlock Grid.Column="1" Text="See All" FontSize="12" FontWeight="SemiBold"
  63. Foreground="#256af4" VerticalAlignment="Center"/>
  64. </Grid>
  65. <!-- Category Cards (horizontal scroll) -->
  66. <ScrollViewer HorizontalScrollBarVisibility="Auto"
  67. VerticalScrollBarVisibility="Disabled">
  68. <StackPanel Orientation="Horizontal" Spacing="12" Margin="16,0">
  69. <!-- HIIT -->
  70. <Border Width="140" Height="190" CornerRadius="16" ClipToBounds="True">
  71. <Border.Background>
  72. <ImageBrush Source="avares://ControlCatalog/Assets/Pulse/cat_hiit.jpg"
  73. Stretch="UniformToFill"/>
  74. </Border.Background>
  75. <Panel>
  76. <Border>
  77. <Border.Background>
  78. <LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%">
  79. <GradientStop Color="#00000000" Offset="0"/>
  80. <GradientStop Color="#33000000" Offset="0.4"/>
  81. <GradientStop Color="#CC000000" Offset="1"/>
  82. </LinearGradientBrush>
  83. </Border.Background>
  84. </Border>
  85. <StackPanel VerticalAlignment="Bottom" Margin="12,0,12,12">
  86. <TextBlock Text="HIIT" FontSize="16" FontWeight="Bold" Foreground="White"/>
  87. <TextBlock Text="12 Sessions" FontSize="11" FontWeight="Light" Foreground="#94a3b8"/>
  88. </StackPanel>
  89. </Panel>
  90. </Border>
  91. <!-- Strength -->
  92. <Border Width="140" Height="190" CornerRadius="16" ClipToBounds="True">
  93. <Border.Background>
  94. <ImageBrush Source="avares://ControlCatalog/Assets/Pulse/cat_strength.jpg"
  95. Stretch="UniformToFill"/>
  96. </Border.Background>
  97. <Panel>
  98. <Border>
  99. <Border.Background>
  100. <LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%">
  101. <GradientStop Color="#00000000" Offset="0"/>
  102. <GradientStop Color="#33000000" Offset="0.4"/>
  103. <GradientStop Color="#CC000000" Offset="1"/>
  104. </LinearGradientBrush>
  105. </Border.Background>
  106. </Border>
  107. <StackPanel VerticalAlignment="Bottom" Margin="12,0,12,12">
  108. <TextBlock Text="Strength" FontSize="16" FontWeight="Bold" Foreground="White"/>
  109. <TextBlock Text="18 Sessions" FontSize="11" FontWeight="Light" Foreground="#94a3b8"/>
  110. </StackPanel>
  111. </Panel>
  112. </Border>
  113. <!-- Yoga -->
  114. <Border Width="140" Height="190" CornerRadius="16" ClipToBounds="True">
  115. <Border.Background>
  116. <ImageBrush Source="avares://ControlCatalog/Assets/Pulse/cat_yoga.jpg"
  117. Stretch="UniformToFill"/>
  118. </Border.Background>
  119. <Panel>
  120. <Border>
  121. <Border.Background>
  122. <LinearGradientBrush StartPoint="0%,0%" EndPoint="0%,100%">
  123. <GradientStop Color="#00000000" Offset="0"/>
  124. <GradientStop Color="#33000000" Offset="0.4"/>
  125. <GradientStop Color="#CC000000" Offset="1"/>
  126. </LinearGradientBrush>
  127. </Border.Background>
  128. </Border>
  129. <StackPanel VerticalAlignment="Bottom" Margin="12,0,12,12">
  130. <TextBlock Text="Yoga" FontSize="16" FontWeight="Bold" Foreground="White"/>
  131. <TextBlock Text="8 Sessions" FontSize="11" FontWeight="Light" Foreground="#94a3b8"/>
  132. </StackPanel>
  133. </Panel>
  134. </Border>
  135. </StackPanel>
  136. </ScrollViewer>
  137. <Border Height="20"/>
  138. <!-- Recommended header -->
  139. <TextBlock Text="Recommended for You" FontSize="18" FontWeight="Bold" Foreground="White"
  140. Margin="16,0,16,12"/>
  141. <!-- Recommended Card 1: Full Body Ignite -->
  142. <Border x:Name="RecCard1" CornerRadius="16" Background="#1a1a1a"
  143. Padding="12" Margin="16,0,16,12"
  144. Cursor="Hand" PointerPressed="OnRecCard1Pressed">
  145. <Grid ColumnDefinitions="Auto,*,Auto">
  146. <Border Width="80" Height="80" CornerRadius="12" ClipToBounds="True">
  147. <Border.Background>
  148. <ImageBrush Source="avares://ControlCatalog/Assets/Pulse/rec_fullbody.jpg"
  149. Stretch="UniformToFill"/>
  150. </Border.Background>
  151. </Border>
  152. <StackPanel Grid.Column="1" VerticalAlignment="Center" Margin="14,0,0,0">
  153. <TextBlock Text="INTERMEDIATE" FontSize="9" FontWeight="Bold"
  154. Foreground="#256af4" LetterSpacing="1" Margin="0,0,0,2"/>
  155. <TextBlock Text="Full Body Ignite" FontSize="14" FontWeight="Bold" Foreground="White"/>
  156. <StackPanel Orientation="Horizontal" Spacing="12" Margin="0,4,0,0">
  157. <StackPanel Orientation="Horizontal" Spacing="4">
  158. <Path Data="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.2 3.2.8-1.3-4.5-2.7V7z"
  159. Fill="#64748b" Stretch="Uniform" Width="12" Height="12"
  160. VerticalAlignment="Center"/>
  161. <TextBlock Text="32 min" FontSize="11" Foreground="#94a3b8"/>
  162. </StackPanel>
  163. <StackPanel Orientation="Horizontal" Spacing="4">
  164. <Path Data="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67z"
  165. Fill="#64748b" Stretch="Uniform" Width="12" Height="12"
  166. VerticalAlignment="Center"/>
  167. <TextBlock Text="450 kcal" FontSize="11" Foreground="#94a3b8"/>
  168. </StackPanel>
  169. </StackPanel>
  170. </StackPanel>
  171. <Button Grid.Column="2" Width="40" Height="40" CornerRadius="20"
  172. Background="#1A256af4" BorderThickness="0" Padding="0"
  173. VerticalAlignment="Center"
  174. Click="OnPlayButtonClicked">
  175. <PathIcon Data="M8 5v14l11-7z" Width="16" Height="16" Foreground="#256af4"/>
  176. </Button>
  177. </Grid>
  178. </Border>
  179. <!-- Recommended Card 2: Sunrise Mobility -->
  180. <Border x:Name="RecCard2" CornerRadius="16" Background="#1a1a1a"
  181. Padding="12" Margin="16,0,16,12"
  182. Cursor="Hand" PointerPressed="OnRecCard2Pressed">
  183. <Grid ColumnDefinitions="Auto,*,Auto">
  184. <Border Width="80" Height="80" CornerRadius="12" ClipToBounds="True">
  185. <Border.Background>
  186. <ImageBrush Source="avares://ControlCatalog/Assets/Pulse/rec_mobility.jpg"
  187. Stretch="UniformToFill"/>
  188. </Border.Background>
  189. </Border>
  190. <StackPanel Grid.Column="1" VerticalAlignment="Center" Margin="14,0,0,0">
  191. <TextBlock Text="BEGINNER" FontSize="9" FontWeight="Bold"
  192. Foreground="#10b981" LetterSpacing="1" Margin="0,0,0,2"/>
  193. <TextBlock Text="Sunrise Mobility" FontSize="14" FontWeight="Bold" Foreground="White"/>
  194. <StackPanel Orientation="Horizontal" Spacing="12" Margin="0,4,0,0">
  195. <StackPanel Orientation="Horizontal" Spacing="4">
  196. <Path Data="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.2 3.2.8-1.3-4.5-2.7V7z"
  197. Fill="#64748b" Stretch="Uniform" Width="12" Height="12"
  198. VerticalAlignment="Center"/>
  199. <TextBlock Text="15 min" FontSize="11" Foreground="#94a3b8"/>
  200. </StackPanel>
  201. <StackPanel Orientation="Horizontal" Spacing="4">
  202. <Path Data="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67z"
  203. Fill="#64748b" Stretch="Uniform" Width="12" Height="12"
  204. VerticalAlignment="Center"/>
  205. <TextBlock Text="120 kcal" FontSize="11" Foreground="#94a3b8"/>
  206. </StackPanel>
  207. </StackPanel>
  208. </StackPanel>
  209. <Button Grid.Column="2" Width="40" Height="40" CornerRadius="20"
  210. Background="#1A10b981" BorderThickness="0" Padding="0"
  211. VerticalAlignment="Center"
  212. Click="OnPlayButtonClicked">
  213. <PathIcon Data="M8 5v14l11-7z" Width="16" Height="16" Foreground="#10b981"/>
  214. </Button>
  215. </Grid>
  216. </Border>
  217. <!-- Recommended Card 3: Power Core 2.0 -->
  218. <Border x:Name="RecCard3" CornerRadius="16" Background="#1a1a1a"
  219. Padding="12" Margin="16,0,16,12"
  220. Cursor="Hand" PointerPressed="OnRecCard3Pressed">
  221. <Grid ColumnDefinitions="Auto,*,Auto">
  222. <Border Width="80" Height="80" CornerRadius="12" ClipToBounds="True">
  223. <Border.Background>
  224. <ImageBrush Source="avares://ControlCatalog/Assets/Pulse/rec_powercore.jpg"
  225. Stretch="UniformToFill"/>
  226. </Border.Background>
  227. </Border>
  228. <StackPanel Grid.Column="1" VerticalAlignment="Center" Margin="14,0,0,0">
  229. <TextBlock Text="ADVANCED" FontSize="9" FontWeight="Bold"
  230. Foreground="#f97316" LetterSpacing="1" Margin="0,0,0,2"/>
  231. <TextBlock Text="Power Core 2.0" FontSize="14" FontWeight="Bold" Foreground="White"/>
  232. <StackPanel Orientation="Horizontal" Spacing="12" Margin="0,4,0,0">
  233. <StackPanel Orientation="Horizontal" Spacing="4">
  234. <Path Data="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm.5-13H11v6l5.2 3.2.8-1.3-4.5-2.7V7z"
  235. Fill="#64748b" Stretch="Uniform" Width="12" Height="12"
  236. VerticalAlignment="Center"/>
  237. <TextBlock Text="45 min" FontSize="11" Foreground="#94a3b8"/>
  238. </StackPanel>
  239. <StackPanel Orientation="Horizontal" Spacing="4">
  240. <Path Data="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67z"
  241. Fill="#64748b" Stretch="Uniform" Width="12" Height="12"
  242. VerticalAlignment="Center"/>
  243. <TextBlock Text="600 kcal" FontSize="11" Foreground="#94a3b8"/>
  244. </StackPanel>
  245. </StackPanel>
  246. </StackPanel>
  247. <Button Grid.Column="2" Width="40" Height="40" CornerRadius="20"
  248. Background="#1Af97316" BorderThickness="0" Padding="0"
  249. VerticalAlignment="Center"
  250. Click="OnPlayButtonClicked">
  251. <PathIcon Data="M8 5v14l11-7z" Width="16" Height="16" Foreground="#f97316"/>
  252. </Button>
  253. </Grid>
  254. </Border>
  255. <Border Height="16"/>
  256. </StackPanel>
  257. </ScrollViewer>
  258. </UserControl>