init commit over here

This commit is contained in:
Derek Holloway
2025-05-12 16:57:19 -07:00
parent 8e02c028a7
commit 838b3ab450
87 changed files with 6068 additions and 0 deletions
@@ -0,0 +1,5 @@
<PageTitle>Checking Session</PageTitle>
@code {
}
@@ -0,0 +1,38 @@
<button type="button" class="collapsible" @onclick=OpenCollapseable>@Title</button>
<ul class="dropdown-content" style="display : @collapseStyle;">
@if (Children != null){
@foreach(var Cur in Children){
<li>
@if(Cur.Type == FileType.Directory) {
<ExplorerChild Title=@Cur.Path Children=Cur.Children PartialPath=@(PartialPath+Cur.Path) ></ExplorerChild>
} else {
<button type="button" @onclick=@((e)=>{ Download(Cur.Path); })>@Cur.Path</button>
}
</li>
}
}
</ul>
@code{
[Parameter]
public string Title{ get; set; } = "";
[Parameter]
public DirObj[]? Children{ get; set; }
[Parameter]
public string PartialPath{ get; set; } = "";
public string collapseStyle = "none";
void OpenCollapseable() {
if (collapseStyle == "block") {
collapseStyle = "none";
} else {
collapseStyle = "block";
}
}
void Download(string Path) {
Nav.NavigateTo( "api/product/download?Product=" + PartialPath + Path, true );
}
}
@@ -0,0 +1,19 @@
@inherits LayoutComponentBase
<div class="page">
<div class="sidebar">
<NavMenu />
</div>
<main>
<article class="content px-4">
@Body
</article>
</main>
</div>
@code{
}
@@ -0,0 +1,88 @@
article{
padding: 0 !important;
}
.page {
position: relative;
display: flex;
flex-direction: column;
background-color: var(--Mistox-Black);
}
body{
background-color: var(--Mistox-Black);
}
main {
flex: 1;
background-color: var(--Mistox-Black);
color: var(--Mistox-White);
}
.sidebar {
border-right: var(--Mistox-Background) 2px solid;
}
.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
height: 45px;
display: flex;
align-items: center;
}
.top-row ::deep a, .top-row ::deep .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
}
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
text-decoration: underline;
}
.top-row ::deep a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
@media (max-width: 640.98px) {
.top-row:not(.auth) {
display: none;
}
.top-row.auth {
justify-content: space-between;
}
.top-row ::deep a, .top-row ::deep .btn-link {
margin-left: 0;
}
}
@media (min-width: 641px) {
.page {
flex-direction: row;
}
.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
min-width: 250px;
}
.top-row {
position: sticky;
top: 0;
z-index: 1;
}
.top-row.auth ::deep a:first-child {
flex: 1;
text-align: right;
width: 0;
}
}
@@ -0,0 +1,96 @@
<div class="top-row">
<div class="top-gradient">
<a class="navbar-brand" href="">
<img src="/img/MistoxLogo.png" />
</a>
</div>
<button title="DropDownButtonMobile" class="navbar-toggler" @onclick="ToggleNavMenu">
<span class="navbar-toggler-icon">MENU</span>
</button>
</div>
<div class="bottom-row">
<style>
@@media (max-width: 641px) {
main{
min-height: @MainHeight;
flex: none !important;
}
}
</style>
<div class="@NavMenuCssClass" @onclick="ToggleNavMenu">
<nav class="flex-column">
<div class="nav-item">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span>Home</span>
</NavLink>
</div>
<div class="nav-item">
<NavLink class="nav-link" href="/project/mist" Match="NavLinkMatch.All">
<span>Project-Mist</span>
</NavLink>
</div>
<AuthorizeView>
<Authorized>
<div class="nav-item">
<NavLink class="nav-link" href="store/catalog">
<span>Store</span>
</NavLink>
</div>
</Authorized>
</AuthorizeView>
<div class="nav-item">
<NavLink class="nav-link" href="/about" Match="NavLinkMatch.All">
<span>About</span>
</NavLink>
</div>
<div class="nav-login">
<AuthorizeView>
<Authorized>
<input class="nav-login-button" type="button" value="@context.User.FindFirst(ClaimTypes.Name)?.Value" @onclick="ManageProf"> </input>
<input class="nav-login-button" type="button" value="Logout" @onclick="ClearSession" />
</Authorized>
<NotAuthorized>
<input class="nav-login-button" type="button" value="Login" @onclick="NavToLogin" />
<input class="nav-login-button" type="button" value="Register" @onclick="NavToRegister" />
</NotAuthorized>
</AuthorizeView>
</div>
</nav>
</div>
</div>
@code {
private bool collapseNavMenu = true;
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
private string? MainHeight => collapseNavMenu ? "calc(100vh - 56px)" : "calc(100vh - 279.2px)";
private void ToggleNavMenu(){
collapseNavMenu = !collapseNavMenu;
}
private void ManageProf() {
Nav.NavigateTo("/account/manage");
}
async void ClearSession() {
await Http.PostAsync("api/account/logout", new StringContent(""));
Nav.NavigateTo("/", true);
}
void NavToLogin() {
Nav.NavigateTo("/account/login");
}
void NavToRegister() {
Nav.NavigateTo("/account/register");
}
}
@@ -0,0 +1,132 @@
.navbar-toggler {
background-color: var(--Mistox-Dark);
color: var(--Mistox-White);
width: 100%;
height: 40px;
border: none;
font-size: 20px;
transition-duration: 0.5s;
}
.navbar-toggler:hover {
background-color: #410a04;
}
.top-row {
background-color: var(--Mistox-Offset);
height: 200px;
}
.bottom-row {
height: calc(100% - 200px);
background: linear-gradient(0deg, var(--Mistox-Dark), var(--Mistox-Offset) );
}
.navbar-brand img {
width: 200px;
height: 200px;
padding: 0 25px;
}
.oi {
width: 2rem;
font-size: 1.1rem;
color: var(--Mistox-White);
}
.nav-item {
font-size: 0.9rem;
padding-bottom: 0.5rem;
text-decoration: none;
}
.nav-item:first-of-type {
padding-top: 1rem;
}
.nav-item:last-of-type {
padding-bottom: 1rem;
}
.nav-item ::deep a {
color: var(--Mistox-White);
border-radius: 4px;
height: 3rem;
display: flex;
align-items: center;
line-height: 3rem;
transition-duration: 0.5s;
text-decoration: none;
padding-left: 20px;
}
.nav-item ::deep a.active {
background-color: rgba(255,255,255,0.25);
color: var(--Mistox-White);
}
.nav-item ::deep a:hover {
background-color: rgba(255,255,255,0.1);
color: var(--Mistox-White);
}
.nav-login {
position: relative;
bottom: 10px;
left: 10px;
width: calc(100% - 20px);
padding-top: 10px;
}
.collapse {
display: none;
}
.nav-login-button {
width: calc(50% - 2.5px);
background-color: transparent;
border-radius: 5px;
border-color: transparent;
color: var(--Mistox-White);
transition-duration: 0.5s;
padding: 5px 0;
}
.nav-login-button:hover {
background-color: #FFFFFF50;
}
@media (min-width: 641px) {
.navbar-toggler {
display: none;
}
.collapse {
/* Never collapse the sidebar for wide screens */
display: block !important;
}
.nav-login {
position: absolute;
}
}
@media (max-width: 640px){
.navbar-brand img {
position: relative !important;
padding-left: calc(50% - 80px) !important;
height: 160px;
width: 160px;
}
.top-gradient {
background: linear-gradient(0deg, var(--Mistox-Dark), var(--Mistox-Offset) );
}
.bottom-row {
background: var(--Mistox-Medium);
}
}
@@ -0,0 +1,13 @@
@if(Statics.User.ID != -1 ) {
<PageDoesntExist>
</PageDoesntExist>
}
@code {
protected override void OnInitialized() {
if (Statics.User.ID == -1 ) {
Nav.NavigateTo( "/account/login?ReturnURL=Null" );
}
}
}
@@ -0,0 +1,7 @@
<PageTitle>Not found</PageTitle>
<h3>Nothing at this page</h3>
@code {
}
@@ -0,0 +1,19 @@
<div class="title-div">
<div>
<h1>@Title</h1>
</div>
@foreach(TitleBarDiv cur in ButtonList ) {
<button type="button" @onclick="()=>{ cur.invokeClicked(); base.StateHasChanged(); }">
<img src="@cur.Image" />
<span>@cur.Name</span>
</button>
}
</div>
@code {
[Parameter]
public string Title { get; set; } = string.Empty;
[Parameter]
public TitleBarDiv[] ButtonList { get; set; } = {};
}
@@ -0,0 +1,43 @@
.title-div {
width: 100%;
height: 45px;
background-color: #16212c;
font-size: 15px;
}
.title-div div {
float: left;
}
.title-div h1 {
font-size: 30px;
padding: 5px;
padding-left: 1rem;
margin: 0;
}
.title-div img{
height: 20px;
}
.title-div span {
position: relative;
top: calc(50% - 15px);
}
.title-div button {
padding: 5px;
margin: 5px;
margin-right: 10px;
float: right;
width: 120px;
border: none;
background-color: #16212c;
color: #d7d7d7;
border-radius: 4px;
transition-duration: 0.5s;
}
.title-div button:hover {
background-color: rgba(255,255,255,0.2);
}