index.html 4.6 KB

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