Skip to content

Commit fb150e3

Browse files
Merge pull request #248 from nodejsjp/feature/silver-sponsers
シルバースポンサーを job board に載せる
2 parents f0d7d5e + 82b3b1a commit fb150e3

File tree

20 files changed

+90
-5
lines changed

20 files changed

+90
-5
lines changed

bulbofile.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,29 @@ asset('source/news/**/*.md')
8383
.pipe(layout('news')) // Single news page
8484
]))
8585

86-
const postedAt = x => x.fm.postedAt ? x.fm.postedAt.valueOf() : 0
86+
/**
87+
* 求人の掲載日の unixtime を返す
88+
* @param {Vinyl} file
89+
* @return {number}
90+
*/
91+
const postedAt = file => file.fm.postedAt ? file.fm.postedAt.valueOf() : 0
92+
93+
// 各スポンサークラスの重み付け
94+
const classWeight = { platinum: 3, gold: 2, silver: 1 }
95+
96+
/**
97+
* 求人のクラスの重み付けを返す
98+
* @param {Vinyl} file
99+
* @return {number}
100+
*/
101+
const getClassWeight = file => classWeight[file.fm.class] || 0
102+
103+
/**
104+
* ジョブボードのソート関数
105+
* class (platinum/gold/silver) で並べた上で掲載順で並べる
106+
*/
107+
const jobboardSort = (x, y) => getClassWeight(y) - getClassWeight(x) || postedAt(y) - postedAt(x)
108+
87109
// Jobboard pages
88110
asset('source/jobs/**/*.md')
89111
.watch('source/**/*.{md,njk}')
@@ -93,7 +115,7 @@ asset('source/jobs/**/*.md')
93115
src
94116
.pipe(accumulate('jobboard.html', {
95117
debounce: true,
96-
sort: (x, y) => postedAt(y) - postedAt(x)
118+
sort: jobboardSort
97119
}))
98120
.pipe(layout('jobboard')), // Job index page
99121
src
5.43 KB
Loading
5.38 KB
Loading
7.46 KB
Loading
4.36 KB
Loading
3.73 KB
Loading
2.33 KB
Loading

source/jobs/.gitkeep

Whitespace-only changes.

source/jobs/2017/cyberagent.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: 株式会社サイバーエージェント
3+
url: https://www.cyberagent.co.jp/
4+
class: silver
5+
image: images/company-logo/cyberagent.png
6+
postedAt: 2017-09-22
7+
---
8+
9+
1998年設立。日本のインターネット業界黎明期より、業界を牽引する会社の一つとして、事業を拡大。 現在はインターネットテレビ「AbemaTV」、定額制音楽配信サービス「AWA」、国内最大のブログサービス「Ameba」などを運営するほか、インターネット広告代理店として国内売上高No.1、スマートフォンゲームにおいても国内有数の企業として、日本を代表するインターネット企業の1社となっている。

source/jobs/2017/cybozu.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: サイボウズ株式会社
3+
url: https://kintone.cybozu.com/jp/
4+
class: silver
5+
image: images/company-logo/cybozu.png
6+
postedAt: 2017-09-22
7+
---
8+
9+
サイボウズは業務アプリ開発プラットフォーム「kintone」をはじめとする、チーム・コラボレーションを支援するクラウドサービスを開発・提供しています。グローバルに拠点をもつ企業や公共団体などの大規模チームから、企業間プロジェクト、ボランティア、家族などの小規模チームまで幅広いお客様にご利用いただいています。

0 commit comments

Comments
 (0)