Skip to content

Commit 5f3e2df

Browse files
committed
お知らせ一覧の動的化 #11
1 parent 02a0c7d commit 5f3e2df

File tree

8 files changed

+131
-24
lines changed

8 files changed

+131
-24
lines changed

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@
99
gfm_quirks: paragraph_end
1010
collections:
1111
session:
12+
output: true
13+
news:
1214
output: true

_includes/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ <h3 class="gnav__title text-center">DojoCon Japan 2018</h3>
6464
<ul class="gnav__menu d-md-flex flex-md-row justify-content-center">
6565
<li><a class="gnav_item" href="/">HOME</a></li>
6666
<li><a class="gnav_item" href="/#about">ABOUT</a></li>
67-
<li><a class="gnav_item" href="/#news">NEWS</a></li>
67+
<li><a class="gnav_item" href="/news/">NEWS</a></li>
6868
<li><a class="gnav_item" href="/#access">ACCESS</a></li>
6969
<li><a class="gnav_item" href="/session/">SESSION</a></li>
7070
<li><a class="gnav_item" href="/#sponsor">SPONSOR</a></li>

_layouts/news.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{% include header.html %}
2+
<article class="entry mb-5">
3+
<div class="container">
4+
<div class="row justify-content-md-center">
5+
<div class="col-12 col-md-8">
6+
<header class="entry__header">
7+
<h2 class="entry__title">{{page.j-title}}</h2>
8+
</header>
9+
<div class="entry__content">
10+
{{content}}
11+
</div>
12+
<hr>
13+
<p class="text-right">{{page.update}}</p>
14+
</div>
15+
</div>
16+
</div>
17+
</article>
18+
<aside class="text-center mt-5">
19+
<a class="btn btn__green btn__xl" href="/news/" role="button">News一覧へ</a>
20+
</aside>
21+
{% include footer.html %}

_news/2018-07-14_contest.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: News
3+
j-title : プログラミングコンテスト作品募集!
4+
description: 子供達に海外の文化やコミュニティーにふれてもらいたい。その思いから、昨年に続き今年も『Go Global! DojoCon Japan 2018プログラミングコンテスト』を開催いたします。最優秀賞受賞者は、アイルランドで2019年6月頃に開催されるCoolest Projectsへご招待します。
5+
update: 2018.07.14
6+
thumbnail: goglobal_contest.jpg
7+
direct-link: contest.html
8+
layout: news
9+
---
10+
11+
子供達に海外の文化やコミュニティーにふれてもらいたい。その思いから、昨年に続き今年も『Go Global! DojoCon Japan 2018プログラミングコンテスト』を開催いたします。最優秀賞受賞者は、アイルランドで2019年6月頃に開催されるCoolest Projectsへご招待します。
12+
13+
[詳しくはこちらをご覧くださいませ。](/contest.html)

_news/2018-07-14_entry-start.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: News
3+
j-title : DojoCon Japan2018参加受付を開始いたしました。
4+
description: DojoCon Japan2018参加受付を開始いたしました。お申込みはこちらから
5+
update: 2018.07.14
6+
thumbnail:
7+
layout: news
8+
---
9+
10+
DojoCon Japan2018参加受付を開始いたしました。
11+
12+
下記のEntryボタンよりPeatixに進んでいただき、申込みを行ってください。
13+
14+
15+
<div class="text-center mt-5"><a class="btn btn__green btn__xxl" href="https://dojoconjp2018.peatix.com/" target="_blank" role="button">ENTRY</a></div>

