optimization: adapt some wordpress config
This commit is contained in:
parent
6105ac8a32
commit
e1ea508003
4 changed files with 27 additions and 31 deletions
|
@ -19,7 +19,18 @@
|
||||||
add_action( 'init', 'kspace_post_supports' );
|
add_action( 'init', 'kspace_post_supports' );
|
||||||
|
|
||||||
add_theme_support( 'post-thumbnails' );
|
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
|
/* 1. Niveau support
|
||||||
*
|
*
|
||||||
|
|
|
@ -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 {
|
.preview-featured {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
|
padding: $lineheight / 3;
|
||||||
|
|
||||||
.preview-link {
|
.preview-link {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.preview-grid {
|
#featured-articles, .preview-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
grid-template-rows: auto;
|
grid-template-rows: auto;
|
||||||
|
@ -6,14 +6,16 @@
|
||||||
margin: -$lineheight / 3;
|
margin: -$lineheight / 3;
|
||||||
padding-bottom: $lineheight;
|
padding-bottom: $lineheight;
|
||||||
|
|
||||||
@include md() {
|
@include sm() {
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@include lg() {
|
@include lg() {
|
||||||
grid-template-columns: 1fr 1fr 1fr;
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-grid {
|
||||||
@include xl() {
|
@include xl() {
|
||||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||||
}
|
}
|
||||||
|
|
27
style.css
27
style.css
|
@ -2524,22 +2524,23 @@ footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: auto; }
|
margin: auto; }
|
||||||
|
|
||||||
.preview-grid {
|
#featured-articles, .preview-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
grid-template-rows: auto;
|
grid-template-rows: auto;
|
||||||
grid-gap: 0.5333333333rem;
|
grid-gap: 0.5333333333rem;
|
||||||
margin: -0.5333333333rem;
|
margin: -0.5333333333rem;
|
||||||
padding-bottom: 1.6rem; }
|
padding-bottom: 1.6rem; }
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 576px) {
|
||||||
.preview-grid {
|
#featured-articles, .preview-grid {
|
||||||
grid-template-columns: 1fr 1fr; } }
|
grid-template-columns: 1fr 1fr; } }
|
||||||
@media (min-width: 992px) {
|
@media (min-width: 992px) {
|
||||||
.preview-grid {
|
#featured-articles, .preview-grid {
|
||||||
grid-template-columns: 1fr 1fr 1fr; } }
|
grid-template-columns: 1fr 1fr 1fr; } }
|
||||||
@media (min-width: 1200px) {
|
@media (min-width: 1200px) {
|
||||||
.preview-grid {
|
.preview-grid {
|
||||||
grid-template-columns: 1fr 1fr 1fr 1fr; } }
|
grid-template-columns: 1fr 1fr 1fr 1fr; } }
|
||||||
|
|
||||||
.preview-list .preview {
|
.preview-list .preview {
|
||||||
display: block; }
|
display: block; }
|
||||||
|
|
||||||
|
@ -2598,17 +2599,9 @@ footer {
|
||||||
line-height: 1.25rem;
|
line-height: 1.25rem;
|
||||||
color: rgba(33, 37, 41, 0.8); }
|
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 {
|
.preview-featured {
|
||||||
font-size: 0.8rem; }
|
font-size: 0.8rem;
|
||||||
|
padding: 0.5333333333rem; }
|
||||||
.preview-featured .preview-link {
|
.preview-featured .preview-link {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
Reference in a new issue