index.html 4.4 KB

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