diff --git a/README.md b/README.md index cf3169ae34748336ada8d079805652fa956a4442..1046acbef70ded50b1ebe770fc334c0dccc00a2e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ <br> -<br> <div align="center"> <img src="https://github.com/trinity-labs/trinity-skin/assets/45216746/f8b4b03a-1371-4abb-bf4a-fd9e2a1c7446" width="30%"> </div> diff --git a/app/acf-util/welcome-html.lsp b/app/acf-util/welcome-html.lsp index a304b54f14bea7b2a6fee00b56fb8accdda88415..769f7df5e293694805e479824e5d148ade5f284b 100644 --- a/app/acf-util/welcome-html.lsp +++ b/app/acf-util/welcome-html.lsp @@ -383,7 +383,7 @@ $(function memChart() { <div id="chartNetwork"> </div> <canvas id="networkChart" class="data-chart block-chart"></canvas> </div> -<div id="demo"></div> +<!--<div id="demo"></div>--> <!-- Dashboard Main Block - NETWORK CHART.JS --> <script type="application/javascript" src="https://cdn.jsdelivr.net/npm/luxon@latest"></script> @@ -472,8 +472,8 @@ $(function networkChart() { chart.data.datasets.forEach(dataset => { dataset.data.push({ x: Date.now(), - y: setInterval(JSON.stringify(lastdata.value.eth0), 1000) - }); + y: 0// setInterval(JSON.stringify(lastdata.value.eth0), 1000) + }) }) } } diff --git a/app/template-html.lsp b/app/template-html.lsp index 58208294ed4ed86dbe00c4c55213875caaf6accd..64838872dd9f604528ab90b849ecee9af9a185d0 100644 --- a/app/template-html.lsp +++ b/app/template-html.lsp @@ -85,28 +85,53 @@ end }); $(document).ready(function() { - document.querySelector('input[type="text"]').setAttribute('placeholder', 'test'); - document.querySelector('#userid input').setAttribute('required','required'); - document.querySelector('#password input').setAttribute('required','required'); - document.querySelector('#userid input').setAttribute('placeholder','🔒 User ID'); - document.querySelector('#password input').setAttribute('placeholder','🔑 Password'); - document.querySelector('#userid input').setAttribute('autocomplete','username'); - document.querySelector('#password input').setAttribute('autocomplete','current-password'); - }); + // Login page input placeholder + if(window.location.href === "https://" + window.location.hostname + "<%= html.html_escape(pageinfo.wwwprefix).."/cgi-bin/acf/acf-util/logon/logon" %>"){ + document.querySelector('#userid input').setAttribute('required','required'); + document.querySelector('#password input').setAttribute('required','required'); + document.querySelector('#userid input').setAttribute('placeholder','🔒 User ID'); + document.querySelector('#password input').setAttribute('placeholder','🔑 Password'); + document.querySelector('#userid input').setAttribute('autocomplete','username'); + document.querySelector('#password input').setAttribute('autocomplete','current-password'); + }; + // Save collapse menu state + var updated = window.localStorage.getItem('nav', updated); + + if (window.localStorage.getItem('nav') === 'active') { + nav.style.display = "block"; + content.style.width = "80%"; + } else { + content.style.width = "100%"; + + }; - function toogleMenu() { - var nav = document.getElementById("nav"); - var content = document.getElementById("content"); - var icon = document.getElementById("toogle-link"); - if (nav.style.display === "block") { - nav.style.display = "none"; - content.style.width = "100%"; - icon.addClass = "active"; - } else { - nav.style.display = "block"; - content.style.width = "80%"; - } + if (updated === '') { + window.localStorage.setItem('nav', 'active'); + $("#nav").toggleClass("active"); + } else { + window.localStorage.getItem('nav', updated); + $("#nav").toggleClass(updated); + } + }); + + // Toogle collapse menu + function toogleMenu() { + var updated = window.localStorage.getItem('nav', updated); + $("#nav").toggleClass("active"); + if (window.localStorage.getItem('nav') === 'active') { + updated = 'not_active'; + nav.style.display = "none"; + content.style.width = "100%"; + $("#nav").toggleClass("not_active"); + } else { + updated = 'active'; + $("#nav").removeClass("not_active"); + nav.style.display = "block"; + content.style.width = "80%"; + } + window.localStorage.setItem('nav', updated); + }; </script> </head> <% end -- pageinfo.skinned %> @@ -155,7 +180,7 @@ end </header> <!-- header --> -<div id="nav" style="display: block;"> +<div id="nav" style="display: none;"> <% local class local tabs diff --git a/css/dashboard-main/content.css b/css/dashboard-main/content.css index 115cdc17454e07be3f6c74f4685845d70dea03ab..08ea58f6d1513fb57bc9644d7f0a1cfde76d0a65 100644 --- a/css/dashboard-main/content.css +++ b/css/dashboard-main/content.css @@ -9,7 +9,6 @@ #content { float: right; - width: 80%; padding: 0.25rem 0 5rem 0; } diff --git a/css/dashboard-main/nav.css b/css/dashboard-main/nav.css index ed40a7509a799212310dc86d1262acf02959dc11..a331a8a8c70aac464f67a138dd9586d36b7b0821 100644 --- a/css/dashboard-main/nav.css +++ b/css/dashboard-main/nav.css @@ -18,6 +18,8 @@ overflow-x: hidden; } +/* Colapse Menu */ + #nav ul { display:block; }