index.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. {% extends 'base.html' %}
  2. {% block title %}
  3. {{ super() }}
  4. {% endblock title %}
  5. {% block meta_tags_in_head %}
  6. {{ super() }}
  7. {% from '_includes/_defaults.html' import LANDING_PAGE_ABOUT with context %}
  8. {% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.title %}
  9. <meta property="og:title" content="{{ LANDING_PAGE_ABOUT.title|e }}"/>
  10. <meta name="twitter:title" content="{{ LANDING_PAGE_ABOUT.title|e }}">
  11. {% else %}
  12. <meta property="og:title" content="{{ SITENAME|striptags|e }}"/>
  13. <meta name="twitter:title" content="{{ SITENAME|striptags|e }}">
  14. {% endif %}
  15. <meta property="og:url" content="{{ SITEURL }}" />
  16. {% from '_includes/_defaults.html' import SITE_DESCRIPTION with context %}
  17. {% if SITE_DESCRIPTION %}
  18. <meta property="og:description" content="{{SITE_DESCRIPTION|e}}" />
  19. <meta name="twitter:description" content="{{SITE_DESCRIPTION|e}}">
  20. {% endif %}
  21. <meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
  22. <meta property="og:article:author" content="{{ AUTHOR }}" />
  23. {% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
  24. {% if FEATURED_IMAGE %}
  25. <meta property="og:image" content="{{FEATURED_IMAGE}}" />
  26. <meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
  27. {% endif %}
  28. {% endblock meta_tags_in_head %}
  29. {% block content %}
  30. {% from '_includes/_defaults.html' import LANDING_PAGE_ABOUT with context %}
  31. {% from '_includes/_defaults.html' import PROJECTS with context %}
  32. <div class="row-fluid">
  33. {% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.title %}
  34. {% set css_class = 'span10 offset2' %}
  35. {% if PROJECTS and LANDING_PAGE_ABOUT %}
  36. {% set css_class = 'span12' %}
  37. {% endif %}
  38. <header class="page-header {{css_class}}">
  39. <h1><a href="{{ SITEURL }}">{{ LANDING_PAGE_ABOUT.title }}</a></h1>
  40. </header>
  41. {% endif %}
  42. <div class="row-fluid">
  43. {% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.details %}
  44. {% set css_class = 'span8 offset2' %}
  45. {% if PROJECTS and LANDING_PAGE_ABOUT %}
  46. {% set css_class = 'span8' %}
  47. {% endif %}
  48. <div class="{{css_class}}">
  49. <header>
  50. <h1 id="about-me">About me</h1>
  51. </header>
  52. <div class="article-content">
  53. {{ LANDING_PAGE_ABOUT.details }}
  54. </div>
  55. </div>
  56. {% endif %}
  57. {% if PROJECTS %}
  58. {% set css_class = 'span8 offset2' %}
  59. {% if PROJECTS and LANDING_PAGE_ABOUT %}
  60. {% set css_class = 'span4' %}
  61. {% endif %}
  62. <div class="{{css_class}}">
  63. <header>
  64. <h1 id="my-projects">My Projects</h1>
  65. </header>
  66. {% for project in PROJECTS %}
  67. <ul class="list-all-articles">
  68. <li>
  69. <a href="{{ project.url }}" title="{{ project.name }}">{{ project.name }}</a> <span class="proj-desc">{{ project.description }}</span>
  70. </li>
  71. </ul>
  72. {%endfor %}
  73. </div>
  74. {% endif %}
  75. </div>
  76. {% if articles %}
  77. {% set css_class = 'span8 offset2' %}
  78. {% if articles and PROJECTS and LANDING_PAGE_ABOUT %}
  79. {% set css_class = 'span12' %}
  80. {% endif %}
  81. <div class="row-fluid">
  82. <div class="{{css_class}}">
  83. <header>
  84. <h1 id="recent-posts">Chapters</h1>
  85. </header>
  86. <div class="recent-posts">
  87. {% for article in articles|sort(attribute='filename') %}
  88. <article>
  89. <a href="{{ SITEURL }}/{{ article.url }}">{{"Chapter %d: %s" % (loop.index0, article.title) }}</a>
  90. </article>
  91. {% endfor %}
  92. </div>
  93. </div>
  94. </div>
  95. {% endif %}
  96. </div>
  97. {% endblock content %}