Skip to content

Commit c4d5a68

Browse files
committed
add center_content option to intro section
1 parent c99b439 commit c4d5a68

File tree

6 files changed

+20
-3
lines changed

6 files changed

+20
-3
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ The `intro` template is used to create an introduction section within a modular
4545
- `use_footer_links` - Whether the `footer_links` from the site-wide customization should also appear in this section. See the *Customization* section below for more information about `footer_links`.
4646
- `links` - A list of icon links to be displayed. Each link needs to specify a `link` (the URL to which it points) and an `icon` (Font-Awesome CSS classes, such as `fas fa-code`). These links will be displayed after the `footer_links` if `use_footer_links` is true.
4747
- `img_alt` - The alt text to be used for the image in this section.
48+
- `center_content` - If true, the content (not the Custom Intro Image) will be centered instead of left-aligned.
4849

4950
#### About
5051

blueprints/modular/intro.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,15 @@ form:
5858
label: Alt Text
5959
validate:
6060
type: textarea
61+
62+
header.center_content:
63+
type: toggle
64+
label: Center Content
65+
highlight: 1
66+
default: 0
67+
description: If activated, the content (not the Custom Intro Image) will be centered instead of left-aligned.
68+
options:
69+
1: PLUDIN_ADMIN.YES
70+
0: PLUDIN_ADMIN.NO
71+
validate:
72+
type: bool

css-compiled/theme.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css-compiled/theme.min.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scss/util.scss

+4
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@
103103
margin-right: auto;
104104
}
105105

106+
.center-text {
107+
text-align: center;
108+
}
109+
106110
// css variables
107111

108112
:root {

templates/modular/intro.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{{ image.html('', page.header.img_alt, 'intro__img')|raw }}
99
{% endif %}
1010

11-
<div class="intro__content {% if image %} with-img {% endif %}">
11+
<div class="intro__content {% if image %} with-img {% endif %} {% if page.header.center_content %} center-text {% endif %}">
1212
{{ content|raw }}
1313

1414
<div class="intro__links">

0 commit comments

Comments
 (0)