Light Beacon 2 лет назад
Родитель
Сommit
9dd9e808cc

+ 3 - 3
Resources/Components/VersionHeaderImage.xaml

@@ -1,9 +1,9 @@
-<Border Style="{StaticResource verImgBdr}">
+<Border Style="{StaticResource VersionImageBorder}">
 <Border.Background>
 <ImageBrush ImageSource="${version-image-link}" Stretch="UniformToFill" />
 </Border.Background>
 <Image Source="${version-image-link}" Opacity="0" Stretch="Fill"/>
 </Border>
-<Border Style="{StaticResource verTxtBdr}" ${$IsEnableAnimation}>
-<TextBlock Style="{StaticResource verTxtBlk}" Text="${version-id}" />
+<Border Style="{StaticResource VersionTitleBorder}" ${$IsEnableAnimation}>
+<TextBlock Style="{StaticResource VersionTitleBlock}" Text="${version-id}" />
 </Border>

+ 3 - 5
Resources/Components/Websites.xaml → Resources/Components/VersionWebsites.xaml

@@ -1,12 +1,10 @@
-<GroupBox Header="阅读完整日志" BorderBrush="{DynamicResource ColorBrush3}">
+<GroupBox Header="阅读完整日志" BorderBrush="{DynamicResource ColorBrush3}" Margin="0,20,0,0">
 <Grid UseLayoutRounding="True" Margin="10,10,10,10">
 <Grid.ColumnDefinitions>
 <ColumnDefinition Width="20*"/>
 <ColumnDefinition Width="12*"/>
-<ColumnDefinition Width="12*"/>
 </Grid.ColumnDefinitions>
-<local:MyButton Style="{StaticResource WikiLinkButton}" EventData="${wiki-link}" ColorType="Highlight" {$EnableWikiSuffix} />
-<local:MyButton Style="{StaticResource MCBBSLinkButton}" EventData="${mcbbs-link}" {$EnableBBSSuffix}/>
-<local:MyButton Style="{StaticResource OfficalLinkButton}" EventData="${official-link}" {$EnableOFLSuffix} />
+<local:MyButton Style="{StaticResource WikiLinkButton}" EventData="${wiki-link}" ColorType="Highlight" />
+<local:MyButton Style="{StaticResource OfficalLinkButton}" EventData="${official-link}"/>
 </Grid>
 </GroupBox>

+ 0 - 65
Resources/Styles/Style.xaml

@@ -12,45 +12,6 @@
 <Style x:Key="ListStyle" TargetType="StackPanel">
   <Setter Property="Margin" Value="22,0,14,5" />
 </Style>
-<Style x:Key="Read" TargetType="local:MyButton">
-  <Setter Property="Margin" Value="0,0,5,5" />
-  <Setter Property="Height" Value="35" />
-  <Setter Property="Padding" Value="13,0,13,0" />
-  <Setter Property="EventType" Value="打开网页" />
-</Style>
-<Style x:Key="Read0" TargetType="local:MyButton" BasedOn="{StaticResource Read}">
-  <Setter Property="Grid.Column" Value="0" />
-  <Setter Property="Text" Value="Minecraft Wiki" />
-  <!--<Setter Property="ColorType" Value="Highlight"/>-->
-</Style>
-<Style x:Key="Read0+" TargetType="local:MyButton" BasedOn="{StaticResource Read0}">
-  <Setter Property="Grid.Row" Value="0" />
-  <Setter Property="Grid.ColumnSpan" Value="3" />
-</Style>
-<Style x:Key="Read1" TargetType="local:MyButton" BasedOn="{StaticResource Read}">
-  <Setter Property="Grid.Column" Value="1" />
-  <Setter Property="Text" Value="MCBBS" />
-</Style>
-<Style x:Key="Read1+" TargetType="local:MyButton" BasedOn="{StaticResource Read1}">
-  <Setter Property="Grid.Column" Value="0" />
-  <Setter Property="Grid.Row" Value="1" />
-</Style>
-<Style x:Key="Read2" TargetType="local:MyButton" BasedOn="{StaticResource Read}">
-  <Setter Property="Grid.Column" Value="2" />
-  <Setter Property="Text" Value="官网" />
-</Style>
-<Style x:Key="Read2+" TargetType="local:MyButton" BasedOn="{StaticResource Read2}">
-  <Setter Property="Grid.Column" Value="1" />
-  <Setter Property="Grid.Row" Value="1" />
-</Style>
-<Style x:Key="ReadR" TargetType="local:MyButton" BasedOn="{StaticResource Read}">
-  <Setter Property="Grid.Column" Value="3" />
-  <Setter Property="Text" Value="Reddit" />
-</Style>
-<Style x:Key="ReadR+" TargetType="local:MyButton" BasedOn="{StaticResource ReadR}">
-  <Setter Property="Grid.Column" Value="2" />
-  <Setter Property="Grid.Row" Value="1" />
-</Style>
 <Style x:Key="Code" TargetType="Border">
   <Setter Property="Background" Value="#e0e0e0" />
   <Setter Property="BorderBrush" Value="#444" />
