Skip to content

Commit

Permalink
Logo + docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrpmorris committed May 5, 2022
1 parent 2404f6a commit 685e29c
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 23 deletions.
30 changes: 30 additions & 0 deletions Docs/Releases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Morris.Blazor.ControlFlow

![](../Images/control-flow-logo.png)


## Releases
### New in 1.0.0
- `ForEach`
```
<ForEach Context=Person In=@People>
<li>@Person.Name</li>
```

- Simple `If`
```
<If Condition=@true>
Content
</If>
```
- `If` with `Else`
```
<If Condition=@true>
<Then>
Content
</Then>
<Else>
Other content
</Else>
</If>
```
Binary file added Images/control-flow-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Images/control-flow-logo.psd
Binary file not shown.
49 changes: 31 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,39 @@
# Morris.Blazor.ControlFlow

## New in 1.0.0
- `ForEach`
```
<ForEach Context=Person In=@People>
<li>@Person.Name</li>
```
![](./Images/control-flow-logo.png)


## Introduction
[![NuGet version (Morris.Blazor.ControlFlow)](https://img.shields.io/nuget/v/Morris.Blazor.ControlFlow.svg?style=flat-square)](https://www.nuget.org/packages/Morris.Blazor.ControlFlow/)

***ControlFlow*** is a Blazor library created to help reduce the amount of C#
code found in markup files.

- Simple `If`
Instead of this
```
<If Condition=@true>
Content
</If>
@if (People?.Length > 0)
{
<ol>
@foreach (var person in People)
{
<li>@person.FullName</li>
}
</ol>
}
```
- `If` with `Else`

You can write this

```
<If Condition=@true>
<Then>
Content
</Then>
<Else>
Other content
</Else>
<If Condition="People?.Length > 0">
<ol>
<ForEach Context=person In=People>
<li>@person.FullName</li>
</ForEach>
</ol>
</If>
```

## More information
- View the [Example projects](https://github.com/mrpmorris/Morris.Blazor.ControlFlow/tree/master/Source/Tutorials)
- Read the [Release notes](./Docs/Releases.md)
6 changes: 3 additions & 3 deletions Source/Lib/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<PropertyGroup>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<LangVersion>10</LangVersion>
<Version>1.0.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<Version>1.0.1</Version>
<AssemblyVersion>1.0.1</AssemblyVersion>
<FileVersion>1.0.1</FileVersion>

<Authors>Peter Morris</Authors>
<Company />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
<PropertyGroup>
<RazorLangVersion>3.0</RazorLangVersion>
<Nullable>enable</Nullable>
<Description>A control flow library for Blazor to help eliminate C# code in your markup files.</Description>
<PackageIcon>control-flow-logo.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>Blazor</PackageTags>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand All @@ -11,6 +15,17 @@
<AssemblyOriginatorKeyFile>..\..\Lib\MrPMorris.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\..\Images\control-flow-logo.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>


<ItemGroup>
<PackageReference Condition="'$(TargetFramework)' == 'net6.0'" Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0" />
Expand Down
5 changes: 3 additions & 2 deletions Source/Morris.Blazor.ControlFlow.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Lib\Directory.Build.props = Lib\Directory.Build.props
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Morris.Blazor.ControlFlow", "Lib\Morris.Blazor.ControlFlow\Morris.Blazor.ControlFlow.csproj", "{5B499DA3-0DB1-48A5-B8E5-3E0B04F53EB7}"
Expand All @@ -15,11 +16,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tutorials", "Tutorials", "{
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ForEachExample", "Tutorials\ForEachExample\ForEachExample.csproj", "{E438D699-B285-4F8A-8087-095765599DFA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IfThenElseSample", "Tutorials\IfThenElseSample\IfThenElseSample.csproj", "{06B9F71D-5203-4CDD-90A5-627BACFADA75}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IfThenElseSample", "Tutorials\IfThenElseSample\IfThenElseSample.csproj", "{06B9F71D-5203-4CDD-90A5-627BACFADA75}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{CE4D64CF-C516-4E76-8D3B-8F45E795F4D2}"
ProjectSection(SolutionItems) = preProject
..\README.md = ..\README.md
..\Docs\Releases.md = ..\Docs\Releases.md
EndProjectSection
EndProject
Global
Expand Down

0 comments on commit 685e29c

Please sign in to comment.