index.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. {{ partial "header.html" . }}
  2. {{ partial "navbar.html" . }}
  3. <div class="container">
  4. <!-- Flag for jQuery -->
  5. <span id="homepage" style="display: none"></span>
  6. <!-- Biography Section -->
  7. {{ range where .Data.Pages "Type" "home" }}
  8. {{ if eq .Title "about" }}
  9. <section id="bio" class="home-section-wrapper full_width home" style="padding-top: 0;">
  10. {{ partial "home_biography" . }}
  11. </section>
  12. {{ end }}
  13. {{ end }}
  14. <!-- Publications Section -->
  15. {{ $pubs_len := len (where .Data.Pages "Type" "publication") }}
  16. {{ if gt $pubs_len 0 }}
  17. <section id="publications" class="home-section-wrapper full_width home">
  18. <div class="row">
  19. <div class="col-xs-12 col-md-4">
  20. <h2>Recent Publications</h2>
  21. <p><a href="{{ .Site.BaseURL }}publication/">More Publications <i class="fa fa-angle-double-right" style="padding-left: 5px;"></i></a></p>
  22. </div>
  23. <div class="col-xs-12 col-md-8">
  24. <ul class="fa-ul">
  25. {{ range $index, $page := first 10 (where .Data.Pages "Type" "publication") }}
  26. <li>
  27. <i class="fa-li fa fa-file-text-o pub-icon" aria-hidden="true"></i>
  28. <span style="padding-right: 8px">{{ .Title }}</span>
  29. <p>{{ partial "publication_links" (dict "content" $page "is_list" 1) }}</p>
  30. </li>
  31. {{ end }}
  32. </ul>
  33. </div>
  34. </div>
  35. </section>
  36. {{ end }}
  37. <!-- Blog Posts Section -->
  38. {{ $posts_len := len (where .Data.Pages "Type" "post") }}
  39. {{ if gt $posts_len 0 }}
  40. <section id="posts" class="home-section-wrapper full_width home">
  41. <div class="row">
  42. <div class="col-xs-12 col-md-4">
  43. <h2>Posts</h2>
  44. <p><a href="{{ .Site.BaseURL }}post/">More Posts <i class="fa fa-angle-double-right" style="padding-left: 5px;"></i></a></p>
  45. </div>
  46. <div class="col-xs-12 col-md-8">
  47. {{ range first 5 (where .Data.Pages "Type" "post") }}
  48. <div class="article-list-item" itemscope="" itemprop="blogPost">
  49. <h3 class="post-title" itemprop="name"><a href="{{ .Permalink }}" itemprop="url">{{ .Title }}</a></h3>
  50. {{ partial "article_metadata" (dict "content" . "is_list" 1) }}
  51. <p itemprop="articleBody">
  52. {{ if .Truncated }}
  53. {{ .Summary }}
  54. {{ else }}
  55. {{ .Content }}
  56. {{ end }}
  57. </p>
  58. <p class="read-more">
  59. <a href="{{ .Permalink }}" class="btn btn-primary btn-outline">Read more</a>
  60. </p>
  61. </div>
  62. {{ end }}
  63. </div>
  64. </div>
  65. </section>
  66. {{ end }}
  67. <!-- Projects Section -->
  68. {{ $projects_len := len (where .Data.Pages "Type" "project") }}
  69. {{ if gt $projects_len 0 }}
  70. <section id="projects" class="home-section-wrapper full_width home">
  71. <div class="row">
  72. <div class="col-xs-12 col-md-4">
  73. <h2>Projects</h2>
  74. </div>
  75. <div class="col-xs-12 col-md-8">
  76. <ul class="fa-ul">
  77. {{ range where .Data.Pages "Type" "project" }}
  78. <li>
  79. {{ if .Content }}<a href="{{ .Permalink }}">{{ else }}{{ with .Params.external_link }}<a href="{{ . }}">{{ end }}{{ end }}
  80. <i class="fa-li fa fa-files-o pub-icon" aria-hidden="true"></i>
  81. <span style="padding-right: 8px">{{ .Title }}</span>
  82. {{ if .Content }}</a >{{ else }}{{ with .Params.external_link }}</a>{{ end }}{{ end }}
  83. </li>
  84. {{ end }}
  85. </ul>
  86. </div>
  87. </div>
  88. </section>
  89. {{ end }}
  90. <!-- Custom Sections -->
  91. {{ range $index, $page := where .Data.Pages "Type" "home" }}
  92. {{ if and (isset .Params "section_id") (not (eq .Params.section_id 0)) }}
  93. {{ $title_words := split $page.Title " " }}
  94. <section id="{{ range $k, $v := $title_words }}{{ if eq $k 0 }}{{ . | urlize | lower }}{{ end }}{{ end }}" class="home-section-wrapper full_width home">
  95. <div class="row">
  96. <div class="col-xs-12 col-md-4">
  97. <h2>{{ title $page.Title }}</h2>
  98. </div>
  99. <div class="col-xs-12 col-md-8">
  100. {{ $page.Content }}
  101. </div>
  102. </div>
  103. </section>
  104. {{ end }}
  105. {{ end }}
  106. <!-- Contact Section -->
  107. <section id="contact" class="home-section-wrapper full_width home">
  108. <div class="row">
  109. <div class="col-xs-12 col-md-4">
  110. <h2>Contact</h2>
  111. </div>
  112. <div class="col-xs-12 col-md-8">
  113. {{ partial "home_contact.html" . }}
  114. </div>
  115. </div>
  116. </section>
  117. <!-- Page Footer -->
  118. {{ partial "footer_container.html" . }}
  119. </div>
  120. {{ partial "footer.html" . }}