Fix: profile button after log in

This commit is contained in:
hyzen
2026-06-04 14:13:48 +05:30
parent 9a68304110
commit 19c5c79d8d
66 changed files with 403 additions and 62 deletions

View File

@@ -13,4 +13,4 @@ Subscribe</a></div></div></div></div><nav class="menu language"><ul class="menu_
<a href=/uninotes/s1/pbm-dcm1110/unit1/>Unit 1</a>
<span>Live</span></nav><div class=uninotes-meta><span class=uninotes-meta__pill>S1</span>
<span class=uninotes-meta__pill>PBM DCM1110</span>
<span class="uninotes-meta__pill uninotes-meta__pill--live">Live</span></div><h1>Unit 1</h1><details class=toc><summary class=toc__summary>Table of Contents</summary><nav id=TableOfContents><ul><li><ul><li><a href=#april-12-2026><em><strong>April 12, 2026</strong></em></a></li></ul></li><li><a href=#introduction>Introduction</a></li></ul></nav></details><h3 class=heading id=april-12-2026><em><strong>April 12, 2026</strong></em><span class=heading__anchor> <a href=#april-12-2026>#</a></span></h3><h2 class=heading id=introduction>Introduction<span class=heading__anchor> <a href=#introduction>#</a></span></h2><p>Management is a process where is an environment is developed to achieve the predefined goals and objectives through planning, organising, directing and controlling.</p><nav class=page-nav><a class=page-nav__next-link href=/uninotes/s1/pbm-dcm1110/unit2/>Unit 2 →</a></nav></main><footer class=footer><p class=footer__copyright-notice>&copy; <a href=https://freedoms4.org>freedoms4.org</a> <a href=/changelog/>Changelog</a></p><p class=footer__theme-info>Built with <a href=https://gohugo.io>Hugo</a> and based on <a href=https://github.com/CyrusYip/hugo-theme-yue>Yue</a> theme</p></footer><script>(function(){var e=document.getElementById("theme-toggle");if(!e)return;function t(){var e=localStorage.getItem("theme");return e?e:window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}function n(e){document.documentElement.setAttribute("data-theme",e),localStorage.setItem("theme",e)}n(t()),e.addEventListener("click",function(){var e=document.documentElement.getAttribute("data-theme")||t();n(e==="dark"?"light":"dark")})})()</script><script>(function(){var e=document.getElementById("mobile-menu-check");if(!e)return;document.addEventListener("click",function(t){if(!e.checked)return;var n=e.closest(".brand__mobile-menu");n&&!n.contains(t.target)&&(e.checked=!1)})})()</script></body></html>
<span class="uninotes-meta__pill uninotes-meta__pill--live">Live</span></div><h1>Unit 1</h1><details class=toc><summary class=toc__summary>Table of Contents</summary><nav id=TableOfContents><ul><li><ul><li><a href=#april-12-2026><em><strong>April 12, 2026</strong></em></a></li></ul></li><li><a href=#introduction>Introduction</a></li></ul></nav></details><h3 class=heading id=april-12-2026><em><strong>April 12, 2026</strong></em><span class=heading__anchor> <a href=#april-12-2026>#</a></span></h3><h2 class=heading id=introduction>Introduction<span class=heading__anchor> <a href=#introduction>#</a></span></h2><p>Management is a process where is an environment is developed to achieve the predefined goals and objectives through planning, organising, directing and controlling.</p><nav class=page-nav><a class=page-nav__next-link href=/uninotes/s1/pbm-dcm1110/unit2/>Unit 2 →</a></nav></main><footer class=footer><p class=footer__copyright-notice>&copy; <a href=https://freedoms4.org>freedoms4.org</a> <a href=/changelog/>Changelog</a></p><p class=footer__theme-info>Built with <a href=https://gohugo.io>Hugo</a> and based on <a href=https://github.com/CyrusYip/hugo-theme-yue>Yue</a> theme</p></footer><script>(function(){var e=document.getElementById("theme-toggle");if(!e)return;function t(){var e=localStorage.getItem("theme");return e?e:window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}function n(e){document.documentElement.setAttribute("data-theme",e),localStorage.setItem("theme",e)}n(t()),e.addEventListener("click",function(){var e=document.documentElement.getAttribute("data-theme")||t();n(e==="dark"?"light":"dark")})})()</script><script>(function(){var n="https://backend.freedoms4.org/auth.php",e=localStorage.getItem("f4_username");if(!e)return;function s(e){var n,s,o,i,a,r,l,c=document.querySelector(".brand__auth--desktop");c&&(c.classList.add("brand__auth--loggedin"),n=document.createElement("div"),n.className="brand__auth-user",s=document.createElement("button"),s.className="brand__auth-user-btn",s.setAttribute("aria-label","Account menu"),l=document.createElement("span"),l.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="12" height="12" fill="currentColor"><path d="M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z"/></svg>',s.appendChild(l.firstChild),s.appendChild(document.createTextNode(" "+e)),r=document.createElement("div"),r.className="brand__auth-user-dropdown",i=document.createElement("button"),i.className="brand__auth-user-logout",i.textContent="Log Out",i.addEventListener("click",t),r.appendChild(i),n.appendChild(s),n.appendChild(r),c.appendChild(n),s.addEventListener("click",function(e){e.stopPropagation(),n.classList.toggle("is-open")}),document.addEventListener("click",function(){n.classList.remove("is-open")})),a=document.querySelector(".brand__mobile-links"),a&&(a.querySelectorAll("a.mobile-link").forEach(function(e){(e.href.indexOf("/login/")!==-1||e.href.indexOf("/signup/")!==-1)&&e.remove()}),o=document.createElement("button"),o.className="mobile-link mobile-link--logout",o.textContent="Log Out ("+e+")",o.style.cssText="background:none;border:none;cursor:pointer;font-family:inherit;font-size:inherit;padding:0;text-align:left;width:100%;",o.addEventListener("click",t),a.insertBefore(o,a.firstChild))}function t(){fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({action:"logout"})}).finally(function(){localStorage.removeItem("f4_username"),window.location.href="/"})}s(e)})()</script><script>(function(){var e=document.getElementById("mobile-menu-check");if(!e)return;document.addEventListener("click",function(t){if(!e.checked)return;var n=e.closest(".brand__mobile-menu");n&&!n.contains(t.target)&&(e.checked=!1)})})()</script></body></html>