-
-
Notifications
You must be signed in to change notification settings - Fork 364
doc(Readme): update component readme #5608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -126,20 +126,20 @@ dotnet new install Bootstrap.Blazor.Templates::* | |
|
|
||
| ## QQ交流群 | ||
|
|
||
| [](https://qm.qq.com/cgi-bin/qm/qr?k=1-jF9-5WA_3GFiJgXem2U_AQfqbdyOlV&jump_from=webapi) [](https://qm.qq.com/cgi-bin/qm/qr?k=Geker7hCXK0HC-J8_974645j_n6w0OE0&jump_from=webapi) | ||
| [](https://qm.qq.com/cgi-bin/qm/qr?k=1-jF9-5WA_3GFiJgXem2U_AQfqbdyOlV&jump_from=webapi) [](https://qm.qq.com/cgi-bin/qm/qr?k=Geker7hCXK0HC-J8_974645j_n6w0OE0&jump_from=webapi) | ||
|
|
||
| ## 视频教程 | ||
|
|
||
| B 站视频集锦 [传送门](https://space.bilibili.com/660853738/channel/index) | ||
|
|
||
| ## 演示地址 | ||
| [](https://www.blazor.zone) | ||
| [](https://www.blazor.zone) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (typo): Correct "greenlight" to "green" "greenlight" appears to be a typo. It should be "green". Suggested implementation: |
||
|
|
||
| ## GVP 奖杯 | ||
|  | ||
|
|
||
| ## 开源协议 | ||
| [](https://gitee.com/LongbowEnterprise/BootstrapBlazor/blob/master/LICENSE) | ||
| [](https://gitee.com/LongbowEnterprise/BootstrapBlazor/blob/master/LICENSE) | ||
|
|
||
| ## 特别鸣谢 | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,110 +2,79 @@ | |||||
|
|
||||||
| ## an enterprise-level UI component library based on Bootstrap and Blazor. | ||||||
|
|
||||||
| <h4>This project is part of the <a href="https://www.dotnetfoundation.org/">.NET Foundation</a> and operates under their <a href="https://www.dotnetfoundation.org/code-of-conduct">code of conduct</a>. </h4> | ||||||
| This project is part of the [.NET Foundation](https://www.dotnetfoundation.org/) and operates under their [Code Of Conduct](https://www.dotnetfoundation.org/code-of-conduct) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (typo): Use sentence case for "Code of Conduct" Change "Code Of Conduct" to "Code of Conduct" for consistency.
Suggested change
|
||||||
|
|
||||||
| [](https://github.com/dotnetcore/BootstrapBlazor/blob/main/LICENSE) | ||||||
| [](https://github.com/dotnetcore/BootstrapBlazor/blob/main/LICENSE) | ||||||
| [](https://github.com/dotnetcore/BootstrapBlazor/actions?query=workflow%3A%22Build+Project%22+branch%3Amain) | ||||||
| [](https://github.com/dotnetcore/BootstrapBlazor) | ||||||
| [](https://github.com/dotnetcore/BootstrapBlazor) | ||||||
| [](https://codecov.io/gh/dotnetcore/BootstrapBlazor) | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
| ## Features | ||||||
| - Enterprise-class UI designed for web applications. | ||||||
| - A set of high-quality Blazor components out of the box. | ||||||
| - Supports WebAssembly-based client-side and SignalR-based server-side UI event interaction. | ||||||
| - Supports Progressive Web Applications (PWA). | ||||||
| - Build with C#, a multi-paradigm static language for an efficient development experience. | ||||||
| - .NET Standard 2.1 based, with direct reference to the rich .NET ecosystem. | ||||||
| - Supports NET5. (Server-Side, WASM) | ||||||
| - Seamless integration with existing ASP.NET Core MVC and Razor Pages projects. | ||||||
|
|
||||||
| ## Online Examples | ||||||
| [](https://www.blazor.zone) | ||||||
|
|
||||||
| ## Installation Guide | ||||||
| [](https://www.blazor.zone) | ||||||
|
|
||||||
| - Install .net core sdk [Official website](https://dotnet.microsoft.com/download?wt.mc_id=DT-MVP-5004174) | ||||||
| - Install Visual Studio latest [Official website](https://visualstudio.microsoft.com/vs/getting-started?wt.mc_id=DT-MVP-5004174) | ||||||
| ## Quick Installation Guide | ||||||
|
|
||||||
| ```shell | ||||||
| git clone https://github.com/dotnetcore/BootstrapBlazor.git | ||||||
| cd BootstrapBlazor/src/BootstrapBlazor.Server | ||||||
| dotnet run | ||||||
| ### Install Package | ||||||
| ``` | ||||||
| dotnet add package BootstrapBlazor | ||||||
| ``` | ||||||
|
|
||||||
| ## Create a new project from the dotnet new template | ||||||
|
|
||||||
| 1. Install the template | ||||||
|
|
||||||
| `dotnet new install Bootstrap.Blazor.Templates::*` | ||||||
|
|
||||||
| 2. Create the Boilerplate project with the template | ||||||
|
|
||||||
| `dotnet new bbapp` | ||||||
|
|
||||||
| ## Install Bootstrap Blazor Project Template | ||||||
|
|
||||||
| 1. Download Project Template | ||||||
|
|
||||||
| Microsoft Market [link](https://marketplace.visualstudio.com/items?itemName=Longbow.BootstrapBlazorUITemplate&wt.mc_id=DT-MVP-5004174) | ||||||
|
|
||||||
| 2. Double Click **BootstrapBlazor.UITemplate.vsix** | ||||||
| ### Add the following to `_Imports.razor` | ||||||
| ``` | ||||||
| @using BootstrapBlazor.Components | ||||||
| ``` | ||||||
|
|
||||||
| ## Import Bootstrap Blazor into an existing project | ||||||
| ### Add the following to the `MainLayout.razor` | ||||||
| ```html | ||||||
| <BootstrapBlazorRoot> | ||||||
| @Body | ||||||
| </BootstrapBlazorRoot> | ||||||
| ``` | ||||||
|
|
||||||
| 1. Go to the project folder of the application and install the Nuget package reference | ||||||
| ### Add the following to your HTML head section | ||||||
| it's either **index.html** or **_Layout.cshtml/_Host.cshtml/App.razor** depending on whether you're running WebAssembly or Server | ||||||
| ```html | ||||||
| <link rel="stylesheet" href="_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css" /> | ||||||
| ``` | ||||||
|
|
||||||
| `dotnet add package BootstrapBlazor` | ||||||
| ### Add the following script at the end of the body | ||||||
| ```html | ||||||
| <script src="_content/BootstrapBlazor/js/bootstrap.blazor.bundle.min.js"></script> | ||||||
| ``` | ||||||
|
|
||||||
| 2. **Add** the `stylesheet` `javascripts` file to your main index file - `Pages/_Host.cshtml (Server)` or `wwwroot/index.html (WebAssembly)` | ||||||
| ### Add the following to the relevant sections of `Program.cs` | ||||||
| ```csharp | ||||||
| builder.Services.AddBootstrapBlazor(); | ||||||
| ``` | ||||||
|
|
||||||
| **HTML** | ||||||
| ## Usage | ||||||
| ```razor | ||||||
| <Display Value="@_text"></Display> | ||||||
| <Button Text="Button" OnClick="@ClickButton"></Button> | ||||||
| @code { | ||||||
| private string? _text; | ||||||
| private void ClickButton(MouseEventArgs e) | ||||||
| { | ||||||
| _text = DateTime.Now.ToString(); | ||||||
| } | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| ## Install CLI Template | ||||||
| 1. Install the template | ||||||
| ``` | ||||||
| <!DOCTYPE html> | ||||||
| <html lang="en"> | ||||||
| <head> | ||||||
| . . . | ||||||
| <link rel="stylesheet" href="_content/BootstrapBlazor/css/bootstrap.blazor.bundle.min.css"> | ||||||
| </head> | ||||||
| <body> | ||||||
| . . . | ||||||
| <script src="_content/BootstrapBlazor/js/bootstrap.blazor.bundle.min.js"></script> | ||||||
| </body> | ||||||
| </html> | ||||||
| dotnet new install Bootstrap.Blazor.Templates::* | ||||||
| ``` | ||||||
|
|
||||||
| 3. Open the `Program.cs` file in the and register the `Bootstrap Blazor` service: | ||||||
|
|
||||||
| **C#** | ||||||
|
|
||||||
| 2. Create the Boilerplate project with the template | ||||||
| ``` | ||||||
| builder.Services.AddBootstrapBlazorServices(); | ||||||
| dotnet new bbapp | ||||||
| ``` | ||||||
|
|
||||||
| ## Visual Studio Integration | ||||||
|
|
||||||
| To create a new `Bootstrap Blazor` UI for Blazor application, use the Create New Project Wizard. The wizard detects all installed versions of `Bootstrap Blazor` for Blazor and lists them in the Version combobox—this enables you to start your project with the desired version. You can also get the latest version to make sure you are up to date. | ||||||
|
|
||||||
| 1. Get the Wizard | ||||||
|
|
||||||
| To use the Create New Project Wizard, install the `Bootstrap Blazor` UI for Blazor Visual Studio Extensions. You can get it from the: | ||||||
|
|
||||||
| - Visual Studio Marketplace (for Windows) | ||||||
|
|
||||||
| 2. Start the Wizard | ||||||
|
|
||||||
| To start the wizard, use either of the following approaches | ||||||
|
|
||||||
| ### Using the Project menu: | ||||||
|
|
||||||
| - Click File > New > Project. | ||||||
| - Find and click the C# Blazor Application option (you can use the search, or filter by Blazor templates). | ||||||
| - Follow the wizard. | ||||||
|
|
||||||
| ## Code of conduct | ||||||
|
|
||||||
| This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (typo): Correct "greenlight" to "green"
"greenlight" appears to be a typo. It should be "green".
Suggested implementation: