-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1311 from ubyssey/redesign-latest
Redesign "latest articles" sidebar block
- Loading branch information
Showing
9 changed files
with
149 additions
and
49 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,33 @@ | ||
{% load articletags %} | ||
|
||
{% comment %} | ||
This template is for the columns for the blog section on the home page under the digital prints section | ||
{% endcomment %} | ||
|
||
|
||
{% load cache %} | ||
{% load humanize %} | ||
{% load wagtailcore_tags %} | ||
{% load wagtailimages_tags %} | ||
{% load video_filters %} | ||
<article class="o-article o-article--column o-article--column-latest{% if padded %} o-article--padded{% endif %}"> | ||
<div class="o-article__meta__image"> | ||
{% if article.featured_media.first %} | ||
{% if article.featured_media.first.image %} | ||
<a class="o-article__image" href="{% pageurl article %}"> | ||
{% image article.featured_media.first.image fill-250x250-c100 %} | ||
</a> | ||
{% elif article.featured_media.first.video %} | ||
<a class="o-article__image" href="{% pageurl article %}" style="background-image: url('http://img.youtube.com/vi/{{ article.featured_media.first.video.url|youtube_embed_id|safe }}/0.jpg'); background-size: contain; background-repeat: no-repeat"></a> | ||
{% endif %} | ||
{% endif %} | ||
</div> | ||
<div class="o-article__meta"> | ||
<h4 class="o-article__section" style="background-color: {{article|get_colour}}"> | ||
<a href="{{article.get_parent.url}}">{{article.get_parent.title}}</a> | ||
</h4> | ||
<h3 class="o-article__headline"> | ||
<a href="{% pageurl article %}">{{ article.title|safe }}</a> | ||
</h3> | ||
</div> | ||
</article> |
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
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
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
12 changes: 12 additions & 0 deletions
12
infinitefeed/templates/infinitefeed/sidebar/sidebar_latest_block.html
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,12 @@ | ||
{% load articletags %} | ||
|
||
<div class="article-list blog sidebar-block"> | ||
{% include 'home/objects/home_heading-box.html' with styling='boxLabel-highlight' title=title text='Last updated:' textBold=articles.0.explicit_published_at|display_pubdate %} | ||
<ul class="article-list"> | ||
{% for article in articles %} | ||
<li> | ||
{% include 'article/objects/blog_column-latest.html' with sameColour=True article=article %} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> |
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
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
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
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