mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 16:38:37 +00:00
Fomantic can make anything look good
This commit is contained in:
parent
b05ae76af5
commit
08d8940db4
5 changed files with 61 additions and 24 deletions
|
@ -8,11 +8,15 @@
|
|||
<h1>Authentication</h1>
|
||||
@foreach (AuthenticationAttempt authAttempt in Model.AuthenticationAttempts)
|
||||
{
|
||||
<div style="background-color: lightgray; display: flex; flex-direction: column; vertical-align: center; padding: 3px;">
|
||||
<p style="margin: 0px">A <b>@authAttempt.Platform</b> authentication request was logged at <b>@authAttempt.Timestamp</b> from the IP address <b>@authAttempt.IPAddress</b>.</p>
|
||||
<div class="ui red segment">
|
||||
<p>A <b>@authAttempt.Platform</b> authentication request was logged at <b>@authAttempt.Timestamp</b> from the IP address <b>@authAttempt.IPAddress</b>.</p>
|
||||
<div>
|
||||
<a href="/">Approve</a>
|
||||
<a href="/">Deny</a>
|
||||
<a href="/authentication/approve/1">
|
||||
<button class="ui tiny green button">Approve</button>
|
||||
</a>
|
||||
<a href="/authentication/deny/1">
|
||||
<button class="ui tiny red button">Deny</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
}
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
if (Model.User == null)
|
||||
{
|
||||
Model.NavigationItems.Add(new PageNavigationItem("Register", "/register"));
|
||||
Model.NavigationItems.Add(new PageNavigationItem("Log in", "/login"));
|
||||
Model.NavigationItems.Add(new PageNavigationItem("Log in", "/login", "user alternate"));
|
||||
Model.NavigationItems.Add(new PageNavigationItem("Register", "/register", "user alternate edit"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.NavigationItems.Add(new PageNavigationItem("Authentication", "/authentication"));
|
||||
Model.NavigationItems.Add(new PageNavigationItem("Log out", "/logout")); // should always be last
|
||||
Model.NavigationItems.Add(new PageNavigationItem("Authentication", "/authentication", "key"));
|
||||
Model.NavigationItems.Add(new PageNavigationItem("Log out", "/logout", "user alternate slash")); // should always be last
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,25 +22,41 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Project Lighthouse</title>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.8.8/dist/semantic.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="~/css/styles.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.8.8/dist/semantic.min.css">
|
||||
</head>
|
||||
<header>
|
||||
<nav>
|
||||
@foreach (PageNavigationItem navigationItem in Model!.NavigationItems)
|
||||
{
|
||||
<a href="@navigationItem.Url">@navigationItem.Name</a>
|
||||
}
|
||||
</nav>
|
||||
<div class="ui attached menu">
|
||||
<div class="ui container">
|
||||
@foreach (PageNavigationItem navigationItem in Model!.NavigationItems)
|
||||
{
|
||||
<a class="item" href="@navigationItem.Url">
|
||||
@if (navigationItem.Icon != null)
|
||||
{
|
||||
<i class="@navigationItem.Icon icon"></i>
|
||||
}
|
||||
@navigationItem.Name
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<body>
|
||||
@RenderBody()
|
||||
<div class="ui container">
|
||||
<br>
|
||||
@RenderBody()
|
||||
</div>
|
||||
</body>
|
||||
<footer style="width: 100%; bottom: 0; position: fixed;">
|
||||
<p>Page generated by @GitVersionHelper.FullVersion</p>
|
||||
@if (GitVersionHelper.IsDirty)
|
||||
{
|
||||
<p>This page was generated using a modified version of Project Lighthouse. Please make sure you are properly disclosing the source code to any users who may be using this instance.</p>
|
||||
}
|
||||
<footer class="lighthouse-footer">
|
||||
<div class="ui black attached inverted segment">
|
||||
<div class="ui container">
|
||||
|
||||
<p>Page generated by @GitVersionHelper.FullVersion</p>
|
||||
@if (GitVersionHelper.IsDirty)
|
||||
{
|
||||
<p>This page was generated using a modified version of Project Lighthouse. Please make sure you are properly disclosing the source code to any users who may be using this instance.</p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</html>
|
|
@ -18,7 +18,7 @@ namespace LBPUnion.ProjectLighthouse.Pages.Layouts
|
|||
|
||||
public readonly List<PageNavigationItem> NavigationItems = new()
|
||||
{
|
||||
new PageNavigationItem("Home", "/"),
|
||||
new PageNavigationItem("Home", "/", "home"),
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
footer.lighthouse-footer {
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
div.authentication-attempt {
|
||||
background-color: lightgray;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
vertical-align: center;
|
||||
padding: 3px;
|
||||
}
|
|
@ -1,13 +1,17 @@
|
|||
#nullable enable
|
||||
|
||||
namespace LBPUnion.ProjectLighthouse.Types
|
||||
{
|
||||
public class PageNavigationItem
|
||||
{
|
||||
public PageNavigationItem(string name, string url)
|
||||
public PageNavigationItem(string name, string url, string? icon = null)
|
||||
{
|
||||
this.Name = name;
|
||||
this.Url = url;
|
||||
this.Icon = icon;
|
||||
}
|
||||
public string Name { get; set; }
|
||||
public string Url { get; set; }
|
||||
public string? Icon { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue