This repository has been archived by the owner on Feb 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
165 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
{% load ads core betty liveblog_tags %} | ||
<div class="liveblog"> | ||
<div>LIVE COVERAGE</div> | ||
<h1 class="liveblog-title">{{ content.title | safe }}</h1> | ||
|
||
|
||
{% if content.pinned_content %} | ||
{% with pinned_content=content.pinned_content %} | ||
<div class="liveblog-pinned-article"> | ||
<a href="#"> | ||
<div class="liveblog-pinned-image"> | ||
{% cropped pinned_content.thumbnail "1x1" 100 %} | ||
</div> | ||
|
||
<div class="liveblog-pinned-meta"> | ||
<div class="liveblog-pinned-title"> | ||
<i class="fa fa-thumb-tack" aria-hidden="true"></i> | ||
{{ pinned_content.title | safe }} | ||
</div> | ||
|
||
{% if content.subhead %} | ||
<div class="liveblog-pinned-excerpt"> | ||
{{ content.subhead | removetags:"p br" | safe }} | ||
</div> | ||
{% endif %} | ||
|
||
<div class="liveblog-published-date"></div> | ||
</div> | ||
</a> | ||
</div> | ||
{% endwith %} | ||
{% endif %} | ||
</div> | ||
|
||
{% for entry in content.entries.all %} | ||
<div class="liveblog-entry"> | ||
|
||
<div class="liveblog-entry-header"> | ||
<div class="liveblog-avatar"> | ||
{% cropped entry.authors.all.0.avatar '1x1' 100 %} | ||
</div> | ||
|
||
<div class="liveblog-entry-meta"> | ||
<div class="liveblog-author-name"> | ||
<a href="{{ entry.authors.all.0.get_absolute_url }}"> | ||
{{ entry.authors.all.0.first_name }} {{ entry.authors.all.0.last_name }} | ||
</a> | ||
</div> | ||
<div class="liveblog-published-time">6:27 AM</div> | ||
<div class="liveblog-published-date">JULY 19TH, 2016</div> | ||
</div> | ||
</div> | ||
|
||
<h1 class="liveblog-entry-headline">{{ entry.headline | safe }}</h1> | ||
|
||
<div class="liveblog-entry-body"> | ||
{{ entry.body | safe }} | ||
</div> | ||
|
||
{% for response in entry.responses.all %} | ||
<div class="liveblog-response"> | ||
<div class="liveblog-avatar"> | ||
{% cropped response.author.avatar '1x1' 100 %} | ||
</div> | ||
|
||
<div class="liveblog-response-content"> | ||
<div class="liveblog-author-name"> | ||
<a href="{{ response.author.get_absolute_url }}"> | ||
{{ response.author.first_name }} {{ response.author.last_name }} | ||
</a> | ||
</div> | ||
|
||
<div class="liveblog-response-body"> | ||
{{ response.body | safe }} | ||
</div> | ||
</div> | ||
</div> | ||
{% endfor %} | ||
|
||
|
||
{% if entry.recirc_content.all %} | ||
<div class="liveblog-related-header"> | ||
RELATED | ||
</div> | ||
|
||
{% for recirc_item in entry.recirc_content.all %} | ||
<div class="liveblog-related-article"> | ||
<a href="#"> | ||
<div class="liveblog-related-image"> | ||
{% cropped recirc_item.thumbnail "1x1" 100 %} | ||
</div> | ||
|
||
<div class="liveblog-related-meta"> | ||
<div class="liveblog-related-title"> | ||
{{ recirc_item.title | safe }} | ||
</div> | ||
|
||
{% if content.subhead %} | ||
<div class="liveblog-related-excerpt"> | ||
{{ content.subhead | removetags:"p br" | safe }} | ||
</div> | ||
{% endif %} | ||
|
||
<div class="liveblog-published-date"></div> | ||
</div> | ||
</a> | ||
</div> | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% liveblog_entry_sharetools_partial %} | ||
|
||
</div> | ||
{% endfor %} | ||
|
||
<div class="liveblog-more"> | ||
<button class="liveblog-more-button"> | ||
SHOW MORE | ||
</button> | ||
</div> | ||
|
||
|
||
{% liveblog_recirc_partial %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<span> | ||
Place an entry sharetools partial at: <code>templates/liveblog/entry_sharetools_override.html</code> | ||
</span> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<span> | ||
Place a recirc partial at: <code>templates/liveblog/recirc_override.html</code> | ||
</span> |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from django import template | ||
from bulbs.utils.methods import get_overridable_template_name | ||
|
||
register = template.Library() | ||
|
||
liveblog_template_name = get_overridable_template_name( | ||
'liveblog/bulbs_liveblog.html', | ||
'liveblog/liveblog_override.html') | ||
|
||
|
||
@register.inclusion_tag(liveblog_template_name, takes_context=True) | ||
def liveblog_partial(context): | ||
return context | ||
|
||
recirc_template_name = get_overridable_template_name( | ||
'liveblog/recirc.html', | ||
'liveblog/recirc_override.html', | ||
must_inherit=False) | ||
|
||
|
||
@register.inclusion_tag(recirc_template_name, takes_context=True) | ||
def liveblog_recirc_partial(context): | ||
return context | ||
|
||
entry_sharetools_template_name = get_overridable_template_name( | ||
'liveblog/entry_sharetools.html', | ||
'liveblog/entry_sharetools_override.html', | ||
must_inherit=False) | ||
|
||
|
||
@register.inclusion_tag(entry_sharetools_template_name, takes_context=True) | ||
def liveblog_entry_sharetools_partial(context): | ||
return context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters