Skip to content

Commit

Permalink
upgrade to net 8
Browse files Browse the repository at this point in the history
  • Loading branch information
wisamidris7 committed Feb 6, 2024
1 parent 0cbd74c commit cb9bab2
Show file tree
Hide file tree
Showing 9 changed files with 301 additions and 7 deletions.
10 changes: 5 additions & 5 deletions BlazorClient.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VisualStudioVersion = 17.7.34009.444
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorClient", "BlazorClient\BlazorClient.csproj", "{62712237-93CE-4D32-924C-D07549850CDA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WSM.Markdown", "..\WSM.Markdown\WSM.Markdown\WSM.Markdown.csproj", "{5BE180FF-1D91-4A57-AF4A-B50E1ED6739C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WSM.Markdown", "WSM.Markdown\WSM.Markdown.csproj", "{DD8F7CCC-B84E-4C20-9B36-431B150915D2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -17,10 +17,10 @@ Global
{62712237-93CE-4D32-924C-D07549850CDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62712237-93CE-4D32-924C-D07549850CDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62712237-93CE-4D32-924C-D07549850CDA}.Release|Any CPU.Build.0 = Release|Any CPU
{5BE180FF-1D91-4A57-AF4A-B50E1ED6739C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BE180FF-1D91-4A57-AF4A-B50E1ED6739C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BE180FF-1D91-4A57-AF4A-B50E1ED6739C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BE180FF-1D91-4A57-AF4A-B50E1ED6739C}.Release|Any CPU.Build.0 = Release|Any CPU
{DD8F7CCC-B84E-4C20-9B36-431B150915D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD8F7CCC-B84E-4C20-9B36-431B150915D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD8F7CCC-B84E-4C20-9B36-431B150915D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD8F7CCC-B84E-4C20-9B36-431B150915D2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
4 changes: 2 additions & 2 deletions BlazorClient/BlazorClient.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Expand All @@ -10,6 +10,6 @@
<PackageReference Include="LLamaSharp.Backend.Cpu" Version="0.3.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\WSM.Markdown\WSM.Markdown\WSM.Markdown.csproj" />
<ProjectReference Include="..\WSM.Markdown\WSM.Markdown.csproj" />
</ItemGroup>
</Project>
16 changes: 16 additions & 0 deletions WSM.Markdown/ReadmeView.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@using Markdig
@using Microsoft.JSInterop;
@inject IJSRuntime jsRuntime

@((MarkupString)Markdown.ToHtml(Content))

@code {
[Parameter] public string Content { get; set; }

Check warning on line 8 in WSM.Markdown/ReadmeView.razor

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'Content' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

Check warning on line 8 in WSM.Markdown/ReadmeView.razor

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'Content' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
[Parameter] public bool ChangeOnRender { get; set; }
protected override void OnAfterRender(bool firstRender)
{
if (ChangeOnRender || firstRender)
jsRuntime.InvokeVoidAsync("initPrism");
base.OnAfterRender(firstRender);
}
}
19 changes: 19 additions & 0 deletions WSM.Markdown/WSM.Markdown.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>


<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Markdig" Version="0.33.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.10" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions WSM.Markdown/_Imports.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@using Microsoft.AspNetCore.Components.Web
12 changes: 12 additions & 0 deletions WSM.Markdown/wwwroot/copyButton.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

pre {
position: relative;
padding: 1em;
background-color: #f0f0f0;
border: 1px solid #ddd;
border-radius: 4px;
}

code {
display: block;
}
1 change: 1 addition & 0 deletions WSM.Markdown/wwwroot/script.js

Large diffs are not rendered by default.

128 changes: 128 additions & 0 deletions WSM.Markdown/wwwroot/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
@import "copyButton.css";

code[class*=language-], pre[class*=language-] {
color: #000;
background: 0 0;
text-shadow: 0 1px #fff;
font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none
}

code[class*=language-] ::-moz-selection, code[class*=language-]::-moz-selection, pre[class*=language-] ::-moz-selection, pre[class*=language-]::-moz-selection {
text-shadow: none;
background: #b3d4fc
}

code[class*=language-] ::selection, code[class*=language-]::selection, pre[class*=language-] ::selection, pre[class*=language-]::selection {
text-shadow: none;
background: #b3d4fc
}

@media print {
code[class*=language-], pre[class*=language-] {
text-shadow: none
}
}

pre[class*=language-] {
padding: 1em;
margin: .5em 0;
overflow: auto
}

:not(pre) > code[class*=language-], pre[class*=language-] {
background: #f5f2f0
}

:not(pre) > code[class*=language-] {
padding: .1em;
border-radius: .3em;
white-space: normal
}

.token.cdata, .token.comment, .token.doctype, .token.prolog {
color: #708090
}

.token.punctuation {
color: #999
}

.token.namespace {
opacity: .7
}

.token.boolean, .token.constant, .token.deleted, .token.number, .token.property, .token.symbol, .token.tag {
color: #905
}

.token.attr-name, .token.builtin, .token.char, .token.inserted, .token.selector, .token.string {
color: #690
}

.language-css .token.string, .style .token.string, .token.entity, .token.operator, .token.url {
color: #9a6e3a;
background: hsla(0,0%,100%,.5)
}

.token.atrule, .token.attr-value, .token.keyword {
color: #07a
}

.token.class-name, .token.function {
color: #dd4a68
}

.token.important, .token.regex, .token.variable {
color: #e90
}

.token.bold, .token.important {
font-weight: 700
}

.token.italic {
font-style: italic
}

.token.entity {
cursor: help
}


.copy-code-button {
opacity: 0;
position: absolute;
top: 0.8em;
right: 0.5em;
padding: 0.5em 1em;
font-size: 14px;
background-color: #0d0d0d;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
transition: .5s
}

pre:hover .copy-code-button {
opacity: 1
}

.copy-code-button:hover {
background-color: #aaaaaa;
color: #0d0d0d;
}
117 changes: 117 additions & 0 deletions WSM.Markdown/wwwroot/styleDark.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
@import "copyButton.css";

code[class*=language-], pre[class*=language-] {
color: #f8f8f2;
background: 0 0;
text-shadow: 0 1px rgba(0,0,0,.3);
font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none
}
*{
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif
}
pre[class*=language-] {
padding: 1em;
margin: .5em 0;
overflow: auto;
border-radius: .3em
}

:not(pre) > code[class*=language-], pre[class*=language-] {
background: #272822
}

:not(pre) > code[class*=language-] {
padding: .1em;
border-radius: .3em;
white-space: normal
}

.token.cdata, .token.comment, .token.doctype, .token.prolog {
color: #8292a2
}

.token.punctuation {
color: #f8f8f2
}

.token.namespace {
opacity: .7
}

.token.constant, .token.deleted, .token.property, .token.symbol, .token.tag {
color: #f92672
}

.token.boolean, .token.number {
color: #ae81ff
}

.token.attr-name, .token.builtin, .token.char, .token.inserted, .token.selector, .token.string {
color: #a6e22e
}

.language-css .token.string, .style .token.string, .token.entity, .token.operator, .token.url, .token.variable {
color: #f8f8f2
}

.token.atrule, .token.attr-value, .token.class-name, .token.function {
color: #e6db74
}

.token.keyword {
color: #66d9ef
}

.token.important, .token.regex {
color: #fd971f
}

.token.bold, .token.important {
font-weight: 700
}

.token.italic {
font-style: italic
}

.token.entity {
cursor: help
}

.copy-code-button {
opacity: 0;
position: absolute;
top: 0.8em;
right: 0.5em;
padding: 0.5em 1em;
font-size: 14px;
background-color: #2e2f29;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
transition: .5s;
}

pre:hover .copy-code-button {
opacity: 1
}

.copy-code-button:hover {
background-color: #fff;
color: #2e2f29;
}

0 comments on commit cb9bab2

Please sign in to comment.