index.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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 }}"/>
  10. <meta name="twitter:title" content="{{ LANDING_PAGE_ABOUT.title }}">
  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:type" content="article" />
  16. <meta property="og:url" content="{{ SITEURL }}" />
  17. {% from '_includes/_defaults.html' import SITE_DESCRIPTION with context %}
  18. {% if SITE_DESCRIPTION %}
  19. <meta property="og:description" content="{{SITE_DESCRIPTION}}" />
  20. <meta name="twitter:description" content="{{SITE_DESCRIPTION}}">
  21. {% endif %}
  22. <meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
  23. <meta property="og:article:author" content="{{ AUTHOR }}" />
  24. <meta name="twitter:card" content="summary">
  25. {% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
  26. {% if FEATURED_IMAGE %}
  27. <meta property="og:image" content="{{FEATURED_IMAGE}}" />
  28. <meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
  29. {% endif %}
  30. {% endblock meta_tags_in_head %}
  31. {% block content %}
  32. {% from '_includes/_defaults.html' import LANDING_PAGE_ABOUT with context %}
  33. {% from '_includes/_defaults.html' import PROJECTS with context %}
  34. <div class="row-fluid">
  35. {% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.title %}
  36. {% set css_class = 'span10 offset2' %}
  37. {% if PROJECTS and LANDING_PAGE_ABOUT %}
  38. {% set css_class = 'span12' %}
  39. {% endif %}
  40. <header class="page-header {{css_class}}">
  41. <h1><a href="{{ SITEURL }}">{{ LANDING_PAGE_ABOUT.title }}</a></h1>
  42. </header>
  43. {% endif %}
  44. <div class="row-fluid">
  45. {% if LANDING_PAGE_ABOUT and LANDING_PAGE_ABOUT.details %}
  46. {% set css_class = 'span8 offset2' %}
  47. {% if PROJECTS and LANDING_PAGE_ABOUT %}
  48. {% set css_class = 'span8' %}
  49. {% endif %}
  50. <div class="{{css_class}}">
  51. <header>
  52. <h1 id="about-me">About me</h1>
  53. </header>
  54. <div class="article-content">
  55. {{ LANDING_PAGE_ABOUT.details }}
  56. </div>
  57. </div>
  58. {% endif %}
  59. {% if PROJECTS %}
  60. {% set css_class = 'span8 offset2' %}
  61. {% if PROJECTS and LANDING_PAGE_ABOUT %}
  62. {% set css_class = 'span4' %}
  63. {% endif %}
  64. <div class="{{css_class}}">
  65. <header>
  66. <h1 id="my-projects">My Projects</h1>
  67. </header>
  68. {% for project in PROJECTS %}
  69. <ul class="list-all-articles">
  70. <li>
  71. <a href="{{ project.url }}" title="{{ project.name }}">{{ project.name }}</a> <span class="proj-desc">{{ project.description }}</span>
  72. </li>
  73. </ul>
  74. {%endfor %}
  75. </div>
  76. {% endif %}
  77. </div>
  78. {% if articles %}
  79. {% set css_class = 'span8 offset2' %}
  80. {% if articles and PROJECTS and LANDING_PAGE_ABOUT %}
  81. {% set css_class = 'span12' %}
  82. {% endif %}
  83. <div class="row-fluid">
  84. <div class="{{css_class}}">
  85. <header>
  86. <h1 id="recent-posts">Recent Posts <a id="allposts" href="{{ SITEURL }}/archives.html">all posts</a></h1>
  87. </header>
  88. <div class="recent-posts">
  89. {% for article in articles %}
  90. {% from '_includes/_defaults.html' import RECENT_ARTICLES_COUNT with context %}
  91. {% if loop.index0 < RECENT_ARTICLES_COUNT %}
  92. <article>
  93. <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }} {%if article.subtitle %} <small> {{ article.subtitle }} </small> {% endif %} </a>
  94. <section>
  95. posted in
  96. <a href="{{ SITEURL }}/categories.html#{{ article.category.slug }}-ref">{{ article.category }}</a>
  97. <div class="recent-posts-time">
  98. <time pubdate="pubdate" datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time>
  99. </div>
  100. </section>
  101. </article>
  102. {% endif %}
  103. {% endfor %}
  104. </div>
  105. </div>
  106. </div>
  107. {% endif %}
  108. </div>
  109. {% endblock content %}