Skip to content
Snippets Groups Projects
contact.html 4.26 KiB
Newer Older
alexisben's avatar
alexisben committed
{{- $template := .block.template -}}
alexisben's avatar
alexisben committed
{{- $position := .block.position -}}
{{- $title := .block.title -}}
Arnaud Levy's avatar
Arnaud Levy committed
{{- $class := "block block-contact" -}}
alexisben's avatar
alexisben committed
{{- with .block.data -}}
  <div class="{{ $class }}{{ if $title }} block-with-title{{ end }}">
alexisben's avatar
alexisben committed
    <div class="container">
      <div class="block-content">
alexisben's avatar
alexisben committed
        {{ if or $title .description }}
alexisben's avatar
alexisben committed
          <div class="top">
alexisben's avatar
alexisben committed
            {{ if $title }}
alexisben's avatar
alexisben committed
              <p class="block-title">{{ partial "PrepareHTML" $title }}</p>
alexisben's avatar
alexisben committed
            {{ end }}
            {{- if .description }}
alexisben's avatar
alexisben committed
              <div class="description">
                {{ partial "PrepareHTML" .description }}
              </div>
            {{ end -}}
alexisben's avatar
alexisben committed
          </div>
        {{ end -}}

alexisben's avatar
alexisben committed
        <div class="informations">
          <address itemscope itemtype="https://schema.org/Organization">
            {{ if .name }}
              <p itemprop="name">{{ .name }}</p>
alexisben's avatar
alexisben committed
            {{ end }}
            {{ with .information }}
              {{ partial "PrepareHTML" . }}
            {{ end }}
alexisben's avatar
alexisben committed
            {{ with .address }}
              {{ if or .address .city .zipcode .country }}
                <div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
                  {{ if .address }}
                  <span itemprop="streetAddress">
                    {{ partial "PrepareHTML" .address }},
                  </span>
                  {{ end }}
                  <br>
                  {{ if .city }}
                  <span itemprop="addressLocality">
                    {{ partial "PrepareHTML" .city }}
alexisben's avatar
alexisben committed
                  </span>
                  {{ end }}
alexisben's avatar
alexisben committed
                  {{ if .zipcode }}
                  <span itemprop="postalCode">
                    {{ partial "PrepareHTML" .zipcode }}
                  </span>
                  {{ end }}
                  {{ if .country }}
                  <span itemprop="addressCountry">
alexisben's avatar
alexisben committed
                    {{ partial "PrepareHTML" .country }}
                  </span>
                  {{ end }}
                </div>
              {{ end }}
            {{ end }}
            {{ with .url }}
Arnaud Levy's avatar
Arnaud Levy committed
              <p><a href="{{ . }}" target="_blank" rel="noreferrer">{{ . }}</a></p>
            {{ end }}
            {{ range .phone_numbers }}
              <p><a itemprop="telephone" href="tel:{{ . }}">{{ . }}</a></p>
            {{ end }}
            {{ range .emails }}
              <p><a itemprop="email" href="mailto:{{ . }}">{{ . }}</a></p>
alexisben's avatar
alexisben committed
          </address>
  
          {{ if .timetable}}
            <ul>
                {{ range .timetable }}
alexisben's avatar
alexisben committed
                  {{ if or
alexisben's avatar
alexisben committed
                    .time_slot_morning.from
                    .time_slot_morning.to
alexisben's avatar
alexisben committed
                    .time_slot_afternoon.from
                    .time_slot_afternoon.to
                  }}
alexisben's avatar
alexisben committed
                    <li>
                      <span>{{ .title }}</span>
                      {{ if or
                        .time_slot_morning.from
                        .time_slot_morning.to
                      }}
                      <span>
                        {{- if .time_slot_morning.from }}
                          <time datetime="{{ .time_slot_morning.from }}">{{ .time_slot_morning.from }}</time>
                        {{ end -}}
                        {{- if .time_slot_morning.to }}
                          <time datetime="{{ .time_slot_morning.to }}">{{ .time_slot_morning.to }}</time>
                        {{ end -}}
                      </span>
                      {{ end }}
                      {{ if or
                        .time_slot_afternoon.from
                        .time_slot_afternoon.to
                      }}
                      <span>
                        {{- if .time_slot_afternoon.from }}
                          <time datetime="{{ .time_slot_afternoon.from }}">{{ .time_slot_afternoon.from }}</time>
                        {{ end -}}
                        {{- if .time_slot_afternoon.to }}
                          <time datetime="{{ .time_slot_afternoon.to }}">{{ .time_slot_afternoon.to }}</time>
                        {{ end -}}
                      </span>
                      {{ end -}}
                    </li>
                  {{ end }}
                {{ end }}
            </ul>
          {{ end }}
        </div>
alexisben's avatar
alexisben committed
      </div>


    </div>
  </div>
alexisben's avatar
alexisben committed
{{- end -}}