-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[!!!][TASK] Modernize widget rendering
The widget rendering has been completely reworked and is now more easy to customize without overwriting the templates. Title rendering has been moved to the main layout, you can now use the new section "Title" to set the widget title. If you have overwritten the widget templates or added new ones that makes use of the "Widgets" layout you need to add this new section. Migration: remove: <h3 class="widget-title">[TITLE]</h3> add: <f:section name="Title">[TITLE]</f:section> Templates changed: * Layouts/Widget.html * Templates/Post/Sidebar.html * Templates/Widget/Archive.html * Templates/Widget/Categories.html * Templates/Widget/Comments.html * Templates/Widget/Feed.html * Templates/Widget/RecentPosts.html * Templates/Widget/Tags.html Releases: master
- Loading branch information
1 parent
298f193
commit 8db7276
Showing
11 changed files
with
37 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
<aside class="tx-blog-widget"> | ||
<f:render section="Content" /> | ||
</aside> | ||
<f:spaceless> | ||
<aside class="blogwidget"> | ||
<h3 class="blogwidget__title"> | ||
<span><f:render section="Title" /></span> | ||
</h3> | ||
<div class="blogwidget__content"> | ||
<f:render section="Content" /> | ||
</div> | ||
</aside> | ||
</f:spaceless> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* Widget | ||
*/ | ||
.blogwidget { | ||
margin-bottom: 1.5rem; | ||
&:last-child { | ||
margin-bottom: 0; | ||
} | ||
} | ||
.blogwidget__content { | ||
> *:last-child { | ||
margin-bottom: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
*/ | ||
@import "components/author"; | ||
@import "components/comment"; | ||
@import "components/widget"; | ||
|
||
/** | ||
* Misc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
<f:layout name="Default" /> | ||
<f:section name="Content"> | ||
<f:for each="{settings.sidebarWidgets}" as="widget"> | ||
<f:cObject typoscriptObjectPath="{widget}" /> | ||
</f:for> | ||
<div class="blogwidgets"> | ||
<f:for each="{settings.sidebarWidgets}" as="widget"> | ||
<f:cObject typoscriptObjectPath="{widget}" /> | ||
</f:for> | ||
</div> | ||
</f:section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<f:layout name="Widget" /> | ||
<f:section name="Title"><f:translate key="headline.archive"/></f:section> | ||
<f:section name="Content"> | ||
<h3 class="widget-title"><f:translate key="headline.archive"/></h3> | ||
<f:render partial="Archive/Menu" arguments="{settings: settings, items: archiveData}" /> | ||
</f:section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.