Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
shrekshao committed Dec 16, 2021
1 parent 2ab4097 commit 7d4d253
Show file tree
Hide file tree
Showing 30 changed files with 768 additions and 136 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
_site
.sass-cache
.jekyll-metadata
.jekyll-cache
10 changes: 6 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,25 @@ source "https://rubygems.org"
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8.4"
gem "jekyll", "~> 4.2.0"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
gem "minima", "~> 2.5.1"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem "jekyll-feed", "~> 0.15.1"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?
gem "wdm", "~> 0.1.1" if Gem.win_platform?


gem "webrick", "~> 1.7"
60 changes: 34 additions & 26 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,78 +1,86 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.8)
concurrent-ruby (1.1.9)
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7-x64-mingw32)
ffi (1.14.2-x64-mingw32)
ffi (1.15.3-x64-mingw32)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
i18n (1.8.10)
concurrent-ruby (~> 1.0)
jekyll (3.8.7)
jekyll (4.2.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
i18n (~> 1.0)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (= 2.3.1)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
mercenary (~> 0.4.0)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 2.0)
jekyll-feed (0.15.1)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.7.1)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (1.17.0)
kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.4.1)
listen (3.5.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mercenary (0.4.0)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.6)
rb-fsevent (0.10.4)
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.26.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.4.0-x64-mingw32)
ffi (~> 1.9)
terminal-table (2.0.0)
unicode-display_width (~> 1.1, >= 1.1.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2021.1)
tzinfo (>= 1.0.0)
unicode-display_width (1.7.0)
wdm (0.1.1)
webrick (1.7.0)

PLATFORMS
x64-mingw32

DEPENDENCIES
jekyll (~> 3.8.4)
jekyll-feed (~> 0.6)
minima (~> 2.0)
jekyll (~> 4.2.0)
jekyll-feed (~> 0.15.1)
minima (~> 2.5.1)
tzinfo-data
wdm (~> 0.1.0)
wdm (~> 0.1.1)
webrick (~> 1.7)

BUNDLED WITH
2.2.1
2.2.32
206 changes: 206 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
# 超业余足球联赛网站生成器
# Super Unprofessional League Website Generator

By shrekshao狄学长

