{{- define "body" -}}

<div id="homepageContainer">
    <div id="homepage">
        <h1 id="title">Michael Zhang</h1>

        <div id="about">{{ .Content }}</div>

        <h2 id="blog-posts-title"><a href="/posts">Recent Blog Posts &raquo;</a></h2>
        <ul id="blog-posts">
            {{ $posts := where (.GetPage "/posts").Pages "Draft" false }}
            {{- range first 3 $posts -}}
            <li><a href="{{ .RelPermalink }}" class="blog-post-link">
                <span class="blog-post">
                    <span class="title">{{ .Title }}</span>
                    <small class="details">
                        {{ .Date.Format "Mon Jan 02, 2006" }}
                    </small>
                </span>
            </a></li>
            {{- end -}}
        </ul>
    </div>
</div>

{{- end -}}
