From 29bbd42c1d3fbb4d9c52678fc1747befd1d2ff2e Mon Sep 17 00:00:00 2001 From: Gauri Date: Sat, 31 Jan 2026 03:20:58 +0530 Subject: [PATCH] feat: Implement consistent section card styling across contest view --- frontend/src/views/ContestView.vue | 769 +++++++++++++---------------- 1 file changed, 337 insertions(+), 432 deletions(-) diff --git a/frontend/src/views/ContestView.vue b/frontend/src/views/ContestView.vue index 83cdc09d..7742b800 100644 --- a/frontend/src/views/ContestView.vue +++ b/frontend/src/views/ContestView.vue @@ -11,14 +11,13 @@ title="View Contest Leaderboard"> Leaderboard - + - @@ -41,7 +40,6 @@ -
@@ -89,329 +87,313 @@
-
-
- -
-
-
Contest Details
-
-
-

Project: {{ contest.project_name }}

-

Status: {{ contest.status }}

-

Start Date: {{ formatDate(contest.start_date) }}

-

End Date: {{ formatDate(contest.end_date) }}

- - Organizers: -
-
- - {{ organizer }} -
-
+ + +
+
+
Contest Details
+
+
+

Project: {{ contest.project_name }}

+

Status: {{ contest.status }}

+

Start Date: {{ formatDate(contest.start_date) }}

+

End Date: {{ formatDate(contest.end_date) }}

+ + Organizers: +
+
+ + {{ organizer }}
+
- -
-
-
-
Scoring System
+ +
+
+
Scoring System
+
+
+ +
+
+ Accepted points: {{ contest.scoring_parameters.max_score }} + Rejected points: {{ contest.scoring_parameters.min_score }}
-
- -
-
- Accepted points: {{ contest.scoring_parameters.max_score }} - Rejected points: {{ contest.scoring_parameters.min_score }} -
- -
-
-
- {{ param.name }} - {{ param.weight }}% -
-

{{ param.description }}

-
-
- -
- - Each parameter scored 0-10, weighted average calculated +
+
+
+ {{ param.name }} + {{ param.weight }}%
+

{{ param.description }}

+
- -
-
-
- Accepted - {{ contest.marks_setting_accepted }} -
+
+ + Each parameter scored 0-10, weighted average calculated +
+
-
- Rejected - {{ contest.marks_setting_rejected }} -
-
+ +
+
+
+ Accepted + {{ contest.marks_setting_accepted }} +
+
+ Rejected + {{ contest.marks_setting_rejected }}
+
- -
-
-
Description
-
-
-

{{ contest.description }}

-
+ +
+
+
Description
+
+
+

{{ contest.description }}

+
- -
-
-
Contest Rules
-
-
-
{{ contest.rules.text }}
-
+ +
+
+
Contest Rules
+
+
{{ contest.rules.text }}
+
+
- -
-
-
Submission Type Allowed
-
-
-

- - {{ - contest.allowed_submission_type === 'new' - ? 'New Articles Only' - : contest.allowed_submission_type === 'expansion' - ? 'Improved Articles Only' - : 'Both (New Articles + Improved Articles)' - }} - -

- -

- - • New Articles = Completely new Wikipedia article created during the contest.
- • Improved Articles = An existing article improved or expanded with substantial - content. -
-

-
+ +
+
+
Submission Type Allowed
+
+

+ + {{ + contest.allowed_submission_type === 'new' + ? 'New Articles Only' + : contest.allowed_submission_type === 'expansion' + ? 'Improved Articles Only' + : 'Both (New Articles + Improved Articles)' + }} + +

+ +

+ + • New Articles = Completely new Wikipedia article created during the contest.
+ • Improved Articles = An existing article improved or expanded with substantial + content. +
+

+
+
- -
-
-
Required Categories
-
-
-

- Articles must belong to the following MediaWiki categories: -

- - - - Submitted articles must be categorized under at least one of these categories. - -
+ +
+
+
Required Categories
+
+
+

+ Articles must belong to the following MediaWiki categories: +

+ + + + Submitted articles must be categorized under at least one of these categories. +
+
- -
-
-
Minimum Reference Count
-
-
-

- {{ contest.min_reference_count }} References required -

- - - Submitted articles must have at least {{ contest.min_reference_count }} external references. - -
+ +
+
+
Minimum Reference Count
+
+

+ {{ contest.min_reference_count }} References required +

