ソースを参照

InfoPage and renaming

master
Flo Smilari 4年前
コミット
f37f845087

+ 0
- 4
CaritasPWA.csproj ファイルの表示

@@ -38,8 +38,4 @@
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\images\" />
</ItemGroup>
</Project>

Pages/Counter.razor → Pages/AccountPage.razor ファイルの表示

@@ -1,4 +1,4 @@
@page "/counter"
@page "/account"
@inject NavigationManager NavigationManager
<h1>Counter</h1>
@@ -9,9 +9,6 @@
<MatListItem>
<MatButton Raised="true" @onclick="IncrementCount">Click me!</MatButton>
</MatListItem>
<MatListItem>
<MatButton Raised="true" @onclick="ShowCaritasWebpage">Erfahre mehr!</MatButton>
</MatListItem>
</MatList>
@@ -21,10 +18,5 @@
private void IncrementCount() {
currentCount++;
}
private void ShowCaritasWebpage() {
NavigationManager.NavigateTo("http://www.caritas.ch");
}
}

+ 0
- 55
Pages/FetchData.razor ファイルの表示

@@ -1,55 +0,0 @@
@page "/fetchdata"
@inject HttpClient Http
<h1>Weather forecast</h1>
<p>This component demonstrates fetching data from the server.</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 Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json");
}
public class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public string Summary { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
}
}

Pages/Index.razor → Pages/IndexPage.razor ファイルの表示


+ 59
- 0
Pages/InfoPage.razor ファイルの表示

@@ -0,0 +1,59 @@
@page "/info"
@inject NavigationManager NavigationManager;
<div class="row px-3 h-100">
<div class="align-items-center justify-content-start">
<img src="/images/caritas_logo.png" width="100%" style="padding:1em" />
</div>
<div class="row no-gutters align-items-center w-100">
<table class="w-100">
<tr>
<td class="text-center">
<p class="text-left">Hier kommt ein Informationstext über die App.</p>
</td>
</tr>
<tr>
<td class="text-center">
<MatButton Raised="true" Class="w-100" @onclick="ShowCaritasWebpage">Mehr erfahren</MatButton>
</td>
</tr>
<tr>
<td>
<MatCaption Style="font-family:Ubuntu">Version: 0.1.0</MatCaption>
</td>
</tr>
</table>
</div>
<div class="row no-gutters align-items-end w-100">
<table class="w-100">
<tr>
<td class="text-right">
<MatCaption Style="font-family:Ubuntu">Entwickelt durch</MatCaption>
</td>
</tr>
<tr>
<td class="text-right">
<img src="/images/integrate_logo.png" width="80%" />
</td>
</tr>
<tr>
<td class="text-right">
<MatCaption Style="font-family:Ubuntu">Platz 10, Business Village Luzern</MatCaption>
</td>
</tr>
<tr>
<td class="text-right">
<MatCaption Style="font-family:Ubuntu">CH-6039 Root D4</MatCaption>
</td>
</tr>
</table>
</div>
</div>
@code {
private void ShowCaritasWebpage() {
NavigationManager.NavigateTo("http://www.caritas.ch");
}
}

+ 1
- 1
Shared/MainLayout.razor ファイルの表示

@@ -1,7 +1,7 @@
@inherits LayoutComponentBase
<NavMenu />
<div class="main vh-100">
<div class="main" style="height:90vh">
<div class="content px-4 h-100">
@Body
</div>

+ 6
- 6
Shared/NavMenu.razor ファイルの表示

@@ -27,13 +27,13 @@
<MatListItemText Style="padding-left:0.5em">Caritas Dienste</MatListItemText>
</MatListItem>
<MatListItem Class="@((Index == 2) ? "bg-primary-color text-white" : "")"
Href="counter"
Href="account"
@onclick="@((e) => ButtonClicked(2))">
<MatIcon Icon="@MatIconNames.Person_outline"></MatIcon>
<MatListItemText Style="padding-left:0.5em">Konto</MatListItemText>
</MatListItem>
<MatListItem Class="@((Index == 3) ? "bg-primary-color text-white" : "")"
Href="fetchdata"
Href="info"
@onclick="@((e) => ButtonClicked(3))">
<MatIcon Icon="@MatIconNames.Error_outline" Style="transform: rotate(180deg)"></MatIcon>
<MatListItemText Style="padding-left:0.5em">Info</MatListItemText>
@@ -90,9 +90,9 @@
System.Diagnostics.Debug.WriteLine($"Notified of navigation via {navigationMethod} to {e.Location}");
if (e.Location.Contains("caritas_services")) {
Index = 1;
} else if(e.Location.Contains("counter")) {
} else if(e.Location.Contains("account")) {
Index = 2;
} else if (e.Location.Contains("fetchdata")) {
} else if (e.Location.Contains("info")) {
Index = 3;
} else {
Index = 4;
@@ -110,9 +110,9 @@
} else {
if (delta.Equals("caritas_services")) {
Index = 1;
} else if (delta.Equals("counter")) {
} else if (delta.Equals("account")) {
Index = 2;
} else if (delta.Equals("fetchdata")) {
} else if (delta.Equals("info")) {
Index = 3;
}
return true;

+ 0
- 16
Shared/SurveyPrompt.razor ファイルの表示

@@ -1,16 +0,0 @@
<div class="alert alert-secondary mt-4" role="alert">
<span class="oi oi-pencil mr-2" aria-hidden="true"></span>
<strong>@Title</strong>
<span class="text-nowrap">
Please take our
<a target="_blank" class="font-weight-bold" href="https://go.microsoft.com/fwlink/?linkid=2127996">brief survey</a>
</span>
and tell us what you think.
</div>
@code {
// Demonstrates how a parent component can supply parameters
[Parameter]
public string Title { get; set; }
}

+ 0
- 1
wwwroot/css/app.css ファイルの表示

@@ -93,7 +93,6 @@ a, .btn-link {
height: 100vh;
}
.sidebar {
background-color: var(--primary);
/*background-image: linear-gradient(180deg, var(--caritas-red) 0%, var(--caritas-red-accent) 70%);*/

+ 4
- 0
wwwroot/css/united/bootstrap.css ファイルの表示

@@ -8166,6 +8166,10 @@ button.bg-dark:focus {
width: 100vw !important;
}

.vh-90 {
height: 90vh !important;
}

.vh-100 {
height: 100vh !important;
}

バイナリ
wwwroot/images/integrate_logo.png ファイルの表示


読み込み中…
キャンセル
保存