| <ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" /> | <ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" /> | ||||
| </ItemGroup> | </ItemGroup> | ||||
| <ItemGroup> | |||||
| <Folder Include="wwwroot\images\" /> | |||||
| </ItemGroup> | |||||
| </Project> | </Project> |
| @page "/counter" | |||||
| @page "/account" | |||||
| @inject NavigationManager NavigationManager | @inject NavigationManager NavigationManager | ||||
| <h1>Counter</h1> | <h1>Counter</h1> | ||||
| <MatListItem> | <MatListItem> | ||||
| <MatButton Raised="true" @onclick="IncrementCount">Click me!</MatButton> | <MatButton Raised="true" @onclick="IncrementCount">Click me!</MatButton> | ||||
| </MatListItem> | </MatListItem> | ||||
| <MatListItem> | |||||
| <MatButton Raised="true" @onclick="ShowCaritasWebpage">Erfahre mehr!</MatButton> | |||||
| </MatListItem> | |||||
| </MatList> | </MatList> | ||||
| private void IncrementCount() { | private void IncrementCount() { | ||||
| currentCount++; | currentCount++; | ||||
| } | } | ||||
| private void ShowCaritasWebpage() { | |||||
| NavigationManager.NavigateTo("http://www.caritas.ch"); | |||||
| } | |||||
| } | } | ||||
| @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); | |||||
| } | |||||
| } |
| @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"); | |||||
| } | |||||
| } |
| @inherits LayoutComponentBase | @inherits LayoutComponentBase | ||||
| <NavMenu /> | <NavMenu /> | ||||
| <div class="main vh-100"> | |||||
| <div class="main" style="height:90vh"> | |||||
| <div class="content px-4 h-100"> | <div class="content px-4 h-100"> | ||||
| @Body | @Body | ||||
| </div> | </div> |
| <MatListItemText Style="padding-left:0.5em">Caritas Dienste</MatListItemText> | <MatListItemText Style="padding-left:0.5em">Caritas Dienste</MatListItemText> | ||||
| </MatListItem> | </MatListItem> | ||||
| <MatListItem Class="@((Index == 2) ? "bg-primary-color text-white" : "")" | <MatListItem Class="@((Index == 2) ? "bg-primary-color text-white" : "")" | ||||
| Href="counter" | |||||
| Href="account" | |||||
| @onclick="@((e) => ButtonClicked(2))"> | @onclick="@((e) => ButtonClicked(2))"> | ||||
| <MatIcon Icon="@MatIconNames.Person_outline"></MatIcon> | <MatIcon Icon="@MatIconNames.Person_outline"></MatIcon> | ||||
| <MatListItemText Style="padding-left:0.5em">Konto</MatListItemText> | <MatListItemText Style="padding-left:0.5em">Konto</MatListItemText> | ||||
| </MatListItem> | </MatListItem> | ||||
| <MatListItem Class="@((Index == 3) ? "bg-primary-color text-white" : "")" | <MatListItem Class="@((Index == 3) ? "bg-primary-color text-white" : "")" | ||||
| Href="fetchdata" | |||||
| Href="info" | |||||
| @onclick="@((e) => ButtonClicked(3))"> | @onclick="@((e) => ButtonClicked(3))"> | ||||
| <MatIcon Icon="@MatIconNames.Error_outline" Style="transform: rotate(180deg)"></MatIcon> | <MatIcon Icon="@MatIconNames.Error_outline" Style="transform: rotate(180deg)"></MatIcon> | ||||
| <MatListItemText Style="padding-left:0.5em">Info</MatListItemText> | <MatListItemText Style="padding-left:0.5em">Info</MatListItemText> | ||||
| System.Diagnostics.Debug.WriteLine($"Notified of navigation via {navigationMethod} to {e.Location}"); | System.Diagnostics.Debug.WriteLine($"Notified of navigation via {navigationMethod} to {e.Location}"); | ||||
| if (e.Location.Contains("caritas_services")) { | if (e.Location.Contains("caritas_services")) { | ||||
| Index = 1; | Index = 1; | ||||
| } else if(e.Location.Contains("counter")) { | |||||
| } else if(e.Location.Contains("account")) { | |||||
| Index = 2; | Index = 2; | ||||
| } else if (e.Location.Contains("fetchdata")) { | |||||
| } else if (e.Location.Contains("info")) { | |||||
| Index = 3; | Index = 3; | ||||
| } else { | } else { | ||||
| Index = 4; | Index = 4; | ||||
| } else { | } else { | ||||
| if (delta.Equals("caritas_services")) { | if (delta.Equals("caritas_services")) { | ||||
| Index = 1; | Index = 1; | ||||
| } else if (delta.Equals("counter")) { | |||||
| } else if (delta.Equals("account")) { | |||||
| Index = 2; | Index = 2; | ||||
| } else if (delta.Equals("fetchdata")) { | |||||
| } else if (delta.Equals("info")) { | |||||
| Index = 3; | Index = 3; | ||||
| } | } | ||||
| return true; | return true; |
| <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; } | |||||
| } |
| height: 100vh; | height: 100vh; | ||||
| } | } | ||||
| .sidebar { | .sidebar { | ||||
| background-color: var(--primary); | background-color: var(--primary); | ||||
| /*background-image: linear-gradient(180deg, var(--caritas-red) 0%, var(--caritas-red-accent) 70%);*/ | /*background-image: linear-gradient(180deg, var(--caritas-red) 0%, var(--caritas-red-accent) 70%);*/ |
| width: 100vw !important; | width: 100vw !important; | ||||
| } | } | ||||
| .vh-90 { | |||||
| height: 90vh !important; | |||||
| } | |||||
| .vh-100 { | .vh-100 { | ||||
| height: 100vh !important; | height: 100vh !important; | ||||
| } | } |