Skip to content

Commit

Permalink
Headings left aligned (#804)
Browse files Browse the repository at this point in the history
* Change CSS to text-align left
* del text-center in template parts
* change templates für text-align center in headings
* Remove div to remove unnecessary padding in header

---------

Co-authored-by: Alexander Bigga <[email protected]>
  • Loading branch information
HueHa-v and albig authored Feb 3, 2025
1 parent ff1870b commit 98ed902
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion archive-sunflower_event.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<main id="primary" class="site-main">
<?php if ( have_posts() ) : ?>

<header class="page-header text-center">
<header class="page-header">
<h1 class="page-title">
<?php
( $sunflower_is_event_archive ) ? esc_html_e( 'Events archive', 'sunflower' ) : esc_html_e( 'Events', 'sunflower' );
Expand Down
2 changes: 1 addition & 1 deletion archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<main id="primary" class="site-main archive">
<?php if ( have_posts() ) { ?>

<header class="page-header text-center">
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="archive-description">', '</div>' );
Expand Down
2 changes: 1 addition & 1 deletion category.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<main id="primary" class="site-main archive">
<?php if ( have_posts() ) { ?>

<header class="page-header text-center">
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
the_archive_description( '<div class="archive-description">', '</div>' );
Expand Down
2 changes: 1 addition & 1 deletion functions/block-patterns/elemente/themen.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- wp:group {"className":"same-height","backgroundColor":"white"} -->
<div class="wp-block-group same-height has-white-background-color has-background"><!-- wp:heading {"textAlign":"center","className":"h1"} -->
<h2 class="wp-block-heading has-text-align-center h1">Unsere Themen</h2>
<h2 class="wp-block-heading h1">Unsere Themen</h2>
<!-- /wp:heading -->

<!-- wp:columns -->
Expand Down
2 changes: 1 addition & 1 deletion functions/block-patterns/elemente/werde-aktiv.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- wp:group {"align":"full","style":{"color":{"text":"#ffffff","background":"#163c29"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} -->
<div class="wp-block-group alignfull has-text-color has-background" style="color:#ffffff;background-color:#163c29"><!-- wp:heading {"textAlign":"center","className":"h1"} -->
<h2 class="wp-block-heading has-text-align-center h1">Werde aktiv</h2>
<h2 class="wp-block-heading h1">Werde aktiv</h2>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"center"} -->
Expand Down
4 changes: 2 additions & 2 deletions functions/block-patterns/seiten/kandidierende.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@

<!-- wp:group {"layout":{"type":"constrained","justifyContent":"center"}} -->
<div class="wp-block-group"><!-- wp:paragraph {"align":"center","metadata":{"name":"Slogan2-1"},"style":{"elements":{"link":{"color":{"text":"var:preset|color|tanne"}}}},"backgroundColor":"grashalm","textColor":"tanne","className":"h3 textbalken"} -->
<p class="has-text-align-center h3 textbalken has-tanne-color has-grashalm-background-color has-text-color has-background has-link-color">Machen,</p>
<p class="h3 textbalken has-tanne-color has-grashalm-background-color has-text-color has-background has-link-color">Machen,</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"align":"center","metadata":{"name":"Slogan2-2"},"style":{"elements":{"link":{"color":{"text":"var:preset|color|tanne"}}}},"backgroundColor":"grashalm","textColor":"tanne","className":"h3 textbalken links-eins"} -->
<p class="has-text-align-center h3 textbalken links-eins has-tanne-color has-grashalm-background-color has-text-color has-background has-link-color">was zählt</p>
<p class="h3 textbalken links-eins has-tanne-color has-grashalm-background-color has-text-color has-background has-link-color">was zählt</p>
<!-- /wp:paragraph --></div>
<!-- /wp:group -->

Expand Down
4 changes: 2 additions & 2 deletions functions/block-patterns/seiten/startseite.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h3 class="wp-block-heading h4">bei den GRÜNEN Musterstadt.</h3>

<!-- wp:group {"className":"same-height","backgroundColor":"white"} -->
<div class="wp-block-group same-height has-white-background-color has-background"><!-- wp:heading {"textAlign":"center","className":"h1"} -->
<h2 class="wp-block-heading has-text-align-center h1">Unsere Themen</h2>
<h2 class="wp-block-heading h1">Unsere Themen</h2>
<!-- /wp:heading -->

<!-- wp:columns -->
Expand Down Expand Up @@ -123,7 +123,7 @@ <h2 class="wp-block-heading h1">Unser Programm<br>für Musterstadt</h2>

<!-- wp:group {"align":"full","style":{"color":{"text":"#ffffff","background":"#163c29"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} -->
<div class="wp-block-group alignfull has-text-color has-background" style="color:#ffffff;background-color:#163c29"><!-- wp:heading {"textAlign":"center","className":"h1"} -->
<h2 class="wp-block-heading has-text-align-center h1">Werde aktiv</h2>
<h2 class="wp-block-heading h1">Werde aktiv</h2>
<!-- /wp:heading -->

<!-- wp:paragraph {"align":"center"} -->
Expand Down
4 changes: 2 additions & 2 deletions sass/_comments.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

&s-title {
text-align: center;
text-align: left;
margin: 50px 0;
}

Expand Down Expand Up @@ -73,7 +73,7 @@
&-reply {

&-title {
text-align: center;
text-align: left;
}
}

Expand Down
4 changes: 2 additions & 2 deletions sass/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
>.entry {

&-header {
text-align: center;
text-align: left;
background: $white;
color: $secondary;
padding: 15px 0;
padding: 0;

@include media-breakpoint-up(md) {
padding: 65px 0;
Expand Down
2 changes: 1 addition & 1 deletion search.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<?php if ( have_posts() ) { ?>

<header class="page-header text-center">
<header class="page-header">
<h1 class="page-title">
<?php
/* translators: %s: search query. */
Expand Down
2 changes: 1 addition & 1 deletion template-parts/content-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<article id="post-<?php the_ID(); ?>" <?php post_class( $sunflower_class ); ?>>
<?php if ( ! $sunflower_styled_layout ) { ?>
<header class="entry-header text-center <?php echo ( has_post_thumbnail() ) ? 'has-post-thumbnail' : 'has-no-post-thumbnail'; ?>">
<header class="entry-header <?php echo ( has_post_thumbnail() ) ? 'has-post-thumbnail' : 'has-no-post-thumbnail'; ?>">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
<?php
Expand Down
9 changes: 3 additions & 6 deletions template-parts/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@

<article id="post-<?php the_ID(); ?>" <?php post_class( $sunflower_class ); ?>>
<?php if ( ! $sunflower_styled_layout ) { ?>
<header class="entry-header full-width <?php echo ( $sunflower_show_post_thumbnail ) ? 'has-post-thumbnail' : 'has-no-post-thumbnail'; ?>">
<div class="container">
<div class="row position-relative">
<div class="col-12">
<header class="entry-header <?php echo ( $sunflower_show_post_thumbnail ) ? 'has-post-thumbnail' : 'has-no-post-thumbnail'; ?>">
<div class="row position-relative">
<div class="col-12">
<?php
$sunflower_roofline = get_post_meta( $post->ID, '_sunflower_roofline', true );
if ( $sunflower_roofline ) {
Expand Down Expand Up @@ -50,8 +49,6 @@
<?php
endif;
?>
</div>

</div>
</div>
</header><!-- .entry-header -->
Expand Down

0 comments on commit 98ed902

Please sign in to comment.