From b68a001dc98fc2ed6a55694a347304c63194c3a2 Mon Sep 17 00:00:00 2001 From: Benjamin Kott Date: Tue, 4 Jun 2019 00:29:42 +0200 Subject: [PATCH 1/7] [WIP] Refactor Metadata --- .../Private/Templates/Page/Default.html | 4 +- Classes/Controller/PostController.php | 32 +++++++++ Configuration/TsConfig/Page/Wizards.tsconfig | 18 +++++ .../TypoScript/Static/setup.typoscript | 69 +++++++++++++++++++ Resources/Private/Language/locallang.xlf | 42 ++++++++++- Resources/Private/Language/locallang_db.xlf | 12 ++++ .../Private/Partials/General/BlogIcons.html | 3 + Resources/Private/Partials/List/Post.html | 2 +- .../Partials/Meta/Elements/Authors.html | 15 ++++ .../Partials/Meta/Elements/Categories.html | 16 +++++ .../Partials/Meta/Elements/Comments.html | 24 +++++++ .../Partials/Meta/Elements/Published.html | 9 +++ .../Private/Partials/Meta/Elements/Tags.html | 16 +++++ Resources/Private/Partials/Meta/Footer.html | 2 + Resources/Private/Partials/Meta/Header.html | 2 + Resources/Private/Partials/Meta/List.html | 2 + .../Private/Partials/Meta/Rendering/Base.html | 20 ++++++ .../Partials/Meta/Rendering/Group.html | 3 + .../Private/Partials/Meta/Rendering/Item.html | 12 ++++ .../Private/Scss/components/_metagroup.scss | 39 +++++++++++ Resources/Private/Scss/frontend.scss | 1 + Resources/Private/Templates/Post/Footer.html | 9 +++ Resources/Private/Templates/Post/Header.html | 11 +++ .../Private/Templates/Post/Metadata.html | 2 +- Resources/Public/Css/frontend.min.css | 2 +- Resources/Public/Icons/plugin-blog-footer.svg | 1 + Resources/Public/Icons/plugin-blog-header.svg | 1 + ext_localconf.php | 16 +++++ ext_tables.php | 14 ++++ 29 files changed, 391 insertions(+), 8 deletions(-) create mode 100644 Resources/Private/Partials/Meta/Elements/Authors.html create mode 100644 Resources/Private/Partials/Meta/Elements/Categories.html create mode 100644 Resources/Private/Partials/Meta/Elements/Comments.html create mode 100644 Resources/Private/Partials/Meta/Elements/Published.html create mode 100644 Resources/Private/Partials/Meta/Elements/Tags.html create mode 100644 Resources/Private/Partials/Meta/Footer.html create mode 100644 Resources/Private/Partials/Meta/Header.html create mode 100644 Resources/Private/Partials/Meta/List.html create mode 100644 Resources/Private/Partials/Meta/Rendering/Base.html create mode 100644 Resources/Private/Partials/Meta/Rendering/Group.html create mode 100644 Resources/Private/Partials/Meta/Rendering/Item.html create mode 100644 Resources/Private/Scss/components/_metagroup.scss create mode 100644 Resources/Private/Templates/Post/Footer.html create mode 100644 Resources/Private/Templates/Post/Header.html create mode 100644 Resources/Public/Icons/plugin-blog-footer.svg create mode 100644 Resources/Public/Icons/plugin-blog-header.svg diff --git a/Build/blog_template_test/Resources/Private/Templates/Page/Default.html b/Build/blog_template_test/Resources/Private/Templates/Page/Default.html index 3f8da384..95def659 100644 --- a/Build/blog_template_test/Resources/Private/Templates/Page/Default.html +++ b/Build/blog_template_test/Resources/Private/Templates/Page/Default.html @@ -5,11 +5,11 @@
- - + + diff --git a/Classes/Controller/PostController.php b/Classes/Controller/PostController.php index 58ca6d06..83700fe7 100644 --- a/Classes/Controller/PostController.php +++ b/Classes/Controller/PostController.php @@ -274,6 +274,38 @@ public function sidebarAction(): void { } + /** + * Header action: output the header of blog post. + * + * @throws \TYPO3\CMS\Core\Context\Exception\AspectNotFoundException + * @throws \TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException + * @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException + */ + public function headerAction(): void + { + $post = $this->postRepository->findCurrentPost(); + $this->view->assign('post', $post); + if ($post instanceof Post) { + $this->blogCacheService->addTagsForPost($post); + } + } + + /** + * Footer action: output the footer of blog post. + * + * @throws \TYPO3\CMS\Core\Context\Exception\AspectNotFoundException + * @throws \TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException + * @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException + */ + public function footerAction(): void + { + $post = $this->postRepository->findCurrentPost(); + $this->view->assign('post', $post); + if ($post instanceof Post) { + $this->blogCacheService->addTagsForPost($post); + } + } + /** * Metadata action: output meta information of blog post. * diff --git a/Configuration/TsConfig/Page/Wizards.tsconfig b/Configuration/TsConfig/Page/Wizards.tsconfig index d20916a8..c63fc869 100644 --- a/Configuration/TsConfig/Page/Wizards.tsconfig +++ b/Configuration/TsConfig/Page/Wizards.tsconfig @@ -59,6 +59,24 @@ mod.wizards.newContentElement.wizardItems.blog { list_type = blog_sidebar } } + blog_header { + iconIdentifier = plugin-blog-header + title = LLL:EXT:blog/Resources/Private/Language/locallang_db.xlf:plugin.blog_header.title + description = LLL:EXT:blog/Resources/Private/Language/locallang_db.xlf:plugin.blog_header.description + tt_content_defValues { + CType = list + list_type = blog_header + } + } + blog_footer { + iconIdentifier = plugin-blog-footer + title = LLL:EXT:blog/Resources/Private/Language/locallang_db.xlf:plugin.blog_footer.title + description = LLL:EXT:blog/Resources/Private/Language/locallang_db.xlf:plugin.blog_footer.description + tt_content_defValues { + CType = list + list_type = blog_footer + } + } blog_metadata { iconIdentifier = plugin-blog-metadata title = LLL:EXT:blog/Resources/Private/Language/locallang_db.xlf:plugin.blog_metadata.title diff --git a/Configuration/TypoScript/Static/setup.typoscript b/Configuration/TypoScript/Static/setup.typoscript index 14f4eea9..03de53de 100644 --- a/Configuration/TypoScript/Static/setup.typoscript +++ b/Configuration/TypoScript/Static/setup.typoscript @@ -39,6 +39,75 @@ plugin.tx_blog { 50 = tt_content.list.20.blog_archivewidget 60 = tt_content.list.20.blog_feedwidget } + # Post View + meta { + header { + enable = 1 + modifierClass = header + elements { + authors { + enable = 1 + } + categories { + enable = 0 + } + tags { + enable = 0 + } + published { + enable = 1 + } + comments { + enable = 1 + } + } + } + footer { + enable = 1 + modifierClass = footer + elements { + authors { + enable = 0 + } + categories { + enable = 1 + } + tags { + enable = 1 + } + published { + enable = 0 + } + comments { + enable = 0 + } + } + + } + list { + enable = 1 + modifierClass = list + elements { + author { + enable = 0 + } + categories { + enable = 0 + } + tags { + enable = 0 + } + published { + enable = 1 + } + comments { + enable = 1 + } + } + } + default =< .list + } + # Lists related settings lists { pagination { diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index 5cb87634..e1add172 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -61,13 +61,13 @@ - No comments + No Comments - %s comment + %s Comment - %s comments + %s Comments Comments closed @@ -92,6 +92,42 @@ + + Author + + + Category + + + Categories + + + Tag + + + Tags + + + Published + + + Comments + + + %s Comment + + + %s Comments + + + Start the Conversation + + + Join the Conversation + + + View the Conversation + All blog posts in ###MONTH_NAME### ###YEAR### diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index 554d0778..3dd93f1b 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -43,6 +43,18 @@ The sidebar contains links enabling the user to quickly navigate your blog. It shows an overview of recent posts and comments, categories, tags and archive links. + + Blog: Header + + + Displays post header + + + Blog: Footer + + + Displays post footer + Blog: Metadata diff --git a/Resources/Private/Partials/General/BlogIcons.html b/Resources/Private/Partials/General/BlogIcons.html index 21ca9c86..d5e38c5b 100644 --- a/Resources/Private/Partials/General/BlogIcons.html +++ b/Resources/Private/Partials/General/BlogIcons.html @@ -1,6 +1,9 @@ + + + diff --git a/Resources/Private/Partials/List/Post.html b/Resources/Private/Partials/List/Post.html index 306f9156..3658e84a 100644 --- a/Resources/Private/Partials/List/Post.html +++ b/Resources/Private/Partials/List/Post.html @@ -1,6 +1,6 @@

- +

{post.abstract}

diff --git a/Resources/Private/Partials/Meta/Elements/Authors.html b/Resources/Private/Partials/Meta/Elements/Authors.html new file mode 100644 index 00000000..40b4d64d --- /dev/null +++ b/Resources/Private/Partials/Meta/Elements/Authors.html @@ -0,0 +1,15 @@ +authors + + + + + + {post.authors.0.name} + + + + + + {content} + + diff --git a/Resources/Private/Partials/Meta/Elements/Categories.html b/Resources/Private/Partials/Meta/Elements/Categories.html new file mode 100644 index 00000000..1d7141c6 --- /dev/null +++ b/Resources/Private/Partials/Meta/Elements/Categories.html @@ -0,0 +1,16 @@ +categories + + + + + + + + + + + diff --git a/Resources/Private/Partials/Meta/Elements/Comments.html b/Resources/Private/Partials/Meta/Elements/Comments.html new file mode 100644 index 00000000..65f70a62 --- /dev/null +++ b/Resources/Private/Partials/Meta/Elements/Comments.html @@ -0,0 +1,24 @@ +comments + + + + + + + + + + + + + + + + + + + + + {text} + + diff --git a/Resources/Private/Partials/Meta/Elements/Published.html b/Resources/Private/Partials/Meta/Elements/Published.html new file mode 100644 index 00000000..3002b0d6 --- /dev/null +++ b/Resources/Private/Partials/Meta/Elements/Published.html @@ -0,0 +1,9 @@ +published + + + + + + + + diff --git a/Resources/Private/Partials/Meta/Elements/Tags.html b/Resources/Private/Partials/Meta/Elements/Tags.html new file mode 100644 index 00000000..d8b8bab8 --- /dev/null +++ b/Resources/Private/Partials/Meta/Elements/Tags.html @@ -0,0 +1,16 @@ +tags + + + + + + + + + + + diff --git a/Resources/Private/Partials/Meta/Footer.html b/Resources/Private/Partials/Meta/Footer.html new file mode 100644 index 00000000..ef8ceaff --- /dev/null +++ b/Resources/Private/Partials/Meta/Footer.html @@ -0,0 +1,2 @@ + + diff --git a/Resources/Private/Partials/Meta/Header.html b/Resources/Private/Partials/Meta/Header.html new file mode 100644 index 00000000..c514a0df --- /dev/null +++ b/Resources/Private/Partials/Meta/Header.html @@ -0,0 +1,2 @@ + + diff --git a/Resources/Private/Partials/Meta/List.html b/Resources/Private/Partials/Meta/List.html new file mode 100644 index 00000000..87b4fac9 --- /dev/null +++ b/Resources/Private/Partials/Meta/List.html @@ -0,0 +1,2 @@ + + diff --git a/Resources/Private/Partials/Meta/Rendering/Base.html b/Resources/Private/Partials/Meta/Rendering/Base.html new file mode 100644 index 00000000..46bdaa66 --- /dev/null +++ b/Resources/Private/Partials/Meta/Rendering/Base.html @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/Resources/Private/Partials/Meta/Rendering/Group.html b/Resources/Private/Partials/Meta/Rendering/Group.html new file mode 100644 index 00000000..a832ed53 --- /dev/null +++ b/Resources/Private/Partials/Meta/Rendering/Group.html @@ -0,0 +1,3 @@ + diff --git a/Resources/Private/Partials/Meta/Rendering/Item.html b/Resources/Private/Partials/Meta/Rendering/Item.html new file mode 100644 index 00000000..13304fd8 --- /dev/null +++ b/Resources/Private/Partials/Meta/Rendering/Item.html @@ -0,0 +1,12 @@ +default + diff --git a/Resources/Private/Scss/components/_metagroup.scss b/Resources/Private/Scss/components/_metagroup.scss new file mode 100644 index 00000000..f0fc73e8 --- /dev/null +++ b/Resources/Private/Scss/components/_metagroup.scss @@ -0,0 +1,39 @@ +/** + * Metagroup + */ +.postmetagroup { + display: flex; + align-items: center; + margin: -.135rem -.5rem; + flex-wrap: wrap; +} +.postmetagroup__item { + padding: .135rem .5rem; + white-space: nowrap; + width: 100%; + @media (min-width: 576px) { + width: auto; + } +} +.postmetagroup__icon, +.postmetagroup__prefix { + opacity: .75; +} +.postmetagroup__item { + display: inline-flex; +} +.postmetagroup__body { + margin-left: 0.25rem +} +.postmetagroup__list { + padding: 0; + margin: 0; + list-style: none; + li { + display: inline; + &:not(:last-child):after { + display: inline; + content: ', '; + } + } +} diff --git a/Resources/Private/Scss/frontend.scss b/Resources/Private/Scss/frontend.scss index 67c9e638..306cbb69 100644 --- a/Resources/Private/Scss/frontend.scss +++ b/Resources/Private/Scss/frontend.scss @@ -1,6 +1,7 @@ /** * Components */ +@import "components/metagroup"; @import "components/author"; @import "components/badge"; @import "components/icons"; diff --git a/Resources/Private/Templates/Post/Footer.html b/Resources/Private/Templates/Post/Footer.html new file mode 100644 index 00000000..f9376252 --- /dev/null +++ b/Resources/Private/Templates/Post/Footer.html @@ -0,0 +1,9 @@ + +
+ + + +
+
diff --git a/Resources/Private/Templates/Post/Header.html b/Resources/Private/Templates/Post/Header.html new file mode 100644 index 00000000..382ea1a7 --- /dev/null +++ b/Resources/Private/Templates/Post/Header.html @@ -0,0 +1,11 @@ + +
+

