Skip to content

Commit

Permalink
modify: 「ワークス」インデックステンプレート:「ワークス」一覧のエントリに関するデータを出力
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamseeker committed Dec 29, 2018
1 parent 7179f8f commit 402cf2e
Showing 1 changed file with 36 additions and 21 deletions.
57 changes: 36 additions & 21 deletions templates/work/_index.html
Expand Up @@ -46,21 +46,35 @@ <h1 class="delta center subfont">{{ entry.heading }}</h1>


{# 「ワークス」セクションのエントリ一覧 #} {# 「ワークス」セクションのエントリ一覧 #}
{% for workEntry in workEntries %} {% for workEntry in workEntries %}
{# 「メイン画像」フィールドを取得 #}
{% set image = workEntry.featuredImage.one() %}

{% if loop.first %} {% if loop.first %}
{# ループの最初のみ出力 #} {# ループの最初のみ出力 #}
<article class="work-entry work-entry-feature"> <article class="work-entry work-entry-feature">
<img src="https://placehold.jp/3d4070/42598f/2000x590.png" alt="sportsrus-bigfeature" width="2000"> {# 「メイン画像」がセットされている場合のみ出力 #}
{% if image %}
<img src="{{ image.getUrl({ width: 2000 }) }}" alt="{{ image.title }}" width="2000">
{% endif %}
<div class="summary-wrap"> <div class="summary-wrap">
<a href="../work/detail.html"><h2 class="center reverse beta">Taking Sports to the Air</h2> {# 「大見出し」がセットされている場合のみ出力 #}
</a> {% if workEntry.heading %}
<h3 class="delta center subfont reverse"><a href="../work/detail.html">Sports R’ Us Sales <a href="{{ workEntry.url }}"><h2 class="center reverse beta">{{ workEntry.heading }}</h2></a>
needed a major Energy Boost.</a></h3> {% endif %}
<div class="block text">
<p> {# 「小見出し」がセットされている場合のみ出力 #}
New e-commerce experience for Sports R' Us {% if workEntry.subheading %}
</p> <h3 class="delta center subfont reverse"><a href="{{ workEntry.url }}">{{ workEntry.subheading }}</a></h3>
</div> {% endif %}
<p class="center"><a href="../work/detail.html" class="more-link">Full Story</a></p>
{# 「概要文」がセットされている場合のみ出力 #}
{% if workEntry.shortDescription %}
<div class="block text">
{{ workEntry.shortDescription }}
</div>
{% endif %}

<p class="center"><a href="{{ workEntry.url }}" class="more-link">Full Story</a></p>
</div><!-- /.summary-wrap --> </div><!-- /.summary-wrap -->
</article><!-- /.work-entry.work-entry-feature --> </article><!-- /.work-entry.work-entry-feature -->
{% else %} {% else %}
Expand All @@ -71,17 +85,18 @@ <h3 class="delta center subfont reverse"><a href="../work/detail.html">Sports R


{# ループの最初以外で出力 #} {# ループの最初以外で出力 #}
<article class="work-entry"> <article class="work-entry">
<figure> {# 「メイン画像」がセットされている場合のみ出力 #}
<a href="../work/detail.html"> {% if image %}
<img src="https://placehold.jp/3d4070/42598f/616x204.png" alt="diva-bigimage" width="616" height="204"> <figure>
</a> <a href="{{ workEntry.url }}">
</figure> <img src="{{ image.getUrl({ width: 616 }) }}" alt="{{ image.title }}" width="616" height="204">
</a>
</figure>
{% endif %}
<div class="summary-wrap"> <div class="summary-wrap">
<h3><a href="../work/detail.html">Diva!</a></h3> <h3><a href="{{ workEntry.url }}">{{ workEntry.title }}</a></h3>
<p> {{ workEntry.shortDescription }}
In July, we released Diva!, our celebrity music app. <p><a href="{{ workEntry.url }}" class="more-link">Read More</a></p>
</p>
<p><a href="../work/detail.html" class="more-link">Read More</a></p>
</div><!-- /.summary-wrap --> </div><!-- /.summary-wrap -->
</article><!-- /.work-entry --> </article><!-- /.work-entry -->


Expand Down

0 comments on commit 402cf2e

Please sign in to comment.