Contest rule: ACM/ICPC

This commit is contained in:
masnn committed 2020-04-15 18:48:17 +08:00
1 parent d1ec9064fc
commit e06283c0cc
43 files changed
+158 -891

No files matched your search

+6 -9
View File
@@ -37,7 +37,7 @@ export default function (env = {}) {
return {
loader: 'babel-loader',
options: {
...require(root('package.json')).babelForProject, // eslint-disable-line
...require(root('package.json')).babelForProject, // eslint-disable-line
cacheDirectory,
},
};
@@ -165,11 +165,6 @@ export default function (env = {}) {
// don't include momentjs locale files
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new MonacoWebpackPlugin({
// available options are documented at https://github.com/Microsoft/monaco-editor-webpack-plugin#options
languages: ['cpp', 'csharp', 'java', 'javascript', 'python', 'rust', 'ruby', 'php', 'pascal', 'go'],
}),
new ExtractCssPlugin({
filename: 'vj4.css?[contenthash:10]',
allChunks: true,
@@ -204,9 +199,6 @@ export default function (env = {}) {
},
}),
env.production
? new UglifyJsPlugin({ sourceMap: true })
: function () { },
env.production
? new OptimizeCssAssetsPlugin()
: function () { },
@@ -228,6 +220,11 @@ export default function (env = {}) {
},
}),
new MonacoWebpackPlugin({
// available options are documented at https://github.com/Microsoft/monaco-editor-webpack-plugin#options
languages: ['cpp', 'csharp', 'java', 'javascript', 'python', 'rust', 'ruby', 'php', 'pascal', 'go'],
}),
// Finally, output asset hashes
new StaticManifestPlugin({
fileName: 'static-manifest.json',
+1 -5
View File
@@ -252,10 +252,6 @@ $training-section-status-icon = {
$contest-color = {
'acm': #6BB67A,
'oi': #F5C735,
'homework': #FFCDCD,
}
// Homework Status
$homework-status-color = {
'not_started': $text-2-color,
'ongoing': $success-color,
}
@@ -1,4 +0,0 @@
.homework-status--text
for key, value in $homework-status-color
&.{key}
color: value
-13
View File
@@ -1,13 +0,0 @@
.page--homework_detail
.col--status
width: rem(150px)
.col--submit-at
width: rem(150px)
.col--problem
border-left: 1px solid $table-border-color
+mobile()
.col--submit-at
display: none
-37
View File
@@ -1,37 +0,0 @@
import { NamedPage } from 'vj/misc/PageLoader';
import Calendar from 'vj/components/calendar';
import i18n from 'vj/utils/i18n';
import { parse as parseMongoId } from 'vj/utils/mongoId';
const page = new NamedPage('homework_main', () => {
// Homework Calendar
if (Context.docs) {
const events = Context.docs.map((doc) => ({
beginAt: doc.begin_at * 1000,
endAt: doc.end_at * 1000,
title: doc.title,
maskFrom: doc.penalty_since ? doc.penalty_since * 1000 : null,
maskTitle: i18n('Time Extension'),
colorIndex: parseMongoId(doc.id).timestamp % 12,
link: doc.url,
}));
const calendar = new Calendar(events);
calendar.getDom().appendTo('[name="calendar_entry"]');
$('[name="homework_display"]').change((ev) => {
switch (ev.currentTarget.value) {
case 'calendar':
$('.homework__list').hide();
$('[name="calendar_entry"]').show();
break;
case 'list':
$('.homework__list').show();
$('[name="calendar_entry"]').hide();
break;
default:
throw new Error('Unexpected display parameter');
}
});
}
});
export default page;
-14
View File
@@ -1,14 +0,0 @@
$highlight-button-color = #F6DF45
.page--homework_main
.homework__title
line-height: 1.2em
margin-bottom: rem(10px)
font-size: rem($font-size-title)
.homework__info-attended
color: $success-color
.homework__date
margin-right: rem(10px)
white-space: nowrap
-22
View File
@@ -1,22 +0,0 @@
.page--homework_scoreboard
.col--rank
width: rem(70px)
border-right: 1px solid $table-border-color
.col--user
width: rem(140px)
.col--total_score, .col--total_time_str, .col--solved_problems
width: rem(100px)
text-align: center
.col--problem_detail
border-left: 1px solid $table-border-color
text-align: center
+mobile()
.col--user
width: auto
.col--problem_detail
display: none