linguabot commited on
Commit
f29c9d3
·
verified ·
1 Parent(s): 667a82e

Upload folder using huggingface_hub

Browse files
client/src/components/Layout.tsx CHANGED
@@ -185,7 +185,7 @@ const Layout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
185
  key={item.name}
186
  to={item.href}
187
  className={`flex items-center px-3 py-2 rounded-lg text-[0.95rem] font-medium transition-colors ${
188
- isActive ? 'bg-ui-bg text-ui-text neon-border' : 'text-ui-text/80 hover:bg-ui-panel/60'
189
  }`}
190
  >
191
  <item.icon className="h-5 w-5 mr-3 text-ui-neonBlue" />
 
185
  key={item.name}
186
  to={item.href}
187
  className={`flex items-center px-3 py-2 rounded-lg text-[0.95rem] font-medium transition-colors ${
188
+ isActive ? 'bg-ui-bg text-ui-text shadow-[0_0_6px_rgba(14,165,233,0.45)]' : 'text-ui-text/80 hover:bg-ui-panel/60'
189
  }`}
190
  >
191
  <item.icon className="h-5 w-5 mr-3 text-ui-neonBlue" />
client/src/pages/TutorialTasks.tsx CHANGED
@@ -271,7 +271,7 @@ const TutorialTasks: React.FC = () => {
271
  .replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>')
272
  .replace(/\*(.+?)\*/g, '<em>$1</em>')
273
  .replace(/\n/g, '<br/>');
274
- return <span dangerouslySetInnerHTML={{ __html: html }} />;
275
  };
276
 