+ + + Submitted articles must have at least {{ contest.min_reference_count }} external references. + +
+
- -
-
-
Jury Members
-
-
-
-
- - {{ jury }} -
+ +
+
+
Jury Members
+
+
+
+
+ + {{ jury }}
+
- -
-
-
-
Submissions
- - - -
+ +
+
+
+
Submissions
+ + +
+
+
+
+ No submissions yet for this contest.
-
-
- No submissions yet for this contest. -
-
- - - - - - - - - - - - - - - - - - - - + + + + + + + +
Article TitleArticle AuthorSubmitted ByStatusScoreSubmitted AtActions
- - {{ submission.article_title }} - - - -
- Total bytes: - {{ formatByteCountWithExact((submission.article_word_count || 0) + - (submission.article_expansion_bytes || 0)) }} -
- -
- Original bytes: - {{ formatByteCountWithExact(submission.article_word_count) }} -
- -
- - Expansion bytes: - - {{ submission.article_expansion_bytes >= 0 ? '+' : '-' }}{{ - formatByteCountWithExact(Math.abs(submission.article_expansion_bytes)) - }} - - - {{ formatByteCountWithExact(0) }} - -
-
-
- {{ submission.article_author }} -
-
Unknown
-
- {{ formatDateShort(submission.article_created_at) }} -
- -
-
- {{ submission.latest_revision_author }} - Latest -
-
- - {{ formatDateShort(submission.latest_revision_timestamp) }} -
-
-
{{ submission.username || 'Unknown' }} - - {{ submission.status }} +
+ + + + + + + + + + + + + + + + - - - - - -
Article TitleArticle AuthorSubmitted ByStatusScoreSubmitted AtActions
+ + {{ submission.article_title }} + + +
+ Total bytes: + {{ formatByteCountWithExact((submission.article_word_count || 0) + + (submission.article_expansion_bytes || 0)) }} +
+
+ Original bytes: + {{ formatByteCountWithExact(submission.article_word_count) }} +
+
+ + Expansion bytes: + + {{ submission.article_expansion_bytes >= 0 ? '+' : '-' }}{{ + formatByteCountWithExact(Math.abs(submission.article_expansion_bytes)) + }} -
- Reviewed + + {{ formatByteCountWithExact(0) }} + +
+
+
+ {{ submission.article_author }} +
+
Unknown
+
+ {{ formatDateShort(submission.article_created_at) }} +
+
+
+ {{ submission.latest_revision_author }} + Latest
-
{{ submission.score || 0 }}{{ formatDate(submission.submitted_at) }} - - -
-
+
+ + {{ formatDateShort(submission.latest_revision_timestamp) }} +
+ +
{{ submission.username || 'Unknown' }} + + {{ submission.status }} + +
+ Reviewed +
+
{{ submission.score || 0 }}{{ formatDate(submission.submitted_at) }} + + +
+
- -
- -
- - User not loaded! - -
- - -
+ +
@@ -423,73 +405,67 @@
-
-
- -
-
-
Contest Details
-
-
-

Project: {{ contest.project_name }}

-

Status: {{ contest.status }}

-

Start Date: {{ formatDate(contest.start_date) }}

-

End Date: {{ formatDate(contest.end_date) }}

- - Organizers: -
-
- - {{ organizer }} -
+
+ +
+
+
Contest Details
+
+
+

Project: {{ contest.project_name }}

+

Status: {{ contest.status }}

+

Start Date: {{ formatDate(contest.start_date) }}

+

End Date: {{ formatDate(contest.end_date) }}

+ + Organizers: +
+
+ + {{ organizer }}
-
-
-
-
Scoring System
-
- -
- -
-
- Accepted points: {{ contest.scoring_parameters.max_score }} - Rejected points: {{ contest.scoring_parameters.min_score }} -
+
+
+
Scoring System
+
+
+ +
+
+ Accepted points: {{ contest.scoring_parameters.max_score }} + Rejected points: {{ contest.scoring_parameters.min_score }} +
-
-
-
- {{ param.name }} - {{ param.weight }}% -
-

{{ param.description }}

+
+
+
+ {{ param.name }} + {{ param.weight }}%
-
- -
- - Each parameter scored 0-10, weighted average calculated +

{{ param.description }}

- -
-
-
- Accepted - {{ contest.marks_setting_accepted }} -
+
+ + Each parameter scored 0-10, weighted average calculated +
+
-
- Rejected - {{ contest.marks_setting_rejected }} -
+ +
+
+
+ Accepted + {{ contest.marks_setting_accepted }} +
+
+ Rejected + {{ contest.marks_setting_rejected }}
@@ -497,7 +473,7 @@
-
+
Description
@@ -607,7 +583,6 @@ {{ loadingSubmissions ? 'Loading...' : 'Refreshing...' }} -
-
-