Skip to content

Fix mobile responsiveness, exam scrolling, and STS quiz answer key parsing - #1

Draft
not-wowmagic with Claude wants to merge 2 commits into
mainfrom
claude/make-site-responsive
Draft

Fix mobile responsiveness, exam scrolling, and STS quiz answer key parsing#1
not-wowmagic with Claude wants to merge 2 commits into
mainfrom
claude/make-site-responsive

Conversation

@Claude

@Claude Claude AI commented Mar 20, 2026

Copy link
Copy Markdown

Addresses three issues: mobile layout not responsive, exam page scrolling on mobile devices, and Science, Technology & Society quiz answers all defaulting to the first option due to answer key parsing failure.

Mobile Responsiveness & Scrolling

Enhanced mobile exam experience with fixed viewport layout:

  • Fixed positioning: Exam page uses position: fixed with 100vh/100dvh to prevent body scroll on mobile
  • Flexbox layout: Header, progress, nav dots, and action buttons remain fixed; only question content scrolls internally
  • Touch optimization: Added -webkit-overflow-scrolling: touch for smooth iOS scrolling
  • Responsive breakpoints: Enhanced 768px and 480px media queries with optimized spacing and typography
@media (max-width: 768px) {
  .exam-page {
    position: fixed;
    height: 100dvh;
    overflow: hidden;
  }
  .question-card {
    flex: 1;
    overflow-y: auto;
  }
}

STS Quiz Answer Key Parser Fix

The parseSTS() function was breaking when encountering separator lines (====) immediately after "ANSWER KEY", never parsing actual answers. All 100 questions defaulted to answer index 0.

Root cause: Logic treated the first separator as end-of-section marker.

Solution: Skip separator lines and use regex to match answer patterns:

// Skip separators, continue parsing
if (inAnswerKey && line.startsWith('====')) {
  if (lines[i+1]?.trim().includes('NOTES')) break;
  continue;
}

// Match all "number. answer" pairs per line
const answerPattern = /(\d+)\.\s+([A-D]|TRUE|FALSE)/g;
while ((match = answerPattern.exec(line)) !== null) {
  // Map answers: A=0, B=1, C=2, D=3, TRUE=0, FALSE=1
}

Verified all 100 STS questions now have correct answer indices matching the answer key.

Original prompt

make the site responsive on mobile device, dont make it scrollable on exam part, also fix and check the quizzes on science technology and society, there are questions that shouldn't be there like 'FALSE 44. C 69. C 94. TRUE' remove questions that are like that

@vercel

vercel Bot commented Mar 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
quicktest Ready Ready Preview, Comment Mar 20, 2026 9:22am

…answer key parsing

Co-authored-by: not-wowmagic <80663411+not-wowmagic@users.noreply.github.com>
@Claude Claude AI changed the title [WIP] Make site responsive for mobile devices and fix quizzes Fix mobile responsiveness, exam scrolling, and STS quiz answer key parsing Mar 20, 2026
@Claude
Claude AI requested a review from not-wowmagic March 20, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants