diff --git a/LUX.UI/LUX.UI/Components/App.razor b/LUX.UI/LUX.UI/Components/App.razor index d18ce6df..19f38820 100644 --- a/LUX.UI/LUX.UI/Components/App.razor +++ b/LUX.UI/LUX.UI/Components/App.razor @@ -4,21 +4,46 @@ - - @* *@ + @* *@ - - - - + + + + + @* *@ + + @* *@ + + @* *@ + - + @* *@ + @* *@ + + + @* + *@ + diff --git a/LUX.UI/LUX.UI/Components/Compo/CmpFooter.razor b/LUX.UI/LUX.UI/Components/Compo/CmpFooter.razor new file mode 100644 index 00000000..dca7231b --- /dev/null +++ b/LUX.UI/LUX.UI/Components/Compo/CmpFooter.razor @@ -0,0 +1,10 @@ +
+
+ LUX.UI Manager v.@version +
+
+ @adesso + Egalware +
+
+ diff --git a/LUX.UI/LUX.UI/Components/Compo/CmpFooter.razor.cs b/LUX.UI/LUX.UI/Components/Compo/CmpFooter.razor.cs new file mode 100644 index 00000000..0029a4bf --- /dev/null +++ b/LUX.UI/LUX.UI/Components/Compo/CmpFooter.razor.cs @@ -0,0 +1,71 @@ +namespace LUX.UI.Components.Compo +{ + public partial class CmpFooter : IDisposable + { + #region Public Methods + + public void Dispose() + { + if (aTimer != null) + { + aTimer.Elapsed -= ElapsedTimer; + aTimer.Stop(); + aTimer.Dispose(); + } + } + + #endregion Public Methods + + #region Protected Fields + + protected DateTime adesso = DateTime.Now; + + #endregion Protected Fields + + #region Protected Methods + + protected void ElapsedTimer(object? source, System.Timers.ElapsedEventArgs e) + { + var pUpd = Task.Run(async () => + { + adesso = DateTime.Now; + await InvokeAsync(StateHasChanged); + }); + pUpd.Wait(); + } + + protected override void OnInitialized() + { + var rawVers = typeof(Program).Assembly.GetName().Version; + version = rawVers != null ? rawVers : new Version("0.0.0.0"); + StartTimer(); + } + + protected void StartTimer() + { + if (aTimer != null) + { + aTimer.Stop(); + aTimer.Dispose(); + } +#if DEBUG + int tOutPeriod = 1000; +#else + int tOutPeriod = 10000; +#endif + aTimer = new System.Timers.Timer(tOutPeriod); + aTimer.Elapsed += ElapsedTimer; + aTimer.Enabled = true; + aTimer.Start(); + } + + #endregion Protected Methods + + #region Private Fields + + private System.Timers.Timer aTimer = null!; + private Version? version = null!; + + #endregion Private Fields + } +} \ No newline at end of file diff --git a/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor b/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor index 5a24bb13..1b8e6cfb 100644 --- a/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor +++ b/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor @@ -1,8 +1,8 @@ @inherits LayoutComponentBase
- @@ -21,3 +25,4 @@ Reload 🗙
+ diff --git a/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.cs b/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.cs new file mode 100644 index 00000000..7dd1a6c8 --- /dev/null +++ b/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.cs @@ -0,0 +1,27 @@ +namespace LUX.UI.Components.Layout +{ + public partial class MainLayout + { + #region Protected Properties + + protected string sideClass { get; set; } = "sidebar"; + + #endregion Protected Properties + + #region Protected Methods + + protected void UpdateNavDisplay() + { + navLarge = !navLarge; + sideClass = navLarge ? "sidebar" : "sidebarSmall"; + } + + #endregion Protected Methods + + #region Private Fields + + private bool navLarge = true; + + #endregion Private Fields + } +} \ No newline at end of file diff --git a/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.css b/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.css index 038baf17..2ec3bdbb 100644 --- a/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.css +++ b/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.css @@ -1,96 +1,78 @@ -.page { - position: relative; - display: flex; - flex-direction: column; +.page { + position: relative; + display: flex; + flex-direction: column; } - main { - flex: 1; + flex: 1; } - -.sidebar { - background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); +.sidebar, +.sidebarSmall { + /*background-image: linear-gradient(180deg, rgb(5, 39, 103) 20%, #3aa6ff 90%);*/ + background: -webkit-linear-gradient(to bottom, #053787, #00A5FF); + /* Chrome 10-25, Safari 5.1-6 */ + background: linear-gradient(to bottom, #053787, #00A5FF); + /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ } - .top-row { - background-color: #f7f7f7; - border-bottom: 1px solid #d6d5d5; - justify-content: flex-end; - height: 3.5rem; - display: flex; - align-items: center; + background-color: #f7f7f7; + border-bottom: 1px solid #d6d5d5; + /*justify-content: flex-end;*/ + height: 3.5rem; + display: flex; + align-items: center; +} +.top-row ::deep a, +.top-row .btn-link { + white-space: nowrap; + margin-left: 1.5rem; +} +.top-row a:first-child { + overflow: hidden; + text-overflow: ellipsis; +} +.bottom-row { + color: #dedede; + background-color: #000000; + height: 1.6rem; + 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 { - 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; - } - - .top-row { - position: sticky; - top: 0; - z-index: 1; - } - - .top-row.auth ::deep a:first-child { - flex: 1; - text-align: right; - width: 0; - } - - .top-row, article { - padding-left: 2rem !important; - padding-right: 1.5rem !important; - } -} - -#blazor-error-ui { - background: lightyellow; - bottom: 0; - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); + .top-row:not(.auth) { display: none; - left: 0; - padding: 0.6rem 1.25rem 0.7rem 1.25rem; - position: fixed; - width: 100%; - z-index: 1000; + } + .top-row.auth { + justify-content: space-between; + } + .top-row a, + .top-row .btn-link { + margin-left: 0; + } } - - #blazor-error-ui .dismiss { - cursor: pointer; - position: absolute; - right: 0.75rem; - top: 0.5rem; - } +@media (min-width: 641px) { + .page { + flex-direction: row; + } + .sidebar { + width: 13.5rem; + height: 100vh; + position: sticky; + top: 0; + } + .sidebarSmall { + width: 4.5rem; + height: 100vh; + position: sticky; + top: 0; + } + .top-row { + position: sticky; + top: 0; + z-index: 1; + } + .top-row, + article { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } +} \ No newline at end of file diff --git a/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.less b/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.less new file mode 100644 index 00000000..29ad093e --- /dev/null +++ b/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.less @@ -0,0 +1,87 @@ +.page { + position: relative; + display: flex; + flex-direction: column; +} + +main { + flex: 1; +} + +.sidebar, +.sidebarSmall { + /*background-image: linear-gradient(180deg, rgb(5, 39, 103) 20%, #3aa6ff 90%);*/ + background: -webkit-linear-gradient(to bottom, #053787, #00A5FF); /* Chrome 10-25, Safari 5.1-6 */ + background: linear-gradient(to bottom, #053787, #00A5FF); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ +} + +.top-row { + background-color: #f7f7f7; + border-bottom: 1px solid #d6d5d5; + /*justify-content: flex-end;*/ + height: 3.5rem; + display: flex; + align-items: center; +} + +.top-row ::deep a, .top-row .btn-link { + white-space: nowrap; + margin-left: 1.5rem; +} + +.top-row a:first-child { + overflow: hidden; + text-overflow: ellipsis; +} + +.bottom-row { + color: #dedede; + background-color: #000000; + height: 1.6rem; + align-items: center; +} + +@media (max-width: 640.98px) { + .top-row:not(.auth) { + display: none; + } + + .top-row.auth { + justify-content: space-between; + } + + .top-row a, .top-row .btn-link { + margin-left: 0; + } +} + +@media (min-width: 641px) { + .page { + flex-direction: row; + } + + .sidebar { + width: 13.5rem; + height: 100vh; + position: sticky; + top: 0; + } + + .sidebarSmall { + width: 4.5rem; + height: 100vh; + position: sticky; + top: 0; + } + + .top-row { + position: sticky; + top: 0; + z-index: 1; + } + + .top-row, article { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } +} diff --git a/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.min.css b/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.min.css new file mode 100644 index 00000000..1576ddc7 --- /dev/null +++ b/LUX.UI/LUX.UI/Components/Layout/MainLayout.razor.min.css @@ -0,0 +1 @@ +.page{position:relative;display:flex;flex-direction:column;}main{flex:1;}.sidebar,.sidebarSmall{background:-webkit-linear-gradient(to bottom,#053787,#00a5ff);background:linear-gradient(to bottom,#053787,#00a5ff);}.top-row{background-color:#f7f7f7;border-bottom:1px solid #d6d5d5;height:3.5rem;display:flex;align-items:center;}.top-row ::deep a,.top-row .btn-link{white-space:nowrap;margin-left:1.5rem;}.top-row a:first-child{overflow:hidden;text-overflow:ellipsis;}.bottom-row{color:#dedede;background-color:#000;height:1.6rem;align-items:center;}@media(max-width:640.98px){.top-row:not(.auth){display:none;}.top-row.auth{justify-content:space-between;}.top-row a,.top-row .btn-link{margin-left:0;}}@media(min-width:641px){.page{flex-direction:row;}.sidebar{width:13.5rem;height:100vh;position:sticky;top:0;}.sidebarSmall{width:4.5rem;height:100vh;position:sticky;top:0;}.top-row{position:sticky;top:0;z-index:1;}.top-row,article{padding-left:.5rem!important;padding-right:.5rem!important;}} \ No newline at end of file diff --git a/LUX.UI/LUX.UI/Components/Layout/NavMenu.razor b/LUX.UI/LUX.UI/Components/Layout/NavMenu.razor index 8e82adbf..efe3b299 100644 --- a/LUX.UI/LUX.UI/Components/Layout/NavMenu.razor +++ b/LUX.UI/LUX.UI/Components/Layout/NavMenu.razor @@ -3,36 +3,52 @@ @inject NavigationManager NavigationManager