index.html 4.5 KB

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