This commit is contained in:
Wiesław Šoltés 2022-11-04 11:11:05 +01:00
Родитель 85fd9f715b
Коммит 744f276e26
45 изменённых файлов: 230 добавлений и 392 удалений

26
.github/workflows/pages.yml поставляемый
Просмотреть файл

@ -1,5 +1,8 @@
name: Deploy to GitHub Pages
env:
PROJECT_PATH: src/TypefaceUtilAvalonia.Web/TypefaceUtilAvalonia.Web.csproj
OUTPUT_PATH: src/TypefaceUtilAvalonia.Web/bin/Release/net7.0/browser-wasm/AppBundle
on:
push:
branches: [ master ]
@ -14,23 +17,32 @@ jobs:
uses: actions/setup-dotnet@v1.9.0
- name: Install wasm-tools
run: dotnet workload install wasm-tools
run: dotnet workload install wasm-tools wasm-experimental
- name: Install DotNetCompress
run: dotnet tool install --global DotNetCompress --version 2.0.0 --no-cache
- name: Publish .NET Project
run: dotnet publish src/TypefaceUtilAvalonia.Web/TypefaceUtilAvalonia.Web.csproj -c Release -o release --nologo
run: dotnet publish $PROJECT_PATH -c Release -o release --nologo
- name: Change base-tag in index.html from / to TypefaceUtil
run: sed -i 's/<base href="\/" \/>/<base href="\/TypefaceUtil\/" \/>/g' release/wwwroot/index.html
- name: Change base-tag in index.html
run: sed -i 's/<base href="\/" \/>/<base href="\/TypefaceUtil\/" \/>/g' $OUTPUT_PATH/index.html
- name: copy index.html to 404.html
run: cp release/wwwroot/index.html release/wwwroot/404.html
run: cp $OUTPUT_PATH/index.html $OUTPUT_PATH/404.html
- name: Compress Output using Brotli
run: DotNetCompress -d $OUTPUT_PATH/ -p "*.dll" "*.js" "*.wasm" --format br --threads 4
- name: Compress Output using GZip
run: DotNetCompress -d $OUTPUT_PATH -p "*.dll" "*.js" "*.wasm" --format gz --threads 4
- name: Add .nojekyll file
run: touch release/wwwroot/.nojekyll
run: touch $OUTPUT_PATH/.nojekyll
- name: Commit wwwroot to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.7
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: release/wwwroot
FOLDER: ${{ env.OUTPUT_PATH }}

Просмотреть файл

@ -63,8 +63,8 @@ ProjectSection(SolutionItems) = preProject
build\System.CommandLine.props = build\System.CommandLine.props
build\System.Text.Json.props = build\System.Text.Json.props
build\XUnit.props = build\XUnit.props
build\Avalonia.Web.Blazor.props = build\Avalonia.Web.Blazor.props
build\Avalonia.Themes.Fluent.props = build\Avalonia.Themes.Fluent.props
build\Avalonia.Web.props = build\Avalonia.Web.props
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "_build", "build\build\_build.csproj", "{A66A3423-81AE-43B9-AAA6-0FBC44BE5152}"

Просмотреть файл

