test.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <!--
  2. ___ ___
  3. /\_ \ /'___`\
  4. _____ ___\//\ \ /\_\ /\ \ ___ __ __ __ __ ____
  5. /\ '__`\ /'___\\ \ \ \/_/// /__ /' _ `\ /'__`\/\ \/\ \/\ \ /',__\
  6. \ \ \L\ \/\ \__/ \_\ \_ // /_\ \ /\ \/\ \/\ __/\ \ \_/ \_/ \/\__, `\
  7. \ \ ,__/\ \____\/\____\/\______/ \ \_\ \_\ \____\\ \___x___/'\/\____/
  8. \ \ \/ \/____/\/____/\/_____/ \/_/\/_/\/____/ \/__//__/ \/___/
  9. \ \_\
  10. \/_/
  11. __
  12. /\ \
  13. \ \ \___ ___ ___ ___ __ _____ __ __ __
  14. \ \ _ `\ / __`\ /' __` __`\ /'__`\ /\ '__`\ /'__`\ /'_ `\ /'__`\
  15. \ \ \ \ \/\ \L\ \/\ \/\ \/\ \/\ __/ \ \ \L\ \/\ \L\.\_/\ \L\ \/\ __/
  16. \ \_\ \_\ \____/\ \_\ \_\ \_\ \____\ \ \ ,__/\ \__/.\_\ \____ \ \____\
  17. \/_/\/_/\/___/ \/_/\/_/\/_/\/____/ \ \ \/ \/__/\/_/\/___L\ \/____/
  18. \ \_\ /\____/
  19. \/_/ \_/__/
  20. **PCL2新闻主页**
  21. By: Light Beacon(最亮的信标)
  22. 维护:最亮的信标(Light Beacon)、空辰KC
  23. 订阅地址:https://news.bugjump.net
  24. 仓库:https://github.com/Light-Beacon/PCL2-NewsHomepage
  25. 协议:CC BY-NC-SA 4.0
  26. -->
  27. <StackPanel>
  28. <StackPanel Margin="0,-10,0,0">
  29. <!--Animations Starts-->
  30. <StackPanel.Triggers>
  31. <EventTrigger RoutedEvent="StackPanel.Loaded">
  32. <BeginStoryboard>
  33. <Storyboard x:Name="animation1" RepeatBehavior="Forever">
  34. <ColorAnimation Storyboard.TargetName="NewsHint" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" From="#FF000000" To="#FF000000" Duration="0:0:0" />
  35. <ColorAnimation BeginTime="0:0:5" Storyboard.TargetName="NewsHint" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" From="#FF000000" To="#00000000" Duration="0:0:1" />
  36. <ColorAnimation BeginTime="0:0:13" Storyboard.TargetName="NewsHint" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" From="#00000000" To="#FF000000" Duration="0:0:1" />
  37. <ColorAnimation Storyboard.TargetName="Hint2" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" From="#00000000" To="#00000000" Duration="0:0:0" />
  38. <ColorAnimation BeginTime="0:0:6" Storyboard.TargetName="Hint2" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" From="#00000000" To="#FF000000" Duration="0:0:1" />
  39. <ColorAnimation BeginTime="0:0:12" Storyboard.TargetName="Hint2" Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" From="#FF000000" To="#00000000" Duration="0:0:1" />
  40. </Storyboard>
  41. </BeginStoryboard>
  42. </EventTrigger>
  43. </StackPanel.Triggers>
  44. <!--Animations Ends-->
  45. <StackPanel.Resources>
  46. <!--Template Starts-->
  47. <!--Template Ends-->
  48. <!--Styles Starts-->
  49. <!--即将弃用-->
  50. <Style TargetType="Ellipse">
  51. <Setter Property="Fill" Value="{DynamicResource ColorBrush3}" />
  52. <Setter Property="HorizontalAlignment" Value="Left" />
  53. <Setter Property="Height" Value="8" />
  54. <Setter Property="Width" Value="8" />
  55. <Setter Property="Margin" Value="0,0,10,0" />
  56. </Style>
  57. <Style TargetType="TextBlock">
  58. <Setter Property="TextWrapping" Value="Wrap" />
  59. <Setter Property="HorizontalAlignment" Value="Left" />
  60. <Setter Property="FontSize" Value="14" />
  61. <Setter Property="Foreground" Value="Black" />
  62. </Style>
  63. <Style x:Key="PGTextBlock" TargetType="TextBlock">
  64. <Setter Property="TextWrapping" Value="Wrap" />
  65. <Setter Property="Margin" Value="25,5,0,5" />
  66. <Setter Property="FontSize" Value="16" />
  67. </Style>
  68. <Style x:Key="ListItem" TargetType="TextBlock">
  69. <Setter Property="Margin" Value="10,-13.5,5,15" />
  70. <Setter Property="TextWrapping" Value="Wrap" />
  71. <Setter Property="HorizontalAlignment" Value="Left" />
  72. <Setter Property="FontSize" Value="14" />
  73. <Setter Property="Foreground" Value="Black" />
  74. </Style>
  75. <Style x:Key="ListItemLink" TargetType="local:MyTextButton">
  76. <Setter Property="Margin" Value="15,-15,5,15" />
  77. <Setter Property="TextElement.FontSize" Value="20" />
  78. </Style>
  79. <Style x:Key="ListStyle" TargetType="StackPanel">
  80. <Setter Property="Margin" Value="22,0,14,5" />
  81. </Style>
  82. <Style x:Key="Read" TargetType="local:MyButton">
  83. <Setter Property="Margin" Value="0,0,5,5" />
  84. <Setter Property="Height" Value="35" />
  85. <Setter Property="Padding" Value="13,0,13,0" />
  86. <Setter Property="EventType" Value="打开网页" />
  87. </Style>
  88. <Style x:Key="Read0" TargetType="local:MyButton" BasedOn="{StaticResource Read}">
  89. <Setter Property="Grid.Column" Value="0" />
  90. <Setter Property="Text" Value="Minecraft Wiki" />
  91. <!--<Setter Property="ColorType" Value="Highlight"/>-->
  92. </Style>
  93. <Style x:Key="Read0+" TargetType="local:MyButton" BasedOn="{StaticResource Read0}">
  94. <Setter Property="Grid.Row" Value="0" />
  95. <Setter Property="Grid.ColumnSpan" Value="3" />
  96. </Style>
  97. <Style x:Key="Read1" TargetType="local:MyButton" BasedOn="{StaticResource Read}">
  98. <Setter Property="Grid.Column" Value="1" />
  99. <Setter Property="Text" Value="MCBBS" />
  100. </Style>
  101. <Style x:Key="Read1+" TargetType="local:MyButton" BasedOn="{StaticResource Read1}">
  102. <Setter Property="Grid.Column" Value="0" />
  103. <Setter Property="Grid.Row" Value="1" />
  104. </Style>
  105. <Style x:Key="Read2" TargetType="local:MyButton" BasedOn="{StaticResource Read}">
  106. <Setter Property="Grid.Column" Value="2" />
  107. <Setter Property="Text" Value="官网" />
  108. </Style>
  109. <Style x:Key="Read2+" TargetType="local:MyButton" BasedOn="{StaticResource Read2}">
  110. <Setter Property="Grid.Column" Value="1" />
  111. <Setter Property="Grid.Row" Value="1" />
  112. </Style>
  113. <Style x:Key="ReadR" TargetType="local:MyButton" BasedOn="{StaticResource Read}">
  114. <Setter Property="Grid.Column" Value="3" />
  115. <Setter Property="Text" Value="Reddit" />
  116. </Style>
  117. <Style x:Key="ReadR+" TargetType="local:MyButton" BasedOn="{StaticResource ReadR}">
  118. <Setter Property="Grid.Column" Value="2" />
  119. <Setter Property="Grid.Row" Value="1" />
  120. </Style>
  121. <Style x:Key="Code" TargetType="Border">
  122. <Setter Property="Background" Value="#e0e0e0" />
  123. <Setter Property="BorderBrush" Value="#444" />
  124. <Setter Property="CornerRadius" Value="1" />
  125. <Setter Property="Margin" Value="5,0,5,0" />
  126. <Setter Property="BorderThickness" Value="1" />
  127. </Style>
  128. <Style TargetType="TextBox">
  129. <Setter Property="Background" Value="{x:Null}" />
  130. <Setter Property="Padding" Value="3,0,3,0" />
  131. <Setter Property="IsReadOnly" Value="True" />
  132. <Setter Property="BorderBrush" Value="{x:Null}" />
  133. </Style>
  134. <Style x:Key="verImgBdr" TargetType="Border">
  135. <Setter Property="HorizontalAlignment" Value="Center" />
  136. <Setter Property="BorderThickness" Value="4" />
  137. <Setter Property="VerticalAlignment" Value="Top" />
  138. <Setter Property="BorderBrush" Value="{DynamicResource ColorBrush3}" />
  139. <Setter Property="CornerRadius" Value="7" />
  140. <Setter Property="MaxHeight" Value="250" />
  141. </Style>
  142. <Style x:Key="verTxtBlk" TargetType="TextBlock">
  143. <Setter Property="HorizontalAlignment" Value="Center" />
  144. <Setter Property="TextAlignment" Value="Center" />
  145. <Setter Property="VerticalAlignment" Value="Center" />
  146. <Setter Property="Foreground" Value="{DynamicResource ColorBrush7}" />
  147. <Setter Property="Width" Value="180" />
  148. <Setter Property="TextWrapping" Value="Wrap" />
  149. <Setter Property="FontSize" Value="20" />
  150. </Style>
  151. <Style x:Key="imgTitle" TargetType="TextBlock">
  152. <Setter Property="FontSize" Value="14" />
  153. <Setter Property="Foreground" Value="#FF777777" />
  154. <Setter Property="HorizontalAlignment" Value="Center" />
  155. <Setter Property="Margin" Value="0,0,0,15" />
  156. </Style>
  157. <Style x:Key="verTxtBdr" TargetType="Border">
  158. <Setter Property="Margin" Value="0,-20,-1,10" />
  159. <Setter Property="Background" Value="{DynamicResource ColorBrush3}" />
  160. <Setter Property="Width" Value="190" />
  161. <Setter Property="Height" Value="36" />
  162. <Setter Property="CornerRadius" Value="2" />
  163. <Setter Property="BorderThickness" Value="0,0,0,3" />
  164. <Setter Property="BorderBrush" Value="{DynamicResource ColorBrush2}" />
  165. </Style>
  166. <!--h2-->
  167. <Style x:Key="h2" TargetType="TextBlock">
  168. <Setter Property="FontSize" Value="24" />
  169. <Setter Property="Padding" Value="15,5" />
  170. <Setter Property="Margin" Value="5,15,5,10" />
  171. <Setter Property="FontWeight" Value="Bold" />
  172. <Setter Property="Foreground" Value="{DynamicResource ColorBrush3}" />
  173. </Style>
  174. <!--h3-->
  175. <Style x:Key="h3" TargetType="TextBlock">
  176. <Setter Property="FontSize" Value="20" />
  177. <Setter Property="Padding" Value="30,0" />
  178. <Setter Property="Margin" Value="-10,0,10,17" />
  179. <Setter Property="FontWeight" Value="Bold" />
  180. <Setter Property="Foreground" Value="{DynamicResource ColorBrush4}" />
  181. </Style>
  182. <!--h4-->
  183. <Style x:Key="h4" TargetType="TextBlock">
  184. <Setter Property="FontSize" Value="16" />
  185. <Setter Property="Padding" Value="30,0" />
  186. <Setter Property="Margin" Value="5,0,10,10" />
  187. <Setter Property="FontWeight" Value="Bold" />
  188. <Setter Property="Foreground" Value="{DynamicResource ColorBrush4}" />
  189. </Style>
  190. <!--footnote-->
  191. <Style x:Key="footnote" TargetType="TextBlock">
  192. <Setter Property="FontSize" Value="14" />
  193. <Setter Property="Padding" Value="30,0" />
  194. <Setter Property="Margin" Value="0,20,0,15" />
  195. <Setter Property="Foreground" Value="#FF777777" />
  196. <Setter Property="TextWrapping" Value="Wrap" />
  197. </Style>
  198. <!--ButtonNameBorder-->
  199. <!--ImageButtonStyle-->
  200. <Style x:Key="ImgBtnImg" TargetType="Image">
  201. <Setter Property="MaxWidth" Value="70px" />
  202. <Setter Property="MaxHeight" Value="70px" />
  203. <Setter Property="Margin" Value="3" />
  204. </Style>
  205. <Style x:Key="ImgBtnBdr" TargetType="Border">
  206. <Setter Property="Background" Value="{DynamicResource ColorBrush7}" />
  207. <Setter Property="BorderBrush" Value="{DynamicResource ColorBrush3}" />
  208. <Setter Property="BorderThickness" Value="2px" />
  209. <Setter Property="CornerRadius" Value="5" />
  210. <Setter Property="Margin" Value="2px" />
  211. </Style>
  212. <Style x:Key="NameBdr" TargetType="Border">
  213. <Setter Property="Background" Value="{DynamicResource ColorBrush3}" />
  214. <Setter Property="BorderThickness" Value="0" />
  215. <Setter Property="CornerRadius" Value="5,5,0,0" />
  216. <Setter Property="Margin" Value="-2,-2,-2,2" />
  217. </Style>
  218. <Style x:Key="ImgBtnTxt" TargetType="TextBlock">
  219. <Setter Property="HorizontalAlignment" Value="Center" />
  220. <Setter Property="VerticalAlignment" Value="Center" />
  221. <Setter Property="Grid.Row" Value="0" />
  222. <Setter Property="Foreground" Value="{DynamicResource ColorBrush7}" />
  223. <Setter Property="FontSize" Value="12px" />
  224. <Setter Property="Margin" Value="8px,2px" />
  225. </Style>
  226. <!-- TEMPLATES -->
  227. <ControlTemplate x:Key="Separator" TargetType="ContentControl">
  228. <Grid Margin="0,0,0,15">
  229. <Grid.ColumnDefinitions>
  230. <ColumnDefinition Width="1*" />
  231. <ColumnDefinition Width="100" />
  232. <ColumnDefinition Width="1*" />
  233. </Grid.ColumnDefinitions>
  234. <Line X1="0" X2="100" Stroke="{DynamicResource ColorBrush5}" StrokeThickness="1.5" HorizontalAlignment="Center" Stretch="Fill" Grid.Column="0" />
  235. <TextBlock Text="{TemplateBinding Content}" HorizontalAlignment="Center" FontSize="14" Foreground="{DynamicResource ColorBrush5}" Grid.Column="1" VerticalAlignment="Center" />
  236. <Line X1="0" X2="100" Stroke="{DynamicResource ColorBrush5}" StrokeThickness="1.5" HorizontalAlignment="Center" Stretch="Fill" Grid.Column="2" />
  237. </Grid>
  238. </ControlTemplate>
  239. </StackPanel.Resources>
  240. </StackPanel>
  241. </StackPanel>
  242. <!-- 由 新闻主页构建器 生成,生成时间:2023/9/30 14:11:28 -->