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
|
| 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-
|
| 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-
|
| 1073 |
-
<h1 className="text-3xl font-bold text-
|
| 1074 |
</div>
|
| 1075 |
-
<p className="text-
|
| 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-
|
| 1090 |
-
: 'bg-
|
| 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-
|
| 1114 |
<div className="flex items-center justify-between mb-4">
|
| 1115 |
<div className="flex items-center space-x-3">
|
| 1116 |
-
<div className="bg-
|
| 1117 |
-
<DocumentTextIcon className="h-5 w-5 text-
|
| 1118 |
</div>
|
| 1119 |
-
<h3 className="text-
|
| 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-
|
| 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-
|
| 1179 |
)}
|
| 1180 |
|
| 1181 |
{/* Group Google Doc (refined) */}
|
| 1182 |
-
<div className="mt-6 bg-
|
| 1183 |
<div className="px-6 pt-6">
|
| 1184 |
-
<h4 className="text-2xl font-bold text-
|
| 1185 |
-
<p className="mt-2 text-
|
| 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-
|
| 1192 |
-
<p className="text-
|
| 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-
|
| 1201 |
<div className="flex items-center justify-between mb-4">
|
| 1202 |
<div className="flex items-center space-x-3">
|
| 1203 |
-
<div className="bg-
|
| 1204 |
-
<DocumentTextIcon className="h-5 w-5 text-
|
| 1205 |
</div>
|
| 1206 |
-
<h3 className="text-
|
| 1207 |
</div>
|
| 1208 |
<button
|
| 1209 |
onClick={startAddingBrief}
|
| 1210 |
-
className="bg-
|
| 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-
|
| 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-
|
| 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-
|
| 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-
|
| 1419 |
-
<h1 className="text-3xl font-bold text-
|
| 1420 |
</div>
|
| 1421 |
-
<p className="text-
|
| 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-
|
| 1436 |
-
: 'bg-
|
| 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-
|
| 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-
|
| 1458 |
<div className="flex items-center justify-between mb-4">
|
| 1459 |
<div className="flex items-center space-x-2">
|
| 1460 |
-
<div className="bg-
|
| 1461 |
-
<BookOpenIcon className="h-5 w-5 text-
|
| 1462 |
</div>
|
| 1463 |
-
<h3 className="text-
|
| 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-
|
| 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-
|
| 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 |
) : (
|