Skip to content

Commit

Permalink
Merge pull request #235 from PrestaSafe/feature/add-force-full-witdh
Browse files Browse the repository at this point in the history
add force_full_witdh
  • Loading branch information
PrestaSafe authored Jun 26, 2024
2 parents 1c2c812 + 79e3c22 commit 612f4ad
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 14 deletions.
18 changes: 6 additions & 12 deletions _dev/src/components/RightPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -218,23 +218,17 @@ emitter.on("globalSave", () => {
<hr class="my-2" />
<!-- container -->
<div class="my-2">
<!-- <Radio
<Checkbox
v-model="config.default.container"
:title="trans('use_container')"
name="container"
value="container"
/>
<Radio
v-model="config.default.container"
:title="trans('use_container')"
name="container"
value="full"
/> -->
</div>
<div class="my-2">
<Checkbox
v-model="config.default.container"
:title="trans('use_container')"
name="container"
value="full"
v-model="config.default.force_full_width"
:title="trans('force_full_width')"
name="force_full_width"
/>
</div>
<!-- cache -->
Expand Down
3 changes: 2 additions & 1 deletion classes/PrettyBlocksModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,8 @@ private function _getBlockTemplate($block)
private function _getDefaultParams($block)
{
$options = [
'container' => true,
'container' => false,
'force_full_width' => false,
'load_ajax' => false,
'is_cached' => false,
'bg_color' => '',
Expand Down
1 change: 1 addition & 0 deletions src/Controller/AdminThemeManagerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ public function indexAction()
'auto_size_section' => $translator->trans('Auto sizing', [], 'Modules.Prettyblocks.Admin'),
'paddings_section_help' => $translator->trans('Padding is the space inside an element, between its content and its boundary', [], 'Modules.Prettyblocks.Admin'),
'margins_section_help' => $translator->trans('Margin refers to the space outside an element, separating it from other elements', [], 'Modules.Prettyblocks.Admin'),
'force_full_width' => $translator->trans('Stretch section to 100%', [], 'Modules.Prettyblocks.Admin'),
],
'security_app' => [
'ajax_token' => \Configuration::getGlobalValue('_PRETTYBLOCKS_TOKEN_'),
Expand Down
11 changes: 10 additions & 1 deletion views/css/_dev/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,13 @@
font-size: 1rem;
margin: 0.5em 0;
padding: 0 0.5em;
}
}

.container_force-full,
._force-full{
width: 100vw;
position: relative;
left: 50%;
right: 50%;
transform: translateX(-50%);
}
9 changes: 9 additions & 0 deletions views/css/dist/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,15 @@
padding: 0 0.5em;
}

.container_force-full,
._force-full{
width: 100vw;
position: relative;
left: 50%;
right: 50%;
transform: translateX(-50%);
}

.hover\:tw_bg-blue-700:hover {
--tw-bg-opacity: 1;
background-color: rgb(29 78 216 / var(--tw-bg-opacity));
Expand Down

0 comments on commit 612f4ad

Please sign in to comment.