mirror of
https://github.com/hyzendust/hyzendust.github.io.git
synced 2026-07-01 07:22:17 +02:00
33 lines
17 KiB
HTML
33 lines
17 KiB
HTML
<!doctype html><html class=html lang=en-us dir=ltr><head><meta charset=utf-8><meta name=viewport content="width=device-width"><title>Sign Up | 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="Sign up for Freedoms4."><meta property="og:url" content="https://freedoms4.org/signup/"><meta property="og:site_name" content="Freedoms4"><meta property="og:title" content="Sign Up"><meta property="og:description" content="Sign up for Freedoms4."><meta property="og:locale" content="en_us"><meta property="og:type" content="article"><meta itemprop=name content="Sign Up"><meta itemprop=description content="Sign up for 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>Sign Up</h1><div id=auth-message class="auth-message auth-message--info is-visible" aria-live=polite>Signing up is giving you access to the following services: <a href=/services/email/>Email</a>, <a href=/services/xmpp/>XMPP</a></div><form id=signup-form class=auth-form novalidate><div class=auth-form__input-wrap><div class=auth-form__group><label class=auth-form__label for=signup-username>Username</label>
|
||
<input class=auth-form__input type=text id=signup-username name=username autocomplete=username required minlength=3 maxlength=32 pattern=[a-zA-Z0-9_\-]+>
|
||
<span class=auth-form__hint>(3-32 characters; letters, numbers, _ and - only)</span></div><div class=auth-form__group><label class=auth-form__label for=signup-email>Email</label>
|
||
<input class=auth-form__input type=email id=signup-email name=email autocomplete=email required></div><div class=auth-form__group><label class=auth-form__label for=signup-password>Password</label>
|
||
<input class=auth-form__input type=password id=signup-password name=password autocomplete=new-password required minlength=8>
|
||
<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>
|
||
<span class=auth-form__hint>(at least 8 characters)</span></div><div class=auth-form__group><label class=auth-form__label for=signup-confirm>Confirm Password</label>
|
||
<input class=auth-form__input type=password id=signup-confirm name=confirm_password autocomplete=new-password required></div></div><div class="auth-form__group auth-form__group--checkbox"><label class=auth-form__checkbox-label for=signup-terms><input class=auth-form__checkbox type=checkbox id=signup-terms name=terms required>
|
||
<span>I agree to the
|
||
<a href=/terms/ target=_blank rel=noopener>Terms and Conditions</a>
|
||
and
|
||
<a href=/privacy/ target=_blank rel=noopener>Privacy Policy</a>.</span></label></div><button type=submit class=auth-form__submit id=signup-submit>
|
||
<span class=auth-form__submit-text>Send verification code</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><div id=otp-panel style=display:none><p class=otp-panel__hint>A 6-digit code was sent to <strong id=otp-email-display></strong>.<br>Enter it below. The code will expire in 10 minutes.</p><div class=auth-form style=margin-top:1rem><div class=auth-form__group><label class=auth-form__label for=otp-input>Verification code</label>
|
||
<input class="auth-form__input otp-panel__input" type=text id=otp-input inputmode=numeric maxlength=6 pattern=\d{6} placeholder=000000 autocomplete=one-time-code></div><button type=button class=auth-form__submit id=otp-submit>
|
||
<span class=auth-form__submit-text>Verify & create account</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><p class=otp-panel__resend>Didn't get it?
|
||
<button type=button id=otp-resend class=otp-panel__resend-btn>
|
||
Resend code
|
||
</button>
|
||
<span id=otp-resend-timer style=display:none></span></p></div></div><p class=auth-card__footer id=signup-footer>Already have an account? <a href=/login/ class=auth-card__link>Log in</a></p></div></div><script>(function(){var t,n,s,o,i,r,c,l,d,u,h,p,g,v,b,j,y,_,f="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("signup-form").style.display="none",document.getElementById("signup-footer").style.display="none";return}if(o=new URLSearchParams(window.location.search).get("next")||sessionStorage.getItem("f4_login_next")||"",!o&&document.referrer)try{g=new URL(document.referrer),g.hostname===window.location.hostname&&(r=g.pathname,r!=="/login/"&&r!=="/signup/"&&(o=r,sessionStorage.setItem("f4_login_next",r)))}catch{}t={username:"",email:"",password:""},n=document.getElementById("auth-message"),d=document.getElementById("signup-form"),p=document.getElementById("signup-submit"),_=document.getElementById("otp-panel"),b=document.getElementById("otp-email-display"),c=document.getElementById("otp-input"),l=document.getElementById("otp-submit"),s=document.getElementById("otp-resend"),i=document.getElementById("otp-resend-timer"),h=document.getElementById("signup-password"),u=d.querySelector(".auth-form__eye"),j=n.innerHTML,y=n.className,n.style.minHeight=n.offsetHeight+"px";function e(e,t){n.textContent=e,n.className="auth-message auth-message--"+t+" is-visible"}function m(){n.innerHTML=j,n.className=y}function a(e,t){e.disabled=t,e.querySelector(".auth-form__submit-text").style.display=t?"none":"",e.querySelector(".auth-form__submit-loader").style.display=t?"inline-flex":"none"}u.addEventListener("click",function(){var e=h.type==="text";h.type=e?"password":"text",u.querySelector(".eye-show").style.display=e?"":"none",u.querySelector(".eye-hide").style.display=e?"none":""}),v=null;function w(e){s.style.display="none",i.style.display="";var t=e;i.textContent="Resend in "+t+"s",v=setInterval(function(){t--,t<=0?(clearInterval(v),i.style.display="none",s.style.display="",s.disabled=!1):i.textContent="Resend in "+t+"s"},1e3)}d.addEventListener("submit",function(n){n.preventDefault(),m();var s=document.getElementById("signup-username").value.trim(),o=document.getElementById("signup-email").value.trim(),i=h.value,r=document.getElementById("signup-confirm").value;if(!s||!o||!i||!r){e("Please fill in all fields.","error");return}if(!/^[a-zA-Z0-9_-]{3,32}$/.test(s)){e("Username must be 3–32 characters: letters, numbers, _ or -.","error");return}if(i.length<8){e("Password must be at least 8 characters.","error");return}if(i!==r){e("Passwords do not match.","error");return}if(!document.getElementById("signup-terms").checked){e("You must agree to the Terms and Conditions and Privacy Policy.","error");return}t.username=s,t.email=o,t.password=i,t.terms_agreed=!0,a(p,!0),fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({action:"send_otp",username:s,email:o})}).then(function(e){return e.json()}).then(function(t){t.success?(d.style.display="none",b.textContent=o,_.style.display="",c.value="",c.focus(),w(60),e("OTP sent! Check your inbox (and spam folder).","success")):e(t.message||"Failed to send code. Please try again.","error")}).catch(function(){e("Network error. Please try again.","error")}).finally(function(){a(p,!1)})}),s.addEventListener("click",function(){m(),s.disabled=!0,fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({action:"send_otp",username:t.username,email:t.email})}).then(function(e){return e.json()}).then(function(t){t.success?(e("New code sent!","success"),w(60)):(e(t.message||"Could not resend. Please try again.","error"),s.disabled=!1)}).catch(function(){e("Network error. Please try again.","error"),s.disabled=!1})});function O(){m();var n=c.value.trim();if(!/^\d{6}$/.test(n)){e("Please enter the 6-digit code from your email.","error");return}a(l,!0),fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({action:"signup",username:t.username,email:t.email,password:t.password,otp:n,terms_agreed:t.terms_agreed})}).then(function(e){return e.json()}).then(function(t){t.success?(e("Account created! Redirecting to login…","success"),setTimeout(function(){var e="/login/";o&&o.startsWith("/")&&(e="/login/?next="+encodeURIComponent(o)),window.location.href=e},1800)):(e(t.message||"Sign-up failed. Please try again.","error"),a(l,!1))}).catch(function(){e("Network error. Please try again.","error"),a(l,!1)})}l.addEventListener("click",O),c.addEventListener("keydown",function(e){e.key==="Enter"&&O()})})()</script></main><footer class=footer><p class=footer__copyright-notice>© <a href=https://freedoms4.org>freedoms4.org</a>
|
||
<a href=/terms/>Terms and Conditions</a> <a href=/privacy/>Privacy Policy</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,i,a,c,r=document.querySelector(".brand__auth");r&&!r.querySelector(".brand__auth-user")&&(r.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"),c=document.createElement("span"),c.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(c.firstChild),n.appendChild(document.createTextNode(" "+e)),o=document.createElement("div"),o.className="brand__auth-user-dropdown",i=document.createElement("button"),i.className="brand__auth-user-logout",i.textContent="Log Out",i.addEventListener("click",s),e==="hyzen"&&(a=document.createElement("a"),a.className="brand__auth-user-admin",a.href="/admin/",a.textContent="User Management",o.appendChild(a)),o.appendChild(i),o.appendChild(i),t.appendChild(n),t.appendChild(o),r.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> |