Skip to content

Commit

Permalink
[TASK] make PageLayout compatible with <=10LTS
Browse files Browse the repository at this point in the history
as 10LTS and below use bootstrap v4 instead of v5 the current page backend module design is broken.
Backporting the 11LTS backend.css and applying some overrides might not be the most elegant solution, however:
a) it works
b) it reduces future errors as only one version of the layout needs to be maintained.
Thus, I propose this PR to make it look pixel perfect on 10LTS.
  • Loading branch information
jpmschuler committed Jun 14, 2022
1 parent 7e8d097 commit ef27835
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 5 deletions.
31 changes: 26 additions & 5 deletions Resources/Private/Templates/Backend/PageLayout/Show.html
@@ -1,14 +1,35 @@
{namespace core = TYPO3\CMS\Core\ViewHelpers}
<f:be.pageRenderer
pageTitle="TemplaVoilà! Plus"
includeCssFiles="{0: '{f:uri.resource(path: \'StyleSheet/Tooltipster.css\', extensionName: \'templavoilaplus\')}', 1: '{f:uri.resource(path: \'StyleSheet/PageLayout.css\', extensionName: \'templavoilaplus\')}'}"
includeRequireJsModules="{
<f:if condition="{settings.configuration.is11orNewer}">
<f:then>
<f:be.pageRenderer
pageTitle="TemplaVoilà! Plus"
includeCssFiles="{0: '{f:uri.resource(path: \'StyleSheet/Tooltipster.css\', extensionName: \'templavoilaplus\')}', 1: '{f:uri.resource(path: \'StyleSheet/PageLayout.css\', extensionName: \'templavoilaplus\')}'}"
includeRequireJsModules="{
PageLayout: 'TYPO3/CMS/Templavoilaplus/PageLayout',
Modal:'TYPO3/CMS/Backend/Modal',
ContextMenu:'TYPO3/CMS/Backend/ContextMenu',
Tooltip: 'TYPO3/CMS/Backend/Tooltip'
}"
/>
/>
</f:then>
<f:else>
<f:be.pageRenderer
pageTitle="TemplaVoilà! Plus"
includeCssFiles="{
0: '{f:uri.resource(path: \'StyleSheet/pre11LTScompat/backend.css\', extensionName: \'templavoilaplus\')}',
1: '{f:uri.resource(path: \'StyleSheet/pre11LTScompat/overrides.css\', extensionName: \'templavoilaplus\')}',
2: '{f:uri.resource(path: \'StyleSheet/Tooltipster.css\', extensionName: \'templavoilaplus\')}',
3: '{f:uri.resource(path: \'StyleSheet/PageLayout.css\', extensionName: \'templavoilaplus\')}'
}"
includeRequireJsModules="{
PageLayout: 'TYPO3/CMS/Templavoilaplus/PageLayout',
Modal:'TYPO3/CMS/Backend/Modal',
ContextMenu:'TYPO3/CMS/Backend/ContextMenu',
Tooltip: 'TYPO3/CMS/Backend/Tooltip'
}"
/>
</f:else>
</f:if>

<div id="moduleLoadingIndicator" data-identifier="moduleLoadingIndicator" class="tvp-loading-spinner">
<core:icon identifier="spinner-circle-dark" size="default" />
Expand Down
13 changes: 13 additions & 0 deletions Resources/Public/StyleSheet/pre11LTScompat/backend.css

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions Resources/Public/StyleSheet/pre11LTScompat/overrides.css
@@ -0,0 +1,24 @@
:root {
--bs-body-font-size: 12px;
}

table {
font-size: inherit;
}

.module-docheader .module-docheader-bar {
margin: 0 0 4px;
}

.module-docheader .module-docheader-bar:first-child {
margin: 4px 0 0;
}

.module-docheader + .module-body {
padding-top: 24px !important;
}

.module-body {
height: auto;
overflow-y: revert;
}

0 comments on commit ef27835

Please sign in to comment.