@ -6,14 +6,15 @@ resources:
endpoint: wieslawsoltes
type: github
name: wieslawsoltes/BuildTemplates
ref: refs/tags/v1.0.0
ref: refs/tags/v2.0.0
variables:
BuildConfiguration: 'Release'
BuildPlatform: 'Any CPU'
PublishFramework: 'net6.0'
PublishFramework: 'net7.0'
PublishProject: 'TypefaceUtilAvalonia.Desktop'
PublishRuntime: ''
Workloads: 'wasm-tools wasm-experimental'
jobs:
- template: Test-PowerShell.yml@templates
@ -21,36 +22,42 @@ jobs:
name: 'Test_Windows'
vmImage: 'windows-2022'
BuildConfiguration: ${{ variables.BuildConfiguration }}
Workloads: ${{ variables.Workloads }}
- template: Test-Bash.yml@templates
parameters:
name: 'Test_Linux'
vmImage: 'ubuntu-20.04'
BuildConfiguration: ${{ variables.BuildConfiguration }}
Workloads: ${{ variables.Workloads }}
- template: Test-Bash.yml@templates
parameters:
name: 'Test_macOS'
vmImage: 'macOS-11'
BuildConfiguration: ${{ variables.BuildConfiguration }}
Workloads: ${{ variables.Workloads }}
- template: Pack-MyGet.yml@templates
parameters:
name: 'Pack_MyGet'
vmImage: 'windows-2022'
BuildConfiguration: ${{ variables.BuildConfiguration }}
Workloads: ${{ variables.Workloads }}
- template: Pack-NuGet.yml@templates
parameters:
name: 'Pack_NuGet'
vmImage: 'windows-2022'
BuildConfiguration: ${{ variables.BuildConfiguration }}
Workloads: ${{ variables.Workloads }}
- template: Publish-PowerShell.yml@templates
parameters:
name: 'Publish_Windows'
vmImage: 'windows-2022'
BuildConfiguration: ${{ variables.BuildConfiguration }}
Workloads: ${{ variables.Workloads }}
PublishFramework: ${{ variables.PublishFramework }}
PublishProject: ${{ variables.PublishProject }}
PublishRuntime: 'win7-x64'
@ -60,6 +67,7 @@ jobs:
name: 'Publish_Ubuntu'
vmImage: 'ubuntu-20.04'
BuildConfiguration: ${{ variables.BuildConfiguration }}
Workloads: ${{ variables.Workloads }}
PublishFramework: ${{ variables.PublishFramework }}
PublishProject: ${{ variables.PublishProject }}
PublishRuntime: 'ubuntu.14.04-x64'
@ -69,6 +77,7 @@ jobs:
name: 'Publish_Debian'
vmImage: 'ubuntu-20.04'
BuildConfiguration: ${{ variables.BuildConfiguration }}
Workloads: ${{ variables.Workloads }}
PublishFramework: ${{ variables.PublishFramework }}
PublishProject: ${{ variables.PublishProject }}
PublishRuntime: 'debian.8-x64'
@ -78,6 +87,7 @@ jobs:
name: 'Publish_macOS'
vmImage: 'macOS-11'
BuildConfiguration: ${{ variables.BuildConfiguration }}
Workloads: ${{ variables.Workloads }}
PublishFramework: ${{ variables.PublishFramework }}
PublishProject: ${{ variables.PublishProject }}
PublishRuntime: 'osx.10.12-x64'

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Controls.Skia" Version="11.0.0-preview2" />
<PackageReference Include="Avalonia.Controls.Skia" Version="11.0.0-preview3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview2" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.0-preview2" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.0-preview3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview2" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Skia" Version="11.0.0-preview2" />
<PackageReference Include="Avalonia.Skia" Version="11.0.0-preview3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview2" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Web.Blazor" Version="11.0.0-preview2" />
<PackageReference Include="Avalonia.Web.Blazor" Version="11.0.0-preview3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.0.0-preview2" />
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.0.0-preview3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.0-preview2" />
<PackageReference Include="Avalonia" Version="11.0.0-preview3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -2,7 +2,7 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VersionPrefix>11.0.0</VersionPrefix>
<VersionSuffix>preview2</VersionSuffix>
<VersionSuffix>preview3</VersionSuffix>
<Authors>Wiesław Šoltés</Authors>
<Company>Wiesław Šoltés</Company>
<Copyright>Copyright © Wiesław Šoltés 2022</Copyright>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Svg.Skia" Version="0.6.0-preview2" />
<PackageReference Include="Svg.Skia" Version="0.6.0-preview3" />
</ItemGroup>
</Project>

Просмотреть файл

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<IsPackable>False</IsPackable>
<NoWarn>CS0649;CS0169</NoWarn>

Просмотреть файл

