Rebrand: new RM Circle badge logo in header, favicons, app icons, share image, chat avatar, Mini App (Marty 2026-11-17)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -677,7 +677,7 @@ function parseCookies(req){const out={};for(const p of (req.headers.cookie||'').
|
||||
function getSession(req){const token=parseCookies(req)['ctb.sid'];if(!token)return null;const s=sessions.get(token);if(!s)return null;if(s.expires<Date.now()){sessions.delete(token);return null}return {token,...s}}
|
||||
function requireAdmin(req,res){if(!getSession(req)){json(res,401,{error:'Unauthorized'});return false}return true}
|
||||
async function bodyJson(req){return await new Promise((resolve,reject)=>{let data='';req.on('data',c=>{data+=c;if(data.length>100000){reject(new Error('Payload too large'));req.destroy()}});req.on('end',()=>{if(!data)return resolve({});try{resolve(JSON.parse(data))}catch(e){reject(new Error('Invalid JSON'))}});req.on('error',reject)})}
|
||||
function contentType(file){const ext=path.extname(file);return ({'.html':'text/html; charset=utf-8','.css':'text/css; charset=utf-8','.js':'application/javascript; charset=utf-8','.json':'application/json; charset=utf-8','.png':'image/png','.jpg':'image/jpeg','.jpeg':'image/jpeg','.webp':'image/webp','.svg':'image/svg+xml','.ico':'image/x-icon','.vtt':'text/vtt; charset=utf-8','.mp4':'video/mp4','.webm':'video/webm'}[ext]||'application/octet-stream')}
|
||||
function contentType(file){const ext=path.extname(file);return ({'.html':'text/html; charset=utf-8','.css':'text/css; charset=utf-8','.js':'application/javascript; charset=utf-8','.json':'application/json; charset=utf-8','.png':'image/png','.jpg':'image/jpeg','.jpeg':'image/jpeg','.webp':'image/webp','.svg':'image/svg+xml','.ico':'image/x-icon','.webmanifest':'application/manifest+json','.vtt':'text/vtt; charset=utf-8','.mp4':'video/mp4','.webm':'video/webm'}[ext]||'application/octet-stream')}
|
||||
function staticFile(req,res,file,status=200){
|
||||
if(!fs.existsSync(file)||!fs.statSync(file).isFile())return false;
|
||||
const size=fs.statSync(file).size;
|
||||
@@ -1870,7 +1870,7 @@ function serveMemberPage(req,res,file,kind,id){
|
||||
phone:{t:"Everybody's making money on your phone. Except you.",d:'90 seconds that flips it. Watch.',i:'/v/og-angle-phone.jpg'},
|
||||
two:{t:"You know two people. That's all this takes.",d:'The #1 excuse, retired in 90 seconds. Watch.',i:'/v/og-angle-two.jpg'},
|
||||
graveyard:{t:'Your side-hustle graveyard has enough tenants.',d:"This one's built different. 90 seconds. Watch.",i:'/v/og-angle-graveyard.jpg'},
|
||||
stopwaiting:{t:'Stop waiting. Start receiving.',d:'The whole thing, explained in one short video. Watch.',i:'/og-card.jpg'}
|
||||
stopwaiting:{t:'Stop waiting. Start receiving.',d:'The whole thing, explained in one short video. Watch.',i:'/brand/rmc-og-1200x630.jpg'}
|
||||
};
|
||||
const angleKey=kind==='join'?new URL(req.url,'http://x').searchParams.get('v'):null;
|
||||
const angle=angleKey?ANGLE_OG[angleKey]:null;
|
||||
@@ -1881,7 +1881,7 @@ function serveMemberPage(req,res,file,kind,id){
|
||||
const desc=angle?angle.d:(kind==='join'
|
||||
? `A team-first crypto build where every payout is verified on Polygon. See Member #${id}'s real on-chain position and join their team. No income is guaranteed.`
|
||||
: `Member #${id}'s live position, team, and payments — read straight from the blockchain. Get your 2, help your 2. No income is guaranteed.`);
|
||||
const img=angle?`${base}${angle.i}`:`${base}/og-card.jpg`;
|
||||
const img=angle?`${base}${angle.i}`:`${base}/brand/rmc-og-1200x630.jpg`;
|
||||
const og=[
|
||||
`<meta property="og:type" content="website">`,
|
||||
`<meta property="og:site_name" content="RM Circle Team Build">`,
|
||||
|
||||
Reference in New Issue
Block a user