index.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. {{ partial "header.html" . }}
  2. {{ partial "navbar.html" . }}
  3. <!-- Flag for jQuery -->
  4. <span id="homepage" style="display: none"></span>
  5. <!-- Biography Section -->
  6. {{ range where .Data.Pages "Type" "home" }}
  7. {{ if eq .Title "about" }}
  8. <section id="bio" class="home-section">
  9. <div class="container">
  10. {{ partial "home_biography" . }}
  11. </div>
  12. </section>
  13. {{ end }}
  14. {{ end }}
  15. <!-- Publications Section -->
  16. {{ $pubs_len := len (where .Data.Pages "Type" "publication") }}
  17. {{ if gt $pubs_len 0 }}
  18. <section id="publications" class="home-section">
  19. <div class="container">
  20. <div class="row">
  21. <div class="col-xs-12 col-md-4 section-heading">
  22. <h1>{{ with .Site.Params.publications.title }}{{ . | markdownify }}{{ end }}</h1>
  23. {{ with .Site.Params.publications.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
  24. {{ if gt $pubs_len .Site.Params.publications.count }}
  25. <p class="view-all">
  26. <a href="{{ .Site.BaseURL }}publication/">
  27. {{ with .Site.Params.publications.str_all }}{{ . | markdownify }}{{ end }}
  28. <i class="fa fa-angle-double-right"></i>
  29. </a>
  30. </p>
  31. {{ end }}
  32. </div>
  33. <div class="col-xs-12 col-md-8">
  34. <ul class="fa-ul">
  35. {{ range $index, $page := first .Site.Params.publications.count (where .Data.Pages "Type" "publication") }}
  36. <li itemscope itemtype="http://schema.org/CreativeWork">
  37. <i class="fa-li fa fa-file-text-o pub-icon" aria-hidden="true"></i>
  38. <span itemprop="name">{{ .Title }}</span>
  39. <p>{{ partial "publication_links" (dict "content" $page "is_list" 1) }}</p>
  40. </li>
  41. {{ end }}
  42. </ul>
  43. </div>
  44. </div>
  45. </div>
  46. </section>
  47. {{ end }}
  48. <!-- Blog Posts Section -->
  49. {{ $posts_len := len (where .Data.Pages "Type" "post") }}
  50. {{ if gt $posts_len 0 }}
  51. <section id="posts" class="home-section">
  52. <div class="container">
  53. <div class="row">
  54. <div class="col-xs-12 col-md-4 section-heading">
  55. <h1>{{ with .Site.Params.posts.title }}{{ . | markdownify }}{{ end }}</h1>
  56. {{ with .Site.Params.posts.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
  57. {{ if gt $posts_len .Site.Params.posts.count }}
  58. <p class="view-all">
  59. <a href="{{ .Site.BaseURL }}post/">
  60. {{ with .Site.Params.posts.str_all }}{{ . | markdownify }}{{ end }}
  61. <i class="fa fa-angle-double-right"></i>
  62. </a>
  63. </p>
  64. {{ end }}
  65. </div>
  66. <div class="col-xs-12 col-md-8">
  67. {{ range first .Site.Params.posts.count (where .Data.Pages "Type" "post") }}
  68. <div class="article-list-item" itemscope="" itemprop="blogPost">
  69. <h3 class="post-title" itemprop="name"><a href="{{ .Permalink }}" itemprop="url">{{ .Title }}</a></h3>
  70. {{ partial "article_metadata" (dict "content" . "is_list" 1) }}
  71. <p class="article-style" itemprop="articleBody">
  72. {{ if .Truncated }}
  73. {{ .Summary }}
  74. {{ else }}
  75. {{ .Content }}
  76. {{ end }}
  77. </p>
  78. <p class="read-more">
  79. <a href="{{ .Permalink }}" class="btn btn-primary btn-outline">
  80. {{ with .Site.Params.posts.str_read_more }}{{ . | markdownify }}{{ end }}
  81. </a>
  82. </p>
  83. </div>
  84. {{ end }}
  85. </div>
  86. </div>
  87. </div>
  88. </section>
  89. {{ end }}
  90. <!-- Projects Section -->
  91. {{ $projects_len := len (where .Data.Pages "Type" "project") }}
  92. {{ if gt $projects_len 0 }}
  93. <section id="projects" class="home-section">
  94. <div class="container">
  95. <div class="row">
  96. <div class="col-xs-12 col-md-4 section-heading">
  97. <h1>{{ with .Site.Params.projects.title }}{{ . | markdownify }}{{ end }}</h1>
  98. {{ with .Site.Params.projects.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
  99. </div>
  100. <div class="col-xs-12 col-md-8">
  101. <ul class="fa-ul">
  102. {{ range where .Data.Pages "Type" "project" }}
  103. <li>
  104. <span class="project-title">
  105. {{ if .Content }}<a href="{{ .Permalink }}">{{ else }}{{ with .Params.external_link }}<a href="{{ . }}">{{ end }}{{ end }}
  106. <i class="fa-li fa fa-files-o pub-icon" aria-hidden="true"></i>
  107. {{ .Title }}
  108. {{ if .Content }}</a >{{ else }}{{ with .Params.external_link }}</a>{{ end }}{{ end }}
  109. </span>
  110. {{ with .Params.summary }}<p class="project-summary">{{ . }}</p>{{ end }}
  111. {{ if isset .Params "tags" }}
  112. {{ $tagsLen := len .Params.tags }}
  113. {{ if gt $tagsLen 0 }}
  114. <div class="project-tags">
  115. <i class="fa fa-tags"></i>
  116. {{ range $k, $v := .Params.tags }}
  117. {{ . }}{{ if lt $k (sub $tagsLen 1) }}, {{ end }}
  118. {{ end }}
  119. </div>
  120. {{ end }}
  121. {{ end }}
  122. </li>
  123. {{ end }}
  124. </ul>
  125. </div>
  126. </div>
  127. </div>
  128. </section>
  129. {{ end }}
  130. <!-- Custom Sections -->
  131. {{ range $index, $page := where .Data.Pages "Type" "home" }}
  132. {{ if and (isset .Params "section_id") (not (eq .Params.section_id 0)) }}
  133. {{ $title_words := split $page.Title " " }}
  134. <section id="{{ range $k, $v := $title_words }}{{ if eq $k 0 }}{{ . | urlize | lower }}{{ end }}{{ end }}" class="home-section">
  135. <div class="container">
  136. <div class="row">
  137. <div class="col-xs-12 col-md-4 section-heading">
  138. <h1>{{ title $page.Title }}</h1>
  139. {{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
  140. </div>
  141. <div class="col-xs-12 col-md-8">
  142. {{ $page.Content }}
  143. </div>
  144. </div>
  145. </div>
  146. </section>
  147. {{ end }}
  148. {{ end }}
  149. <!-- Contact Section -->
  150. {{ if .Site.Params.contact.enable }}
  151. <section id="contact" class="home-section">
  152. <div class="container">
  153. <div class="row">
  154. <div class="col-xs-12 col-md-4 section-heading">
  155. <h1>{{ with .Site.Params.contact.title }}{{ . | markdownify }}{{ end }}</h1>
  156. {{ with .Site.Params.contact.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
  157. </div>
  158. <div class="col-xs-12 col-md-8">
  159. {{ partial "home_contact.html" . }}
  160. </div>
  161. </div>
  162. </div>
  163. </section>
  164. {{ end }}
  165. <!-- Page Footer -->
  166. {{ partial "footer_container.html" . }}
  167. {{ partial "footer.html" . }}