Nattiden 2 лет назад
Родитель
Сommit
dca5d12b56

+ 6 - 0
Resources/Components/Newra/VersionHeaderImage.xaml

@@ -0,0 +1,6 @@
+<ContentControl Template="{StaticResource InnerShadow}" Height="140">
+    <Image Source="${version-image-link}" Style="{StaticResource VersionImage}"/>
+</ContentControl>
+<Border Style="{StaticResource VersionTitleBorder}">
+    <TextBlock Style="{StaticResource VersionTitleBlock}" Text="${version-id}" />
+</Border>

+ 19 - 0
Resources/Styles/VersionHeaderImage.xaml

@@ -0,0 +1,19 @@
+<Style TargetType="Image" x:Key="VersionImage" >
+  <Setter Property="Stretch" Value="UniformToFill"/>
+  <Setter Property="VerticalAlignment" Value="Center"/>
+</Style>
+
+<ControlTemplate TargetType="ContentControl" x:Key="InnerShadow">
+  <Grid Opacity="0.95" Margin="4">
+    <Border x:Name="InnerShadowMask" CornerRadius="8" Background="White"/>
+    <ContentPresenter/>
+    <Border Margin="-8.1" CornerRadius="8" BorderThickness="8" BorderBrush="black">
+        <Border.Effect>
+            <DropShadowEffect BlurRadius="20" ShadowDepth="0" Color="Black"/>
+        </Border.Effect>
+    </Border>
+    <Grid.OpacityMask>
+        <VisualBrush Stretch="None" Visual="{Binding ElementName=InnerShadowMask}"/>
+    </Grid.OpacityMask>
+  </Grid>
+</ControlTemplate>

+ 1 - 1
Resources/Styles/VersionHeaderImage.yml → Resources/Styles/VersionHeaderImageClassic.yml

@@ -32,4 +32,4 @@ Styles:
       Foreground: "{DynamicResource ColorBrush7}"
       Width: 180
       TextWrapping: Wrap
-      FontSize: 18
+      FontSize: 18

+ 1 - 1
Resources/Templates/Classic/VersionBase.yml

@@ -1,7 +1,7 @@
 components:
  - ${@IF|${warn}|Head/Warn}
  - ${@IF|${hint}|Head/Hint}
- - ${@IF|${version-image-link}|VersionHeaderImage}
+ - ${@IF|${version-image-link}|Classic/VersionHeaderImage}
  - FlowDocumentViewer
  - ${@IF|${not_finished}|Loading}
  - ${@IF|!${disable-websites}|Classic/VersionWebsites}

+ 12 - 0
Resources/Templates/Newra/VersionBase.yml

@@ -0,0 +1,12 @@
+components:
+ - ${@IF|${warn}|Head/Warn}
+ - ${@IF|${hint}|Head/Hint}
+ - ${@IF|!${disable-versionimage}|${@IF|${version-image-link}|Newra/VersionHeaderImage}}
+ - FlowDocumentViewer
+ - ${@IF|${not_finished}|Loading}
+ - ${@IF|!${disable-translator}|TranslatorBar}
+ - ${@IF|!${disable-lastupdate}|LastUpdateBox}
+ - ${@IF|!${disable-toolbar}|VersionToolBar}
+base: Card
+fill:
+   loading_content: 翻译施工中

+ 11 - 0
Resources/Templates/Newra/VersionLatestCard.yml

@@ -0,0 +1,11 @@
+components:
+ - $MarkdownPresenter
+base: Simplex/VersionMarkdownCard
+filter:
+  file_exten:
+    - md
+    - markdown
+  skin: newra
+  latest: true
+cover:
+  title: 最新${version-type} - ${version-id}

+ 7 - 0
Resources/Templates/Newra/VersionMarkdownCard.yml

@@ -0,0 +1,7 @@
+components:
+ - $MarkdownPresenter
+base: Simplex/VersionBase
+filter:
+  file_exten:
+    - md
+    - markdown