{post.title}

+ +
+ +
+
+
+
+ diff --git a/Resources/Private/Templates/Post/Metadata.html b/Resources/Private/Templates/Post/Metadata.html index f7dc075c..46cf33c6 100644 --- a/Resources/Private/Templates/Post/Metadata.html +++ b/Resources/Private/Templates/Post/Metadata.html @@ -1 +1 @@ - + diff --git a/Resources/Public/Css/frontend.min.css b/Resources/Public/Css/frontend.min.css index e5cd1c9c..daf90b31 100644 --- a/Resources/Public/Css/frontend.min.css +++ b/Resources/Public/Css/frontend.min.css @@ -1 +1 @@ -.postauthor{display:-webkit-box;display:-ms-flexbox;display:flex}.postauthor+.postauthor{border-top:1px solid rgba(0,0,0,.15);padding-top:1.5rem;margin-top:1.5rem}.postauthor__avatar{margin-right:1rem}.postauthor__avatarimage{display:block;border-radius:50%;overflow:hidden}.postauthor__body{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.postauthor__body>:last-child{margin-bottom:0}.postauthor__intro{opacity:.75}.postauthor__name{font-weight:700;font-size:1.25rem;line-height:1.5rem}.postauthor__sublinedivider{margin-right:.25rem}.postauthor__social{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:.25rem}.postauthor__social+.postauthor__actions{margin-top:.5rem}.postauthor__sociallink{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-right:.5rem}.postauthor__sociallinklabel{position:absolute!important;clip:rect(1px,1px,1px,1px)!important;padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden!important}.postauthor__bio{margin-top:1rem;margin-bottom:1rem}.postauthor__bio p{margin-bottom:.5rem}.postauthor__bio>:last-child{margin-bottom:0}.postauthor__actions{margin-bottom:1rem}.blogbadge{display:inline-block;padding:.5em;border-radius:2px;border:1px solid;line-height:1em}.blogbadge:hover{text-decoration:none}.blogicon{top:.125em;position:relative;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-item-align:center;align-self:center}.blogicon svg{height:1em;width:1em}.postcomment{display:-webkit-box;display:-ms-flexbox;display:flex}.postcomment+.postcomment{border-top:1px solid rgba(0,0,0,.15);padding-top:1.5rem;margin-top:1.5rem}.postcomment__avatar{margin-right:1rem}.postcomment__avatarimage{display:block;border-radius:50%;overflow:hidden}.postcomment__body{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.postcomment__body>:last-child{margin-bottom:0}.postcomment__author{font-weight:700;font-size:1.25rem;line-height:1.5rem;margin-top:.5rem}.postcomment__comment{margin-top:1rem}.postcomment__comment p{margin-bottom:.5rem}.postcomment__comment>:last-child{margin-bottom:0}.blogpagination__list{display:-webkit-box;display:-ms-flexbox;display:flex;padding-left:0;list-style:none}.blogpagination__item:first-child .blogpagination__link{margin-left:0}.blogpagination__item--active{font-weight:700}.blogpagination__link{display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1;border:1px solid}.blogpagination__item--disabled .blogpagination__link{pointer-events:none;cursor:auto}.blogwidget{margin-bottom:1.5rem}.blogwidget:last-child{margin-bottom:0}.blogwidget__content{overflow:hidden}.blogwidget__content>:last-child{margin-bottom:0}.blogwidgetlist{padding:0;margin:0;list-style:none}.blogwidgetlist .blogwidgetlist{padding-left:1rem}.blogwidgetlist__itemcount{margin-left:.25rem}.blogwidgetlist__itemcount:before{content:"("}.blogwidgetlist__itemcount:after{content:")"}.blogwidgetlist__itemauthor{font-weight:700}.blogwidgetlist--tags{margin:-.25rem!important}.blogwidgetlist--tags .blogwidgetlist__item{display:inline-block;vertical-align:middle;margin:.25rem}.blogwidgetlist--recentcomments .blogwidgetlist__item+.blogwidgetlist__item{margin-top:1rem}.blogwidgetlist--recentcomments .blogwidgetlist__itemtext{margin-bottom:.25rem}.blogwidgetlist--recentcomments .blogwidgetlist__itemauthoron{margin-left:.25rem;margin-right:.25rem}.alert__title{font-weight:700}.alert__list{margin:0;padding:0;list-style:none} \ No newline at end of file +.postmetagroup{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:-.135rem -.5rem;-ms-flex-wrap:wrap;flex-wrap:wrap}.postmetagroup__item{padding:.135rem .5rem;white-space:nowrap;width:100%}@media (min-width:576px){.postmetagroup__item{width:auto}}.postmetagroup__icon,.postmetagroup__prefix{opacity:.75}.postmetagroup__item{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.postmetagroup__body{margin-left:.25rem}.postmetagroup__list{padding:0;margin:0;list-style:none}.postmetagroup__list li{display:inline}.postmetagroup__list li:not(:last-child):after{display:inline;content:", "}.postauthor{display:-webkit-box;display:-ms-flexbox;display:flex}.postauthor+.postauthor{border-top:1px solid rgba(0,0,0,.15);padding-top:1.5rem;margin-top:1.5rem}.postauthor__avatar{margin-right:1rem}.postauthor__avatarimage{display:block;border-radius:50%;overflow:hidden}.postauthor__body{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.postauthor__body>:last-child{margin-bottom:0}.postauthor__intro{opacity:.75}.postauthor__name{font-weight:700;font-size:1.25rem;line-height:1.5rem}.postauthor__sublinedivider{margin-right:.25rem}.postauthor__social{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-top:.25rem}.postauthor__social+.postauthor__actions{margin-top:.5rem}.postauthor__sociallink{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-right:.5rem}.postauthor__sociallinklabel{position:absolute!important;clip:rect(1px,1px,1px,1px)!important;padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden!important}.postauthor__bio{margin-top:1rem;margin-bottom:1rem}.postauthor__bio p{margin-bottom:.5rem}.postauthor__bio>:last-child{margin-bottom:0}.postauthor__actions{margin-bottom:1rem}.blogbadge{display:inline-block;padding:.5em;border-radius:2px;border:1px solid;line-height:1em}.blogbadge:hover{text-decoration:none}.blogicon{top:.125em;position:relative;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-item-align:center;align-self:center}.blogicon svg{height:1em;width:1em}.postcomment{display:-webkit-box;display:-ms-flexbox;display:flex}.postcomment+.postcomment{border-top:1px solid rgba(0,0,0,.15);padding-top:1.5rem;margin-top:1.5rem}.postcomment__avatar{margin-right:1rem}.postcomment__avatarimage{display:block;border-radius:50%;overflow:hidden}.postcomment__body{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.postcomment__body>:last-child{margin-bottom:0}.postcomment__author{font-weight:700;font-size:1.25rem;line-height:1.5rem;margin-top:.5rem}.postcomment__comment{margin-top:1rem}.postcomment__comment p{margin-bottom:.5rem}.postcomment__comment>:last-child{margin-bottom:0}.blogpagination__list{display:-webkit-box;display:-ms-flexbox;display:flex;padding-left:0;list-style:none}.blogpagination__item:first-child .blogpagination__link{margin-left:0}.blogpagination__item--active{font-weight:700}.blogpagination__link{display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1;border:1px solid}.blogpagination__item--disabled .blogpagination__link{pointer-events:none;cursor:auto}.blogwidget{margin-bottom:1.5rem}.blogwidget:last-child{margin-bottom:0}.blogwidget__content{overflow:hidden}.blogwidget__content>:last-child{margin-bottom:0}.blogwidgetlist{padding:0;margin:0;list-style:none}.blogwidgetlist .blogwidgetlist{padding-left:1rem}.blogwidgetlist__itemcount{margin-left:.25rem}.blogwidgetlist__itemcount:before{content:"("}.blogwidgetlist__itemcount:after{content:")"}.blogwidgetlist__itemauthor{font-weight:700}.blogwidgetlist--tags{margin:-.25rem!important}.blogwidgetlist--tags .blogwidgetlist__item{display:inline-block;vertical-align:middle;margin:.25rem}.blogwidgetlist--recentcomments .blogwidgetlist__item+.blogwidgetlist__item{margin-top:1rem}.blogwidgetlist--recentcomments .blogwidgetlist__itemtext{margin-bottom:.25rem}.blogwidgetlist--recentcomments .blogwidgetlist__itemauthoron{margin-left:.25rem;margin-right:.25rem}.alert__title{font-weight:700}.alert__list{margin:0;padding:0;list-style:none} \ No newline at end of file diff --git a/Resources/Public/Icons/plugin-blog-footer.svg b/Resources/Public/Icons/plugin-blog-footer.svg new file mode 100644 index 00000000..a134949e --- /dev/null +++ b/Resources/Public/Icons/plugin-blog-footer.svg @@ -0,0 +1 @@ + diff --git a/Resources/Public/Icons/plugin-blog-header.svg b/Resources/Public/Icons/plugin-blog-header.svg new file mode 100644 index 00000000..a134949e --- /dev/null +++ b/Resources/Public/Icons/plugin-blog-header.svg @@ -0,0 +1 @@ + diff --git a/ext_localconf.php b/ext_localconf.php index e863c8a1..542458f8 100644 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -81,6 +81,22 @@ ] ); + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'T3G.AgencyPack.Blog', + 'Header', + [ + 'Post' => 'header', + ] + ); + + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( + 'T3G.AgencyPack.Blog', + 'Footer', + [ + 'Post' => 'footer', + ] + ); + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin( 'T3G.AgencyPack.Blog', 'Metadata', diff --git a/ext_tables.php b/ext_tables.php index b8377b2d..a46f50bc 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -41,6 +41,8 @@ 'plugin-blog-category' => 'EXT:blog/Resources/Public/Icons/plugin-blog-category.svg', 'plugin-blog-commentform' => 'EXT:blog/Resources/Public/Icons/plugin-blog-commentform.svg', 'plugin-blog-comments' => 'EXT:blog/Resources/Public/Icons/plugin-blog-comments.svg', + 'plugin-blog-header' => 'EXT:blog/Resources/Public/Icons/plugin-blog-header.svg', + 'plugin-blog-footer' => 'EXT:blog/Resources/Public/Icons/plugin-blog-footer.svg', 'plugin-blog-metadata' => 'EXT:blog/Resources/Public/Icons/plugin-blog-metadata.svg', 'plugin-blog-posts' => 'EXT:blog/Resources/Public/Icons/plugin-blog-posts.svg', 'plugin-blog-relatedposts' => 'EXT:blog/Resources/Public/Icons/plugin-blog-relatedposts.svg', @@ -130,6 +132,18 @@ 'LLL:EXT:blog/Resources/Private/Language/locallang_db.xlf:plugin.blog_relatedposts.title', 'plugin-blog-relatedposts' ); + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( + 'T3G.AgencyPack.Blog', + 'Header', + 'LLL:EXT:blog/Resources/Private/Language/locallang_db.xlf:plugin.blog_header.title', + 'plugin-blog-header' + ); + \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( + 'T3G.AgencyPack.Blog', + 'Footer', + 'LLL:EXT:blog/Resources/Private/Language/locallang_db.xlf:plugin.blog_footer.title', + 'plugin-blog-footer' + ); if (TYPO3_MODE === 'BE') { // Module Web > Blog From f87dffb085aa15927d204b74a8823f7b75c2a8b1 Mon Sep 17 00:00:00 2001 From: Benjamin Kott Date: Wed, 19 Jun 2019 00:09:57 +0200 Subject: [PATCH 2/7] [TASK] Refine meta templates --- .../TypoScript/Static/setup.typoscript | 34 +++++++++++++++---- Resources/Private/Partials/List/Post.html | 3 +- Resources/Private/Partials/Meta/Footer.html | 2 -- Resources/Private/Partials/Meta/Header.html | 2 -- Resources/Private/Partials/Meta/List.html | 2 -- .../Private/Partials/Meta/ListFooter.html | 2 ++ .../Private/Partials/Meta/ListHeader.html | 2 ++ .../Private/Partials/Meta/PostFooter.html | 2 ++ .../Private/Partials/Meta/PostHeader.html | 2 ++ .../Partials/Meta/Rendering/Group.html | 2 +- .../Rendering/{Base.html => Section.html} | 0 .../Private/Scss/components/_metagroup.scss | 25 +++++++++++++- Resources/Private/Templates/Post/Footer.html | 4 +-- Resources/Private/Templates/Post/Header.html | 4 +-- Resources/Public/Css/frontend.min.css | 2 +- 15 files changed, 67 insertions(+), 21 deletions(-) delete mode 100644 Resources/Private/Partials/Meta/Footer.html delete mode 100644 Resources/Private/Partials/Meta/Header.html delete mode 100644 Resources/Private/Partials/Meta/List.html create mode 100644 Resources/Private/Partials/Meta/ListFooter.html create mode 100644 Resources/Private/Partials/Meta/ListHeader.html create mode 100644 Resources/Private/Partials/Meta/PostFooter.html create mode 100644 Resources/Private/Partials/Meta/PostHeader.html rename Resources/Private/Partials/Meta/Rendering/{Base.html => Section.html} (100%) diff --git a/Configuration/TypoScript/Static/setup.typoscript b/Configuration/TypoScript/Static/setup.typoscript index 03de53de..fe087d7c 100644 --- a/Configuration/TypoScript/Static/setup.typoscript +++ b/Configuration/TypoScript/Static/setup.typoscript @@ -41,9 +41,9 @@ plugin.tx_blog { } # Post View meta { - header { + postheader { enable = 1 - modifierClass = header + modifierClass = condensed elements { authors { enable = 1 @@ -62,9 +62,9 @@ plugin.tx_blog { } } } - footer { + postfooter { enable = 1 - modifierClass = footer + modifierClass = condensed elements { authors { enable = 0 @@ -82,11 +82,10 @@ plugin.tx_blog { enable = 0 } } - } - list { + listheader { enable = 1 - modifierClass = list + modifierClass = condensed elements { author { enable = 0 @@ -105,6 +104,27 @@ plugin.tx_blog { } } } + listfooter { + enable = 1 + modifierClass = condensed + elements { + author { + enable = 1 + } + categories { + enable = 0 + } + tags { + enable = 1 + } + published { + enable = 0 + } + comments { + enable = 0 + } + } + } default =< .list } diff --git a/Resources/Private/Partials/List/Post.html b/Resources/Private/Partials/List/Post.html index 3658e84a..c9edfdd6 100644 --- a/Resources/Private/Partials/List/Post.html +++ b/Resources/Private/Partials/List/Post.html @@ -1,6 +1,6 @@

- +

{post.abstract}

@@ -9,4 +9,5 @@

{post.description}

+
diff --git a/Resources/Private/Partials/Meta/Footer.html b/Resources/Private/Partials/Meta/Footer.html deleted file mode 100644 index ef8ceaff..00000000 --- a/Resources/Private/Partials/Meta/Footer.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/Resources/Private/Partials/Meta/Header.html b/Resources/Private/Partials/Meta/Header.html deleted file mode 100644 index c514a0df..00000000 --- a/Resources/Private/Partials/Meta/Header.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/Resources/Private/Partials/Meta/List.html b/Resources/Private/Partials/Meta/List.html deleted file mode 100644 index 87b4fac9..00000000 --- a/Resources/Private/Partials/Meta/List.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/Resources/Private/Partials/Meta/ListFooter.html b/Resources/Private/Partials/Meta/ListFooter.html new file mode 100644 index 00000000..70d15b87 --- /dev/null +++ b/Resources/Private/Partials/Meta/ListFooter.html @@ -0,0 +1,2 @@ + + diff --git a/Resources/Private/Partials/Meta/ListHeader.html b/Resources/Private/Partials/Meta/ListHeader.html new file mode 100644 index 00000000..ca0e20cf --- /dev/null +++ b/Resources/Private/Partials/Meta/ListHeader.html @@ -0,0 +1,2 @@ + + diff --git a/Resources/Private/Partials/Meta/PostFooter.html b/Resources/Private/Partials/Meta/PostFooter.html new file mode 100644 index 00000000..1d1133e1 --- /dev/null +++ b/Resources/Private/Partials/Meta/PostFooter.html @@ -0,0 +1,2 @@ + + diff --git a/Resources/Private/Partials/Meta/PostHeader.html b/Resources/Private/Partials/Meta/PostHeader.html new file mode 100644 index 00000000..9c481f98 --- /dev/null +++ b/Resources/Private/Partials/Meta/PostHeader.html @@ -0,0 +1,2 @@ + + diff --git a/Resources/Private/Partials/Meta/Rendering/Group.html b/Resources/Private/Partials/Meta/Rendering/Group.html index a832ed53..515dafab 100644 --- a/Resources/Private/Partials/Meta/Rendering/Group.html +++ b/Resources/Private/Partials/Meta/Rendering/Group.html @@ -1,3 +1,3 @@ -