Skip to content

Commit

Permalink
tag system
Browse files Browse the repository at this point in the history
  • Loading branch information
shrekshao committed Aug 12, 2022
1 parent ebf6194 commit 972fe5f
Show file tree
Hide file tree
Showing 16 changed files with 170 additions and 11 deletions.
6 changes: 4 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1" if Gem.win_platform?


gem "webrick", "~> 1.7"

gem "webrick", "~> 1.7"

gem 'jekyll-tagging'
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ GEM
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-tagging (1.1.0)
nuggets
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.4.0)
Expand All @@ -50,6 +52,7 @@ GEM
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
nuggets (1.6.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.7)
Expand Down Expand Up @@ -77,6 +80,7 @@ PLATFORMS
DEPENDENCIES
jekyll (~> 4.2.0)
jekyll-feed (~> 0.15.1)
jekyll-tagging
minima (~> 2.5.1)
tzinfo-data
wdm (~> 0.1.1)
Expand Down
5 changes: 3 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ theme: minima
plugins:
- jekyll-feed
- jekyll-seo-tag
- jekyll/tagging

# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
Expand All @@ -44,5 +45,5 @@ exclude:
- vendor/ruby/
- docs/

# exclude:
tag_page_layout: tag_page
tag_page_dir: tag
1 change: 1 addition & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
{%- include google-analytics.html -%}
{%- endif -%}
<link rel="stylesheet" type="text/css" href="{{"/assets/css/custom-football-squad.css" | relative_url }}">
<link rel="stylesheet" type="text/css" href="{{"/assets/css/tags.css" | relative_url }}">
</head>
7 changes: 7 additions & 0 deletions _includes/tags.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{%- if include.tags != nil -%}
<ul class="tags">
{%- for tag in include.tags -%}
<li><a href="{{tag | tag_url}}" class="tag">{{tag}}</a></li>
{%- endfor -%}
</ul>
{%- endif -%}
8 changes: 1 addition & 7 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@ <h1 class="page-heading">{{ page.title }}</h1>
{{ content }}

{%- if site.posts.size > 0 -%}
<h2 class="post-list-heading">
{% if page.list_title != nil %}
{% t page.list_title %}
{% else %}
Posts
{% endif %}
</h2>
<ul class="post-list">
{%- for post in site.posts -%}
<li>
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
<span class="post-meta">{{ post.date | date: date_format }}</span>
{%- include tags.html tags=post.tags -%}
<h3>
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
Expand Down
41 changes: 41 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
layout: default
---
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">

<header class="post-header">
<h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
<p class="post-meta">
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
{{ page.date | date: date_format }}
</time>
{%- if page.modified_date -%}
~
{%- assign mdate = page.modified_date | date_to_xmlschema -%}
<time class="dt-modified" datetime="{{ mdate }}" itemprop="dateModified">
{{ mdate | date: date_format }}
</time>
{%- endif -%}
{%- if page.author -%}
• {% for author in page.author %}
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span class="p-author h-card" itemprop="name">{{ author }}</span></span>
{%- if forloop.last == false %}, {% endif -%}
{% endfor %}
{%- endif -%}</p>

{%- include tags.html tags=page.tags -%}

</header>

<div class="post-content e-content" itemprop="articleBody">
{{ content }}
</div>

{%- if site.disqus.shortname -%}
{%- include disqus_comments.html -%}
{%- endif -%}

<a class="u-url" href="{{ page.url | relative_url }}" hidden></a>
</article>
36 changes: 36 additions & 0 deletions _layouts/tag_page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
layout: default
---

<div class="home">
{%- if page.title -%}
<h1 class="page-heading">{{ page.title }}</h1>
{%- endif -%}

{%- if page.tag -%}
<h2 class="page-heading">{{ page.tag }}</h2>
{%- endif -%}

{{ content }}

{%- if site.posts.size > 0 -%}
<ul class="post-list">
{%- for post in page.posts -%}
<li>
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
<span class="post-meta">{{ post.date | date: date_format }}</span>
{%- include tags.html tags=post.tags -%}
<h3>
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</h3>
{%- if site.show_excerpts -%}
{{ post.excerpt }}
{%- endif -%}
</li>
{%- endfor -%}
</ul>
{%- endif -%}

</div>
2 changes: 2 additions & 0 deletions _posts/2022-02-13-posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ game_key: "2022-02-13-1"