[EN](docs/EN.md) | [简体中文](#)

[示例](https://super-unprofessional-league.github.io/super-unprofessional-league-website/)

一个基于Jekyll的静态网站生成器,转为建造超业余足球联赛网站定制,适用于校园内赛事,社区联赛等。

![](docs/tournament-page.png)

![](docs/team-page.png)

![](docs/game-page.png)

已支持以下功能:
* 多个赛季
- 联赛(传统积分榜,积分等数据根据比赛信息自动计算)
- 杯赛(小组赛积分榜 + 淘汰赛树状图)
* 比赛页面
- 比分
- 各类信息: 日期, 点球决胜,弃权等
- 比赛事件
- 进球
- 乌龙球
- 点球
- 红黄牌
- 换人
- 照片
- 视频外链嵌入
* 球员数据榜
- 射手榜(进球数根据比赛信息自动计算)
* 队伍页面
- 球员列表
- 首发阵容
- 照片
* 语言翻译支持
* 战报,新闻,通知等文章发布



## 快速开始

* 安装 [Jekyll](https://jekyllrb.com/docs/) (参考Jekyll官方文档)
* `bundle install`
* 开发状态下 `bundle exec jekyll serve`
* 生成网站 `bundle exec jekyll build``_site/`下)
* `_site/` 目录下 `git init`, push 到 github上或其他服务商来部署(参考 github page 文档等)
* 注意:因为项目使用了自定义Jekyll plugin所以无法使用github自带的自动生成


## 添加你的联赛数据

所有比赛相关数据在 `_data/` 目录下

所有静态文件(照片等)置于 `assets` 目录下

### _data 数据结构示例

* _data
- seasons
- 2018-2019
- config.json (可选,若无则默认为联赛模式)
- teams
* bayern.json
* dortmund.json
- games
* 2018-11-10-1.json

### teams 队伍数据结构

```json
{
"display_name": "多特蒙德",
"description": "blahblahblah...",
"logo": "bvb09.jpg",
"players": {
"starting": [
{
"number": 1,
"name": "布尔基",
"img": "placeholder-player.jpg",
"locator": "GK",
"position": "门将"
}
,{
"number": 28,
"name": "维特塞尔",
"img": "placeholder-player.jpg",
"locator": "CDM",
"position": "中场"
}
,{
"number": 11,
"name": "罗伊斯",
"img": "placeholder-player.jpg",
"locator": "CAM",
"position": "中场"
}
],
"subs": [
{
"number": 9,
"name": "哈兰德",
"img": "placeholder-player.jpg",
"position": "前锋"
}

]
}
}
```

* 队伍文件名似乎暂时只支持ascii英文字符
* 阵容位置缩写 (`GK`, `CM`, etc) 对应到css里预设的位置 ([在这里看全部可用位置缩写](https://github.com/super-unprofessional-league/super-unprofessional-league-website/blob/master/assets/css/custom-football-squad.css#L70))

![](docs/field-locator.png)

### games 比赛数据结构

```json
{
"date": "2018/11/10/9:30",
"type": "group-r1",
"schedule": false,
"home": {
"key": "dortmund",
"score": 3,
"events": [
{"type": "yellow", "time": 29, "player": "Weigl"},
{"type": "yellow", "time": 36, "player": "Akanji"},
{"type": "off", "time": 46, "player": "Weigl"},
{"type": "sub", "time": 46, "player": "Dahoud"},
{"type": "penalty", "time": 49, "player": "Reus"},
{"type": "goal", "time": 67, "player": "Reus"},
{"type": "goal", "time": 73, "player": "Paco Alcacer"}
]
},
"away": {
"key": "bayern",
"score": 2,
"events": [
{"type": "goal", "time": 26, "player": "Lewandowski"},
{"type": "goal", "time": 52, "player": "Lewandowski"},
{"type": "yellow", "time": 55, "player": "Ribery"}
]
}
}
```

* `type` string若包含`group`则为小组赛阶段比赛

### config.json 联赛设置

```json
{
"display_name": "健雄杯2013",
"type": "group + knockout",
"group_stage": {
"A": [
"613111",
"610122",
"610121",
"610111"
],
"B": [
"611111",
"613121",
"610113",
"610112"
]
},
"knockout_stage": [
[
["610131", "610111", "2013-10-21-1"],

["613111", "610112", "2013-10-20-1"],

["613131", "611131", ""],

["610132", "611111", "2013-10-15-1"]
],
[
["610111", "613111", "2013-11-14-1"],

["611131", "610132", "2013-11-15-1"]
],
[
["613111","611131", "2013-11-17-1"]
]
],
"winner": "613111",
"rules": "*大一球队直接进入淘汰赛\n*各小组前两名出线"
}
```

* 若无此文件则赛季默认为联赛
* `type`
- `league`
- `group + knockout`
* 若为 `group + knockout`
* `group_stage``小组名` => `队伍文件名(无后缀)`
* `knockout_stage`每个数组轮次为2的幂次递减,... 16, 8, 4, 2, 1
* `["主队文件名(无后缀)", "客队文件名(无后缀)", "比赛文件名(无后缀)"]`
7 changes: 3 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: NCCSF
author: 北加州华人足球联盟
title: NCCSF北加足球生涯
author: 狄学长
# email: [email protected]
description: >- # this means to ignore newlines until "baseurl:"
北加州华人足球联盟(Northern California Chinese Soccer Federation, aka NCCSF) 是由旧金山湾区华人球队共同发起成立的, 经美国联邦和加州政府认证的非盈利组织(501c.4 nonprofit organization)。 NCCSF 致力于发展华人社区群众足球运动,提高社区球员/球队数量及足球水平,促进社区球队/球员之间友好交流,从而达到提高足球运动在北加州/北美社区的普及度及增强华人体质的目标。
通过参与组织各类有有益社区的足球比赛及活动,NCCSF 力争为北加州华人社区足球队提供良好的后勤保障服务,为成员球队和广大足球爱好者打造一个资源共享的公共平台。
NCCSF非官方战报赛果阵容,记录足球生活。战报倾向性取决于作者转会到哪个队踢
baseurl: "" # the subpath of your site
url: "" # the base hostname & protocol for your site, e.g. http://example.com
lang: zh
Expand Down
6 changes: 6 additions & 0 deletions _data/seasons/21w/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"display_name": "21冬",
"description": "2021年冬季联赛",
"type": "league",
"rules": "*本次联赛共有16支球队参加,120场比赛。\n*9v9"
}
Loading

0 comments on commit 7d4d253

Please sign in to comment.