// Home
$home-slider-height: 760px;
+
+// Brief box
+
+$brief-box-background: #5F5F5E;
+$brief-box-background-head: #868686;
+$brief-box-color-head: #000000;
+$brief-box-color: #FFFFFF;
// Boxes
@import 'boxes/article-box';
@import 'boxes/page-box';
+@import 'boxes/brief-box';
// Sliders
@import 'sliders/slider-page';
--- /dev/null
+$module: ".brief-box";
+
+#{$module} {
+
+ position: relative;
+ @include padding(1);
+ @include margin-bottom(1);
+ text-align: center;
+
+ background: $brief-box-background;
+
+ &__head {
+
+ text-transform: uppercase;
+ display: inline-block;
+ background: $brief-box-background-head;
+ color: $brief-box-color-head;
+
+ @include padding(0 1);
+
+ @include font-size(m);
+ @include line-height(1.25);
+ @include typeface(sans-serif);
+ font-weight: weight(regular);
+
+ }
+
+ &__title {
+
+ display: block;
+ margin: 0 auto;
+ color: $brief-box-color;
+
+ @include margin-top(3);
+ @include margin-bottom(1);
+
+ @include font-size(xl);
+ @include line-height(1.25);
+ @include typeface(serif);
+ font-weight: weight(heavy);
+
+ }
+
+ &__desc {
+
+ display: block;
+ margin: 0 auto;
+ color: $brief-box-color;
+
+ @include margin-bottom(1);
+
+ @include font-size(xl);
+ @include line-height(1.25);
+ @include typeface(serif);
+ font-weight: weight(light);
+
+ }
+
+ &__button {
+
+ @extend .button;
+ @extend .button--small;
+
+ @include margin-bottom(3);
+
+ }
+
+}
-<hr/>
-<h1>Body</h1>
-<br/>
-{% for body in home.dynamiccontenthomebody_set.all %}
- {% if body.content_type.model == "brief" %}
- {% include "home/inc/brief_card.html" %}
- {% else %}
- {% include "home/inc/generic_card.html" %}
- {% endif %}
-{% endfor %}
-
-<br/>
-<hr/>
+<div class="container">
+ <div class="row">
+ {% for body in home.dynamiccontenthomebody_set.all %}
+ <div class="col-xs-4">
+ {% if body.content_type.model == "brief" %}
+ {% include "home/inc/brief_card.html" %}
+ {% else %}
+ {% include "home/inc/generic_card.html" %}
+ {% endif %}
+ </div>
+ {% endfor %}
+ </div>
+</div>
-<h2>{{ body.content_object.title }}<h2><br/>
-<p>{{ body.content_object.description|slice:":500" }}</p>
-{% if body.content_object.external_content %}
-<a href="{{ body.content_object.external_content }}" title="{{ body.content_object.text_button }}">{{ body.content_object.text_button }}</a><br/>
-{% elif body.content_object.content_object %}
-<a href="{{ body.content_object.content_object.get_absolute_url }}" title="{{ body.content_object.text_button }}">{{ body.content_object.text_button }}</a><br/>
-{% endif %}
-<a href="{{ body.content_object.get_absolute_url }}" title="{{ body.content_object.title }}">{{ body.content_object.title }}</a><br/>
-
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br/>
+{% load i18n %}
+
+<div class="brief-box">
+
+ <div class="brief-box__head">
+ {% trans 'Brief !' %}
+ </div>
+
+ <h3 class="brief-box__title">{{ body.content_object.title }}</h3>
+ <div class="brief-box__desc">
+ {{ body.content_object.description|slice:":500" }}
+ </div>
+ {% if body.content_object.external_content %}
+ <a class="brief-box__button" href="{{ body.content_object.external_content }}" title="{{ body.content_object.text_button }}">{{ body.content_object.text_button }}</a>
+ {% elif body.content_object.content_object %}
+ <a class="brief-box__button" href="{{ body.content_object.content_object.get_absolute_url }}" title="{{ body.content_object.text_button }}">{{ body.content_object.text_button }}</a>
+ {% else %}
+ <a class="brief-box__button" href="{{ body.content_object.get_absolute_url }}" title="{{ body.content_object.title }}">{{ body.content_object.title }}</a>
+ {% endif %}
+
+</div>
-{% load organization_tags i18n %}
-<h2>{{ body.content_object.title }}<h2><br/>
-<p>{{ body.content_object.description|slice:":500" }}</p>
-{% with body.content_object.images.all|get_type:'card' as image %}
- {% if image %}
- <img src="{{ MEDIA_URL }}{{ image.first.file }}" title="" /><br/>
- {% endif %}
-{% endwith %}
-<a href="{{ body.content_object.get_absolute_url }}" title="{{ body.content_object.title }}">{{ body.content_object.title }}</a><br/>
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br/>
+{% load i18n pages_tags mezzanine_tags media_tags organization_tags %}
+
+<a class="article-box" href="{{ body.content_object.get_absolute_url }}" title="{{ body.content_object.title }}">
+ <div class="article-box__header">
+ <figure class="article-box__image">
+ {% with body.content_object.images.all|get_type:'card' as image %}
+ {% if image %}
+ <img src="{{ MEDIA_URL }}{% thumbnail image.first.file 427 286 %}" data-src="{{ MEDIA_URL }}{% thumbnail images.0.file 427 286 %}" class="lazyload" alt="" />
+ {% endif %}
+ {% endwith %}
+ </figure>
+ {% if body.content_type.model == 'article' %}
+ <div class="article-box__tags">
+ <div class="tag tag--small tag--category">
+ {% trans 'News' %}
+ </div>
+ {% if body.content_object.department %}
+ <div class="tag tag--small dashed dashed--gray">
+ {{ body.content_object.department.name }}
+ </div>
+ {% endif %}
+ </div>
+ {% elif body.content_type.model == 'event' %}
+ <!-- TODO: Add event type tags -->
+ {% endif %}
+ </div>
+
+ <div class="article-box__content tal">
+ <h3 class="article-box__title">{{ body.content_object.title }}</h3>
+ <div class="article-box__subtitle">
+ {% if body.content_type.model == 'article' %}
+ {{ body.content_object.publish_date|date:"DATE_FORMAT" }}
+ {% for category in body.content_object.categories.all %}
+ {% if forloop.first %} | {% endif %}
+ {% if not forloop.first %}, {% endif %}
+ <strong>{{ category }}</strong>
+ {% endfor %}
+ {% elif body.content_type.model == 'event' %}
+ <!-- TODO: Add event type categories -->
+ {% endif %}
+ </div>
+ <div class="article-box__desc">
+ {{ body.content_object.description|richtext_filters|safe|truncatechars_html:200 }}
+ </div>
+ </div>
+</a>
<a class="article-box" href="{% url 'magazine-article-detail' article.slug %}">
<div class="article-box__header">
<figure class="article-box__image">
- {% with article.images.all|get_type:'card' as images %}
- {% if images %}
- <img src="{{ MEDIA_URL }}{% thumbnail images.0.file 427 286 top=0.5 left=article.photo_alignment|get_photo_alignment %}" data-src="{{ MEDIA_URL }}{% thumbnail images.0.file 427 286 %}" class="lazyload" />
- {% endif %}
- {% endwith %}
+ {% with article.images.all|get_type:'card' as images %}
+ {% if images %}
+ <img src="{{ MEDIA_URL }}{% thumbnail images.0.file 427 286 top=0.5 left=article.photo_alignment|get_photo_alignment %}" data-src="{{ MEDIA_URL }}{% thumbnail images.0.file 427 286 %}" class="lazyload" />
+ {% endif %}
+ {% endwith %}
</figure>
<div class="article-box__tags">
<div class="tag tag--small tag--category">