Skip to content

Commit

Permalink
Update css-generator.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jessuppi authored Aug 15, 2024
1 parent 9f7944d commit c548108
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions inc/css-generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ function hovercraft_generate_css(){
/* misc */
$blockquote_captions = get_theme_mod( 'hovercraft_blockquote_captions', 'none' );
$breadcrumbs = get_theme_mod( 'hovercraft_breadcrumbs', 'none' );
$home_postmain_top_columns = get_theme_mod( 'hovercraft_home_postmain_top_columns', '1' );
$home_postmain_bottom_columns = get_theme_mod( 'hovercraft_home_postmain_bottom_columns', '1' );
$prefooter_top_columns = get_theme_mod( 'hovercraft_prefooter_top_columns', '1' );
$prefooter_bottom_columns = get_theme_mod( 'hovercraft_prefooter_bottom_columns', '1' );
$gallery_captions = get_theme_mod( 'hovercraft_gallery_captions', 'none' );
Expand Down Expand Up @@ -3106,6 +3108,37 @@ function hovercraft_generate_css(){
}
}

@media screen and (max-width: 1200px) {
#home-postmain-top .inner {
width: 100%;
padding: 0px 0px;
}
}

@media screen and (min-width: 1200px) {
#home-postmain-top .inner {
width: 100%;
display: grid;
<?php if ( $home_postmain_top_columns == '1' ) {
echo "grid-template-columns: repeat(1, 1fr);\n";
} elseif ( $home_postmain_top_columns == '2' ) {
echo "grid-template-columns: repeat(2, 1fr);\n";
} elseif ( $home_postmain_top_columns == '3' ) {
echo "grid-template-columns: repeat(3, 1fr);\n";
} elseif ( $home_postmain_top_columns == '4' ) {
echo "grid-template-columns: repeat(4, 1fr);\n";
} elseif ( $home_postmain_top_columns == '5' ) {
echo "grid-template-columns: repeat(5, 1fr);\n";
} elseif ( $home_postmain_top_columns == '6' ) {
echo "grid-template-columns: repeat(6, 1fr);\n";
} elseif ( $home_postmain_top_columns == '7' ) {
echo "grid-template-columns: repeat(7, 1fr);\n";
} elseif ( $home_postmain_top_columns == '8' ) {
echo "grid-template-columns: repeat(8, 1fr);\n"; } ?>
gap: 30px;
}
}

#home-postmain-top a {
color: <?php echo $postmain_top_link_color; ?>;
text-decoration: <?php echo $postmain_top_link_decoration; ?>;
Expand Down

0 comments on commit c548108

Please sign in to comment.