index.html 4.3 KB

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