Skip to content

Commit

Permalink
Eoxia#51 fix: Headers of old templates php
Browse files Browse the repository at this point in the history
  • Loading branch information
eoxia-amandine committed May 23, 2024
1 parent 4394766 commit 8486287
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 47 deletions.
27 changes: 26 additions & 1 deletion assets/css/style-sensei.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ body.learner-profile article.post:not(.course), body.learner-archive-message art
display: flex;
margin-top: 0;
}
@media (max-width: 599px) {
body.learner-profile article.post:not(.course), body.learner-archive-message article.post:not(.course), body.single-sensei_message article.post:not(.course) {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
}
body.learner-profile article.post:not(.course) .profile-sidebar, body.learner-archive-message article.post:not(.course) .profile-sidebar, body.single-sensei_message article.post:not(.course) .profile-sidebar {
width: 30%;
-webkit-box-ordinal-group: 2;
Expand All @@ -116,6 +124,11 @@ body.learner-profile article.post:not(.course) .profile-sidebar, body.learner-ar
background: #fff;
border-right: 1px solid rgba(0, 0, 0, 0.1);
}
@media (max-width: 599px) {
body.learner-profile article.post:not(.course) .profile-sidebar, body.learner-archive-message article.post:not(.course) .profile-sidebar, body.single-sensei_message article.post:not(.course) .profile-sidebar {
width: 100%;
}
}
body.learner-profile article.post:not(.course) #learner-container, body.learner-archive-message article.post:not(.course) #learner-container, body.single-sensei_message article.post:not(.course) #learner-container {
width: 70%;
-webkit-box-ordinal-group: 3;
Expand All @@ -126,6 +139,11 @@ body.learner-profile article.post:not(.course) #learner-container, body.learner-
-ms-flex-positive: 1;
flex-grow: 1;
}
@media (max-width: 599px) {
body.learner-profile article.post:not(.course) #learner-container, body.learner-archive-message article.post:not(.course) #learner-container, body.single-sensei_message article.post:not(.course) #learner-container {
width: 100%;
}
}
body.learner-profile #learner-container, body.learner-archive-message #learner-container, body.single-sensei_message #learner-container {
padding: 0 10% 2em 2em;
}
Expand Down Expand Up @@ -169,9 +187,16 @@ body.learner-profile .post.course .meter .value {
}

.profile-sidebar .profile-sidebar-content {
margin-left: 250px;
margin-left: auto;
padding-top: 2em;
padding-right: 4em;
max-width: 250px;
}
@media (max-width: 599px) {
.profile-sidebar .profile-sidebar-content {
margin-right: auto;
padding-right: 0;
}
}
.profile-sidebar .profile-sidebar-content svg {
max-width: 12px;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/style-sensei.min.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions assets/scss/sensei/template/_learner-profile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,29 @@ body.learner-profile, body.learner-archive-message, body.single-sensei_message {
display: flex;
margin-top: 0;

@media ( max-width: $media__mobile ) {
flex-direction: column;
}

.profile-sidebar {
width: 30%;
order: 1;
background: #fff;
border-right: 1px solid rgba(0,0,0,0.1);

@media ( max-width: $media__mobile ) {
width: 100%;
}
}
#learner-container {
width: 70%;
order: 2;
background: rgba(0,0,0,0.05);
flex-grow: 1;

@media ( max-width: $media__mobile ) {
width: 100%;
}
}
}

