mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-02 10:08:39 +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>
|
<h1>Authentication</h1>
|
||||||
@foreach (AuthenticationAttempt authAttempt in Model.AuthenticationAttempts)
|
@foreach (AuthenticationAttempt authAttempt in Model.AuthenticationAttempts)
|
||||||
{
|
{
|
||||||
<div style="background-color: lightgray; display: flex; flex-direction: column; vertical-align: center; padding: 3px;">
|
<div class="ui red segment">
|
||||||
<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>
|
<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>
|
<div>
|
||||||
<a href="/">Approve</a>
|
<a href="/authentication/approve/1">
|
||||||
<a href="/">Deny</a>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
|
@ -7,13 +7,13 @@
|
||||||
|
|
||||||
if (Model.User == null)
|
if (Model.User == null)
|
||||||
{
|
{
|
||||||
Model.NavigationItems.Add(new PageNavigationItem("Register", "/register"));
|
Model.NavigationItems.Add(new PageNavigationItem("Log in", "/login", "user alternate"));
|
||||||
Model.NavigationItems.Add(new PageNavigationItem("Log in", "/login"));
|
Model.NavigationItems.Add(new PageNavigationItem("Register", "/register", "user alternate edit"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Model.NavigationItems.Add(new PageNavigationItem("Authentication", "/authentication"));
|
Model.NavigationItems.Add(new PageNavigationItem("Authentication", "/authentication", "key"));
|
||||||
Model.NavigationItems.Add(new PageNavigationItem("Log out", "/logout")); // should always be last
|
Model.NavigationItems.Add(new PageNavigationItem("Log out", "/logout", "user alternate slash")); // should always be last
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,25 +22,41 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>Project Lighthouse</title>
|
<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="~/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>
|
</head>
|
||||||
<header>
|
<header>
|
||||||
<nav>
|
<div class="ui attached menu">
|
||||||
|
<div class="ui container">
|
||||||
@foreach (PageNavigationItem navigationItem in Model!.NavigationItems)
|
@foreach (PageNavigationItem navigationItem in Model!.NavigationItems)
|
||||||
{
|
{
|
||||||
<a href="@navigationItem.Url">@navigationItem.Name</a>
|
<a class="item" href="@navigationItem.Url">
|
||||||
|
@if (navigationItem.Icon != null)
|
||||||
|
{
|
||||||
|
<i class="@navigationItem.Icon icon"></i>
|
||||||
}
|
}
|
||||||
</nav>
|
@navigationItem.Name
|
||||||
|
</a>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<body>
|
<body>
|
||||||
|
<div class="ui container">
|
||||||
|
<br>
|
||||||
@RenderBody()
|
@RenderBody()
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<footer style="width: 100%; bottom: 0; position: fixed;">
|
<footer class="lighthouse-footer">
|
||||||
|
<div class="ui black attached inverted segment">
|
||||||
|
<div class="ui container">
|
||||||
|
|
||||||
<p>Page generated by @GitVersionHelper.FullVersion</p>
|
<p>Page generated by @GitVersionHelper.FullVersion</p>
|
||||||
@if (GitVersionHelper.IsDirty)
|
@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>
|
<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>
|
</footer>
|
||||||
</html>
|
</html>
|
|
@ -18,7 +18,7 @@ namespace LBPUnion.ProjectLighthouse.Pages.Layouts
|
||||||
|
|
||||||
public readonly List<PageNavigationItem> NavigationItems = new()
|
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
|
namespace LBPUnion.ProjectLighthouse.Types
|
||||||
{
|
{
|
||||||
public class PageNavigationItem
|
public class PageNavigationItem
|
||||||
{
|
{
|
||||||
public PageNavigationItem(string name, string url)
|
public PageNavigationItem(string name, string url, string? icon = null)
|
||||||
{
|
{
|
||||||
this.Name = name;
|
this.Name = name;
|
||||||
this.Url = url;
|
this.Url = url;
|
||||||
|
this.Icon = icon;
|
||||||
}
|
}
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
|
public string? Icon { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue