From 1193914f8be3663cc19a70d76af0c8bdc48d4f85 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Wed, 8 Jan 2020 21:03:54 +0100 Subject: [PATCH] Restructure ordering of blog post view --- .../ContentElements/ParseFunc.typoscript | 12 --- .../TypoScript/Setup/Page.typoscript | 21 +++-- Resources/Private/Layouts/Page/BlogPost.html | 29 +++++++ Resources/Private/Layouts/Page/Default.html | 21 ++--- .../Private/Partials/BlogPostHeader.html | 39 +++++++-- Resources/Private/Partials/Menu/Page.html | 10 ++- Resources/Private/Partials/Page/Footer.html | 7 ++ Resources/Private/Partials/Page/Header.html | 6 ++ Resources/Private/Sass/_layout.scss | 7 +- Resources/Private/Sass/index.scss | 3 +- Resources/Private/Sass/layout/_content.scss | 81 ++++++++++++++++--- Resources/Private/Sass/layout/_elements.scss | 27 ------- .../Private/Sass/layout/page/_blogPost.scss | 22 +++++ .../Private/Templates/Page/BlogPost.html | 29 ++----- Resources/Private/Templates/Page/Default.html | 10 +-- 15 files changed, 209 insertions(+), 115 deletions(-) create mode 100644 Resources/Private/Layouts/Page/BlogPost.html create mode 100644 Resources/Private/Partials/Page/Footer.html create mode 100644 Resources/Private/Partials/Page/Header.html create mode 100644 Resources/Private/Sass/layout/page/_blogPost.scss diff --git a/Configuration/TypoScript/Setup/ContentElements/ParseFunc.typoscript b/Configuration/TypoScript/Setup/ContentElements/ParseFunc.typoscript index 37fed18..7070d31 100644 --- a/Configuration/TypoScript/Setup/ContentElements/ParseFunc.typoscript +++ b/Configuration/TypoScript/Setup/ContentElements/ParseFunc.typoscript @@ -15,18 +15,6 @@ lib.parseFunc { pre { userFunc = DanielSiepmann\DsSite\UserFunction\CodeHighlighting->preTag } - a = TEXT - a { - current = 1 - typolink { - parameter.data = parameters:href - title.data = parameters:title - ATagParams.data = parameters:allParams - target.data = parameters:target - extTarget = {$styles.content.links.extTarget} - extTarget.override.data = parameters:target - } - } } allowTags = a, abbr, acronym, address, b, bdo, big, blockquote, br, caption, center, cite, code, dd, del, dfn, dl, div, dt, em, h3, h4, h5, h6, hr, i, img, ins, kbd, label, li, link, ol, p, pre, q, s, samp, sdfield, small, span, strike, strong, sub, sup, title, tt, u, ul, var denyTags = * diff --git a/Configuration/TypoScript/Setup/Page.typoscript b/Configuration/TypoScript/Setup/Page.typoscript index b5ea66f..46e27eb 100644 --- a/Configuration/TypoScript/Setup/Page.typoscript +++ b/Configuration/TypoScript/Setup/Page.typoscript @@ -8,17 +8,16 @@ page { viewport = width=device-width, initial-scale=1 } - # Just an idea to add layout based class, if necessary - # bodyTagCObject = COA - # bodyTagCObject { - # 10 = COA - # 10 { - # 10 =< page.10.templateName.cObject - # 10.wrap = Layout| - # wrap = class="|" - # } - # stdWrap.noTrimWrap = || - # } + bodyTagCObject = COA + bodyTagCObject { + 10 = COA + 10 { + 10 =< page.10.templateName.cObject + 10.wrap = Layout| + wrap = class="|" + } + stdWrap.noTrimWrap = || + } 10 = FLUIDTEMPLATE 10 { diff --git a/Resources/Private/Layouts/Page/BlogPost.html b/Resources/Private/Layouts/Page/BlogPost.html new file mode 100644 index 0000000..0b2dd2a --- /dev/null +++ b/Resources/Private/Layouts/Page/BlogPost.html @@ -0,0 +1,29 @@ + + + {f:render(partial: 'Header', arguments: _all)} + +
+
+

Blog Post

+
+ +
+ {f:render(partial: 'BlogPostHeader', arguments: { + title: data.title, + blogPost : data, + compatibleWith: compatibleWith, + topics: assignedTopics, + addLinks: 1 + })} + + + + {f:render(section: 'Content', arguments: _all)} +
+
+ + {f:render(partial: 'Footer', arguments: _all)} + diff --git a/Resources/Private/Layouts/Page/Default.html b/Resources/Private/Layouts/Page/Default.html index 114d99a..294d2b7 100644 --- a/Resources/Private/Layouts/Page/Default.html +++ b/Resources/Private/Layouts/Page/Default.html @@ -1,20 +1,21 @@ -
- {settings.websiteTitle} -
+ + {f:render(partial: 'Header', arguments: _all)}
- +
+

{data.title}

+
+
{f:render(section: 'Content', arguments: _all)}
+ +
- + {f:render(partial: 'Footer', arguments: _all)} diff --git a/Resources/Private/Partials/BlogPostHeader.html b/Resources/Private/Partials/BlogPostHeader.html index 1e87cb7..925ffd9 100644 --- a/Resources/Private/Partials/BlogPostHeader.html +++ b/Resources/Private/Partials/BlogPostHeader.html @@ -12,14 +12,41 @@ Updated:

Tested with TYPO3: - - {version.data.title}{f:if(condition: '!{i.isLast}', then: ',')} - + {f:render(section: 'TopicList', arguments: { + topics: compatibleWith, + addLinks: addLinks + })}

Topics: - - {topic.data.title}{f:if(condition: '!{i.isLast}', then: ',')} - + {f:render(section: 'TopicList', arguments: { + topics: topics, + addLinks: addLinks + })}

+ + + + + {topic.data.title}{f:if(condition: '!{i.isLast}', then: ',')} + + + + + + + + {content -> f:spaceless()} + + + {content} + + + diff --git a/Resources/Private/Partials/Menu/Page.html b/Resources/Private/Partials/Menu/Page.html index 8cfe3fd..c262e2f 100644 --- a/Resources/Private/Partials/Menu/Page.html +++ b/Resources/Private/Partials/Menu/Page.html @@ -8,11 +8,13 @@ topics: page.topics })} - {page.data.abstract -> f:format.html()} +
+ {page.data.abstract -> f:format.html()} - - {f:render(partial: 'Image', arguments: {image: page.media.0})} - + + {f:render(partial: 'Image', arguments: {image: page.media.0})} + +