Skip to content

super-unprofessional-league/hjlpfc

Repository files navigation

东南大学吴健雄足球院队网站

By shrekshao狄学长

EN | 简体中文

示例

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

已支持以下功能:

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

快速开始

  • 安装 Jekyll (参考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 队伍数据结构

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

games 比赛数据结构

{
    "date": "2018/11/10/9:30",
    "type": "group-r1",
    "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 联赛设置

{
  "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
    • ["主队文件名(无后缀)", "客队文件名(无后缀)", "比赛文件名(无后缀)"]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published