Files
hyzendust.github.io/docs/login/index.html

15 lines
13 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html><html class=html lang=en-us dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width"><title>Login | Freedoms4</title><link rel=stylesheet href=/css/style.min.34d0accb85f8ec23ceee8c29eef5907823b531d8acb9e6bdf45a3b37ad028d30.css integrity="sha256-NNCsy4X47CPO7owp7vWQeCO1Mdisuea99Fo7N60CjTA=" crossorigin=anonymous><link rel=icon href=/favicon.ico><meta name=description content="Login to Freedoms4."><meta property="og:url" content="https://freedoms4.org/login/"><meta property="og:site_name" content="Freedoms4"><meta property="og:title" content="Login"><meta property="og:description" content="Login to Freedoms4."><meta property="og:locale" content="en_us"><meta property="og:type" content="article"><meta itemprop=name content="Login"><meta itemprop=description content="Login to Freedoms4."><link rel=stylesheet href=/css/custom.css><script>(function(){var e=localStorage.getItem("theme");e&&document.documentElement.setAttribute("data-theme",e),localStorage.getItem("f4_username")==="hyzen"&&document.documentElement.classList.add("hyzen-user")})()</script><script async src=https://plausible.freedoms4.org/js/pa-5BKl0z0RLzwrclKq4y-qk.js></script><script>(window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(e){plausible.o=e||{}}),plausible.init()</script></head><body class=body><header class=header><div class=brand><img src=/logo.png alt="Freedoms4 logo"><h1>Freedoms4</h1><div class=brand__actions><button class=theme-toggle id=theme-toggle aria-label="Toggle theme" title="Toggle dark/light mode">
<svg class="theme-toggle__sun" viewBox="0 0 24 24" width="16" height="16" fill="currentColor"><path d="M12 7c-2.76.0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55.0 1-.45 1-1s-.45-1-1-1H2c-.55.0-1 .45-1 1s.45 1 1 1zm18 0h2c.55.0 1-.45 1-1s-.45-1-1-1h-2c-.55.0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58c-.39-.39-1.03-.39-1.41.0-.39.39-.39 1.03.0 1.41l1.06 1.06c.39.39 1.03.39 1.41.0s.39-1.03.0-1.41L5.99 4.58zm12.37 12.37c-.39-.39-1.03-.39-1.41.0-.39.39-.39 1.03.0 1.41l1.06 1.06c.39.39 1.03.39 1.41.0.39-.39.39-1.03.0-1.41l-1.06-1.06zm1.06-12.37-1.06 1.06c-.39.39-.39 1.03.0 1.41s1.03.39 1.41.0l1.06-1.06c.39-.39.39-1.03.0-1.41s-1.03-.39-1.41.0zM7.05 18.36l-1.06 1.06c-.39.39-.39 1.03.0 1.41s1.03.39 1.41.0l1.06-1.06c.39-.39.39-1.03.0-1.41s-1.03-.39-1.41.0z"/></svg>
<svg class="theme-toggle__moon" viewBox="0 0 24 24" width="16" height="16" fill="currentColor"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg></button><div class=brand__auth><input type=checkbox id=auth-dropdown class=brand__auth-check>
<label class=brand__auth-toggle for=auth-dropdown tabindex=0 aria-label="Account options"><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></label><div class=brand__auth-links><a href=/login/ class="auth-link auth-link--login">Login</a>
<a href=/signup/ class="auth-link auth-link--signup">Sign Up</a></div></div><div class=rss-subscribe><button class=rss-subscribe__btn aria-label="Subscribe via RSS" title="Subscribe via RSS">
<svg viewBox="0 0 24 24" width="10" height="10" fill="currentColor" aria-hidden="true"><path d="M6.18 15.64a2.18 2.18.0 012.18 2.18c0 1.19-.98 2.18-2.18 2.18C4.98 20 4 19.01 4 17.82a2.18 2.18.0 012.18-2.18M4 4.44A15.56 15.56.0 0119.56 20h-2.83A12.73 12.73.0 004 7.27V4.44m0 5.66a9.9 9.9.0 019.9 9.9h-2.83A7.07 7.07.0 004 12.93V10.1z"/></svg>
<span>Subscribe</span></button><div class=rss-subscribe__dropdown><button class=rss-subscribe__item data-rss-url=https://freedoms4.org/index.xml>All updates</button>
<button class=rss-subscribe__item data-rss-url=https://freedoms4.org/blog/index.xml>Blog posts</button></div></div></div></div><nav class="menu language"><ul class="menu__list language__list"><li class=menu__item><a class=menu__link href=/>Home</a></li><li class=menu__item><a class=menu__link href=/blog/>Blog</a></li><li class=menu__item><a class=menu__link href=/services/>Services</a></li><li class=menu__item><a class=menu__link href=/uninotes/>UniNotes</a></li><li class=menu__item><a class=menu__link href=/contact/>Contact</a></li></ul></nav></header><main class=main><div class=auth-page><div class=auth-card><h1 class=auth-page__title>Login</h1><div id=auth-message class=auth-message aria-live=polite></div><form id=login-form class=auth-form novalidate><div class=auth-form__input-wrap><div class=auth-form__group><label class=auth-form__label for=login-username>Username</label>
<input class=auth-form__input type=text id=login-username name=username autocomplete=username required></div><div class=auth-form__group><label class=auth-form__label for=login-password>Password</label>
<input class=auth-form__input type=password id=login-password name=password autocomplete=current-password required>
<button type=button class=auth-form__eye aria-label="Toggle password visibility" tabindex=-1>
<svg class="eye-show" viewBox="0 0 24 24" width="16" height="16" fill="currentColor"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76.0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66.0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"/></svg>
<svg class="eye-hide" viewBox="0 0 24 24" width="16" height="16" fill="currentColor" style="display:none"><path d="M12 7c2.76.0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4.0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55.0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65.0 1.66 1.34 3 3 3 .22.0.44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76.0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"/></svg></button></div></div><button type=submit class=auth-form__submit id=login-submit>
<span class=auth-form__submit-text>Log In</span>
<span class=auth-form__submit-loader style=display:none><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" class="spin"><path d="M12 4V1L8 5l4 4V6c3.31.0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31.0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"/></svg></span></button></form><p class=auth-card__footer id=login-footer>Don't have an account? <a href=/signup/ class=auth-card__link>Sign up</a></p></div></div><script>(function(){var e,t,n,s,i,a="https://backend.freedoms4.org/auth.php";if(localStorage.getItem("f4_username")){document.getElementById("auth-message").textContent="You are already logged in!",document.getElementById("auth-message").className="auth-message auth-message--success is-visible",document.getElementById("login-form").style.display="none",document.getElementById("login-footer").style.display="none";return}(function(){var e,n,s=new URLSearchParams(window.location.search),t=s.get("next");if(t&&t.startsWith("/"))sessionStorage.setItem("f4_login_next",t);else if(!sessionStorage.getItem("f4_login_next")&&document.referrer)try{n=new URL(document.referrer),n.hostname===window.location.hostname&&(e=n.pathname,e!=="/login/"&&e!=="/signup/"&&sessionStorage.setItem("f4_login_next",e))}catch{}})(),i=document.getElementById("login-form"),n=document.getElementById("auth-message"),e=document.getElementById("login-submit"),s=i.querySelector(".auth-form__eye"),t=document.getElementById("login-password"),t=document.getElementById("login-password"),s.addEventListener("click",function(){var e=t.type==="text";t.type=e?"password":"text",s.querySelector(".eye-show").style.display=e?"":"none",s.querySelector(".eye-hide").style.display=e?"none":""});function o(e,t){n.textContent=e,n.className="auth-message auth-message--"+t+" is-visible"}i.addEventListener("submit",function(s){s.preventDefault(),n.className="auth-message";var i=document.getElementById("login-username").value.trim(),r=t.value;if(!i||!r){o("Please fill in all fields.","error");return}e.disabled=!0,e.querySelector(".auth-form__submit-text").style.display="none",e.querySelector(".auth-form__submit-loader").style.display="inline-flex",fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({action:"login",username:i,password:r})}).then(function(e){return e.json()}).then(function(e){e.success?(o("Logged in successfully! Redirecting…","success"),localStorage.setItem("f4_username",i),localStorage.setItem("f4_login_time",Date.now()),setTimeout(function(){var t=sessionStorage.getItem("f4_login_next");sessionStorage.removeItem("f4_login_next"),window.location.href=t&&t.startsWith("/")?t:e.redirect||"/"},1e3)):o(e.message||"Login failed. Please try again.","error")}).catch(function(){o("Network error. Please try again.","error")}).finally(function(){e.disabled=!1,e.querySelector(".auth-form__submit-text").style.display="",e.querySelector(".auth-form__submit-loader").style.display="none"})})})()</script></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(){document.querySelectorAll(".menu__item").forEach(function(e){var t=e.querySelector("a");t&&t.getAttribute("href")==="/uninotes/"&&e.classList.add("menu__item--uninotes")})})()</script><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 t="https://backend.freedoms4.org/auth.php",e=localStorage.getItem("f4_username");if(!e)return;function n(e){var t,n,o,a,r,i=document.querySelector(".brand__auth");i&&!i.querySelector(".brand__auth-user")&&(i.classList.add("brand__auth--loggedin"),t=document.createElement("div"),t.className="brand__auth-user",n=document.createElement("button"),n.className="brand__auth-user-btn",n.setAttribute("aria-label","Account menu"),r=document.createElement("span"),r.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>',n.appendChild(r.firstChild),n.appendChild(document.createTextNode(" "+e)),a=document.createElement("div"),a.className="brand__auth-user-dropdown",o=document.createElement("button"),o.className="brand__auth-user-logout",o.textContent="Log Out",o.addEventListener("click",s),a.appendChild(o),t.appendChild(n),t.appendChild(a),i.appendChild(t),n.addEventListener("click",function(e){e.stopPropagation(),t.classList.toggle("is-open")}),document.addEventListener("click",function(){t.classList.remove("is-open")}))}function s(){fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({action:"logout"})}).finally(function(){localStorage.removeItem("f4_username"),localStorage.removeItem("f4_login_time"),localStorage.removeItem("f4_session_fails"),window.location.reload()})}n(e)})()</script><script>(function(){var t,e=document.querySelector(".rss-subscribe");if(!e)return;t=e.querySelector(".rss-subscribe__btn"),t.addEventListener("click",function(t){t.stopPropagation(),e.classList.toggle("is-open")}),document.addEventListener("click",function(t){e.contains(t.target)||e.classList.remove("is-open")}),e.querySelectorAll(".rss-subscribe__item").forEach(function(t){t.addEventListener("click",function(n){n.stopPropagation();var s,o=t.getAttribute("data-rss-url"),a=t.textContent;function i(){t.textContent="Copied!",setTimeout(function(){t.textContent=a,e.classList.remove("is-open")},1200)}try{s=document.createElement("textarea"),s.value=o,s.style.cssText="position:fixed;top:0;left:0;opacity:0;pointer-events:none;",document.body.appendChild(s),s.focus(),s.select(),document.execCommand("copy"),document.body.removeChild(s),i()}catch{navigator.clipboard&&navigator.clipboard.writeText(o).then(i).catch(function(){t.textContent=o})}})})})()</script></body></html>