@ -1,6 +1,6 @@
{
"sdk": {
"version": "6.0.100",
"version": "7.0.100-rc.2.22477.23",
"rollForward": "latestMinor",
"allowPrerelease": true
}

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<OutputType>Exe</OutputType>
<LangVersion>preview</LangVersion>
<IsPackable>False</IsPackable>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net7.0</TargetFrameworks>
<OutputType>Library</OutputType>
<IsPackable>True</IsPackable>
<Nullable>enable</Nullable>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>False</IsPackable>
<Nullable>enable</Nullable>
<RootNamespace>TypefaceUtil.Avalonia</RootNamespace>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>False</IsPackable>
<Nullable>enable</Nullable>
<ApplicationIcon>..\TypefaceUtilAvalonia.Base\Assets\Icon.ico</ApplicationIcon>

Просмотреть файл

@ -1,10 +0,0 @@
<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p>Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>

Просмотреть файл

@ -1,16 +0,0 @@
using Avalonia.ReactiveUI;
using Avalonia.Web.Blazor;
namespace TypefaceUtilAvalonia.Web;
public partial class App
{
protected override void OnParametersSet()
{
base.OnParametersSet();
WebAppBuilder.Configure<TypefaceUtil.Avalonia.App>()
.UseReactiveUI()
.SetupWithSingleViewLifetime();
}
}

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 1.2 KiB

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

Просмотреть файл

@ -0,0 +1,64 @@
.highlight {
color: white;
font-size: 2.5rem;
display: block;
}
.purple {
color: #8b44ac;
}
.icon {
opacity : 0.05;
height: 35%;
width: 35%;
position : absolute;
background-repeat: no-repeat;
right: 0px;
bottom: 0px;
margin-right: 3%;
margin-bottom: 5%;
z-index: 5000;
background-position: right bottom;
pointer-events: none;
}
#avalonia-splash a{
color: whitesmoke;
text-decoration: none;
}
.center {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
#avalonia-splash {
position: relative;
height: 100%;
width: 100%;
color: whitesmoke;
background: #1b2a4e;
font-family: 'Nunito', sans-serif;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
justify-content: center;
align-items: center;
}
.splash-close {
animation: fadeout 0.25s linear forwards;
}
@keyframes fadeout {
0% {
opacity:100%;
}
100% {
opacity:0;
visibility: collapse;
}
}

Двоичные данные
src/TypefaceUtilAvalonia.Web/AppBundle/favicon.ico Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 399 B

Просмотреть файл

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<title>TypefaceUtil</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="/" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@200;300;400;500;600;700&family=Open+Sans:wght@600&display=swap" rel="stylesheet">
<link rel="modulepreload" href="./main.js" />
<link rel="modulepreload" href="./dotnet.js" />
<link rel="modulepreload" href="./avalonia.js" />
<link rel="stylesheet" href="./app.css" />
<link rel="preconnect" href="https://fonts.googleapis.com">
</head>
<body style="margin: 0px">
<div id="out">
<div id="avalonia-splash">
<div class="center">
<h2 class="purple">
Powered by
<a class="highlight" href="https://www.avaloniaui.net/" target="_blank">Avalonia UI</a></h2>
</div>
</div>
</div>
<script type='module' src="./main.js"></script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,16 @@
import { dotnet } from './dotnet.js'
import { registerAvaloniaModule } from './avalonia.js';
const is_browser = typeof window != "undefined";
if (!is_browser) throw new Error(`Expected to be running in a browser`);
const dotnetRuntime = await dotnet
.withDiagnosticTracing(false)
.withApplicationArgumentsFromQuery()
.create();
await registerAvaloniaModule(dotnetRuntime);
const config = dotnetRuntime.getConfig();
await dotnetRuntime.runMainAndExit(config.mainAssemblyName, [window.location.search]);

Просмотреть файл

@ -0,0 +1,10 @@
{
"routes": [
{
"route": "/*",
"headers": {
"Cache-Control": "public, must-revalidate, max-age=2419200"
}
}
]
}

Просмотреть файл

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<linker>
<assembly fullname="TypefaceUtilAvalonia.Web" preserve="All" />
</linker>

Просмотреть файл

@ -1,5 +0,0 @@
@page "/"
@using Avalonia.Web.Blazor
<AvaloniaView />

Просмотреть файл

@ -1,26 +1,15 @@
using System;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
using System.Runtime.Versioning;
using Avalonia;
using Avalonia.Web;
using TypefaceUtil.Avalonia;
namespace TypefaceUtilAvalonia.Web;
[assembly:SupportedOSPlatform("browser")]
public class Program
internal class Program
{
public static async Task Main(string[] args)
{
await CreateHostBuilder(args).Build().RunAsync();
}
private static void Main(string[] args)
=> BuildAvaloniaApp().SetupBrowserApp("out");
public static WebAssemblyHostBuilder CreateHostBuilder(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
return builder;
}
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>();
}

