milwright commited on
Commit
0946b85
Β·
1 Parent(s): b88ba0c

improve: update welcome overlay with consistent styling and accurate content

Browse files

- Change from 'classic literature' to 'historical and literary texts'
- Use GitHub icon instead of book emoji
- Apply consistent CSS classes from main application
- Move styles to styles.css for better organization
- Maintain same color scheme and button styling as rest of app

Files changed (1) hide show
  1. src/welcomeOverlay.js +14 -39
src/welcomeOverlay.js CHANGED
@@ -21,68 +21,43 @@ class WelcomeOverlay {
21
  createOverlay() {
22
  const overlay = document.createElement('div');
23
  overlay.className = 'welcome-overlay';
24
- overlay.style.cssText = `
25
- position: fixed;
26
- top: 0;
27
- left: 0;
28
- width: 100%;
29
- height: 100%;
30
- background: rgba(0, 0, 0, 0.8);
31
- display: flex;
32
- align-items: center;
33
- justify-content: center;
34
- z-index: 1000;
35
- opacity: 0;
36
- transition: opacity 0.3s ease;
37
- `;
38
 
39
  const modal = document.createElement('div');
 
40
  modal.style.cssText = `
41
- background: white;
42
- border-radius: 12px;
43
- padding: 32px;
44
  max-width: 500px;
45
  margin: 20px;
46
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
47
  text-align: center;
48
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
49
  `;
50
 
51
  modal.innerHTML = `
52
- <div style="font-size: 48px; margin-bottom: 16px;">πŸ“š</div>
53
- <h1 style="margin: 0 0 24px 0; color: #1a1a1a; font-size: 28px; font-weight: 600;">
 
 
54
  Cloze Reader
55
  </h1>
56
 
57
- <div style="text-align: left; color: #4a4a4a; line-height: 1.6; margin-bottom: 32px;">
58
- <p style="margin: 0 0 16px 0;">
59
- <strong>Practice reading comprehension</strong> by filling in missing words from classic literature passages.
60
  </p>
61
 
62
- <p style="margin: 0 0 16px 0;">
63
  <strong>How to play:</strong> Read the passage, fill in the blanks, and use hints or chat help (πŸ’¬) if needed. Progress through levels as you improve.
64
  </p>
65
 
66
- <p style="margin: 0 0 16px 0;">
67
- <strong>Data source:</strong> Passages from Project Gutenberg's public domain collection, processed via Hugging Face Datasets.
68
  </p>
69
 
70
- <p style="margin: 0 0 0 0;">
71
  <strong>AI assistance:</strong> Powered by Google's Gemma 3 model via OpenRouter for intelligent word selection and contextual hints.
72
  </p>
73
  </div>
74
 
75
- <button id="welcome-start-btn" style="
76
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
77
- color: white;
78
- border: none;
79
- padding: 12px 32px;
80
- border-radius: 8px;
81
- font-size: 16px;
82
- font-weight: 600;
83
- cursor: pointer;
84
- transition: transform 0.2s ease;
85
- " onmouseover="this.style.transform='scale(1.05)'" onmouseout="this.style.transform='scale(1)'">
86
  Start Reading
87
  </button>
88
  `;
 
21
  createOverlay() {
22
  const overlay = document.createElement('div');
23
  overlay.className = 'welcome-overlay';
24
+ overlay.style.opacity = '0';
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  const modal = document.createElement('div');
27
+ modal.className = 'welcome-modal';
28
  modal.style.cssText = `
 
 
 
29
  max-width: 500px;
30
  margin: 20px;
 
31
  text-align: center;
 
32
  `;
33
 
34
  modal.innerHTML = `
35
+ <img src="https://raw.githubusercontent.com/zmuhls/cloze-reader/main/icon.png"
36
+ alt="Cloze Reader"
37
+ style="width: 64px; height: 64px; margin-bottom: 16px; border-radius: 8px;">
38
+ <h1 class="welcome-title">
39
  Cloze Reader
40
  </h1>
41
 
42
+ <div class="welcome-content">
43
+ <p>
44
+ <strong>Practice reading comprehension</strong> by filling in missing words from historical and literary texts.
45
  </p>
46
 
47
+ <p>
48
  <strong>How to play:</strong> Read the passage, fill in the blanks, and use hints or chat help (πŸ’¬) if needed. Progress through levels as you improve.
49
  </p>
50
 
51
+ <p>
52
+ <strong>Data source:</strong> Historical and literary texts from Project Gutenberg's public domain collection, processed via Hugging Face Datasets.
53
  </p>
54
 
55
+ <p style="margin-bottom: 0;">
56
  <strong>AI assistance:</strong> Powered by Google's Gemma 3 model via OpenRouter for intelligent word selection and contextual hints.
57
  </p>
58
  </div>
59
 
60
+ <button id="welcome-start-btn" class="btn btn-primary">
 
 
 
 
 
 
 
 
 
 
61
  Start Reading
62
  </button>
63
  `;