Plain HTML, CSS, and JavaScript example for integrating a LootLocker player profile page using White Label Login.
- White label sign up and sign in
- White label game session creation
- Session token stored in cookie and reused on reload
- Profile header with initials avatar
- Connected accounts list
- Friends, followers, and following totals on profile
- Dedicated social subpages for friends, followers, and following
- Dedicated blocked players subpage with unblock actions
index.htmlredirect entry (sends users to login)login.htmlsign in pagesignup.htmlsign up pageprofile.htmlprofile overview page with social totalsprofile/friends.htmlfriends list subpageprofile/followers.htmlfollowers list subpageprofile/following.htmlfollowing list subpageprofile/platforms.htmlplatform linking status subpageprofile/blocked.htmlblocked players subpagestyles/styles.cssvisual theme and layoutstyles/custom.cssoptional local overrides loaded afterstyles/styles.css(gitignored)styles/templates/*.cssstarter theme templates you can copy intostyles/custom.cssstyles/logo.svgshared logo assetscripts/pages/auth.jsshared login/signup page logicscripts/pages/profile.jsprofile page logicscripts/pages/social-list.jsshared social subpage logicscripts/pages/platforms.jsplatforms page logicscripts/api/client.jsLootLocker API client and endpoint wrappersscripts/api/auth.jsauth flow helpers (sign up/sign in + session creation)scripts/api/session.jssession token read/write helpersscripts/config.jsshared runtime config for all pagesscripts/utils.jsshared utilities (cookies, notices, escaping, helpers)scripts/custom.jsoptional local behavior overrides loaded before page scripts (gitignored)
Set runtime values in scripts/custom.js only:
// scripts/custom.js
window.LootLockerProfileConfig = {
apiBase: "https://api.lootlocker.com",
gameKey: "YOUR_GAME_KEY",
domainKey: "YOUR_DOMAIN_KEY",
publisherName: "Your Brand",
isDevelopment: "true",
gameVersion: "1.0.0.0",
rememberDays: 30,
customStylesheets: ["styles/custom.css"],
customScripts: ["scripts/brand-hooks.js"],
};For additional white-label stylesheets, set customStylesheets through runtime config:
<script>
window.LootLockerProfileConfig = {
customStylesheets: ["styles/custom.css", "styles/brand-overrides.css"],
};
</script>Each path is appended as a <link rel="stylesheet"> at runtime by page scripts.
Additional custom scripts can be loaded with customScripts the same way.
Host the project on any local file server (not file://) so browser fetch behavior is consistent.
Then open the server URL root (or /login.html).
For custom styling/behavior that should survive upstream updates, create these optional files locally:
styles/custom.cssscripts/custom.js
Custom icon/asset overrides should go in:
styles/assets/custom/
That folder's contents are gitignored by default (except its README).
To override typeface in styles/custom.css, for example:
body,
button,
input,
select,
textarea {
font-family: "Your Brand Font", "Segoe UI", sans-serif;
}For white-label branding, replace these files with your own assets:
styles/assets/favicon.icostyles/assets/logo-darkmode.svgstyles/assets/logo-lightmode.svgstyles/assets/logo.svg
They are already referenced by all pages and loaded automatically when present.
Both files are listed in .gitignore, so teams can customize freely without accidentally pushing local overrides.
You can also start from ready-made examples in styles/templates/:
styles/templates/template-sunrise-citrus.cssstyles/templates/template-darcular.cssstyles/templates/template-carbon-electric.cssstyles/templates/template-bubble-gum.cssstyles/templates/template-ncsa-mosaic-1993.css
Copy any template contents into styles/custom.css, then tweak colors, spacing, radii, and fonts as needed.
If you are using Copilot or another coding agent/LLM, treat this README as the primary instruction source for customization behavior.
Required customization behavior:
- Put white-label style changes in
styles/custom.css. - Keep
styles/styles.cssgeneric unless the change is intended for all consumers. - Put custom icons/assets in
styles/assets/custom/. - Override typeface in
styles/custom.css. - Use
LootLockerProfileConfig.customStylesheetsfor additional stylesheet links. - Use
LootLockerProfileConfig.customScriptsfor additional script links.
Supporting agent instruction files:
.github/copilot-instructions.mdAGENTS.md
These files point back to this README to avoid duplicated or conflicting instructions.
POST /white-label-login/sign-up(sign up mode only)POST /white-label-login/loginPOST /game/v2/session/white-labelGET /game/player/hazy-hammock/v1/infoGET /game/v1/connected-accountsPOST /client/v3/remote/leasePUT /game/v1/connected-accounts/attachGET /game/player/friends?per_page=50&page=1GET /game/player/{player_public_id}/followers?per_page=20GET /game/player/{player_public_id}/following?per_page=20
- Avatar is initials-based by design in this version.
- The UI is intentionally plain and themeable. Update CSS variables in
styles/styles.cssto white-label quickly. - This project currently does not include any build step or dependencies.