index.html 4.7 KB

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