Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions coderedcms/blocks/base_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,20 @@ class CoderedAdvSettings(blocks.StructBlock):
max_length=255,
label=_('Custom ID'),
)
padding = blocks.ChoiceBlock(
choices=cr_settings['FRONTEND_PADDING_CHOICES'],
default=cr_settings['FRONTEND_PADDING_DEFAULT'],
required=False,
label=_('Padding'),
help_text=_('Add additional spacing around this block.'),
)
align_text = blocks.ChoiceBlock(
choices=cr_settings['FRONTEND_ALIGN_CHOICES'],
default=cr_settings['FRONTEND_ALIGN_DEFAULT'],
required=False,
label=_('Alignment'),
help_text=_('Aligns text, images, and buttons within this block.'),
)

class Meta:
form_template = 'wagtailadmin/block_forms/base_block_settings_struct.html'
Expand Down
27 changes: 25 additions & 2 deletions coderedcms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@
'PROTECTED_MEDIA_URL': '/protected/',
'PROTECTED_MEDIA_ROOT': os.path.join(BASE_DIR, 'protected'),
'PROTECTED_MEDIA_UPLOAD_WHITELIST': [],
'PROTECTED_MEDIA_UPLOAD_BLACKLIST': ['.sh', '.exe', '.bat', '.ps1', '.app', '.jar', '.py', '.php', '.pl', '.rb'], # noqa
'PROTECTED_MEDIA_UPLOAD_BLACKLIST': [
'.sh', '.exe', '.bat', '.ps1', '.app', '.jar', '.py', '.php', '.pl', '.rb'
],

'FRONTEND_ALIGN_DEFAULT': '',
'FRONTEND_ALIGN_CHOICES': (
('', 'Default'),
('text-left', 'Left'),
('text-center', 'Center'),
('text-right', 'Right'),
('text-justify', 'Right'),
),

'FRONTEND_BTN_SIZE_DEFAULT': '',
'FRONTEND_BTN_SIZE_CHOICES': (
Expand Down Expand Up @@ -97,7 +108,19 @@
('navbar-expand-xl', 'xl - Show on extra large screens (desktop, wide monitor)'),
),

'FRONTEND_THEME_HELP': "Change the color palette of your site with a Bootstrap theme. Powered by Bootswatch https://bootswatch.com/.", # noqa
'FRONTEND_PADDING_DEFAULT': '',
'FRONTEND_PADDING_CHOICES': (
('', 'Default'),
('cr-p-0', 'No padding'),
('cr-p-1', 'Small padding'),
('cr-p-2', 'Medium padding'),
('cr-p-3', 'Large padding'),
),

'FRONTEND_THEME_HELP': (
"Change the color palette of your site with a Bootstrap theme. "
"Powered by Bootswatch https://bootswatch.com/."
),
'FRONTEND_THEME_DEFAULT': '',
'FRONTEND_THEME_CHOICES': (
('', 'Default - Classic Bootstrap'),
Expand Down