mirror of
https://github.com/hyzendust/hyzendust.github.io.git
synced 2026-07-01 07:22:17 +02:00
Fix: profile button after log in
This commit is contained in:
@@ -11,4 +11,4 @@ Subscribe</a></div></div></div></div><nav class="menu language"><ul class="menu_
|
||||
› <a href=/uninotes/s1/>S1</a>
|
||||
› <a href=/uninotes/s1/et-dcm1107/>ET DCM1107</a>
|
||||
› <span>Unit 12</span></nav><div class=uninotes-meta><span class=uninotes-meta__pill>S1</span>
|
||||
<span class=uninotes-meta__pill>ET DCM1107</span></div><h1>Unit 12</h1><p class=unit-choice__subtitle>Choose type:</p><div class=unit-choice__options><a class="unit-choice__card unit-choice__card--self" href=/uninotes/s1/et-dcm1107/unit12/self/><div class=unit-choice__icon><svg viewBox="0 0 24 24" width="32" height="32" fill="currentColor"><path d="M12 3 1 9l4 2.18v6L12 21l7-3.82v-6l2-1.09V17h2V9L12 3zm6.82 6L12 12.72 5.18 9 12 5.28 18.82 9zM17 15.99l-5 2.73-5-2.73v-3.72L12 15l5-2.73v3.72z"/></svg></div><div class=unit-choice__label>Self</div><div class=unit-choice__desc>Self-study notes</div></a><div class="unit-choice__card unit-choice__card--live unit-choice__card--unavailable"><div class=unit-choice__icon><svg viewBox="0 0 24 24" width="32" height="32" fill="currentColor"><path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55.0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55.0 1-.45 1-1v-3.5l4 4v-11l-4 4z"/></svg></div><div class=unit-choice__label>Live</div><div class=unit-choice__desc>Not available</div></div></div></main><footer class=footer><p class=footer__copyright-notice>© <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>ET DCM1107</span></div><h1>Unit 12</h1><p class=unit-choice__subtitle>Choose type:</p><div class=unit-choice__options><a class="unit-choice__card unit-choice__card--self" href=/uninotes/s1/et-dcm1107/unit12/self/><div class=unit-choice__icon><svg viewBox="0 0 24 24" width="32" height="32" fill="currentColor"><path d="M12 3 1 9l4 2.18v6L12 21l7-3.82v-6l2-1.09V17h2V9L12 3zm6.82 6L12 12.72 5.18 9 12 5.28 18.82 9zM17 15.99l-5 2.73-5-2.73v-3.72L12 15l5-2.73v3.72z"/></svg></div><div class=unit-choice__label>Self</div><div class=unit-choice__desc>Self-study notes</div></a><div class="unit-choice__card unit-choice__card--live unit-choice__card--unavailable"><div class=unit-choice__icon><svg viewBox="0 0 24 24" width="32" height="32" fill="currentColor"><path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55.0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55.0 1-.45 1-1v-3.5l4 4v-11l-4 4z"/></svg></div><div class=unit-choice__label>Live</div><div class=unit-choice__desc>Not available</div></div></div></main><footer class=footer><p class=footer__copyright-notice>© <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>
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user