Expand Down
8 changes: 7 additions & 1 deletion assets/scss/sensei/template/_profile-sidebar.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
.profile-sidebar {
.profile-sidebar-content {
margin-left: 250px;
margin-left: auto;
padding-top: 2em;
padding-right: 4em;
max-width: 250px;

@media ( max-width: $media__mobile ) {
margin-right: auto;
padding-right: 0;
}

svg {
max-width: 12px;
Expand Down
26 changes: 14 additions & 12 deletions block-template-parts/footer.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
<!-- wp:group {"layout":{"inherit":false}} -->
<div class="wp-block-group"><!-- wp:separator {"color":"grey","className":"is-style-wide"} -->
<hr class="wp-block-separator has-text-color has-background has-grey-background-color has-grey-color is-style-wide"/>
<!-- /wp:separator -->

<!-- wp:group {"layout":{"contentSize":"1200px"}} -->
<!-- wp:group {"style":{"border":{"top":{"color":"var:preset|color|grey","width":"1px"}},"spacing":{"padding":{"top":"var:preset|spacing|70","bottom":"var:preset|spacing|70"}}},"backgroundColor":"white","layout":{"inherit":false}} -->
<div class="wp-block-group has-white-background-color has-background" style="border-top-color:var(--wp--preset--color--grey);border-top-width:1px;padding-top:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70)"><!-- wp:group {"layout":{"contentSize":"1200px","type":"constrained"}} -->
<div class="wp-block-group"><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"60%"} -->
<div class="wp-block-column" style="flex-basis:60%"><!-- wp:paragraph -->
<p><strong>A propos de nous</strong></p>
<p class=""><strong>A propos de nous</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam ac volutpat lacus. Vivamus tincidunt purus ac accumsan scelerisque. Fusce tempor nulla velit, vitae dictum lectus elementum eget. Etiam eleifend tempor mauris, fermentum vestibulum tortor vestibulum.</p>
<p class="">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam ac volutpat lacus. Vivamus tincidunt purus ac accumsan scelerisque. Fusce tempor nulla velit, vitae dictum lectus elementum eget. Etiam eleifend tempor mauris, fermentum vestibulum tortor vestibulum.</p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->

<!-- wp:column {"width":"20%"} -->
<div class="wp-block-column" style="flex-basis:20%"><!-- wp:paragraph -->
<p><strong>Autres liens</strong></p>
<p class=""><strong>Autres liens</strong></p>
<!-- /wp:paragraph -->

<!-- wp:navigation {"overlayMenu":"never","layout":{"type":"flex","setCascadingProperties":"true","orientation":"vertical","justifyContent":"left"},"style":{"typography":{"fontStyle":"normal","fontWeight":"600"},"spacing":{"blockGap":"0.5em"}}} /--></div>
<!-- wp:navigation {"ref":150,"overlayMenu":"never","layout":{"type":"flex","setCascadingProperties":"true","orientation":"vertical","justifyContent":"left"},"style":{"typography":{"fontStyle":"normal","fontWeight":"600"},"spacing":{"blockGap":"0.5em"}}} /--></div>
<!-- /wp:column -->

<!-- wp:column {"width":"20%"} -->
<div class="wp-block-column" style="flex-basis:20%"><!-- wp:paragraph -->
<p><strong>Contactez-nous</strong></p>
<p class=""><strong>Contactez-nous</strong></p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>lorem ipsum</li><li>lorem ipsum</li></ul>
<ul class=""><!-- wp:list-item -->
<li class="">lorem ipsum</li>
<!-- /wp:list-item -->

<!-- wp:list-item -->
<li class="">lorem ipsum</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->

<!-- wp:social-links -->
Expand Down
40 changes: 21 additions & 19 deletions block-template-parts/header.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
<!-- wp:group {"style":{"spacing":{"padding":{"top":"0em","right":"0em","bottom":"0em","left":"0em"}},"border":{"radius":"0px"}},"backgroundColor":"white","className":"header-sticky","layout":{"inherit":false}} -->
<div class="wp-block-group header-sticky has-white-background-color has-background" style="border-radius:0px;padding-top:0em;padding-right:0em;padding-bottom:0em;padding-left:0em"><!-- wp:group {"layout":{"inherit":false,"contentSize":"1200px","type":"constrained"}} -->
<div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"padding":{"top":"1em","right":"1.5em","bottom":"0em","left":"1.5em"}}},"layout":{"type":"flex","allowOrientation":false,"justifyContent":"space-between","flexWrap":"wrap"}} -->
<div class="wp-block-group" style="padding-top:1em;padding-right:1.5em;padding-bottom:0em;padding-left:1.5em"><!-- wp:group {"layout":{"type":"flex","allowOrientation":false}} -->
<div class="wp-block-group"><!-- wp:site-logo {"width":50,"className":"is-style-default"} /-->
<div class="wp-block-group header-sticky has-white-background-color has-background" style="border-radius:0px;padding-top:0em;padding-right:0em;padding-bottom:0em;padding-left:0em"><!-- wp:group {"layout":{"type":"default"}} -->
<div class="wp-block-group"><!-- wp:group {"style":{"spacing":{"padding":{"top":"1em","right":"1.5em","bottom":"1em","left":"1.5em"}}},"layout":{"type":"flex","allowOrientation":false,"justifyContent":"space-between","flexWrap":"wrap"}} -->
<div class="wp-block-group" style="padding-top:1em;padding-right:1.5em;padding-bottom:1em;padding-left:1.5em"><!-- wp:group {"layout":{"type":"flex","allowOrientation":false}} -->
<div class="wp-block-group"><!-- wp:site-logo {"width":50,"className":"is-style-default"} /-->

<!-- wp:group -->
<div class="wp-block-group"><!-- wp:site-title {"style":{"spacing":{"margin":{"top":"0","right":"0","bottom":"0","left":"0"}}},"textColor":"galaxy"} /-->
<!-- wp:group -->
<div class="wp-block-group"><!-- wp:site-title {"style":{"spacing":{"margin":{"top":"0","right":"0","bottom":"0","left":"0"}}},"textColor":"galaxy"} /-->

