diff options
| author | transtrike <transtrike@gmail.com> | 2020-12-20 10:44:58 +0200 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2020-12-20 10:44:58 +0200 |
| commit | a83b518a7a16d93f207bab8ec5c54c14c9493e23 (patch) | |
| tree | c79d5dda1a6aebbbf54af0725a85ded830af8c3e /src/DevHive.Blazor/Pages | |
| parent | 8880e0efec7462f6865e528f01b9973c6e722e8b (diff) | |
| download | DevHive-a83b518a7a16d93f207bab8ec5c54c14c9493e23.tar DevHive-a83b518a7a16d93f207bab8ec5c54c14c9493e23.tar.gz DevHive-a83b518a7a16d93f207bab8ec5c54c14c9493e23.zip | |
Removed Razor, added Angular
Diffstat (limited to 'src/DevHive.Blazor/Pages')
| -rw-r--r-- | src/DevHive.Blazor/Pages/Counter.razor | 16 | ||||
| -rw-r--r-- | src/DevHive.Blazor/Pages/Error.cshtml | 42 | ||||
| -rw-r--r-- | src/DevHive.Blazor/Pages/Error.cshtml.cs | 32 | ||||
| -rw-r--r-- | src/DevHive.Blazor/Pages/FetchData.razor | 46 | ||||
| -rw-r--r-- | src/DevHive.Blazor/Pages/Index.razor | 7 | ||||
| -rw-r--r-- | src/DevHive.Blazor/Pages/_Host.cshtml | 35 |
6 files changed, 0 insertions, 178 deletions
diff --git a/src/DevHive.Blazor/Pages/Counter.razor b/src/DevHive.Blazor/Pages/Counter.razor deleted file mode 100644 index ea07ff3..0000000 --- a/src/DevHive.Blazor/Pages/Counter.razor +++ /dev/null @@ -1,16 +0,0 @@ -@page "/counter"
-
-<h1>Counter</h1>
-
-<p>Current count: @currentCount</p>
-
-<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
-
-@code {
- private int currentCount = 0;
-
- private void IncrementCount()
- {
- currentCount++;
- }
-}
diff --git a/src/DevHive.Blazor/Pages/Error.cshtml b/src/DevHive.Blazor/Pages/Error.cshtml deleted file mode 100644 index 9e1d3fa..0000000 --- a/src/DevHive.Blazor/Pages/Error.cshtml +++ /dev/null @@ -1,42 +0,0 @@ -@page
-@model DevHive.Blazor.Pages.ErrorModel
-
-<!DOCTYPE html>
-<html>
-
-<head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
- <title>Error</title>
- <link href="~/css/bootstrap/bootstrap.min.css" rel="stylesheet" />
- <link href="~/css/app.css" rel="stylesheet" />
-</head>
-
-<body>
- <div class="main">
- <div class="content px-4">
- <h1 class="text-danger">Error.</h1>
- <h2 class="text-danger">An error occurred while processing your request.</h2>
-
- @if (Model.ShowRequestId)
- {
- <p>
- <strong>Request ID:</strong> <code>@Model.RequestId</code>
- </p>
- }
-
- <h3>Development Mode</h3>
- <p>
- Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
- </p>
- <p>
- <strong>The Development environment shouldn't be enabled for deployed applications.</strong>
- It can result in displaying sensitive information from exceptions to end users.
- For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
- and restarting the app.
- </p>
- </div>
- </div>
-</body>
-
-</html>
diff --git a/src/DevHive.Blazor/Pages/Error.cshtml.cs b/src/DevHive.Blazor/Pages/Error.cshtml.cs deleted file mode 100644 index b18c4a6..0000000 --- a/src/DevHive.Blazor/Pages/Error.cshtml.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.AspNetCore.Mvc.RazorPages;
-using Microsoft.Extensions.Logging;
-
-namespace DevHive.Blazor.Pages
-{
- [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
- [IgnoreAntiforgeryToken]
- public class ErrorModel : PageModel
- {
- public string RequestId { get; set; }
-
- public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
-
- private readonly ILogger<ErrorModel> _logger;
-
- public ErrorModel(ILogger<ErrorModel> logger)
- {
- _logger = logger;
- }
-
- public void OnGet()
- {
- RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
- }
- }
-}
diff --git a/src/DevHive.Blazor/Pages/FetchData.razor b/src/DevHive.Blazor/Pages/FetchData.razor deleted file mode 100644 index a496d0d..0000000 --- a/src/DevHive.Blazor/Pages/FetchData.razor +++ /dev/null @@ -1,46 +0,0 @@ -@page "/fetchdata"
-
-@using DevHive.Blazor.Data
-@inject WeatherForecastService ForecastService
-
-<h1>Weather forecast</h1>
-
-<p>This component demonstrates fetching data from a service.</p>
-
-@if (forecasts == null)
-{
- <p><em>Loading...</em></p>
-}
-else
-{
- <table class="table">
- <thead>
- <tr>
- <th>Date</th>
- <th>Temp. (C)</th>
- <th>Temp. (F)</th>
- <th>Summary</th>
- </tr>
- </thead>
- <tbody>
- @foreach (var forecast in forecasts)
- {
- <tr>
- <td>@forecast.Date.ToShortDateString()</td>
- <td>@forecast.TemperatureC</td>
- <td>@forecast.TemperatureF</td>
- <td>@forecast.Summary</td>
- </tr>
- }
- </tbody>
- </table>
-}
-
-@code {
- private WeatherForecast[] forecasts;
-
- protected override async Task OnInitializedAsync()
- {
- forecasts = await ForecastService.GetForecastAsync(DateTime.Now);
- }
-}
diff --git a/src/DevHive.Blazor/Pages/Index.razor b/src/DevHive.Blazor/Pages/Index.razor deleted file mode 100644 index a4c47de..0000000 --- a/src/DevHive.Blazor/Pages/Index.razor +++ /dev/null @@ -1,7 +0,0 @@ -@page "/"
-
-<h1>Hello, world!</h1>
-
-Welcome to your new app.
-
-<SurveyPrompt Title="How is Blazor working for you?" />
diff --git a/src/DevHive.Blazor/Pages/_Host.cshtml b/src/DevHive.Blazor/Pages/_Host.cshtml deleted file mode 100644 index 9c03a62..0000000 --- a/src/DevHive.Blazor/Pages/_Host.cshtml +++ /dev/null @@ -1,35 +0,0 @@ -@page "/"
-@namespace DevHive.Blazor.Pages
-@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
-@{
- Layout = null;
-}
-
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>DevHive.Blazor</title>
- <base href="~/" />
- <link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
- <link href="css/site.css" rel="stylesheet" />
- <link href="DevHive.Blazor.styles.css" rel="stylesheet" />
-</head>
-<body>
- <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>
- <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>
|