277
  const applyLinkFormat = (
@@ -1064,15 +1064,15 @@ const TutorialTasks: React.FC = () => {
1064
  // Remove intrusive loading screen - just show content with loading state
1065
 
1066
  return (
1067
- <div className="min-h-screen bg-gray-50 py-8">
1068
  <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
1069
  {/* Header */}
1070
  <div className="mb-8">
1071
  <div className="flex items-center mb-4">
1072
- <AcademicCapIcon className="h-8 w-8 text-indigo-900 mr-3" />
1073
- <h1 className="text-3xl font-bold text-gray-900">Tutorial Tasks</h1>
1074
  </div>
1075
- <p className="text-gray-600">
1076
  Complete weekly tutorial tasks with your group to practice collaborative translation skills.
1077
  </p>
1078
  </div>
@@ -1086,8 +1086,8 @@ const TutorialTasks: React.FC = () => {
1086
  onClick={() => handleWeekChange(week)}
1087
  className={`px-4 py-2 rounded-lg font-medium whitespace-nowrap transition-all duration-200 ease-in-out ${
1088
  selectedWeek === week
1089
- ? 'bg-indigo-600 text-white'
1090
- : 'bg-white text-gray-700 hover:bg-gray-50 border border-gray-300'
1091
  }`}
1092
  >
1093
  Week {week}
@@ -1110,13 +1110,13 @@ const TutorialTasks: React.FC = () => {
1110
  <>
1111
  {/* Translation Brief - Shown once at the top */}
1112
  {tutorialWeek && tutorialWeek.translationBrief ? (
1113
- <div className="bg-white rounded-lg p-6 mb-8 border border-gray-200 shadow-sm">
1114
  <div className="flex items-center justify-between mb-4">
1115
  <div className="flex items-center space-x-3">
1116
- <div className="bg-indigo-600 rounded-lg p-2">
1117
- <DocumentTextIcon className="h-5 w-5 text-white" />
1118
  </div>
1119
- <h3 className="text-indigo-900 font-semibold text-xl">Translation Brief</h3>
1120
  </div>
1121
  {JSON.parse(localStorage.getItem('user') || '{}').role === 'admin' && (
1122
  <div className="flex items-center space-x-2">
@@ -1125,7 +1125,7 @@ const TutorialTasks: React.FC = () => {
1125
  <button
1126
  onClick={saveBrief}
1127
  disabled={saving}
1128
- className="bg-indigo-500 hover:bg-indigo-600 text-white px-3 py-1 rounded-md transition-colors duration-200 text-sm"
1129
  >
1130
  {saving ? (
1131
  <div className="animate-spin rounded-full h-4 w-4 border-b-2 border-white"></div>
@@ -1175,21 +1175,21 @@ const TutorialTasks: React.FC = () => {
1175
  />
1176
  </div>
1177
  ) : (
1178
- <div className="text-gray-900 leading-relaxed text-lg font-smiley whitespace-pre-wrap">{renderFormatted(tutorialWeek.translationBrief || '')}</div>
1179
  )}
1180
 
1181
  {/* Group Google Doc (refined) */}
1182
- <div className="mt-6 bg-white rounded-xl border border-gray-200 shadow-sm">
1183
  <div className="px-6 pt-6">
1184
- <h4 className="text-2xl font-bold text-gray-900">Group Google Doc</h4>
1185
- <p className="mt-2 text-gray-600">Open or share each group’s working document.</p>
1186
  </div>
1187
  <div className="px-6 pb-4 pt-4 border-t border-gray-100">
1188
  <GroupDocSection weekNumber={selectedWeek} />
1189
  </div>
1190
  </div>
1191
- <div className="mt-4 p-3 bg-indigo-50 rounded-lg">
1192
- <p className="text-indigo-900 text-sm">
1193
  <strong>Note:</strong> Tutorial tasks are completed as group submissions. Each group should collaborate to create a single translation per task.
1194
  </p>
1195
  </div>
@@ -1197,17 +1197,17 @@ const TutorialTasks: React.FC = () => {
1197
  ) : (
1198
  // Show add brief button when no brief exists
1199
  JSON.parse(localStorage.getItem('user') || '{}').role === 'admin' && (
1200
- <div className="bg-white rounded-lg p-6 mb-8 border border-gray-200 border-dashed shadow-sm">
1201
  <div className="flex items-center justify-between mb-4">
1202
  <div className="flex items-center space-x-3">
1203
- <div className="bg-indigo-100 rounded-lg p-2">
1204
- <DocumentTextIcon className="h-5 w-5 text-indigo-900" />
1205
  </div>
1206
- <h3 className="text-indigo-900 font-semibold text-xl">Translation Brief</h3>
1207
  </div>
1208
  <button
1209
  onClick={startAddingBrief}
1210
- className="bg-indigo-600 hover:bg-indigo-700 text-white px-6 py-3 rounded-lg font-medium flex items-center space-x-2 shadow-sm"
1211
  >
1212
  <PlusIcon className="h-5 w-5" />
1213
  <span className="font-medium">Add Brief</span>
@@ -1224,7 +1224,7 @@ const TutorialTasks: React.FC = () => {
1224
  id="tutorial-brief-input"
1225
  value={editForm.translationBrief}
1226
  onChange={(e) => setEditForm({ ...editForm, translationBrief: e.target.value })}
1227
- className="w-full p-4 border border-gray-300 rounded-lg text-gray-900 leading-relaxed text-base bg-white focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"
1228
  rows={6}
1229
  placeholder="Enter translation brief..."
1230
  />
@@ -1232,7 +1232,7 @@ const TutorialTasks: React.FC = () => {
1232
  <button
1233
  onClick={saveBrief}
1234
  disabled={saving}
1235
- className="bg-indigo-600 hover:bg-indigo-700 text-white px-6 py-3 rounded-lg font-medium flex items-center space-x-2 shadow-sm"
1236
  >
1237
  {saving ? (
1238
  <div className="animate-spin rounded-full h-4 w-4 border-b-2 border-white"></div>
 
271
  .replace(/\*\*(.+?)\*\*/g, '<strong>$1</strong>')
272
  .replace(/\*(.+?)\*/g, '<em>$1</em>')
273
  .replace(/\n/g, '<br/>');
274
+ return <span dangerouslySetInnerHTML={{ __html: html.replace(/text-indigo-600/g, 'text-ui-neonBlue').replace(/text-indigo-900/g, 'text-ui-text') }} />;
275
  };
276
 
277
  const applyLinkFormat = (
 
1064
  // Remove intrusive loading screen - just show content with loading state
1065
 
1066
  return (
1067
+ <div className="min-h-screen bg-ui-bg py-8">
1068
  <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
1069
  {/* Header */}
1070
  <div className="mb-8">
1071
  <div className="flex items-center mb-4">
1072
+ <AcademicCapIcon className="h-8 w-8 text-ui-neonBlue mr-3" />
1073
+ <h1 className="text-3xl font-bold text-ui-text">Tutorial Tasks</h1>
1074
  </div>
1075
+ <p className="text-ui-text/70">
1076
  Complete weekly tutorial tasks with your group to practice collaborative translation skills.
1077
  </p>
1078
  </div>
 
1086
  onClick={() => handleWeekChange(week)}
1087
  className={`px-4 py-2 rounded-lg font-medium whitespace-nowrap transition-all duration-200 ease-in-out ${
1088
  selectedWeek === week
1089
+ ? 'bg-ui-neonBlue text-white'
1090
+ : 'bg-ui-panel text-ui-text hover:bg-white border border-ui-border'
1091
  }`}
1092
  >
1093
  Week {week}
 
1110
  <>
1111
  {/* Translation Brief - Shown once at the top */}
1112
  {tutorialWeek && tutorialWeek.translationBrief ? (
1113
+ <div className="bg-ui-panel rounded-lg p-6 mb-8 border border-ui-border shadow-sm">
1114
  <div className="flex items-center justify-between mb-4">
1115
  <div className="flex items-center space-x-3">
1116
+ <div className="bg-ui-neonBlue rounded-lg p-2">
1117
+ <DocumentTextIcon className="h-5 w-5 text-ui-panel" />
1118
  </div>
1119
+ <h3 className="text-ui-text font-semibold text-xl">Translation Brief</h3>
1120
  </div>
1121
  {JSON.parse(localStorage.getItem('user') || '{}').role === 'admin' && (
1122
  <div className="flex items-center space-x-2">
 
1125
  <button
1126
  onClick={saveBrief}
1127
  disabled={saving}
1128
+ className="bg-ui-neonBlue hover:bg-ui-neonBlue/90 text-white px-3 py-1 rounded-md transition-colors duration-200 text-sm"
1129
  >
1130
  {saving ? (
1131
  <div className="animate-spin rounded-full h-4 w-4 border-b-2 border-white"></div>
 
1175
  />
1176
  </div>
1177
  ) : (
1178
+ <div className="text-ui-text leading-relaxed text-lg font-smiley whitespace-pre-wrap">{renderFormatted(tutorialWeek.translationBrief || '')}</div>
1179
  )}
1180
 
1181
  {/* Group Google Doc (refined) */}
1182
+ <div className="mt-6 bg-ui-panel rounded-xl border border-ui-border shadow-sm">
1183
  <div className="px-6 pt-6">
1184
+ <h4 className="text-2xl font-bold text-ui-text">Group Google Doc</h4>
1185
+ <p className="mt-2 text-ui-text/70">Open or share each group’s working document.</p>
1186
  </div>
1187
  <div className="px-6 pb-4 pt-4 border-t border-gray-100">
1188
  <GroupDocSection weekNumber={selectedWeek} />
1189
  </div>
1190
  </div>
1191
+ <div className="mt-4 p-3 bg-ui-bg rounded-lg">
1192
+ <p className="text-ui-text text-sm">
1193
  <strong>Note:</strong> Tutorial tasks are completed as group submissions. Each group should collaborate to create a single translation per task.
1194
  </p>
1195
  </div>
 
1197
  ) : (
1198
  // Show add brief button when no brief exists
1199
  JSON.parse(localStorage.getItem('user') || '{}').role === 'admin' && (
1200
+ <div className="bg-ui-panel rounded-lg p-6 mb-8 border border-ui-border border-dashed shadow-sm">
1201
  <div className="flex items-center justify-between mb-4">
1202
  <div className="flex items-center space-x-3">
1203
+ <div className="bg-ui-bg rounded-lg p-2">
1204
+ <DocumentTextIcon className="h-5 w-5 text-ui-neonBlue" />
1205
  </div>
1206
+ <h3 className="text-ui-text font-semibold text-xl">Translation Brief</h3>
1207
  </div>
1208
  <button
1209
  onClick={startAddingBrief}
1210
+ className="bg-ui-neonBlue hover:bg-ui-neonBlue/90 text-white px-6 py-3 rounded-lg font-medium flex items-center space-x-2 shadow-sm"
1211
  >
1212
  <PlusIcon className="h-5 w-5" />
1213
  <span className="font-medium">Add Brief</span>
 
1224
  id="tutorial-brief-input"
1225
  value={editForm.translationBrief}
1226
  onChange={(e) => setEditForm({ ...editForm, translationBrief: e.target.value })}
1227
+ className="w-full p-4 border border-ui-border rounded-lg text-ui-text leading-relaxed text-base bg-ui-panel focus:ring-2 focus:ring-ui-neonBlue focus:border-ui-neonBlue"
1228
  rows={6}
1229
  placeholder="Enter translation brief..."
1230
  />
 
1232
  <button
1233
  onClick={saveBrief}
1234
  disabled={saving}
1235
+ className="bg-ui-neonBlue hover:bg-ui-neonBlue/90 text-white px-6 py-3 rounded-lg font-medium flex items-center space-x-2 shadow-sm"
1236
  >
1237
  {saving ? (
1238
  <div className="animate-spin rounded-full h-4 w-4 border-b-2 border-white"></div>
client/src/pages/WeeklyPractice.tsx CHANGED
@@ -1410,15 +1410,15 @@ const WeeklyPractice: React.FC = () => {
1410
 
1411
 
1412
  return (
1413
- <div className="min-h-screen bg-gray-50 py-8">
1414
  <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
1415
  {/* Header */}
1416
  <div className="mb-8">
1417
  <div className="flex items-center mb-4">
1418
- <BookOpenIcon className="h-8 w-8 text-indigo-600 mr-3" />
1419
- <h1 className="text-3xl font-bold text-gray-900">Weekly Practice</h1>
1420
  </div>
1421
- <p className="text-gray-600">
1422
  Practice your translation skills with weekly examples and cultural elements.
1423
  </p>
1424
  </div>
@@ -1432,8 +1432,8 @@ const WeeklyPractice: React.FC = () => {
1432
  onClick={() => handleWeekChange(week)}
1433
  className={`px-4 py-2 rounded-lg font-medium whitespace-nowrap transition-all duration-200 ease-in-out ${
1434
  selectedWeek === week
1435
- ? 'bg-indigo-600 text-white'
1436
- : 'bg-white text-gray-700 hover:bg-gray-50 border border-gray-300'
1437
  }`}
1438
  >
1439
  Week {week}
@@ -1446,7 +1446,7 @@ const WeeklyPractice: React.FC = () => {
1446
  {isWeekTransitioning && (
1447
  <div className="fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-50">
1448
  <div className="bg-white rounded-lg shadow-lg p-4 flex items-center space-x-3">
1449
- <div className="animate-spin rounded-full h-6 w-6 border-b-2 border-indigo-600"></div>
1450
  <span className="text-gray-700 font-medium">Loading...</span>
1451
  </div>
1452
  </div>
@@ -1454,13 +1454,13 @@ const WeeklyPractice: React.FC = () => {
1454
 
1455
  {/* Translation Brief - Shown once at the top (standalone allowed) */}
1456
  {!isWeekTransitioning && weeklyPracticeWeek && weeklyPracticeWeek.translationBrief ? (
1457
- <div className="bg-gradient-to-r from-blue-50 to-indigo-50 rounded-xl p-8 mb-8 border border-blue-200">
1458
  <div className="flex items-center justify-between mb-4">
1459
  <div className="flex items-center space-x-2">
1460
- <div className="bg-blue-100 rounded-full p-2">
1461
- <BookOpenIcon className="h-5 w-5 text-blue-600" />
1462
  </div>
1463
- <h3 className="text-blue-900 font-semibold text-xl">Translation Brief</h3>
1464
  </div>
1465
  {JSON.parse(localStorage.getItem('user') || '{}').role === 'admin' && (
1466
  <div className="flex items-center space-x-2">
@@ -1488,7 +1488,7 @@ const WeeklyPractice: React.FC = () => {
1488
  <>
1489
  <button
1490
  onClick={startEditingBrief}
1491
- className="bg-blue-100 hover:bg-blue-200 text-blue-700 px-3 py-1 rounded-lg transition-colors duration-200"
1492
  >
1493
  <PencilIcon className="h-4 w-4" />
1494
  </button>
@@ -1520,7 +1520,7 @@ const WeeklyPractice: React.FC = () => {
1520
  />
1521
  </div>
1522
  ) : (
1523
- <div className="text-blue-800 leading-relaxed text-lg font-smiley whitespace-pre-wrap">{renderFormatted(weeklyPracticeWeek.translationBrief || '')}</div>
1524
  )}
1525
  </div>
1526
  ) : (
 
1410
 
1411
 
1412
  return (
1413
+ <div className="min-h-screen bg-ui-bg py-8">
1414
  <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
1415
  {/* Header */}
1416
  <div className="mb-8">
1417
  <div className="flex items-center mb-4">
1418
+ <BookOpenIcon className="h-8 w-8 text-ui-neonBlue mr-3" />
1419
+ <h1 className="text-3xl font-bold text-ui-text">Weekly Practice</h1>
1420
  </div>
1421
+ <p className="text-ui-text/70">
1422
  Practice your translation skills with weekly examples and cultural elements.
1423
  </p>
1424
  </div>
 
1432
  onClick={() => handleWeekChange(week)}
1433
  className={`px-4 py-2 rounded-lg font-medium whitespace-nowrap transition-all duration-200 ease-in-out ${
1434
  selectedWeek === week
1435
+ ? 'bg-ui-neonBlue text-white'
1436
+ : 'bg-ui-panel text-ui-text hover:bg-white border border-ui-border'
1437
  }`}
1438
  >
1439
  Week {week}
 
1446
  {isWeekTransitioning && (
1447
  <div className="fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 z-50">
1448
  <div className="bg-white rounded-lg shadow-lg p-4 flex items-center space-x-3">
1449
+ <div className="animate-spin rounded-full h-6 w-6 border-b-2 border-ui-neonBlue"></div>
1450
  <span className="text-gray-700 font-medium">Loading...</span>
1451
  </div>
1452
  </div>
 
1454
 
1455
  {/* Translation Brief - Shown once at the top (standalone allowed) */}
1456
  {!isWeekTransitioning && weeklyPracticeWeek && weeklyPracticeWeek.translationBrief ? (
1457
+ <div className="bg-ui-panel rounded-xl p-8 mb-8 border border-ui-border">
1458
  <div className="flex items-center justify-between mb-4">
1459
  <div className="flex items-center space-x-2">
1460
+ <div className="bg-ui-bg rounded-full p-2">
1461
+ <BookOpenIcon className="h-5 w-5 text-ui-neonBlue" />
1462
  </div>
1463
+ <h3 className="text-ui-text font-semibold text-xl">Translation Brief</h3>
1464
  </div>
1465
  {JSON.parse(localStorage.getItem('user') || '{}').role === 'admin' && (
1466
  <div className="flex items-center space-x-2">
 
1488
  <>
1489
  <button
1490
  onClick={startEditingBrief}
1491
+ className="bg-ui-bg hover:bg-white text-ui-text px-3 py-1 rounded-lg transition-colors duration-200"
1492
  >
1493
  <PencilIcon className="h-4 w-4" />
1494
  </button>
 
1520
  />
1521
  </div>
1522
  ) : (
1523
+ <div className="text-ui-text leading-relaxed text-lg font-smiley whitespace-pre-wrap">{renderFormatted(weeklyPracticeWeek.translationBrief || '')}</div>
1524
  )}
1525
  </div>
1526
  ) : (