<!-- wp:site-tagline {"style":{"spacing":{"margin":{"top":"0","right":"0","bottom":"0","left":"0"}}},"fontSize":"small"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->

<!-- wp:group {"layout":{"type":"flex","allowOrientation":false,"justifyContent":"right"}} -->
<div class="wp-block-group"><!-- wp:navigation {"ref":141} /-->
<!-- wp:site-tagline {"style":{"spacing":{"margin":{"top":"0","right":"0","bottom":"0","left":"0"}}},"fontSize":"small"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->

<!-- wp:acf/bfs-login {"name":"acf/bfs-login","data":[],"mode":"preview"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->
<!-- wp:group {"layout":{"type":"flex","allowOrientation":false,"justifyContent":"right"}} -->
<div class="wp-block-group"><!-- wp:navigation {"ref":150} /-->

<!-- wp:separator {"opacity":"css","backgroundColor":"grey","className":"is-style-wide"} -->
<hr class="wp-block-separator has-text-color has-grey-color has-css-opacity has-grey-background-color has-background is-style-wide"/>
<!-- /wp:separator --></div>
<!-- wp:group {"style":{"spacing":{"padding":{"left":"var:preset|spacing|40"}},"border":{"left":{"color":"var:preset|color|light-grey","width":"1px"},"top":{},"right":{},"bottom":{}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="border-left-color:var(--wp--preset--color--light-grey);border-left-width:1px;padding-left:var(--wp--preset--spacing--40)"><!-- wp:beflex/login {"name":"beflex/login","mode":"preview"} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group --></div>
<!-- /wp:group -->

<!-- wp:separator {"opacity":"css","style":{"spacing":{"margin":{"top":"0"}}},"backgroundColor":"grey","className":"is-style-wide"} -->
<hr class="wp-block-separator has-text-color has-grey-color has-css-opacity has-grey-background-color has-background is-style-wide" style="margin-top:0"/>
<!-- /wp:separator --></div>
<!-- /wp:group -->
10 changes: 6 additions & 4 deletions sensei/archive-course.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,25 @@
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<?php
$block_content = do_blocks( file_get_contents(get_stylesheet_directory() . "/block-templates/archive-course.html") );
$block_header = do_blocks( file_get_contents(get_stylesheet_directory_uri() . "/block-template-parts/header.html") );
$block_content = do_blocks( file_get_contents(get_stylesheet_directory_uri() . "/block-templates/archive-course.html") );
$block_footer = do_blocks( file_get_contents(get_stylesheet_directory_uri() . "/block-template-parts/footer.html") );
?>
<?php wp_head(); ?>
</head>

<body <?php body_class( 'sensei-template-old' ); ?>>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div class="wp-site-blocks">

<header class="wp-block-template-part site-header">
<?php block_header_area(); ?>
<?php echo $block_header; ?>
</header>

<?php echo $block_content; ?>

<footer class="wp-block-template-part site-footer">
<?php block_footer_area(); ?>
<?php echo $block_footer; ?>
</footer>
</div>
<?php wp_footer(); ?>
Expand Down
10 changes: 7 additions & 3 deletions sensei/archive-message.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<?php
$block_header = do_blocks( file_get_contents(get_stylesheet_directory_uri() . "/block-template-parts/header.html") );
$block_footer = do_blocks( file_get_contents(get_stylesheet_directory_uri() . "/block-template-parts/footer.html") );
?>
<?php wp_head(); ?>
</head>

<body <?php body_class( 'sensei-template-old' ); ?>>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div class="wp-site-blocks">

<header class="wp-block-template-part site-header">
<?php block_header_area(); ?>
<?php echo $block_header; ?>
</header>

<?php
Expand Down Expand Up @@ -62,7 +66,7 @@
?>

<footer class="wp-block-template-part site-footer">
<?php block_footer_area(); ?>
<?php echo $block_footer; ?>
</footer>
</div>
<?php wp_footer(); ?>
Expand Down
8 changes: 5 additions & 3 deletions sensei/learner-profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<?php
$block_header = do_blocks( file_get_contents(get_stylesheet_directory_uri() . "/block-template-parts/header.html") );
$block_content = '';
$block_footer = do_blocks( file_get_contents(get_stylesheet_directory_uri() . "/block-template-parts/footer.html") );
?>
<?php wp_head(); ?>
</head>

<body <?php body_class( 'sensei-template-old' ); ?>>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div class="wp-site-blocks">

<header class="wp-block-template-part site-header">
<?php block_header_area(); ?>
<?php echo $block_header; ?>
</header>

<?php
Expand Down Expand Up @@ -117,7 +119,7 @@
<?php echo $block_content; ?>

<footer class="wp-block-template-part site-footer">
<?php block_footer_area(); ?>
<?php echo $block_footer; ?>
</footer>
</div>
<?php wp_footer(); ?>
Expand Down
10 changes: 7 additions & 3 deletions sensei/single-message.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<?php
$block_header = do_blocks( file_get_contents(get_stylesheet_directory_uri() . "/block-template-parts/header.html") );
$block_footer = do_blocks( file_get_contents(get_stylesheet_directory_uri() . "/block-template-parts/footer.html") );
?>
<?php wp_head(); ?>
</head>

<body <?php body_class( 'sensei-template-old' ); ?>>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div class="wp-site-blocks">

<header class="wp-block-template-part site-header">
<?php block_header_area(); ?>
<?php echo $block_header; ?>
</header>

<?php
Expand Down Expand Up @@ -151,7 +155,7 @@
</article>

<footer class="wp-block-template-part site-footer">
<?php block_footer_area(); ?>
<?php echo $block_footer; ?>
</footer>
</div>
<?php wp_footer(); ?>
Expand Down

0 comments on commit 8486287

Please sign in to comment.