Просмотреть файл

@ -1,30 +0,0 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:13961",
"sslPort": 44319
}
},
"profiles": {
"TypefaceUtilAvalonia.Web - IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"TypefaceUtilAvalonia.Web": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

Просмотреть файл

@ -0,0 +1,14 @@
<linker>
<!-- App -->
<assembly fullname="TypefaceUtilAvalonia.Base" preserve="All" />
<assembly fullname="TypefaceUtilAvalonia.Web" preserve="All" />
<assembly fullname="Avalonia.Xaml.Interactions" preserve="All" />
<assembly fullname="Avalonia.Xaml.Interactivity" preserve="All" />
<!-- Avalonia Themes -->
<assembly fullname="Avalonia.Themes.Fluent" preserve="All" />
</linker>

Просмотреть файл

@ -1,7 +0,0 @@
@inherits LayoutComponentBase
<div class="page">
<div class="main">
@Body
</div>
</div>

Просмотреть файл

@ -1,70 +0,0 @@
.page {
position: relative;
display: flex;
flex-direction: column;
}
.main {
flex: 1;
}
.sidebar {
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}
.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
height: 3.5rem;
display: flex;
align-items: center;
}
.top-row ::deep a, .top-row .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
}
.top-row a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
@media (max-width: 640.98px) {
.top-row:not(.auth) {
display: none;
}
.top-row.auth {
justify-content: space-between;
}
.top-row a, .top-row .btn-link {
margin-left: 0;
}
}
@media (min-width: 641px) {
.page {
flex-direction: row;
}
.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
}
.top-row {
position: sticky;
top: 0;
z-index: 1;
}
.main > div {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
}

Просмотреть файл

@ -1,65 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
<WasmMainJSPath>AppBundle\main.js</WasmMainJSPath>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MSBuildEnableWorkloadResolver>true</MSBuildEnableWorkloadResolver>
<IsPackable>False</IsPackable>
<Nullable>enable</Nullable>
<RootNamespace>TypefaceUtilAvalonia.Web</RootNamespace>
<EmccTotalMemory>16777216</EmccTotalMemory>
<BlazorEnableTimeZoneSupport>false</BlazorEnableTimeZoneSupport>
<BlazorWebAssemblyPreserveCollationData>false</BlazorWebAssemblyPreserveCollationData>
<RootNamespace>TypefaceUtil.Avalonia</RootNamespace>
</PropertyGroup>
<!-- In debug, make builds faster by reducing optimizations -->
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<WasmNativeStrip>false</WasmNativeStrip>
<EmccCompileOptimizationFlag>-O1</EmccCompileOptimizationFlag>
<RunAOTCompilation>false</RunAOTCompilation>
<Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Optimize>true</Optimize>
<WasmNativeStrip>true</WasmNativeStrip>
<EmccCompileOptimizationFlag>-O3</EmccCompileOptimizationFlag>
<EmccLinkOptimizationFlag>-O3</EmccLinkOptimizationFlag>
<RunAOTCompilation>false</RunAOTCompilation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DebuggerSupport>false</DebuggerSupport>
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
<EventSourceSupport>false</EventSourceSupport>
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<InvariantGlobalization>true</InvariantGlobalization>
<MetadataUpdaterSupport>false</MetadataUpdaterSupport>
<UseNativeHttpHandler>true</UseNativeHttpHandler>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>link</TrimMode>
<TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
</PropertyGroup>
<ItemGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<BlazorLinkerDescriptor Include="LinkerConfig.xml" />
<TrimmableAssembly Include="Microsoft.CodeAnalysis" />
<TrimmableAssembly Include="Microsoft.CodeAnalysis.CSharp" />
<TrimmableAssembly Include="Microsoft.CodeAnalysis.CSharp.Scripting" />
<TrimmableAssembly Include="Microsoft.CodeAnalysis.Scripting" />
<TrimmableAssembly Include="Avalonia.Controls.DataGrid" />
</ItemGroup>
<PropertyGroup>
<BlazorEnableCompression>true</BlazorEnableCompression>
</PropertyGroup>
<Import Project="..\..\build\Avalonia.Web.Blazor.props" />
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0" PrivateAssets="all" />
<TrimmerRootDescriptor Include="Roots.xml" />
</ItemGroup>
<ItemGroup>
<WasmExtraFilesToDeploy Include="AppBundle\app.css" />
<WasmExtraFilesToDeploy Include="AppBundle\favicon.ico" />
<WasmExtraFilesToDeploy Include="AppBundle\index.html" />
<WasmExtraFilesToDeploy Include="AppBundle\Logo.svg" />
<WasmExtraFilesToDeploy Include="AppBundle\main.js" />
<WasmExtraFilesToDeploy Include="AppBundle\staticwebapp.config.json" />
</ItemGroup>
<Import Project="..\..\build\Base.props" />
<Import Project="..\..\build\Avalonia.props" />
<Import Project="..\..\build\Avalonia.Web.props" />
<ItemGroup>
<ProjectReference Include="..\TypefaceUtilAvalonia.Base\TypefaceUtilAvalonia.Base.csproj" />
</ItemGroup>

