rm unused after migrate to api
This commit is contained in:
1 parent
f3febbe3a9
commit
4de352e2df
25 files changed
-1149
No files matched your search
@@ -1,22 +0,0 @@
|
||||
const courses = {
|
||||
painting: ['Живопись', ''],
|
||||
drawing: ['Рисунок', '/courses/drawing'],
|
||||
sculpting: ['Скульптура', ''],
|
||||
sculpture: ['Скульптура', ''],
|
||||
ceramic: ['Керамика', '/courses/ceramics'],
|
||||
ceramics: ['Керамика', '/courses/ceramics'],
|
||||
composition: ['Композиция', ''],
|
||||
'easel-composition': ['Станковая композиция', ''],
|
||||
dpi: ['ДПИ', ''],
|
||||
'art-talks': ['Беседа по искусству', ''],
|
||||
history: ['История искусства', '/courses/art-history'],
|
||||
cg: ['Комп. графика', '/courses/cg'],
|
||||
}
|
||||
|
||||
export function getCourse(id) {
|
||||
const course = id in courses ? courses[id] : null
|
||||
if (!course) return null
|
||||
|
||||
const [title, url] = course
|
||||
return {id, title, url}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
export const autumnMonth = 8;
|
||||
export const springMonth = 0;
|
||||
|
||||
export function scheduleDate(schedule){
|
||||
let {period, semester} = schedule;
|
||||
|
||||
let i = semester === 'spring' ? 1 : 0;
|
||||
let year = getPeriod(period)[i];
|
||||
|
||||
return new Date(
|
||||
year,
|
||||
i ? springMonth : autumnMonth,
|
||||
1
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* f("2012-2015") -> [2012, 2015]
|
||||
* f(["2012", "2015"]) -> [2012, 2015]
|
||||
* f([2012, 2015]) -> [2012, 2015]
|
||||
*
|
||||
* @param i
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getPeriod(i){
|
||||
if (typeof i === 'string') return getPeriod(i.split('-'));
|
||||
|
||||
return i.map(Number);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* f("2012-2015") -> "2012-2015"
|
||||
* f(["2012", "2015"]) -> "2012-2015"
|
||||
* f([2012, 2015]) -> "2012-2015"
|
||||
*
|
||||
* @param i
|
||||
* @returns {*}
|
||||
*/
|
||||
export function getPeriodString(i) {
|
||||
return getPeriod(i)
|
||||
.join('-')
|
||||
}
|
||||
Reference in new issue
Block a user