mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
147 lines
5 KiB
HTML
147 lines
5 KiB
HTML
{{ partial "header.html" . }}
|
|
{{ partial "navbar.html" . }}
|
|
|
|
<!-- Flag for jQuery -->
|
|
<span id="homepage" style="display: none"></span>
|
|
|
|
|
|
<!-- Biography Section -->
|
|
{{ range where .Data.Pages "Type" "home" }}
|
|
{{ if eq .Title "about" }}
|
|
<section id="bio" class="home-section">
|
|
<div class="container">
|
|
{{ partial "home_biography" . }}
|
|
</div>
|
|
</section>
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
|
|
<!-- Publications Section -->
|
|
{{ $pubs_len := len (where .Data.Pages "Type" "publication") }}
|
|
{{ if gt $pubs_len 0 }}
|
|
<section id="publications" class="home-section">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-md-4">
|
|
<h2>Recent Publications</h2>
|
|
<p><a href="{{ .Site.BaseURL }}publication/">More Publications <i class="fa fa-angle-double-right" style="padding-left: 5px;"></i></a></p>
|
|
</div>
|
|
<div class="col-xs-12 col-md-8">
|
|
<ul class="fa-ul">
|
|
{{ range $index, $page := first 10 (where .Data.Pages "Type" "publication") }}
|
|
<li>
|
|
<i class="fa-li fa fa-file-text-o pub-icon" aria-hidden="true"></i>
|
|
<span style="padding-right: 8px">{{ .Title }}</span>
|
|
<p>{{ partial "publication_links" (dict "content" $page "is_list" 1) }}</p>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{{ end }}
|
|
|
|
|
|
<!-- Blog Posts Section -->
|
|
{{ $posts_len := len (where .Data.Pages "Type" "post") }}
|
|
{{ if gt $posts_len 0 }}
|
|
<section id="posts" class="home-section">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-md-4">
|
|
<h2>Posts</h2>
|
|
<p><a href="{{ .Site.BaseURL }}post/">More Posts <i class="fa fa-angle-double-right" style="padding-left: 5px;"></i></a></p>
|
|
</div>
|
|
<div class="col-xs-12 col-md-8">
|
|
{{ range first 5 (where .Data.Pages "Type" "post") }}
|
|
<div class="article-list-item" itemscope="" itemprop="blogPost">
|
|
<h3 class="post-title" itemprop="name"><a href="{{ .Permalink }}" itemprop="url">{{ .Title }}</a></h3>
|
|
{{ partial "article_metadata" (dict "content" . "is_list" 1) }}
|
|
<p itemprop="articleBody">
|
|
{{ if .Truncated }}
|
|
{{ .Summary }}
|
|
{{ else }}
|
|
{{ .Content }}
|
|
{{ end }}
|
|
</p>
|
|
<p class="read-more">
|
|
<a href="{{ .Permalink }}" class="btn btn-primary btn-outline">Read more</a>
|
|
</p>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{{ end }}
|
|
|
|
|
|
<!-- Projects Section -->
|
|
{{ $projects_len := len (where .Data.Pages "Type" "project") }}
|
|
{{ if gt $projects_len 0 }}
|
|
<section id="projects" class="home-section">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-md-4">
|
|
<h2>Projects</h2>
|
|
</div>
|
|
<div class="col-xs-12 col-md-8">
|
|
<ul class="fa-ul">
|
|
{{ range where .Data.Pages "Type" "project" }}
|
|
<li>
|
|
{{ if .Content }}<a href="{{ .Permalink }}">{{ else }}{{ with .Params.external_link }}<a href="{{ . }}">{{ end }}{{ end }}
|
|
<i class="fa-li fa fa-files-o pub-icon" aria-hidden="true"></i>
|
|
<span style="padding-right: 8px">{{ .Title }}</span>
|
|
{{ if .Content }}</a >{{ else }}{{ with .Params.external_link }}</a>{{ end }}{{ end }}
|
|
{{ with .Params.summary }}<p>{{ . }}</p>{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{{ end }}
|
|
|
|
|
|
<!-- Custom Sections -->
|
|
{{ range $index, $page := where .Data.Pages "Type" "home" }}
|
|
{{ if and (isset .Params "section_id") (not (eq .Params.section_id 0)) }}
|
|
{{ $title_words := split $page.Title " " }}
|
|
<section id="{{ range $k, $v := $title_words }}{{ if eq $k 0 }}{{ . | urlize | lower }}{{ end }}{{ end }}" class="home-section">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-md-4">
|
|
<h2>{{ title $page.Title }}</h2>
|
|
</div>
|
|
<div class="col-xs-12 col-md-8">
|
|
{{ $page.Content }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
|
|
<!-- Contact Section -->
|
|
<section id="contact" class="home-section">
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-xs-12 col-md-4">
|
|
<h2>Contact</h2>
|
|
</div>
|
|
<div class="col-xs-12 col-md-8">
|
|
{{ partial "home_contact.html" . }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
|
|
<!-- Page Footer -->
|
|
{{ partial "footer_container.html" . }}
|
|
|
|
{{ partial "footer.html" . }}
|