Permalink
Browse files

modify: 「サービス」詳細テンプレート:「サービス本文」の出力

  • Loading branch information...
dreamseeker committed Dec 23, 2018
1 parent a88de05 commit 451ac64413ad1af5657ed4add23fd9fa7feb423f
Showing with 25 additions and 16 deletions.
  1. +25 −16 templates/services/_entry.html
@@ -52,24 +52,33 @@
{% include "_partials/article_body" %}
</article><!-- /article -->
</section><!-- /section -->
<section class="service-points">

<div class="flex">
<div class="service-point">
<div class="g1-flex4 g2-flex3 g3-flex4">
<h4>Discover your audience</h4>
<p>
Your audience is human, but their device is not. We like to cross that gap by engaging your audience in
casual conversation as one would at their local pub.
</p>
</div>
<div class="g1-flex4 g2-flex3 g3-flex8">
<img class="" src="https://placehold.jp/3d4070/42598f/600x200.png" alt="discover">
</div>
</div><!-- /.service-point -->
</div><!-- /.flex -->
{# 「サービス本文」がセットされている場合のみ出力 #}
{% if entry.serviceBody | length %}
<section class="service-points">
{# ブロックのループ処理 #}
{% for block in entry.serviceBody.all() %}
{# 「メイン画像」フィールドを取得 #}
{% set image = block.image.one() %}

<div class="flex">
<div class="service-point">
<div class="g1-flex4 g2-flex3 g3-flex4">
<h4>{{ block.heading }}</h4>
{{ block.text | raw }}
</div>
<div class="g1-flex4 g2-flex3 g3-flex8">
{# 「画像」がセットされている場合のみ出力 #}
{% if image %}
<img src="{{ image.getUrl('medium') }}" alt="{{ image.title }}" />
{% endif %}
</div>
</div><!-- /.service-point -->
</div><!-- /.flex -->
{% endfor %}
</section><!-- /.service-points -->
{% endif %}

</section><!-- /.service-points -->
<section class="services-work-entry">
<div style="background-image: url('https://placehold.jp/3d4070/42598f/1280x328.png')">
<div class="flex">

0 comments on commit 451ac64

Please sign in to comment.