diff --git a/assets/css/editor-style.css b/assets/css/editor-style.css index 2fffcc2..c456e27 100644 --- a/assets/css/editor-style.css +++ b/assets/css/editor-style.css @@ -117,12 +117,15 @@ border-radius: 15px; } -.editor-styles-wrapper .wp-block-button__link { - border-radius: 0 !important; +.wp-block-button__link { font-family: "PTSans"; - background-color: #008939 !important; + background-color: #008939; + color: #fff; text-transform: uppercase; + font-size: 1rem; + border-radius: 3px; } + .wp-block-pullquote{ border-top: 0; border-bottom: 0; @@ -229,6 +232,11 @@ } } +.styled-layout .wp-block-group { + padding-top: 100px; + padding-bottom: 100px; +} + /* Main column width */ .wp-block { max-width: 860px; @@ -244,18 +252,18 @@ max-width: none; } +.same-height .wp-block-column .wp-block-image img { + max-height: 200px; +} + @media (min-width: 1200px) { - .same-height .wp-block-column img { + .same-height .wp-block-column .wp-block-image img { max-height: 230px; } -} - -@media (min-width: 576px) { - .same-height .wp-block-column img { - max-height: 200px; + .wp-block-column { + margin-bottom: 0; } } - .wp-block-column img { width: 100%; object-fit: cover; @@ -279,12 +287,6 @@ p a { margin: 3px 0 0 0; } -.notice p { - font-size: 90%; - padding: 0; -} - - /* customize RSS block */ .wp-block-rss { padding: unset; @@ -459,3 +461,67 @@ p a { top: 2rem; } } + +/* styled layout */ +.styled-layout .wp-block-group { + padding-top: 100px; + padding-bottom: 100px; +} + +@media (max-width: 767.98px) { + .styled-layout .wp-block-group { + padding-top: 50px; + padding-bottom: 50px; + } +} + +.styled-layout .wp-block-group.wp-block-group-is-layout-flow > h2, .styled-layout .wp-block-group.wp-block-group-is-layout-flow > .h2, +.styled-layout .wp-block-group .wp-block-group__inner-container > h2, +.styled-layout .wp-block-group .wp-block-group__inner-container > .h2 { + margin-bottom: 70px; +} + +.styled-layout .site-main { + margin-bottom: 0; +} + +/* next-events block */ +.wp-block-group { + position: relative; +} +.wp-block-group__inner-container { + max-width: 1200px; + position: relative; +} + +.next-events { + background-image: url("../img/sunflower1.jpg"); + background-size: cover; + background-position: top; +} +.sunflower-has-background-dim > * { + z-index: 30; +} + +.sunflower-has-background-dim::before { + content: ""; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + z-index: 20; + opacity: 0.3; + background-color: #000; +} +.wp-block-group.alignfull.has-background { + width: 100vw; + display: flex; + justify-content: center; + flex-wrap: wrap; + flex-direction: column; + margin-left: calc(50% - 50vw); + margin-right: calc(50% - 50vw); + padding-left: 5vw; + padding-right: 5vw; +} diff --git a/functions/block-patterns/elemente/programm.html b/functions/block-patterns/elemente/programm.html index 376db4d..fea9211 100644 --- a/functions/block-patterns/elemente/programm.html +++ b/functions/block-patterns/elemente/programm.html @@ -1,18 +1,18 @@ - -
-
+ +
+
- -
+ +

Unser Programm
für Musterstadt

-

Subheadline Lorem ipsum dolor sit amet. Subheadline Lorem ipsum dolor sit amet.Subheadline Lorem ipsum dolor sit amet.Subheadline Lorem ipsum dolor sit amet.
weiterlesen

+

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
weiterlesen

diff --git a/functions/block-patterns/elemente/themen.html b/functions/block-patterns/elemente/themen.html index cddbbde..4578ae4 100644 --- a/functions/block-patterns/elemente/themen.html +++ b/functions/block-patterns/elemente/themen.html @@ -1,10 +1,10 @@ - -
+ +

Unsere Themen

- -
+ +
Shed Bicycle Bike Old Wooden Shack  - Free-Photos / Pixabay
@@ -17,10 +17,6 @@

Verkehr

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

- -

- -
diff --git a/functions/block-patterns/elemente/werde-aktiv.html b/functions/block-patterns/elemente/werde-aktiv.html index 8d02887..4479d10 100644 --- a/functions/block-patterns/elemente/werde-aktiv.html +++ b/functions/block-patterns/elemente/werde-aktiv.html @@ -1,5 +1,5 @@ - -
+ +

Werde aktiv

@@ -9,15 +9,15 @@

Werde aktiv

diff --git a/functions/block-patterns/seiten/kandidierende.html b/functions/block-patterns/seiten/kandidierende.html index f93544f..7d13fd3 100644 --- a/functions/block-patterns/seiten/kandidierende.html +++ b/functions/block-patterns/seiten/kandidierende.html @@ -1,79 +1,87 @@
-
-
Sunflower Flower Plant Petals  - Couleur / Pixabay
- - - - - - - - - - - - - -
- - - -
-
Position Kandidatin
Alter 192 Jahre alt
Geboren in einer Stadt
Wahlkreis Nummer 1.345
- - - -

Vernetze dich mit mir

- - - - - - - - - - - - - - - - -
-
- - - -
- -
-
- +
+
Sunflower Flower Plant Petals  - Couleur / Pixabay
+ + + + + + + + + + + + + +
+ + + +
+
Position Kandidatin
Alter 192 Jahre alt
Geboren in einer Stadt
Wahlkreis Nummer 1.345
+ + + +
+

Vernetze dich mit mir

+ + + + + + + + + + + +
+ + + + + +
+ + + + +
+
+
+ + + +
+ +
+
+ diff --git a/functions/block-patterns/seiten/startseite.html b/functions/block-patterns/seiten/startseite.html index aa723d7..f13359f 100644 --- a/functions/block-patterns/seiten/startseite.html +++ b/functions/block-patterns/seiten/startseite.html @@ -1,6 +1,6 @@ - -
-

Gemeinsam für eine grüne Musterstadt

+ + @@ -28,13 +28,13 @@

bei den GRÜNEN Musterstadt.

- -
+ +

Unsere Themen

- -
+ +
Shed Bicycle Bike Old Wooden Shack  - Free-Photos / Pixabay
@@ -47,10 +47,6 @@

Verkehr

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

- -

- -
@@ -100,11 +96,11 @@

Umwelt

- + - -
-
+ +
+
@@ -122,8 +118,8 @@

Unser Programm
für Musterstadt

- -
+ +

Werde aktiv

diff --git a/functions/metaboxes.php b/functions/metaboxes.php index 32bd584..3406f30 100644 --- a/functions/metaboxes.php +++ b/functions/metaboxes.php @@ -114,6 +114,25 @@ function sunflower_meta_box_layout() { ); } +/** + * Add the styled_layout class in backend editor if set. + * + * @param string $classes The editor body classes. + * @return string The modified classes + */ +function sunflower_admin_classes_layout( $classes ) { + + global $post; + + if ( $post ) { + $sunflower_styled_layout = get_post_meta( $post->ID, '_sunflower_styled_layout', true ) ? 'styled-layout' : ''; + $classes .= ' ' . $sunflower_styled_layout; + } + + return trim( $classes ); +} +add_filter( 'admin_body_class', 'sunflower_admin_classes_layout' ); + /** * Get the rendered metabox for backend. */ diff --git a/mkdocs/theme/footer.html b/mkdocs/theme/footer.html index 73e22b7..550386d 100644 --- a/mkdocs/theme/footer.html +++ b/mkdocs/theme/footer.html @@ -22,5 +22,5 @@ {% endif %}
- Dokumentation für das WordPress-Theme Sunflower von Logo verdigado. + Dokumentation für das WordPress-Theme Sunflower von Logo verdigado. diff --git a/sass/wp-blocks/column.scss b/sass/wp-blocks/column.scss index bd5a25a..40106dd 100644 --- a/sass/wp-blocks/column.scss +++ b/sass/wp-blocks/column.scss @@ -2,7 +2,6 @@ margin-bottom: 0; .wp-block-column { - margin-bottom: 50px; .wp-block-group { padding: 0; @@ -18,7 +17,6 @@ p, ul { - padding: 0 1em; &.textbalken { padding: 0 0.5em; @@ -34,6 +32,11 @@ &.no-gap.is-layout-flex { gap: 0; + + p, + ul { + padding: 0 1em; + } } } @@ -44,8 +47,11 @@ .wp-block-column { - img { - max-height: 200px; + .wp-block-image { + + img { + max-height: 200px; + } } } } @@ -58,8 +64,11 @@ .wp-block-column { - img { - max-height: 230px; + .wp-block-image { + + img { + max-height: 230px; + } } } } diff --git a/src/next-events/render.php b/src/next-events/render.php index 734f554..7dbeb4c 100644 --- a/src/next-events/render.php +++ b/src/next-events/render.php @@ -17,9 +17,9 @@ } $sunflower_return = sprintf( - '
+ '
-

%s

+

%s

', $sunflower_classes, diff --git a/theme.json b/theme.json index d4d0641..1cb4140 100755 --- a/theme.json +++ b/theme.json @@ -3,7 +3,7 @@ "version": 3, "settings": { "appearanceTools": false, - "useRootPaddingAwareAlignments": true, + "useRootPaddingAwareAlignments": false, "color": { "palette": [ { @@ -129,16 +129,5 @@ } ] } - }, - "styles": { - "spacing": { - "padding": { - "top": "0px", - "bottom": "0px", - "right": "2rem", - "left": "2rem" - } - } - } - + } }