optimization: adapt some wordpress config

This commit is contained in:
Kazhnuz 2023-10-13 20:37:23 +02:00
parent 6105ac8a32
commit e1ea508003
4 changed files with 27 additions and 31 deletions

View file

@ -19,7 +19,18 @@
add_action( 'init', 'kspace_post_supports' );
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 825, 510, true );
set_post_thumbnail_size( 520, 290, true );
//Remove Gutenberg Block Library CSS from loading on the frontend
function smartwp_remove_wp_block_library_css(){
wp_dequeue_style( 'wp-block-library' );
wp_dequeue_style( 'wp-block-library-theme' );
wp_dequeue_style( 'wc-blocks-style' ); // Remove WooCommerce block CSS
wp_deregister_style( 'dashicons' );
add_filter( 'show_admin_bar', '__return_false' );
}
add_action( 'wp_enqueue_scripts', 'smartwp_remove_wp_block_library_css', 100 );
/* 1. Niveau support
*

View file

@ -1,16 +1,6 @@
#featured-articles {
display:grid;
grid-template-columns: 1fr;
grid-template-rows: auto;
grid-gap: $lineheight;
padding-bottom: $lineheight;
@include lg() {
grid-template-columns: 1fr 1fr 1fr;
}
}
.preview-featured {
font-size: 0.8rem;
padding: $lineheight / 3;
.preview-link {
display: block;

View file

@ -1,4 +1,4 @@
.preview-grid {
#featured-articles, .preview-grid {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: auto;
@ -6,14 +6,16 @@
margin: -$lineheight / 3;
padding-bottom: $lineheight;
@include md() {
@include sm() {
grid-template-columns: 1fr 1fr;
}
@include lg() {
grid-template-columns: 1fr 1fr 1fr;
}
}
.preview-grid {
@include xl() {
grid-template-columns: 1fr 1fr 1fr 1fr;
}

View file

@ -2524,22 +2524,23 @@ footer {
width: 100%;
margin: auto; }
.preview-grid {
#featured-articles, .preview-grid {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: auto;
grid-gap: 0.5333333333rem;
margin: -0.5333333333rem;
padding-bottom: 1.6rem; }
@media (min-width: 768px) {
.preview-grid {
@media (min-width: 576px) {
#featured-articles, .preview-grid {
grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) {
.preview-grid {
#featured-articles, .preview-grid {
grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 1200px) {
.preview-grid {
grid-template-columns: 1fr 1fr 1fr 1fr; } }
@media (min-width: 1200px) {
.preview-grid {
grid-template-columns: 1fr 1fr 1fr 1fr; } }
.preview-list .preview {
display: block; }
@ -2598,17 +2599,9 @@ footer {
line-height: 1.25rem;
color: rgba(33, 37, 41, 0.8); }
#featured-articles {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: auto;
grid-gap: 1.6rem;
padding-bottom: 1.6rem; }
@media (min-width: 992px) {
#featured-articles {
grid-template-columns: 1fr 1fr 1fr; } }
.preview-featured {
font-size: 0.8rem; }
font-size: 0.8rem;
padding: 0.5333333333rem; }
.preview-featured .preview-link {
display: block;
padding: 0;