{{ if isset .Site.Params "videos" }}
{{ if .Site.Params.videos.enable }}
{{ if gt (len .Site.Data.videos) 0 }}
<section class="bar background-gray mb-0">
    <div class="container">
        <div class="heading text-center">
            <h2>類型</h2>
        </div>
        <div class="col-md-12">
            <div class="row">
            {{ range $index, $element := sort .Site.Data.videos "weight" }}
                <div class="col-md-6 video__col">
                    <div class="box-simple box__video">
                        {{ with $element.url }}
                        </a>
                        {{ end }}
                        <h3 class="video__title">{{ $element.name | markdownify }}</h3>
                        <p class="video__desc">{{ $element.description | markdownify }}</p>
                        <iframe src="{{ $element.url }}" frameborder="0" style="width: 100%; height: 220px;"></iframe>
                    </div>
                </div>
            {{ end }}
            </div>
        </div>
    </div>
</section>
{{ end }}
{{ end }}
{{ end }}

