Skip to content

Commit 46e60b7

Browse files
committed
Update playground app to use .NET 7
1 parent 665c07f commit 46e60b7

7 files changed

Lines changed: 73 additions & 23 deletions

File tree

src/DocoptNet.Playground/DocoptNet.Playground.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.2" />
9-
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.2" PrivateAssets="all" />
10-
<PackageReference Include="System.Net.Http.Json" Version="6.0.0" />
8+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.1" />
9+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.1" PrivateAssets="all" />
10+
<PackageReference Include="System.Net.Http.Json" Version="7.0.0" />
1111
</ItemGroup>
1212

1313
<!--

src/DocoptNet.Playground/wwwroot/css/app.css

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
22

33
html, body {
4-
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
4+
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
55
}
66

77
body {
@@ -53,6 +53,49 @@ a, .btn-link {
5353
top: 0.5rem;
5454
}
5555

56+
.blazor-error-boundary {
57+
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJo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MxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
58+
padding: 1rem 1rem 1rem 3.7rem;
59+
color: white;
60+
}
61+
62+
.blazor-error-boundary::after {
63+
content: "An error has occurred."
64+
}
65+
66+
.loading-progress {
67+
position: relative;
68+
display: block;
69+
width: 8rem;
70+
height: 8rem;
71+
margin: 20vh auto 1rem auto;
72+
}
73+
74+
.loading-progress circle {
75+
fill: none;
76+
stroke: #e0e0e0;
77+
stroke-width: 0.6rem;
78+
transform-origin: 50% 50%;
79+
transform: rotate(-90deg);
80+
}
81+
82+
.loading-progress circle:last-child {
83+
stroke: #1b6ec2;
84+
stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
85+
transition: stroke-dasharray 0.05s ease-in-out;
86+
}
87+
88+
.loading-progress-text {
89+
position: absolute;
90+
text-align: center;
91+
font-weight: bold;
92+
inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
93+
}
94+
95+
.loading-progress-text:after {
96+
content: var(--blazor-load-percentage-text, "Loading");
97+
}
98+
5699
html, body {
57100
background-color: #21222c;
58101
height: 100%;
@@ -107,7 +150,7 @@ tt, code {
107150
border: 1px solid #44475a;
108151
}
109152

110-
#args {
153+
#args td {
111154
color: #bd93f9;
112155
}
113156

@@ -146,8 +189,7 @@ tt, code {
146189
margin-right: 0;
147190
}
148191

149-
#result-pane
150-
{
192+
#result-pane {
151193
overflow-y: scroll;
152194
}
153195

src/DocoptNet.Playground/wwwroot/css/bootstrap/bootstrap.min.css

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/DocoptNet.Playground/wwwroot/css/bootstrap/bootstrap.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/DocoptNet.Playground/wwwroot/css/open-iconic/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
[Open Iconic v1.1.1](http://useiconic.com/open)
1+
[Open Iconic v1.1.1](https://github.com/iconic/open-iconic)
22
===========
33

4-
### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint&mdash;ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons)
4+
### Open Iconic is the open source sibling of [Iconic](https://github.com/iconic/open-iconic). It is a hyper-legible collection of 223 icons with a tiny footprint&mdash;ready to use with Bootstrap and Foundation. [View the collection](https://github.com/iconic/open-iconic)
55

66

77

88
## What's in Open Iconic?
99

1010
* 223 icons designed to be legible down to 8 pixels
11-
* Super-light SVG files - 61.8 for the entire set
11+
* Super-light SVG files - 61.8 for the entire set
1212
* SVG sprite&mdash;the modern replacement for icon fonts
1313
* Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats
1414
* Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats
@@ -17,7 +17,7 @@
1717

1818
## Getting Started
1919

20-
#### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections.
20+
#### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](https://github.com/iconic/open-iconic) and [Reference](https://github.com/iconic/open-iconic) sections.
2121

2222
### General Usage
2323

@@ -33,7 +33,7 @@ We like SVGs and we think they're the way to display icons on the web. Since Ope
3333

3434
Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack.
3535

36-
Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `<svg>` *tag and a unique class name for each different icon in the* `<use>` *tag.*
36+
Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `<svg>` *tag and a unique class name for each different icon in the* `<use>` *tag.*
3737

3838
```
3939
<svg class="icon">

src/DocoptNet.Playground/wwwroot/index.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en">
3+
34
<head>
45
<meta charset="utf-8" />
56
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
@@ -9,7 +10,14 @@
910
<link href="css/app.css" rel="stylesheet" />
1011
</head>
1112
<body>
12-
<div id="app">Loading...</div>
13+
<div id="app">
14+
<svg class="loading-progress">
15+
<circle r="40%" cx="50%" cy="50%" />
16+
<circle r="40%" cx="50%" cy="50%" />
17+
</svg>
18+
<div class="loading-progress-text"></div>
19+
</div>
20+
1321
<div id="blazor-error-ui">
1422
An unhandled error has occurred.
1523
<a href="" class="reload">Reload</a>

src/DocoptNet/Docopt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static IHelpFeaturingParser<T> CreateParser<T>(string doc, Func<ApplicationResul
3434
try
3535
{
3636
var optionsFirst = (flags & ParseFlags.OptionsFirst) != ParseFlags.None;
37-
arguments = ParseArgv(tokens, options, optionsFirst).AsReadOnly();
37+
arguments = new ReadOnlyList<LeafPattern>(ParseArgv(tokens, options, optionsFirst));
3838
}
3939
catch (DocoptInputErrorException e)
4040
{

0 commit comments

Comments
 (0)