forked from XAMPPRocky/tokei
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Razor Components (XAMPPRocky#992)
- Loading branch information
1 parent
83cf62a
commit b7624ab
Showing
3 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
@* 55 lines 35 code 15 comments 5 blanks *@ | ||
@page "/" | ||
@using Microsoft.AspNetCore.Components.Web | ||
@namespace temp.Pages | ||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers | ||
|
||
@{ | ||
// foo | ||
string foo = "bar"; | ||
|
||
/* | ||
* bar | ||
*/ | ||
string bar = "foo"; | ||
} | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<base href="~/" /> | ||
<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" /> | ||
<link href="css/site.css" rel="stylesheet" /> | ||
<link href="temp.styles.css" rel="stylesheet" /> | ||
<link rel="icon" type="image/png" href="favicon.png"/> | ||
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" /> | ||
</head> | ||
<body> | ||
@* | ||
multi-line comment | ||
*@ | ||
<component type="typeof(App)" render-mode="ServerPrerendered" /> | ||
|
||
<div id="blazor-error-ui"> | ||
<environment include="Staging,Production"> | ||
An error has occurred. This application may no longer respond until reloaded. | ||
</environment> | ||
<!-- | ||
different multi-line comment | ||
--> | ||
<environment include="Development"> | ||
An unhandled exception has occurred. See browser dev tools for details. | ||
</environment> | ||
<a href="" class="reload">Reload</a> | ||
<a class="dismiss">🗙</a> | ||
</div> | ||
|
||
<script src="_framework/blazor.server.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@* 45 lines 16 code 21 comments 8 blanks *@ | ||
@page "/counter" | ||
|
||
@{ | ||
// foo | ||
string foo = "bar"; | ||
|
||
/* | ||
* bar | ||
*/ | ||
string bar = "foo"; | ||
} | ||
|
||
<PageTitle>Counter</PageTitle> | ||
|
||
@* | ||
multi-line comment | ||
*@ | ||
<h1>Counter</h1> | ||
|
||
<p role="status">Current count: @currentCount</p> | ||
|
||
<!-- | ||
different multi-line comment | ||
--> | ||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button> | ||
|
||
@code { | ||
/* | ||
C# style multi-line comment | ||
*/ | ||
private int currentCount = 0; | ||
|
||
private void IncrementCount() | ||
{ | ||
// increment the count | ||
currentCount++; | ||
} | ||
} |