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..7b341118 100644 --- a/Classes/Controller/PostController.php +++ b/Classes/Controller/PostController.php @@ -274,15 +274,54 @@ 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. * * @throws \TYPO3\CMS\Core\Context\Exception\AspectNotFoundException * @throws \TYPO3\CMS\Extbase\Configuration\Exception\InvalidConfigurationTypeException * @throws \TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException + * + * @deprecated */ public function metadataAction(): void { + trigger_error( + 'Using \T3G\AgencyPack\Blog\Controller\PostController::metadataAction is deprecated. Use headerAction or footerAction instead.', + E_USER_DEPRECATED + ); + $post = $this->postRepository->findCurrentPost(); $this->view->assign('post', $post); if ($post instanceof Post) { diff --git a/Configuration/TsConfig/Page/Wizards.tsconfig b/Configuration/TsConfig/Page/Wizards.tsconfig index d20916a8..1a73a820 100644 --- a/Configuration/TsConfig/Page/Wizards.tsconfig +++ b/Configuration/TsConfig/Page/Wizards.tsconfig @@ -59,13 +59,22 @@ mod.wizards.newContentElement.wizardItems.blog { list_type = blog_sidebar } } - blog_metadata { - iconIdentifier = plugin-blog-metadata - title = LLL:EXT:blog/Resources/Private/Language/locallang_db.xlf:plugin.blog_metadata.title - description = LLL:EXT:blog/Resources/Private/Language/locallang_db.xlf:plugin.blog_metadata.description + 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_metadata + 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_commentform { diff --git a/Configuration/TypoScript/Static/constants.typoscript b/Configuration/TypoScript/Static/constants.typoscript index 7de4aaff..b702318a 100644 --- a/Configuration/TypoScript/Static/constants.typoscript +++ b/Configuration/TypoScript/Static/constants.typoscript @@ -14,6 +14,16 @@ # customsubcategory=blog_150_authors=LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.blog_150_authors # customsubcategory=blog_160_notifications=LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.blog_160_notifications +# customcategory=blog_post=LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.customcategory.post +# customsubcategory=100_blog_post=LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.customsubcategory.post +# customsubcategory=110_blog_post_header=LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.customsubcategory.post.header +# customsubcategory=120_blog_post_footer=LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.customsubcategory.post.footer + +# customcategory=blog_list=LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.customcategory.list +# customsubcategory=200_blog_list_element=LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.customsubcategory.list.element +# customsubcategory=210_blog_list_element_header=LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.customsubcategory.list.element.header +# customsubcategory=220_blog_list_element_footer=LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.customsubcategory.list.element.footer + plugin { tx_blog { view { @@ -48,6 +58,129 @@ plugin { # cat=blog/blog_100_uids; type=int+; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.storagePid storagePid = 0 + meta { + postheader { + # cat=blog_post/110_blog_post_header; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.header.enable + enable = 1 + # cat=blog_post/110_blog_post_header; type=options[simple, condensed, extended]; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.modifier + modifier = simple + elements { + authors { + # cat=blog_post/110_blog_post_header; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.authors.enable + enable = 1 + } + categories { + # cat=blog_post/110_blog_post_header; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.categories.enable + enable = 0 + } + tags { + # cat=blog_post/110_blog_post_header; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.tags.enable + enable = 0 + } + published { + # cat=blog_post/110_blog_post_header; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.published.enable + enable = 1 + # cat=blog_post/110_blog_post_header; type=string; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.published.format + format = %d.%m.%Y + } + comments { + # cat=blog_post/110_blog_post_header; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.comments.enable + enable = 1 + } + } + } + postfooter { + # cat=blog_post/120_blog_post_footer; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.footer.enable + enable = 1 + # cat=blog_post/120_blog_post_footer; type=options[simple, condensed, extended]; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.modifier + modifier = simple + elements { + authors { + # cat=blog_post/120_blog_post_footer; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.authors.enable + enable = 0 + } + categories { + # cat=blog_post/120_blog_post_footer; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.categories.enable + enable = 1 + } + tags { + # cat=blog_post/120_blog_post_footer; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.tags.enable + enable = 1 + } + published { + # cat=blog_post/120_blog_post_footer; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.published.enable + enable = 0 + # cat=blog_post/120_blog_post_footer; type=string; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.published.format + format = %d.%m.%Y + } + comments { + # cat=blog_post/120_blog_post_footer; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.comments.enable + enable = 0 + } + } + } + listheader { + # cat=blog_list/210_blog_list_element_header; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.header.enable + enable = 1 + # cat=blog_list/210_blog_list_element_header; type=options[simple, condensed, extended]; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.modifier + modifier = simple + elements { + authors { + # cat=blog_list/210_blog_list_element_header; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.authors.enable + enable = 0 + } + categories { + # cat=blog_list/210_blog_list_element_header; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.categories.enable + enable = 0 + } + tags { + # cat=blog_list/210_blog_list_element_header; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.tags.enable + enable = 0 + } + published { + # cat=blog_list/210_blog_list_element_header; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.published.enable + enable = 1 + # cat=blog_list/210_blog_list_element_header; type=string; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.published.format + format = %d.%m.%Y + } + comments { + # cat=blog_list/210_blog_list_element_header; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.comments.enable + enable = 1 + } + } + } + listfooter { + # cat=blog_list/220_blog_list_element_footer; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.footer.enable + enable = 1 + # cat=blog_list/220_blog_list_element_footer; type=options[simple, condensed, extended]; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.modifier + modifier = simple + elements { + authors { + # cat=blog_list/220_blog_list_element_footer; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.authors.enable + enable = 1 + } + categories { + # cat=blog_list/220_blog_list_element_footer; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.categories.enable + enable = 0 + } + tags { + # cat=blog_list/220_blog_list_element_footer; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.tags.enable + enable = 1 + } + published { + # cat=blog_list/220_blog_list_element_footer; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.published.enable + enable = 0 + # cat=blog_list/220_blog_list_element_footer; type=string; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.published.format + format = %d.%m.%Y + } + comments { + # cat=blog_list/220_blog_list_element_footer; type=boolean; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.meta.elements.comments.enable + enable = 0 + } + } + } + } + lists { pagination { # cat=blog/blog_120_lists; type=int+; label= LLL:EXT:blog/Resources/Private/Language/locallang.xlf:constantEditor.lists.pagination.itemsPerPage diff --git a/Configuration/TypoScript/Static/setup.typoscript b/Configuration/TypoScript/Static/setup.typoscript index 14f4eea9..b5a8ec4b 100644 --- a/Configuration/TypoScript/Static/setup.typoscript +++ b/Configuration/TypoScript/Static/setup.typoscript @@ -39,6 +39,99 @@ plugin.tx_blog { 50 = tt_content.list.20.blog_archivewidget 60 = tt_content.list.20.blog_feedwidget } + # Post View + meta { + postheader { + enable = {$plugin.tx_blog.settings.meta.postheader.enable} + modifier = {$plugin.tx_blog.settings.meta.postheader.modifier} + elements { + authors { + enable = {$plugin.tx_blog.settings.meta.postheader.elements.authors.enable} + } + categories { + enable = {$plugin.tx_blog.settings.meta.postheader.elements.categories.enable} + } + tags { + enable = {$plugin.tx_blog.settings.meta.postheader.elements.tags.enable} + } + published { + enable = {$plugin.tx_blog.settings.meta.postheader.elements.published.enable} + format = {$plugin.tx_blog.settings.meta.postheader.elements.published.format} + } + comments { + enable = {$plugin.tx_blog.settings.meta.postheader.elements.comments.enable} + } + } + } + postfooter { + enable = {$plugin.tx_blog.settings.meta.postfooter.enable} + modifier = {$plugin.tx_blog.settings.meta.postfooter.modifier} + elements { + authors { + enable = {$plugin.tx_blog.settings.meta.postfooter.elements.authors.enable} + } + categories { + enable = {$plugin.tx_blog.settings.meta.postfooter.elements.categories.enable} + } + tags { + enable = {$plugin.tx_blog.settings.meta.postfooter.elements.tags.enable} + } + published { + enable = {$plugin.tx_blog.settings.meta.postfooter.elements.published.enable} + format = {$plugin.tx_blog.settings.meta.postfooter.elements.published.format} + } + comments { + enable = {$plugin.tx_blog.settings.meta.postfooter.elements.comments.enable} + } + } + } + listheader { + enable = {$plugin.tx_blog.settings.meta.listheader.enable} + modifier = {$plugin.tx_blog.settings.meta.listheader.modifier} + elements { + authors { + enable = {$plugin.tx_blog.settings.meta.listheader.elements.authors.enable} + } + categories { + enable = {$plugin.tx_blog.settings.meta.listheader.elements.categories.enable} + } + tags { + enable = {$plugin.tx_blog.settings.meta.listheader.elements.tags.enable} + } + published { + enable = {$plugin.tx_blog.settings.meta.listheader.elements.published.enable} + format = {$plugin.tx_blog.settings.meta.listheader.elements.published.format} + } + comments { + enable = {$plugin.tx_blog.settings.meta.listheader.elements.comments.enable} + } + } + } + listfooter { + enable = {$plugin.tx_blog.settings.meta.listfooter.enable} + modifier = {$plugin.tx_blog.settings.meta.listfooter.modifier} + elements { + authors { + enable = {$plugin.tx_blog.settings.meta.listfooter.elements.authors.enable} + } + categories { + enable = {$plugin.tx_blog.settings.meta.listfooter.elements.categories.enable} + } + tags { + enable = {$plugin.tx_blog.settings.meta.listfooter.elements.tags.enable} + } + published { + enable = {$plugin.tx_blog.settings.meta.listfooter.elements.published.enable} + format = {$plugin.tx_blog.settings.meta.listfooter.elements.published.format} + } + comments { + enable = {$plugin.tx_blog.settings.meta.listfooter.elements.comments.enable} + } + } + } + default < .listheader + } + # Lists related settings lists { pagination { diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index 5cb87634..7afd455d 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,45 @@ + + Author + + + Authors + + + 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### @@ -237,6 +276,12 @@ TYPO3 Blog + + TYPO3 Blog: Post + + + TYPO3 Blog: List + Page ID settings @@ -246,6 +291,24 @@ Listings + + Post + + + Post Header + + + Post Footer + + + Element + + + Element Header + + + Element Footer + Widgets @@ -412,6 +475,43 @@ Month format:The format of the month (default: %B). + + Display meta information in the header + + + Display meta information in the footer + + + Meta information display style + + + Condensed + + + Extended + + + Simple + + + Show authors in the meta section + + + Show categories in the meta section + + + Show tags in the meta section + + + Show the publish date in the meta section + + + Published date format: Default: %d.%m.%Y + + + Show comments in the meta section + + Category RSS Feed diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index 554d0778..6965df43 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -43,8 +43,20 @@ 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 + Blog: Metadata (Deprecated, will be removed with v11) Displays post meta data, like date, tags, category, sharing links... 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..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/Default.html b/Resources/Private/Partials/Meta/Default.html new file mode 100644 index 00000000..fed0f23e --- /dev/null +++ b/Resources/Private/Partials/Meta/Default.html @@ -0,0 +1,2 @@ + + diff --git a/Resources/Private/Partials/Meta/Elements/Authors.html b/Resources/Private/Partials/Meta/Elements/Authors.html new file mode 100644 index 00000000..64a5bc5f --- /dev/null +++ b/Resources/Private/Partials/Meta/Elements/Authors.html @@ -0,0 +1,24 @@ +authors + + + + + + + + + + + + + + + {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..fb7f5bc7 --- /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..4c73bc78 --- /dev/null +++ b/Resources/Private/Partials/Meta/Elements/Comments.html @@ -0,0 +1,23 @@ +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..1a8891ad --- /dev/null +++ b/Resources/Private/Partials/Meta/Elements/Published.html @@ -0,0 +1,10 @@ +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..8ba18ffe --- /dev/null +++ b/Resources/Private/Partials/Meta/Elements/Tags.html @@ -0,0 +1,16 @@ +tags + + + + + + + + + + + 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 new file mode 100644 index 00000000..a04bb275 --- /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/Partials/Meta/Rendering/Section.html b/Resources/Private/Partials/Meta/Rendering/Section.html new file mode 100644 index 00000000..e54678b0 --- /dev/null +++ b/Resources/Private/Partials/Meta/Rendering/Section.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Resources/Private/Scss/components/_metagroup.scss b/Resources/Private/Scss/components/_metagroup.scss new file mode 100644 index 00000000..a80082a1 --- /dev/null +++ b/Resources/Private/Scss/components/_metagroup.scss @@ -0,0 +1,73 @@ +/** + * 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: .25rem +} +.postmetagroup__content { + white-space: initial; +} +.postmetagroup__list { + padding: 0; + margin: 0; + list-style: none; + li { + display: inline; + &:not(:last-child):after { + display: inline; + content: ', '; + } + } +} + +/** + * Simple + */ +.postmetagroup--simple { + .postmetagroup__prefix { + 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; + } +} + +/** + * Condensed + */ +.postmetagroup--condensed { + .postmetagroup__body { + display: flex; + } + .postmetagroup__prefix:after { + display: inline; + content: ':'; + } + .postmetagroup__content { + margin-left: .25rem; + } +} 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..2c313c94 --- /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..4accd9e6 --- /dev/null +++ b/Resources/Private/Templates/Post/Header.html @@ -0,0 +1,10 @@ + +
+

{post.title}

+ +
+ +
+
+
+
diff --git a/Resources/Private/Templates/Post/Metadata.html b/Resources/Private/Templates/Post/Metadata.html index f7dc075c..b0c4a9e1 100644 --- a/Resources/Private/Templates/Post/Metadata.html +++ b/Resources/Private/Templates/Post/Metadata.html @@ -1 +1,3 @@ - + + + diff --git a/Resources/Public/Css/frontend.min.css b/Resources/Public/Css/frontend.min.css index e5cd1c9c..9bc2b5b5 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__content{white-space:normal}.postmetagroup__list{padding:0;margin:0;list-style:none}.postmetagroup__list li{display:inline}.postmetagroup__list li:not(:last-child):after{display:inline;content:", "}.postmetagroup--simple .postmetagroup__prefix{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}.postmetagroup--condensed .postmetagroup__body{display:-webkit-box;display:-ms-flexbox;display:flex}.postmetagroup--condensed .postmetagroup__prefix:after{display:inline;content:":"}.postmetagroup--condensed .postmetagroup__content{margin-left:.25rem}.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