%namespace file="/functions/partials" name="partials" import="*"/>
<%inherit file="site" />
<%def name="main_content()">
<%
import json
i18n = object.LimeAPI.i18n
lang = object.language()
%>
%if object._files('carousel-images'):
${partials.renderImageCarousel(object, withControlCarousel=False,
withDownloadButton=False, language=object.language(), imageVariant='articleimg')}
%elif object.val('mainimage.file'):
${partials.renderMainImageWidthFigcaption(object)}
%endif
${object.val('longtitle') or object.val('title')}
${partials.socialShare()}
%if object.val('abstract') or object.val('teaser'):
${object.val('abstract') or object.val('teaser')}
%endif
${ i18n('site-publisert', lang=object.language()) }: ${site.formatDate(object.publishDate(),format='%d.%m.%Y',localized='no')}
% if object.val('dateModified') and site.formatDate(object.val('dateModified'),format='%Y%m%d') > site.formatDate(object.publishDate(),format='%Y%m%d'):
${ i18n('site-oppdatert', lang=object.language()) }: ${site.formatDate(object.val('dateModified'),format='%d.%m.%Y',localized='no')}
% endif
% if object.val('txtauthor'):
${ i18n('site-author', lang=object.language()) }: ${object.val('txtauthor')}
% endif
% if object.val('byline'):
${object.val('byline')}
% endif
% if object.val('body').find('limewidget') != -1:
${partials.renderBodyandWidgets()}
% else:
${partials.renderBody(object)}
% endif
${ object.layoutSection('layout.bottom-full', location_in_page='in_sidebar') }