Focus Discord community page on joining, support, linking and game chat
This commit is contained in:
parent
4cd70cb9a9
commit
e2622a73ab
3 changed files with 14 additions and 1 deletions
|
|
@ -10,3 +10,5 @@ test('wrong guild and Discord failure retain the correct invitation without fabr
|
|||
const original=globalThis.fetch;try{for(const response of [Response.json({guild:{id:'old-guild'}}),new Response('',{status:429})]){globalThis.fetch=async()=>response;const{handleCommunity}=await fresh();const r=await handleCommunity(new Request('https://www.dunerealms.com/api/community'));assert.deepEqual(await r.json(),{status:'unavailable',name:'DuneRealms',inviteUrl:'https://discord.gg/tRgcyZAxzt'});assert.equal(r.headers.get('cache-control'),'no-store');}}finally{globalThis.fetch=original;}
|
||||
});
|
||||
test('Discord page uses DuneRealms branding and the new invite',async()=>{const html=await readFile(new URL('../web/discord.html',import.meta.url),'utf8');assert(html.includes('https://discord.gg/tRgcyZAxzt'));assert(!/yousmp|jS4cx7eSGh/i.test(html));});
|
||||
|
||||
test('Discord page stays focused and accurately marks unfinished integrations',async()=>{const html=await readFile(new URL('../web/discord.html',import.meta.url),'utf8');for(const text of ['Connect your account','Get support','Follow game chat','Community guidelines','COMING SOON','Sales and General Support','VIP, AlphaTester and staff'])assert(html.includes(text));assert(!html.includes('faction-atlas'));assert(!html.includes('id="realm-menu"'));assert(!html.includes('contact.js'));for(const id of ['discord-name','discord-members','discord-online','discord-state'])assert(html.includes('id="'+id+'"'));});
|
||||
|
|
|
|||
1
website/web/discord-page.css
Normal file
1
website/web/discord-page.css
Normal file
|
|
@ -0,0 +1 @@
|
|||
.discord-page{max-width:1180px;margin:0 auto;padding:32px 22px 60px}.discord-page .page-intro{margin:0 0 28px}.discord-page .discord-panel{margin-bottom:24px}.discord-feature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.discord-feature{position:relative;padding:28px;border:1px solid #64734c;border-radius:14px;background:linear-gradient(135deg,#1d3c2e,#10291f);box-shadow:0 8px 24px #0002}.discord-feature>img{object-fit:contain;margin-bottom:10px}.discord-feature h2{color:#e5cd91;margin:8px 0 14px;font-size:1.4rem}.discord-feature p,.discord-feature li{color:#d4ddce;line-height:1.7}.discord-feature .button{display:inline-block;margin-top:12px}.discord-status{float:right;border:1px solid #827244;border-radius:20px;padding:4px 10px;color:#dcc88e;font-size:.7rem;letter-spacing:.08em}.discord-rules{margin-top:24px;scroll-margin-top:24px}.discord-rules li+li{margin-top:10px}.discord-page a:focus-visible{outline:3px solid #e7cb81;outline-offset:5px}@media(max-width:700px){.discord-feature-grid{grid-template-columns:1fr}.discord-page{padding:24px 14px 40px}.discord-feature{padding:22px}}
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue

Staff