From 0cee75ceb50365862e40f0fa1bc449dd6b3ea025 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Mon, 27 Jan 2020 13:27:21 +0100 Subject: [PATCH] Add proper layout handling Provide "normal" content pages. --- .../TypoScript/Setup/Page.typoscript | 14 +++++---- Configuration/TypoScript/setup.typoscript | 4 --- Resources/Private/Layouts/Page/BlogPost.html | 29 ------------------- .../Page/{Default.html => BlogSidebar.html} | 0 .../Layouts/Page/{Full.html => Content.html} | 4 ++- Resources/Private/Sass/Frontend/_layout.scss | 2 +- ...{_blogPost-and-full.scss => _content.scss} | 6 ++-- .../Private/Templates/Page/BlogPost.html | 16 +++++++++- Resources/Private/Templates/Page/Default.html | 2 +- Resources/Private/Templates/Page/Full.html | 6 +++- 10 files changed, 36 insertions(+), 47 deletions(-) delete mode 100644 Resources/Private/Layouts/Page/BlogPost.html rename Resources/Private/Layouts/Page/{Default.html => BlogSidebar.html} (100%) rename Resources/Private/Layouts/Page/{Full.html => Content.html} (73%) rename Resources/Private/Sass/Frontend/layout/page/{_blogPost-and-full.scss => _content.scss} (85%) diff --git a/Configuration/TypoScript/Setup/Page.typoscript b/Configuration/TypoScript/Setup/Page.typoscript index cd40ba5..896e70d 100644 --- a/Configuration/TypoScript/Setup/Page.typoscript +++ b/Configuration/TypoScript/Setup/Page.typoscript @@ -10,13 +10,17 @@ page { bodyTagCObject = COA bodyTagCObject { - 10 = COA + 10 = CASE 10 { - 10 =< page.10.templateName.cObject - 10.wrap = Layout| - wrap = class="|" + key.stdWrap.cObject =< page.10.templateName.cObject + default = TEXT + default.value = BlogSidebar + Full = TEXT + Full.value = Content + BlogPost = TEXT + BlogPost.value = Content } - stdWrap.noTrimWrap = || + stdWrap.noTrimWrap = || } 10 = FLUIDTEMPLATE diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index 52c0c68..efd1c76 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -1,7 +1,3 @@ @import 'EXT:seo/Configuration/TypoScript/XmlSitemap/setup.typoscript' @import 'EXT:ds_site/Configuration/TypoScript/Setup/' @import 'EXT:ds_site/Configuration/TypoScript/Setup/ContentElements/' - -config { - admPanel = 1 -} diff --git a/Resources/Private/Layouts/Page/BlogPost.html b/Resources/Private/Layouts/Page/BlogPost.html deleted file mode 100644 index 81c8c1b..0000000 --- a/Resources/Private/Layouts/Page/BlogPost.html +++ /dev/null @@ -1,29 +0,0 @@ - - - {f:render(partial: 'Header', arguments: _all) -> f:spaceless()} - -
-
-

Blog Post

-
- -
- {f:render(partial: 'BlogPostHeader', arguments: { - title: data.title, - blogPost : data, - compatibleWith: compatibleWith, - topics: assignedTopics, - addLinks: 1 - }) -> f:spaceless()} - - - - {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/BlogSidebar.html similarity index 100% rename from Resources/Private/Layouts/Page/Default.html rename to Resources/Private/Layouts/Page/BlogSidebar.html diff --git a/Resources/Private/Layouts/Page/Full.html b/Resources/Private/Layouts/Page/Content.html similarity index 73% rename from Resources/Private/Layouts/Page/Full.html rename to Resources/Private/Layouts/Page/Content.html index 2f03cee..c6a2226 100644 --- a/Resources/Private/Layouts/Page/Full.html +++ b/Resources/Private/Layouts/Page/Content.html @@ -5,10 +5,12 @@
-

{data.title}

+

{f:render(section: 'Header', arguments: _all) -> f:spaceless()}

+ {f:render(section: 'ContentHeader', arguments: _all, optional: 1) -> f:spaceless()} + diff --git a/Resources/Private/Sass/Frontend/_layout.scss b/Resources/Private/Sass/Frontend/_layout.scss index 6238e2c..c3611f8 100644 --- a/Resources/Private/Sass/Frontend/_layout.scss +++ b/Resources/Private/Sass/Frontend/_layout.scss @@ -2,7 +2,7 @@ @import "layout/header"; @import "layout/footer"; @import "layout/content"; -@import "layout/page/blogPost-and-full"; +@import "layout/page/content"; body { @extend .container; diff --git a/Resources/Private/Sass/Frontend/layout/page/_blogPost-and-full.scss b/Resources/Private/Sass/Frontend/layout/page/_content.scss similarity index 85% rename from Resources/Private/Sass/Frontend/layout/page/_blogPost-and-full.scss rename to Resources/Private/Sass/Frontend/layout/page/_content.scss index 00eaae1..aba93d7 100644 --- a/Resources/Private/Sass/Frontend/layout/page/_blogPost-and-full.scss +++ b/Resources/Private/Sass/Frontend/layout/page/_content.scss @@ -1,5 +1,4 @@ -body.LayoutFull, -body.LayoutBlogPost { +body.LayoutContent { article { @extend .row; @extend .col-12; @@ -22,8 +21,7 @@ body.LayoutBlogPost { } @media (max-width: 1023px) { - body.LayoutFull, - body.LayoutBlogPost { + body.LayoutContent { article, article > main { padding-right: 0; diff --git a/Resources/Private/Templates/Page/BlogPost.html b/Resources/Private/Templates/Page/BlogPost.html index e35ff47..e53dfbb 100644 --- a/Resources/Private/Templates/Page/BlogPost.html +++ b/Resources/Private/Templates/Page/BlogPost.html @@ -1,7 +1,21 @@ - + + + + Blog Post + + + + {f:render(partial: 'BlogPostHeader', arguments: { + title: data.title, + blogPost : data, + compatibleWith: compatibleWith, + topics: assignedTopics, + addLinks: 1 + })} +
diff --git a/Resources/Private/Templates/Page/Default.html b/Resources/Private/Templates/Page/Default.html index 09ed127..8fb4889 100644 --- a/Resources/Private/Templates/Page/Default.html +++ b/Resources/Private/Templates/Page/Default.html @@ -1,7 +1,7 @@ - + {contentMain -> f:format.raw()} diff --git a/Resources/Private/Templates/Page/Full.html b/Resources/Private/Templates/Page/Full.html index 74f4358..9b41262 100644 --- a/Resources/Private/Templates/Page/Full.html +++ b/Resources/Private/Templates/Page/Full.html @@ -1,7 +1,11 @@ - + + + + {data.title} +
{contentMain -> f:format.raw()}