1
Fork 0

add project template content

This commit is contained in:
Jake Howard 2016-11-26 13:00:06 +00:00
parent b19b41ea84
commit e45446b317
2 changed files with 22 additions and 9 deletions

View file

@ -44,6 +44,9 @@ class ProjectPage(Entity):
related_name='+' related_name='+'
) )
def get_download_url(self):
return self.download_url or self.asset.url
search_fields = Page.search_fields + [ search_fields = Page.search_fields + [
index.SearchField('intro'), index.SearchField('intro'),
index.SearchField('body'), index.SearchField('body'),

View file

@ -5,14 +5,24 @@
{% block body_class %}template-projectpage{% endblock %} {% block body_class %}template-projectpage{% endblock %}
{% block content %} {% block content %}
<h1>{{ page.title }}</h1> {% include 'common/header.html' with page=page %}
<p class="meta">{{ page.date }}</p> <section>
<div class="container">
<p class="text-right small">
Updated: {{ page.date|datetime }}
</p>
{{ page.body|richtext }}
</div>
</section>
<div class="container text-center">
<div class="btn-group">
{% if page.get_download_link %}
<a class="btn btn-primary btn-xl" href="{{ page.get_download_link }}">Download {{ page.title }}</a>
{% endif %}
{% if page.main_image %} {% if page.url %}
{% image page.main_image width-400 %} <a class="btn btn-github btn-xl" href="{{ page.url }}"><i class="fa fa-github fa-lg"></i> View on Github</a>
{% endif %} {% endif %}
</div>
<div class="intro">{{ page.intro }}</div> </div>
{{ page.body|richtext }}
{% endblock %} {% endblock %}