title: "2022 春季联赛 第二轮 EBU 总结"
categories: news

tags: 9p
---


Expand Down
2 changes: 2 additions & 0 deletions _posts/2022-03-11-training-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: game_post

title: "2022/03/11 训练赛录像总结"
categories: news

tags: 11p
---


Expand Down
2 changes: 2 additions & 0 deletions _posts/2022-07-16-vs-cmu.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ game_key: "2022-07-16-1"

title: "校联杯首战告捷GSF 2:1 雪城CMU联队 狄克梅开二度 锡麟屡献神扑"
categories: news
tags: gamepost 7p
author: 狄克
---

此前约半年时间,GSF在正式比赛中难尝一胜,主教练吴骏帅位岌岌可危,于是他励精图治改革训练战术,并且喊出了拿下校联杯7人制社区盾奖杯,夺取GSF队史首冠的豪言壮语以期重振球队雄风(同时保住帅位)。在吴指导的激情感召下(其实是内卷打卡考勤制度的威逼下)GSF众将也已经厉兵秣马,士气高涨地投入训练和友谊赛一月有余,摩拳擦掌。企图在此次系列赛下一球成名,站稳主力位置的新老球员不在少数。
Expand Down
2 changes: 2 additions & 0 deletions _posts/2022-07-23-0-vs-sbk.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ game_key: "2022-07-23-1"

title: "克星神威再现造三球!榜首大战GSF 3:2 逆转绝杀SBK"
categories: news
tags: gamepost 7p
author: 狄克
---

2022校联杯第三比赛日,一日双赛,第三轮GSF迎来榜首大战,对阵两场同积6分的SouthBay Knight。
Expand Down
2 changes: 2 additions & 0 deletions _posts/2022-07-23-first-champion.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ season_key: "22q3-1"

title: "队史首冠!GSF勇夺校联杯社区盾"
categories: news
tags: gamepost 7p
author: 狄克
---

{% assign gk = "2022-07-16-1" %}
Expand Down
2 changes: 2 additions & 0 deletions _posts/2022-07-29-bio-ningguanghan.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: game_post

title: "【人物小传】MP5球王宁广涵"
categories: news
tags: bio
author: 宁广涵
---

*编者按:值此GSF夺取队史首冠之际,众球星展开了忆苦思甜活动,追忆球队历史,表彰球队名宿 ~~自我夸奖~~。以期球队未来能获得更多美好的瞬间*
Expand Down
2 changes: 2 additions & 0 deletions _posts/2022-08-06-vs-calblue.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ game_key: "2022-08-06-1"

title: "GSF United大胜CalBlue迎开门红,Colin逆天倒钩艳压梅西一剑封喉"
categories: news
tags: gamepost 9p
author: 宁广涵
---

8月6日,2022年湾区华人足联9人制联赛第一轮拉开了序幕。GSF United迎战CalBlue。CalBlue今年在华人足联11人制联赛中刚刚获得了冠军,是一支传统强队。而GSF也是在刚刚闭幕的校联杯7人制比赛中获得了社区盾的冠军。两个冠军的对决,注定精彩纷呈。
Expand Down
59 changes: 59 additions & 0 deletions assets/css/tags.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.tags {
list-style: none;
margin: 0;
overflow: hidden;
padding: 0;
}

.tags li {
float: left;
}

.tag {
background: #eee;
border-radius: 3px 0 0 3px;
color: #999;
display: inline-block;
height: 15px;
line-height: 15px;
padding: 0 10px 0 11px;
position: relative;
margin: 0 10px 10px 0;
text-decoration: none;
-webkit-transition: color 0.2s;

font-size: 10px;
margin: 5px;
}

.tag::before {
background: #fff;
border-radius: 10px;
/* box-shadow: inset 0 1px rgba(0, 0, 0, 0.25); */
content: '';
height: 3px;
left: 5px;
position: absolute;
width: 3px;
top: 5px;
}

.tag::after {
background: #fff;
border-bottom: 7.5px solid transparent;
border-left: 5px solid #eee;
border-top: 7.5px solid transparent;
content: '';
position: absolute;
right: 0;
top: 0;
}

.tag:hover {
background-color: rgb(85, 145, 224);
color: white;
}

.tag:hover::after {
border-left-color: rgb(85, 145, 224);
}

0 comments on commit 972fe5f

Please sign in to comment.