add project template content
This commit is contained in:
parent
b19b41ea84
commit
e45446b317
2 changed files with 22 additions and 9 deletions
|
@ -44,6 +44,9 @@ class ProjectPage(Entity):
|
|||
related_name='+'
|
||||
)
|
||||
|
||||
def get_download_url(self):
|
||||
return self.download_url or self.asset.url
|
||||
|
||||
search_fields = Page.search_fields + [
|
||||
index.SearchField('intro'),
|
||||
index.SearchField('body'),
|
||||
|
|
|
@ -5,14 +5,24 @@
|
|||
{% block body_class %}template-projectpage{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
<p class="meta">{{ page.date }}</p>
|
||||
|
||||
{% if page.main_image %}
|
||||
{% image page.main_image width-400 %}
|
||||
{% include 'common/header.html' with page=page %}
|
||||
<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 %}
|
||||
|
||||
<div class="intro">{{ page.intro }}</div>
|
||||
|
||||
{{ page.body|richtext }}
|
||||
{% if page.url %}
|
||||
<a class="btn btn-github btn-xl" href="{{ page.url }}"><i class="fa fa-github fa-lg"></i> View on Github</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Reference in a new issue