@@ -64,38 +25,12 @@
   <Setter Property="IsReadOnly" Value="True" />
   <Setter Property="BorderBrush" Value="{x:Null}" />
 </Style>
-<Style x:Key="verImgBdr" TargetType="Border">
-  <Setter Property="HorizontalAlignment" Value="Center" />
-  <Setter Property="BorderThickness" Value="4" />
-  <Setter Property="VerticalAlignment" Value="Top" />
-  <Setter Property="BorderBrush" Value="{DynamicResource ColorBrush3}" />
-  <Setter Property="CornerRadius" Value="7" />
-  <Setter Property="MaxHeight" Value="200" />
-</Style>
-<Style x:Key="verTxtBlk" TargetType="TextBlock">
-  <Setter Property="HorizontalAlignment" Value="Center" />
-  <Setter Property="TextAlignment" Value="Center" />
-  <Setter Property="VerticalAlignment" Value="Center" />
-  <Setter Property="Foreground" Value="{DynamicResource ColorBrush7}" />
-  <Setter Property="Width" Value="180" />
-  <Setter Property="TextWrapping" Value="Wrap" />
-  <Setter Property="FontSize" Value="20" />
-</Style>
 <Style x:Key="imgTitle" TargetType="TextBlock">
   <Setter Property="FontSize" Value="14" />
   <Setter Property="Foreground" Value="#FF777777" />
   <Setter Property="HorizontalAlignment" Value="Center" />
   <Setter Property="Margin" Value="0,0,0,15" />
 </Style>
-<Style x:Key="verTxtBdr" TargetType="Border">
-  <Setter Property="Margin" Value="0,-20,-1,10" />
-  <Setter Property="Background" Value="{DynamicResource ColorBrush3}" />
-  <Setter Property="Width" Value="190" />
-  <Setter Property="Height" Value="36" />
-  <Setter Property="CornerRadius" Value="2" />
-  <Setter Property="BorderThickness" Value="0,0,0,3" />
-  <Setter Property="BorderBrush" Value="{DynamicResource ColorBrush2}" />
-</Style>
 <!--footnote-->
 <Style x:Key="footnote" TargetType="TextBlock">
   <Setter Property="FontSize" Value="14" />

+ 35 - 0
Resources/Styles/VersionHeaderImage.yml

@@ -0,0 +1,35 @@
+Values:
+  - &CornerRadius 7
+
+Styles:
+ - Key: VersionImageBorder
+   Target: Border
+   Setters:
+      HorizontalAlignment: Center
+      BorderThickness: 4
+      VerticalAlignment: Top
+      BorderBrush: "{DynamicResource ColorBrush3}"
+      CornerRadius: *CornerRadius
+      MaxHeight: 150
+
+ - Key: VersionTitleBorder
+   Target: Border
+   Setters:
+      Margin: 0,-20,-1,10
+      Background: "{DynamicResource ColorBrush3}"
+      Width: 190
+      Height: 36
+      CornerRadius: *CornerRadius
+      BorderThickness: 0,0,0,2 # Shadow
+      BorderBrush: "{DynamicResource ColorBrush2}"
+
+ - Key: VersionTitleBlock
+   Target: TextBlock
+   Setters:
+      HorizontalAlignment: Center
+      TextAlignment: Center
+      VerticalAlignment: Center
+      Foreground: "{DynamicResource ColorBrush7}"
+      Width: 180
+      TextWrapping: Wrap
+      FontSize: 20

+ 29 - 0
Resources/Styles/VersionLinks.yml

@@ -0,0 +1,29 @@
+Styles:
+ - Key: &Base LinkButtonBase
+   Target: &Button local:MyButton
+   Setters:
+      Margin: 0,0,5,5
+      Height: 35
+      Padding: 13,0
+      EventType: 打开网页
+
+ - Key: WikiLinkButton
+   Target: *Button
+   BasedOn: *Base
+   Setters:
+      Grid.Column: 0
+      Text: "Minecraft Wiki"
+
+ - Key: MCBBSLinkButton
+   Target: *Button
+   BasedOn: *Base
+   Setters:
+      Grid.Column: 1
+      Text: "MCBBS"
+
+ - Key: OfficalLinkButton
+   Target: *Button
+   BasedOn: *Base
+   Setters:
+      Grid.Column: 2
+      Text: "官网"

+ 1 - 1
Resources/Templates/VersionCard.yml

@@ -1,7 +1,7 @@
 components:
  - VersionHeaderImage
  - $MarkdownPresenter
- - VersionLinksBox
+ - VersionWebsites
 base: CardBase
 filter:
   file_exten: