diff --git a/css/admin-style.css b/css/admin-style.css new file mode 100644 index 0000000..68ccfdd --- /dev/null +++ b/css/admin-style.css @@ -0,0 +1,7 @@ +/* body { + background: red !important; +} */ + +#menu-posts { + border-top: 1px solid rgba(255, 255, 255, 0.2) !important; +} diff --git a/css/editor-style.css b/css/editor-style.css index b56c859..ff70fcb 100644 --- a/css/editor-style.css +++ b/css/editor-style.css @@ -373,14 +373,17 @@ body { max-width: 1280px } -.wp-block[data-align=wide] { +.wp-block[data-align="wide"] { max-width: 1280px } -.wp-block[data-align=full] { +.wp-block[data-align="full"] { max-width: 100% } +.acf-block-component { +} + @media (min-width: 782px) { .md\:my-6 { margin-top: 1.5rem; @@ -448,4 +451,4 @@ body { font-size: 3rem; line-height: 1 } -} \ No newline at end of file +} diff --git a/functions.php b/functions.php index f8b68b6..261f48b 100644 --- a/functions.php +++ b/functions.php @@ -57,7 +57,7 @@ function tailpress_enqueue_scripts() function enqueue_gutenberg_back_styles() { - // wp_enqueue_style( 'tailpress_back', tailpress_asset( 'css/app.css' ), array() ); + wp_enqueue_style('tailpress_back', tailpress_asset('css/app.css'), array()); } add_action('enqueue_block_editor_assets', 'enqueue_gutenberg_back_styles'); @@ -131,6 +131,8 @@ add_filter('nav_menu_submenu_css_class', 'tailpress_nav_menu_add_submenu_class', require_once(__DIR__ . '/includes/blocks.php'); require_once(__DIR__ . '/includes/post_types.php'); +require_once(__DIR__ . '/includes/admin.php'); +require_once(__DIR__ . '/includes/logos.php'); // require_once( __DIR__ . '/includes/taxonomy.php'); // require_once( __DIR__ . '/includes/errorlog.php'); // require_once( __DIR__ . '/includes/logos.php'); \ No newline at end of file diff --git a/includes/admin.php b/includes/admin.php new file mode 100644 index 0000000..b2a9538 --- /dev/null +++ b/includes/admin.php @@ -0,0 +1,28 @@ +remove_menu('comments'); +} +add_action('wp_before_admin_bar_render', 'mytheme_admin_bar_render'); diff --git a/includes/blocks.php b/includes/blocks.php index a4fa026..0016999 100755 --- a/includes/blocks.php +++ b/includes/blocks.php @@ -2,20 +2,21 @@ // ##### Blocks Category 🡒 Déclaration de la catégorie de blocks custom -function client_add_block_categories( $categories ) { +function client_add_block_categories($categories) +{ return array_merge( + [ [ - [ - 'slug' => 'client_blocks', - 'title' => __( 'Mon titre ', 'client-blocks' ), - 'icon' => 'heart', - ], + 'slug' => 'client_blocks', + 'title' => __('Mon titre ', 'client-blocks'), + 'icon' => 'heart', ], - $categories + ], + $categories ); } -add_action( 'block_categories_all', 'client_add_block_categories', 10, 2 ); +add_action('block_categories_all', 'client_add_block_categories', 10, 2); // ##### Blocks 🡒 Déclaration des blocks acf custom @@ -29,7 +30,7 @@ function acf_custom_client_blocks_init() 'name' => 'home_header', 'title' => __("Home — Section d'accueil"), 'description' => __("Brique pour la section d'acccueil"), - 'render_template' => 'template-parts/blocks/home/home_header/home_header.php', + 'render_template' => 'template-blocks/home/home_header/home_header.php', 'category' => 'client_blocks', 'multiple' => false, 'mode' => 'auto', @@ -51,9 +52,9 @@ function acf_custom_client_blocks_init() // ##### Home 🡒 Latest Articles acf_register_block_type(array( 'name' => 'latest_articles', - 'title' => __("Home — Derniers Articles"), + 'title' => __("Derniers Articles"), 'description' => __("Brique pour afficher les derniers articles publiés sur le site"), - 'render_template' => 'template-parts/blocks/home/latest_articles/latest_articles.php', + 'render_template' => 'template-blocks/generics/latest-post-query.php', 'category' => 'client_blocks', 'multiple' => false, 'mode' => 'auto', @@ -66,7 +67,6 @@ function acf_custom_client_blocks_init() // }, )); - } } add_action('acf/init', 'acf_custom_client_blocks_init'); @@ -78,8 +78,4 @@ add_action('acf/init', 'acf_custom_client_blocks_init'); // function block_newsfeed_add_editor_styles() { // add_editor_style( get_stylesheet_directory_uri() . '/template-parts/blocks/editor.css' ); // } -// add_action( 'admin_init', 'block_newsfeed_add_editor_styles' ); - - - -?> +// add_action( 'admin_init', 'block_newsfeed_add_editor_styles' ); \ No newline at end of file diff --git a/includes/logos.php b/includes/logos.php index 9bc7e29..104bafc 100755 --- a/includes/logos.php +++ b/includes/logos.php @@ -1,20 +1,34 @@ - */ + +function cc_mime_types($mimes) +{ +$mimes['svg'] = 'image/svg+xml'; +return $mimes; +} +add_filter('upload_mimes', 'cc_mime_types'); + // ############################# // AJOUT D'UN ESPACE LOGO CUSTOM // ############################# -function add_logo_customizer_settings($wp_customize) { - $wp_customize->add_setting('logo_semlex_dark'); +// function add_logo_customizer_settings($wp_customize) +// { +// $wp_customize->add_setting('logo_semlex_dark'); - // Add a control to upload the hover logo - $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'logo_semlex_dark', array( - 'label' => 'Logo Semlex Sombre', - 'section' => 'title_tagline', //this is the section where the custom-logo from WordPress is - 'settings' => 'logo_semlex_dark', - 'priority' => 8 // show it just below the custom-logo - ))); -} - -add_action('customize_register', 'add_logo_customizer_settings'); +// // Add a control to upload the hover logo +// $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'logo_semlex_dark', array( +// 'label' => 'Logo Semlex Sombre', +// 'section' => 'title_tagline', //this is the section where the custom-logo from WordPress is +// 'settings' => 'logo_semlex_dark', +// 'priority' => 8 // show it just below the custom-logo +// ))); +// } +// add_action('customize_register', 'add_logo_customizer_settings'); \ No newline at end of file diff --git a/includes/post_types.php b/includes/post_types.php index eeb5afb..944c6ae 100644 --- a/includes/post_types.php +++ b/includes/post_types.php @@ -1,12 +1,5 @@ + + + + + + + + + + + + +
+

Lastest Articles

+ +
+ 4, // Number of recent posts thumbnails to display + 'post_status' => 'publish' // Show only the published posts + )); + + + foreach ($recent_posts as $key => $post) { + $post_date = date_i18n('j F Y', strtotime($post['post_date'])); + ?> +
+

qsdqsd

+ 'article_thumbnail')); ?> +
+ +

+

+
+ +
+ +
+ +
\ No newline at end of file diff --git a/template-parts/blocks/home/home_header/home_header.css b/template-blocks/home/home_header.css similarity index 100% rename from template-parts/blocks/home/home_header/home_header.css rename to template-blocks/home/home_header.css diff --git a/template-parts/blocks/home/home_header/home_header.php b/template-blocks/home/home_header.php similarity index 100% rename from template-parts/blocks/home/home_header/home_header.php rename to template-blocks/home/home_header.php diff --git a/template-parts/blocks/home/latest_articles/latest_articles.js b/template-parts/blocks/home/latest_articles/latest_articles.js deleted file mode 100755 index e69de29..0000000 diff --git a/template-parts/blocks/home/latest_articles/latest_articles.php b/template-parts/blocks/home/latest_articles/latest_articles.php deleted file mode 100755 index e5d9ab2..0000000 --- a/template-parts/blocks/home/latest_articles/latest_articles.php +++ /dev/null @@ -1,35 +0,0 @@ - - -
-

Lastest Articles

- -
- 4, // Number of recent posts thumbnails to display - 'post_status' => 'publish' // Show only the published posts - )); - - - foreach ($recent_posts as $key => $post) { - $post_date = date_i18n('j F Y', strtotime($post['post_date'])); - ?> -
- 'article_thumbnail') ); ?> -
- -

-

-
- -
- -
- -