_news/2018-07-14_wanted-sponsor.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: News
3+
j-title : スポンサーシップのご案内
4+
description: 当イベントのスポンサーとしてご支援いただければ、世界中に広がるCoderDojoのネットワークを活用し、国内はもとより、世界に向けてスポンサー様のツールやサービスをアピールいただけるものと考えております。また、イベント当日はセッション登壇や、ブース出展などの特典を用意しており、イベントに参加する大人や子供たちとのリアルな交流を通して、貴社の魅力をさらにアピールすることができます。
5+
update: 2018.07.14
6+
thumbnail: sponsor.png
7+
direct-link: sponsor.html
8+
layout: news
9+
---
10+
11+
[DojoCon Japan 2018 スポンサーシップのご案内 [スライド]](https://docs.google.com/presentation/d/e/2PACX-1vTi9tgYcWf29lots9oovBMtCODvs7oUJ0Ud2PSTFqLrXtGOLVnEIDlSjRG20SEMYPSTMbe9mblOkvp5/pub?start=false&loop=false&delayms=3000&slide=id.p){:target="_blank"}
12+
13+
私達、DojoCon Japan 実行委員会は、2018年8月25日(土)サイボウズ東京オフィスにて、「DojoCon Japan 2018」を開催いたします。
14+
15+
DojoCon(CoderDojo Conference)とは、CoderDojo発祥の地、アイルランドにおいて、CoderDojo Foundation主催で年1回のペースで開催されており、主にCoderDojoを支える大人たちを対象にしたカンファレンスです。 「DojoCon Japan」はこの日本版という位置づけで2016年に「DojoCon Japan 2016」2017年に「DojoCon Japan 2017」が大阪市で開催され、本年が3回目の開催。また東京でははじめての開催となります。
16+
17+
当イベントのスポンサーとしてご支援いただければ、世界中に広がるCoderDojoのネットワークを活用し、国内はもとより、世界に向けてスポンサー様のツールやサービスをアピールいただけるものと考えております。また、イベント当日はセッション登壇や、ブース出展などの特典を用意しており、イベントに参加する大人や子供たちとのリアルな交流を通して、貴社の魅力をさらにアピールすることができます。
18+
19+
ぜひ、DojoCon Japan 2018 の スポンサーとして、当イベントにご協力をお願いいたします。
20+
21+
なお、お申込みは、下記フォームよりお願いいたします。
22+
23+
24+
<iframe src="https://docs.google.com/forms/d/e/1FAIpQLSeorer9rOpxiTyhaVu44tn4wZ4ltQTw7UEcQPdfimvroD2Paw/viewform?embedded=true" width="700" height="4000" frameborder="0" marginheight="0" marginwidth="0">読み込んでいます...</iframe>

_news/index.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: News
3+
j-title : DojoCon Japan 2018ニュースの一覧
4+
description: DojoCon Japan 2018におけるニュースの一覧
5+
layout: archive
6+
---
7+
8+
<section id="news">
9+
<div class="container">
10+
<div class="row post-list">
11+
{% for news in site.news %}
12+
{% if news.layout == "archive" %}
13+
{% else %}
14+
<div class="col-6">
15+
<article class="post-list__item">
16+
<div class="post-list__thumbnail">
17+
<a href="{%if news.direct-link %}{{ site.url }}/{{ news.direct-link }}{% else %}{{ site.url }}{{ news.url }}{% endif %}"><img
18+
src="/img/{% if news.thumbnail %}{{ news.thumbnail }}{% else %}dummy-img.png{% endif %}"
19+
alt="{{news.j-title}}の画像"></a>
20+
</div>
21+
<div class="post-list__content">
22+
<h3 class="post-list__title">{{ news.j-title }}</h3>
23+
<!--p.post-list__time-->
24+
<p class="post-list__speaker">{{ news.speaker-name }}</p>
25+
</div>
26+
<div class="post-list__more"><a class="btn btn__green btn__xl" href="{{ site.url }}{{ news.url }}"
27+
role="button">more</a></div>
28+
</article>
29+
</div>
30+
{% endif %}
31+
{% endfor %}
32+
</div>
33+
</div>
34+
</section>

index.html

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,28 @@ <h2 class="heading__01">NEWS</h2>
4949
</div>
5050
<div class="container">
5151
<div class="row post-list">
52-
<div class="col-md-6">
53-
<article class="post-list__item"><a href="https://dojoconjp2018.peatix.com/" target="_blank">
54-
<div class="post-list__thumbnail"><img src="img/dummy-img.png" alt="NEWS記事のイメージ共通画像"></div>
55-
<div class="post-list__content">
56-
<p class="post-list__date">2018.07.14</p>
57-
<h3 class="post-list__title">DojoCon Japan2018参加受付を開始いたしました。</h3>
58-
</div></a></article>
59-
</div>
60-
<div class="col-md-6">
61-
<article class="post-list__item"><a href="/sponsor.html">
62-
<div class="post-list__thumbnail"><img src="img/sponsor.png" alt="スポンサー募集ページ"></div>
63-
<div class="post-list__content">
64-
<p class="post-list__date">2018.07.14</p>
65-
<h3 class="post-list__title">スポンサー募集中</h3>
66-
</div></a></article>
67-
</div>
68-
<div class="col-md-6">
69-
<article class="post-list__item"><a href="/contest.html">
70-
<div class="post-list__thumbnail"><img src="img/goglobal_contest.jpg" alt="go global contestの画像"></div>
71-
<div class="post-list__content">
72-
<p class="post-list__date">2018.07.14</p>
73-
<h3 class="post-list__title">コンテンスト募集開始いたしました。</h3>
74-
</div></a></article>
52+
{% for news in site.news %}
53+
{% if news.layout == "archive" %}
54+
{% else %}
55+
<div class="col-6">
56+
<article class="post-list__item">
57+
<a href="{%if news.direct-link %}{{ site.url }}/{{ news.direct-link }}{% else %}{{ site.url }}{{ news.url }}{% endif %}">
58+
<div class="post-list__thumbnail">
59+
<img
60+
src="/img/{% if news.thumbnail %}{{ news.thumbnail }}{% else %}dummy-img.png{% endif %}"
61+
alt="{{news.j-title}}の画像">
62+
</div>
63+
<div class="post-list__content">
64+
<p class="post-list__date">{{ news.update }}</p>
65+
<h3 class="post-list__title">{{ news.j-title }}</h3>
66+
<!--p.post-list__time-->
67+
<p class="post-list__speaker">{{ news.speaker-name }}</p>
68+
</div>
69+
</a>
70+
</article>
7571
</div>
72+
{% endif %}
73+
{% endfor %}
7674
</div>
7775
</div>
7876
</section>

0 commit comments

Comments
 (0)