Remove Privacy page, clean up some css, add jacknet login link
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Simon 2021-10-06 00:45:38 +01:00
parent d7c38191ce
commit 868291c135
6 changed files with 152 additions and 56 deletions

View File

@ -6,5 +6,21 @@
<div class="text-center">
<h1 class="display-4">Welcome</h1>
<p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
</div>
<div class="container-fluid">
@if (User.Identity == null || !User.Identity.IsAuthenticated)
{
<h2>Please log in</h2>
<a asp-page="/UserHome" style="display: inline-block;">
<span style="white-space: nowrap;display: flex;">
Login with
<img style="no-repeat;width: 6em;background-size: contain;background-position: center;margin-left: 10px;" src="~/static/JackNet-auth-logo-orange.svg"></img>
</span>
</a>
}
else
{
<p>You're already logged in, please use the <a asp-area="" asp-page="/UserHome">User</a> tab to see your devices.</p>
}
</div>

View File

@ -1,8 +0,0 @@
@page
@model PrivacyModel
@{
ViewData["Title"] = "Privacy Policy";
}
<h1>@ViewData["Title"]</h1>
<p>Use this page to detail your site's privacy policy.</p>

View File

@ -1,19 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace ManagementPage.Pages
{
public class PrivacyModel : PageModel
{
private readonly ILogger<PrivacyModel> _logger;
public PrivacyModel(ILogger<PrivacyModel> logger)
{
_logger = logger;
}
public void OnGet()
{
}
}
}

View File

@ -23,16 +23,16 @@
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-page="/Index">Home</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-page="/Privacy">Privacy</a>
</li>
@if (User.Identity != null && User.Identity.IsAuthenticated)
{
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-page="/UserHome">User</a>
</li>
}
</ul>
@if (User.Identity != null && User.Identity.IsAuthenticated)
{
<ul class="navbar-nav flex-grow-1">
<ul class="navbar-nav flex-grow-1" style="justify-content: right">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-page="/logout">Logout</a>
</li>

View File

@ -6,7 +6,8 @@
<h3>Hi @Model.name</h3>
<hr></hr>
<div class="card-deck row row-cols-1 row-cols-md-3 g-4">
<div class="container-fluid">
<div class="card-deck row row-cols-1 row-cols-md-3 g-4">
@foreach (var item in @Model.data)
{
<div class="card" style="width: 18rem;">
@ -23,14 +24,16 @@
}
<div class="card text-center" style="width: 18rem;">
<div class="card-body ">
<div class="card-body d-flex flex-column">
<h5 class="card-title">New Item</h5>
<p class="card-text">Register a new device</p>
<div class="mt-auto">
<button type="button" class="btn btn-primary oi oi-plus" data-bs-toggle="modal" data-bs-target="#devicemodal"></button>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="devicemodal" tabindex="-1" aria-labelledby="deviceModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 23 KiB