Просмотреть файл

@ -1,10 +0,0 @@
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.AspNetCore.Components.WebAssembly.Http
@using Microsoft.JSInterop
@using TypefaceUtilAvalonia.Web
@using TypefaceUtilAvalonia.Web.Shared

Просмотреть файл

@ -0,0 +1,11 @@
{
"wasmHostProperties": {
"perHostConfig": [
{
"name": "browser",
"html-path": "index.html",
"Host": "browser"
}
]
}
}

Просмотреть файл

@ -1,79 +0,0 @@
html, body {
font-family: "Nunito", sans-serif;
margin: 0;
height: 100vh;
overflow: hidden;
}
a {
text-decoration: none;
color: white;
}
#blazor-error-ui {
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}
#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
.canvas-container {
opacity:1;
position:fixed;
width:100%;
height:100%;
top:0px;
left:0px;
z-index:500;
}
canvas
{
opacity:1;
position:fixed;
width:100%;
height:100%;
top:0px;
left:0px;
z-index:500;
}
#app, .page {
height: 100%;
background: #171C2C;
color: white;
}
.navbar-brand {
font-size: 22px;
}
.overlay{
opacity:0.0;
position:fixed;
width:100vw;
height:100vh;
top:0px;
left:0px;
z-index:1000;
}
#splash {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
min-height: 100vh;
}

Двоичные данные
src/TypefaceUtilAvalonia.Web/wwwroot/favicon.ico

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 172 KiB

Просмотреть файл

@ -1,54 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>TypefaceUtil</title>
<base href="/" />
<link href="css/app.css" rel="stylesheet" />
</head>
<body>
<div id="app">
<div id="splash">
<h2>Powered by</h2>
<a class="navbar-brand" href="https://www.avaloniaui.net/" target="_blank">
<img src="Logo.svg" alt="Avalonia Logo" width="30" height="24" class="d-inline-block align-text-top">
Avalonia
</a>
</div>
</div>
<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="js/app.js"></script>
<script src="_framework/blazor.webassembly.js" autostart="true"></script>
<!--<script type="module">
import { BrotliDecode } from './js/decode.min.js';
Blazor.start({
loadBootResource: function (type, name, defaultUri, integrity) {
if (type !== 'dotnetjs' && location.hostname !== 'localhost') {
return (async function () {
const response = await fetch(defaultUri + '.br', { cache: 'no-cache' });
if (!response.ok) {
throw new Error(response.statusText);
}
const originalResponseBuffer = await response.arrayBuffer();
const originalResponseArray = new Int8Array(originalResponseBuffer);
const decompressedResponseArray = BrotliDecode(originalResponseArray);
const contentType = type ===
'dotnetwasm' ? 'application/wasm' : 'application/octet-stream';
return new Response(decompressedResponseArray,
{ headers: { 'content-type': contentType } });
})();
}
}
});
</script>-->
</body>
</html>

Просмотреть файл

@ -1 +0,0 @@


Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<IsPackable>False</IsPackable>
</PropertyGroup>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<OutputType>Library</OutputType>
<IsPackable>False</IsPackable>
<Nullable>enable</Nullable>