T
1
PS
THE 1% STANDARD
LOGIN
SIGN UP
Enter your credentials below
Login
Create your client account
Create Account
T
1
PS
THE 1% STANDARD
Sign Out
×
Log Today
Date
Weight (kg)
Calories
Workout
Notes
Save Entry
<>var C={u:"Joel",p:"8824",r:"coach"};var U=JSON.parse(localStorage.getItem("t1ps_u")||"[]");var ss=null;function init(){var s=localStorage.getItem("t1ps_s");if(s){ss=JSON.parse(s);if(ss&&gU(ss.u)){sA();}else{sLg();}}else{sLg();}}function gU(u){if(u.toLowerCase()==="joel")return C;return U.find(function(x){return x.u.toLowerCase()===u.toLowerCase();})||null;}function dL(){var u=document.getElementById("lu").value.trim();var p=document.getElementById("lp").value;var e=document.getElementById("lE");e.textContent="";if(!u||!p){e.textContent="Please enter username and password.";return;}var usr=null;if(u.toLowerCase()==="joel"&&p==="8824"){usr=C;}else{var f=U.find(function(x){return x.u.toLowerCase()===u.toLowerCase();});if(f&&f.p===p)usr=f;}if(usr){ss={u:usr.u||usr.username,r:usr.r||"client"};localStorage.setItem("t1ps_s",JSON.stringify(ss));sA();}else{e.textContent="Invalid username or password.";}}function dS(){var u=document.getElementById("su").value.trim();var p=document.getElementById("sp").value;var p2=document.getElementById("sp2").value;var e=document.getElementById("sE");e.textContent="";if(!u||!p){e.textContent="Please fill all fields.";return;}if(p!==p2){e.textContent="Passwords do not match.";return;}if(u.toLowerCase()==="joel"){e.textContent="Username taken.";return;}if(U.find(function(x){return x.u.toLowerCase()===u.toLowerCase();})){e.textContent="Username already exists.";return;}U.push({u:u,p:p,r:"client"});localStorage.setItem("t1ps_u",JSON.stringify(U));ss={u:u,r:"client"};localStorage.setItem("t1ps_s",JSON.stringify(ss));sA();}function dOut(){ss=null;localStorage.removeItem("t1ps_s");document.getElementById("app").classList.add("hidden");document.getElementById("loginPage").classList.remove("hidden");document.getElementById("lu").value="";document.getElementById("lp").value="";}function sT(isL){document.getElementById("lF").classList.toggle("hidden",!isL);document.getElementById("sF").classList.toggle("hidden",isL);document.getElementById("tL").classList.toggle("active",isL);document.getElementById("tS").classList.toggle("active",!isL);}function sLg(){document.getElementById("loginPage").classList.remove("hidden");document.getElementById("app").classList.add("hidden");}function sA(){document.getElementById("loginPage").classList.add("hidden");document.getElementById("app").classList.remove("hidden");bN();sP("dashboard");}function bN(){var iC=ss.r==="coach";document.getElementById("uL").textContent=ss.u;var items=iC?[{id:"dashboard",ic:"dashboard",lb:"Dashboard"},{id:"roster",ic:"group",lb:"Client Roster"},{id:"resources",ic:"library_books",lb:"Resources"},{id:"notes",ic:"edit_note",lb:"Coach Notes"}]:[{id:"dashboard",ic:"dashboard",lb:"Dashboard"},{id:"resources",ic:"library_books",lb:"Resources"}];document.getElementById("nav").innerHTML=items.map(function(it){return"
"+it.ic+"<"+"/span>"+it.lb+"<"+"/div>";}).join("");}function sP(p){document.querySelectorAll(".nav-item").forEach(function(el){el.classList.remove("active");});var n=document.getElementById("n_"+p);if(n)n.classList.add("active");var mc=document.getElementById("mc");if(p==="dashboard")mc.innerHTML=gDB();else if(p==="resources")mc.innerHTML=gRS();else if(p==="roster")mc.innerHTML=gRO();else if(p==="notes")mc.innerHTML=gNT();}function gDB(){var lg=JSON.parse(localStorage.getItem("t1ps_lg_"+ss.u)||"[]");var rw=lg.length?lg.slice(-5).reverse().map(function(l){return"
"+l.wo+"<"+"/div>
"+l.d+" "+l.w+"kg "+l.c+"kcal<"+"/div><"+"/div>";}).join(""):"
No entries yet. Click + Log Today.<"+"/div>";return"
Dashboard<"+"/div>
Welcome back, "+ss.u+"<"+"/div><"+"/div>
Entries<"+"/div>
"+lg.length+"<"+"/div><"+"/div>
Last Weight<"+"/div>
"+( lg.length?lg[lg.length-1].w+"kg":"--")+"<"+"/div><"+"/div>
Last Calories<"+"/div>
"+( lg.length?lg[lg.length-1].c:"--")+"<"+"/div><"+"/div><"+"/div>
Recent Activity
+ Log Today<"+"/button><"+"/div>"+rw+"<"+"/div>";}function gRS(){return"
Resources<"+"/div>
Your coaching materials<"+"/div><"+"/div>
🥗<"+"/div>
Nutrition Guide<"+"/div>
Macros and meal planning for your goals.<"+"/div>
View<"+"/a><"+"/div>
🏋️<"+"/div>
Training Program<"+"/div>
12-week progressive overload plan.<"+"/div>
View<"+"/a><"+"/div>
🧠<"+"/div>
Mindset Framework<"+"/div>
Mental tools for consistent performance.<"+"/div>
View<"+"/a><"+"/div><"+"/div>";}function gRO(){var all=[{u:"Jason",j:"Jan 2025",lg:3}].concat(U.map(function(u){return{u:u.u,j:"Recently",lg:JSON.parse(localStorage.getItem("t1ps_lg_"+u.u)||"[]").length};}));return"
Client Roster<"+"/div>
All active coaching clients<"+"/div><"+"/div>
Client<"+"/th>
Joined<"+"/th>
Logs<"+"/th>
Status<"+"/th><"+"/tr><"+"/thead>
"+all.map(function(c){return"
"+c.u+"<"+"/td>
"+c.j+"<"+"/td>
"+c.lg+"<"+"/td>
Active<"+"/span><"+"/td><"+"/tr>";}).join("")+"<"+"/tbody><"+"/table><"+"/div>";}function gNT(){var sv=localStorage.getItem("t1ps_cn")||"" ;return"
Coach Notes<"+"/div>
Private coaching observations<"+"/div><"+"/div>
"+sv+"<"+"/textarea>
Save Notes<"+"/button><"+"/div>";}function svN(){var v=document.getElementById("cNA").value;localStorage.setItem("t1ps_cn",v);var b=document.querySelector(".save-btn");b.textContent="Saved!";setTimeout(function(){b.textContent="Save Notes";},2000);}function oM(){var d=new Date();document.getElementById("mD").value=d.toISOString().split("T")[0];["mW","mC","mWk","mN"].forEach(function(id){document.getElementById(id).value="";});document.getElementById("logMod").classList.remove("hidden");}function cM(){document.getElementById("logMod").classList.add("hidden");}function sL(){var d=document.getElementById("mD").value;var wo=document.getElementById("mWk").value;if(!d||!wo){alert("Fill date and workout.");return;}var lg=JSON.parse(localStorage.getItem("t1ps_lg_"+ss.u)||"[]");lg.push({d:d,w:document.getElementById("mW").value||"--",c:document.getElementById("mC").value||"--",wo:wo,n:document.getElementById("mN").value});localStorage.setItem("t1ps_lg_"+ss.u,JSON.stringify(lg));cM();sP("dashboard");}window.onload=function(){init();};