{{ define "main" }}
<div class="dream-home">
    <section class="hero">
        <div class="hero-constellation"></div>
        <h1 class="hero-title reveal">
            <span class="hero-glyph">◇</span>
            Val's Dreamscape
        </h1>
        <p class="hero-subtitle reveal">{{ .Site.Params.description }}</p>
        <div class="hero-scroll reveal">
            <span>向下探索</span>
            <div class="scroll-arrow"></div>
        </div>
    </section>

    {{ $sections := slice "journey" "sketch" "gallery" "essay" }}
    {{ range $sections }}
    {{ $pages := where $.Site.RegularPages "Section" . }}
    {{ if $pages }}
    <section class="dream-section reveal">
        <h2 class="section-heading">
            <span class="section-glyph">
                {{ if eq . "journey" }}◈{{ end }}
                {{ if eq . "sketch" }}✎{{ end }}
                {{ if eq . "gallery" }}❖{{ end }}
                {{ if eq . "essay" }}✦{{ end }}
            </span>
            {{ if eq . "journey" }}旅程{{ end }}
            {{ if eq . "sketch" }}速记{{ end }}
            {{ if eq . "gallery" }}图志{{ end }}
            {{ if eq . "essay" }}随笔{{ end }}
        </h2>
        <div class="card-constellation">
            {{ range $pages }}
            <a href="{{ .RelPermalink }}" class="dream-card reveal">
                <div class="card-glow"></div>
                <div class="card-content">
                    <time class="card-time">{{ .Date.Format "2006.01.02" }}</time>
                    <h3 class="card-title">{{ .Title }}</h3>
                    <p class="card-excerpt">{{ .Summary | truncate 80 }}</p>
                    <div class="card-tags">
                        {{ range .Params.tags }}<span class="tag">{{ . }}</span>{{ end }}
                    </div>
                </div>
            </a>
            {{ end }}
        </div>
    </section>
    {{ end }}
    {{ end }}
</div>
{{ end }}
