Skip to content
Snippets Groups Projects
Commit 7123dab1 authored by Matthias Adrowski's avatar Matthias Adrowski
Browse files

Merge remote-tracking branch 'origin/master' into feature_Upgrade-to-TYPO3-11

parents d715b775 8ae4d306
No related branches found
No related tags found
1 merge request!38Feature upgrade to typo3 11
<f:layout name="Default" />
<f:layout name="Default"/>
{namespace base=SGalinski\ProjectBase\ViewHelpers}
{namespace sg=SGalinski\SgNews\ViewHelpers}
......@@ -10,14 +10,15 @@
<div class="intro-section">
<section class="dark-bg">
<div class="tx-sgnews-single-header {f:if(condition: newsMetaData.imageObject, then: 'tx-sgnews-single-header-image')}">
<div
class="tx-sgnews-single-header {f:if(condition: newsMetaData.imageObject, then: 'tx-sgnews-single-header-image')}">
<f:if condition="{newsMetaData.imageObject}">
<div class="tx-sgnews-single-image">
<picture>
<source media="(max-width: 1200px)"
srcset="{f:uri.image(src: newsMetaData.imageObject.uid, treatIdAsReference: '1', width: '1200c', height: '403c', cropVariant: 'small')}">
srcset="{f:uri.image(src: newsMetaData.imageObject.uid, treatIdAsReference: '1', width: '1200c', height: '403c', cropVariant: 'small')}">
<f:image image="{newsMetaData.imageObject}" alt="" width="1845c"
height="619c" loading="lazy"/>
height="619c" loading="lazy"/>
</picture>
</div>
</f:if>
......@@ -30,11 +31,15 @@
<div class="tx-sgnews-teaser-meta">
<f:if condition="{authorCount}">
<span class="author">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="#FFF" d="M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z" /></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path
fill="#FFF"
d="M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"/></svg>
</span>
<f:for each="{newsMetaData.news.newsAuthor}" as="newsAuthor" iteration="iterator">
<f:alias map="{divider: '{f:if(condition: \'{iterator.cycle} < {authorCount}\', then: \',\')}'}">
<f:for each="{newsMetaData.news.newsAuthor}" as="newsAuthor"
iteration="iterator">
<f:alias
map="{divider: '{f:if(condition: \'{iterator.cycle} < {authorCount}\', then: \',\')}'}">
<a class="tx-sgnews-teaser-meta-author" href="#author{newsAuthor.uid}">
<f:if condition="{newsAuthor.name}">
{newsAuthor.name}{divider}
......@@ -46,26 +51,32 @@
<f:if condition="{newsMetaData.news.location}">
<span class="location">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="#FFF" d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z" /></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path
fill="#FFF"
d="M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z"/></svg>
{newsMetaData.news.location}
</span>
</f:if>
<span class="date">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#FFF" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm57.1 350.1L224.9 294c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v137.7l63.5 46.2c5.4 3.9 6.5 11.4 2.6 16.8l-28.2 38.8c-3.9 5.3-11.4 6.5-16.8 2.6z" /></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#FFF"
d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm57.1 350.1L224.9 294c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v137.7l63.5 46.2c5.4 3.9 6.5 11.4 2.6 16.8l-28.2 38.8c-3.9 5.3-11.4 6.5-16.8 2.6z"/></svg>
<f:format.date format="{f:translate(key:'frontend.dateformat')}">{newsMetaData.news.lastUpdated}</f:format.date>
</span>
<span class="category">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#FFF" d="M0 252.118V48C0 21.49 21.49 0 48 0h204.118a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882L293.823 497.941c-18.745 18.745-49.137 18.745-67.882 0L14.059 286.059A48 48 0 0 1 0 252.118zM112 64c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z" /></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#FFF"
d="M0 252.118V48C0 21.49 21.49 0 48 0h204.118a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882L293.823 497.941c-18.745 18.745-49.137 18.745-67.882 0L14.059 286.059A48 48 0 0 1 0 252.118zM112 64c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z"/></svg>
<a href="{f:uri.page(pageUid: '{newsMetaData.category.uid}')}">
{newsMetaData.category.subtitleWithFallbackToTitle}
</a>
</span>
<f:if condition="{newsMetaData.news.tags}">
<br />
<br/>
<span class="tags">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="#FFF" d="M497.941 225.941L286.059 14.059A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v204.118a48 48 0 0 0 14.059 33.941l211.882 211.882c18.744 18.745 49.136 18.746 67.882 0l204.118-204.118c18.745-18.745 18.745-49.137 0-67.882zM112 160c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm513.941 133.823L421.823 497.941c-18.745 18.745-49.137 18.745-67.882 0l-.36-.36L527.64 323.522c16.999-16.999 26.36-39.6 26.36-63.64s-9.362-46.641-26.36-63.64L331.397 0h48.721a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882z" /></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path
fill="#FFF"
d="M497.941 225.941L286.059 14.059A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v204.118a48 48 0 0 0 14.059 33.941l211.882 211.882c18.744 18.745 49.136 18.746 67.882 0l204.118-204.118c18.745-18.745 18.745-49.137 0-67.882zM112 160c-26.51 0-48-21.49-48-48s21.49-48 48-48 48 21.49 48 48-21.49 48-48 48zm513.941 133.823L421.823 497.941c-18.745 18.745-49.137 18.745-67.882 0l-.36-.36L527.64 323.522c16.999-16.999 26.36-39.6 26.36-63.64s-9.362-46.641-26.36-63.64L331.397 0h48.721a48 48 0 0 1 33.941 14.059l211.882 211.882c18.745 18.745 18.745 49.137 0 67.882z"/></svg>
<f:for each="{newsMetaData.news.tags}" as="tag" iteration="it">
{tag.title}<f:if condition="{it.isLast}"><f:else>, </f:else></f:if>
</f:for>
......@@ -77,20 +88,22 @@
</div>
</div>
</section>
</div>
<section class="content">
<div class="container">
<div class="tx-sgnews-single">
<div class="tx-sgnews-single-container">
<f:alias map="{content: '{f:cObject(typoscriptObjectPath: \'{f:if(condition: \\\'{newsMetaData.news.contentFromAnotherPage}\\\', then: \\\'lib.contentFromAnotherPage\\\', else: \\\'lib.mainContent\\\')}\')}'}">
<ul class="tx-sgnews-single-container">
<f:alias
map="{content: '{f:cObject(typoscriptObjectPath: \'{f:if(condition: \\\'{newsMetaData.news.contentFromAnotherPage}\\\', then: \\\'lib.contentFromAnotherPage\\\', else: \\\'lib.mainContent\\\')}\')}'}">
<div class="tx-sgnews-single-content">
<p>
<a href="#comments">{f:cObject(typoscriptObjectPath: "lib.sgCommentsGetCountWithLabel")}</a>
<a href="#comments">{f:cObject(typoscriptObjectPath:
"lib.sgCommentsGetCountWithLabel")}</a>
<span>//</span>
<f:translate key="frontend.singleview.readingTime" />
<f:translate key="frontend.singleview.readingTime"/>
<strong>
<sg:getReadingTime content="{content}" />
<sg:getReadingTime content="{content}"/>
</strong>
</p>
......@@ -100,7 +113,7 @@
<f:if condition="{newsMetaData.news.newsAuthor -> f:count()}">
<h2>
<f:translate key="frontend.singleview.authors" />
<f:translate key="frontend.singleview.authors"/>
</h2>
<hr>
......@@ -108,7 +121,8 @@
<f:for each="{newsMetaData.news.newsAuthor}" as="newsAuthor" iteration="iterator">
<div id="author{newsAuthor.uid}" class="tx-sgnews-author">
<f:if condition="{newsAuthor.image}">
<f:image class="tx-sgnews-author-image" image="{newsAuthor.image}" width="150c" height="150px" />
<f:image class="tx-sgnews-author-image" image="{newsAuthor.image}" width="150c"
height="150px"/>
</f:if>
<div class="tx-sgnews-author-information">
......@@ -122,7 +136,8 @@
<div class="tx-sgnews-author-information-bar">
<f:if condition="{newsAuthor.email}">
<div class="tx-sgnews-author-information-email">
<span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
<span class="glyphicon glyphicon-envelope"
aria-hidden="true"></span>
<f:link.email email="{newsAuthor.email}" target="_blank">
{newsAuthor.email}
</f:link.email>
......@@ -131,7 +146,8 @@
<f:if condition="{newsAuthor.website}">
<div class="tx-sgnews-author-information-website">
<span class="glyphicon glyphicon-home" aria-hidden="true"></span>
<span class="glyphicon glyphicon-home"
aria-hidden="true"></span>
<f:link.external uri="{newsAuthor.website}" target="_blank">
{newsAuthor.website}
</f:link.external>
......@@ -149,8 +165,10 @@
<f:if condition="{settings.authorNewsPid}">
<div class="tx-sgnews-author-information-articles">
<span class="glyphicon glyphicon-tag" aria-hidden="true"></span>
<f:link.action pageUid="{settings.authorNewsPid}" pluginName="NewsByAuthor" controller="NewsByAuthor" action="list" arguments="{authorId: newsAuthor.uid}">
<f:translate key="frontend.singleview.authorsAdditionalArticles" />
<f:link.action pageUid="{settings.authorNewsPid}"
pluginName="NewsByAuthor" controller="NewsByAuthor"
action="list" arguments="{authorId: newsAuthor.uid}">
<f:translate key="frontend.singleview.authorsAdditionalArticles"/>
</f:link.action>
</div>
</f:if>
......@@ -165,35 +183,67 @@
<hr>
<div class="tx-sgnews-meta-bar">
<base:sharer />
<base:sharer/>
<div class="tx-sgnews-likes" id="tx-sgnews-likes" data-uid="{newsMetaData.news.uid}">
<button class="tx-sgnews-like-buton btn btn-sm btn-info" data-ajaxurl="{sgajax:uri.ajax(extensionName: 'SgNews', controller: 'Ajax\Like', action: 'addLike', format: 'json')}">
<button class="tx-sgnews-like-buton btn btn-sm btn-info"
data-ajaxurl="{sgajax:uri.ajax(extensionName: 'SgNews', controller: 'Ajax\Like', action: 'addLike', format: 'json')}">
<span class="tx-sgnews-number-of-likes">
<span class="badge"><i class="fa fa-star-o" aria-hidden="true"></i>
<span class="tx-sgnews-number-of-likes-value">{newsMetaData.news.likes}</span>
</span>
</span>
<f:translate key="frontend.singleview.likeButton" />
<f:translate key="frontend.singleview.likeButton"/>
</button>
</div>
</div>
<f:if condition="{newsMetaData.news.relatedNews}">
<div class="tx-sgnews-single-related">
<h3>
<f:translate key="frontend.singleview.relatedArticles" />
</h3>
<ul>
<f:for each="{newsMetaData.news.relatedNews}" as="relatedNewsEntry">
<li>
<a href="{f:uri.page(pageUid: '{relatedNewsEntry.uid}')}">
{relatedNewsEntry.subtitleWithFallbackToTitle}
</a>
</li>
</f:for>
</ul>
</div>
<f:then>
<div class="tx-sgnews-single-related tx-sgnews-categories">
<h3>
<f:translate key="frontend.singleview.relatedArticles"/>
</h3>
<ul class="tx-sgnews-list tx-sgnews-overview row">
<sg:related news="{newsMetaData.news}"
relatedNews="{newsMetaData.news.relatedNews}"
as="relatedNewsEntry">
<li class="col-md-4 col-sm-6 col-xs-12">
<f:render partial="Teaser" arguments="{
newsMetaData: relatedNewsEntry,
headerTag: '<h2>',
closingHeaderTag: '</h2>',
showCategory: '1'
}" />
</li>
</sg:related>
</ul>
</div>
</f:then>
<f:else>
<f:if condition="{settings.enableAutomaticRelatedNews}">
<sg:related news="{newsMetaData.news}" iteration="iterator" limit="3" as="relatedNewsEntry">
<f:if condition="{iterator.isFirst}">
<div class="tx-sgnews-single-related tx-sgnews-categories">
<h3>
<f:translate key="frontend.singleview.relatedArticles"/>
</h3>
<ul class="tx-sgnews-list tx-sgnews-overview row">
</f:if>
<li class="col-md-4 col-sm-6 col-xs-12">
<f:render partial="Teaser" arguments="{
newsMetaData: relatedNewsEntry,
headerTag: '<h2>',
closingHeaderTag: '</h2>',
showCategory: '1'
}" />
</li>
<f:if condition="{iterator.isLast}">
</ul>
</div>
</f:if>
</sg:related>
</f:if>
</f:else>
</f:if>
</div>
</div>
......@@ -206,16 +256,24 @@
<f:if condition="{previousNews} || {nextNews}">
<div class="tx-sgnews-single-footer-browser">
<f:if condition="{previousNews}">
<a href="{f:uri.page(pageUid: '{previousNews.uid}')}" class="btn btn-md btn-info tx-sgnews-footer-browser-previous">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#FFF" d="M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zM142.1 273l135.5 135.5c9.4 9.4 24.6 9.4 33.9 0l17-17c9.4-9.4 9.4-24.6 0-33.9L226.9 256l101.6-101.6c9.4-9.4 9.4-24.6 0-33.9l-17-17c-9.4-9.4-24.6-9.4-33.9 0L142.1 239c-9.4 9.4-9.4 24.6 0 34z" /></svg>
<f:translate key="frontend.singleview.previousArticle" />
<a href="{f:uri.page(pageUid: '{previousNews.uid}')}"
class="btn btn-md btn-info tx-sgnews-footer-browser-previous">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path fill="#FFF"
d="M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zM142.1 273l135.5 135.5c9.4 9.4 24.6 9.4 33.9 0l17-17c9.4-9.4 9.4-24.6 0-33.9L226.9 256l101.6-101.6c9.4-9.4 9.4-24.6 0-33.9l-17-17c-9.4-9.4-24.6-9.4-33.9 0L142.1 239c-9.4 9.4-9.4 24.6 0 34z"/>
</svg>
<f:translate key="frontend.singleview.previousArticle"/>
</a>
</f:if>
<f:if condition="{nextNews}">
<a href="{f:uri.page(pageUid: '{nextNews.uid}')}" class="btn btn-md btn-info tx-sgnews-footer-browser-next">
<f:translate key="frontend.singleview.nextArticle" />
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#FFF" d="M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zm113.9 231L234.4 103.5c-9.4-9.4-24.6-9.4-33.9 0l-17 17c-9.4 9.4-9.4 24.6 0 33.9L285.1 256 183.5 357.6c-9.4 9.4-9.4 24.6 0 33.9l17 17c9.4 9.4 24.6 9.4 33.9 0L369.9 273c9.4-9.4 9.4-24.6 0-34z" /></svg>
<a href="{f:uri.page(pageUid: '{nextNews.uid}')}"
class="btn btn-md btn-info tx-sgnews-footer-browser-next">
<f:translate key="frontend.singleview.nextArticle"/>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path fill="#FFF"
d="M256 8c137 0 248 111 248 248S393 504 256 504 8 393 8 256 119 8 256 8zm113.9 231L234.4 103.5c-9.4-9.4-24.6-9.4-33.9 0l-17 17c-9.4 9.4-9.4 24.6 0 33.9L285.1 256 183.5 357.6c-9.4 9.4-9.4 24.6 0 33.9l17 17c9.4 9.4 24.6 9.4 33.9 0L369.9 273c9.4-9.4 9.4-24.6 0-34z"/>
</svg>
</a>
</f:if>
</div>
......@@ -224,14 +282,16 @@
</div>
</section>
<section class="content">
<div class="container">
<div class="tx-sgnews-single-comments">
<div id="comments" class="tx-sgnews-comments-inner">
<f:cObject typoscriptObjectPath="lib.sgCommentsIndex" />
<f:if condition="{newsMetaData.news.enableComments}">
<section class="content">
<div class="container">
<div class="tx-sgnews-single-comments">
<div id="comments" class="tx-sgnews-comments-inner">
<f:cObject typoscriptObjectPath="lib.sgCommentsIndex"/>
</div>
</div>
</div>
</div>
</section>
</section>
</f:if>
</f:alias>
</f:section>
@import "layout-content";
// sg_news SingleView pages have two intro-sections,
// so we need to remove the duplicate white space created by the first one
.intro-section + .main-content .tx-sgnews {
margin-top: $margin-base-vertical * -2;
}
// reduce the gap between the .dark-bg and the comment section
.tx-sgnews .content.dark-bg + .content {
margin-top: $margin-base-vertical * -1;
......
......@@ -6,7 +6,7 @@
"license": [
"GPL-2.0-or-later"
],
"version": "9.6.3",
"version": "9.8.3",
"support": {
},
"repositories": [
......
......@@ -19,7 +19,7 @@ $EM_CONF['sg_news'] = [
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'lockType' => '',
'version' => '9.6.3',
'version' => '9.8.3',
'constraints' => [
'depends' => [
'typo3' => '10.4.0-11.5.99',
......
......@@ -10,6 +10,7 @@ CREATE TABLE pages (
tx_sgnews_location mediumtext,
tx_sgnews_date_end int(10) unsigned DEFAULT '0' NOT NULL,
tx_sgnews_content_from_another_page int(11) unsigned DEFAULT '0' NOT NULL,
tx_sgnews_comments_enable tinyint(4) unsigned DEFAULT '1' NOT NULL,
KEY news_author (tx_sgnews_news_author)
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment