diff --git a/functions.php b/functions.php index f0a0c14..7206e67 100644 --- a/functions.php +++ b/functions.php @@ -34,6 +34,8 @@ function tailpress_setup() { add_theme_support( 'editor-styles' ); add_editor_style( 'css/editor-style.css' ); + + // add_post_type_support( 'page', 'excerpt' ); } add_action( 'after_setup_theme', 'tailpress_setup' ); @@ -121,6 +123,8 @@ function tailpress_nav_menu_add_submenu_class( $classes, $args, $depth ) { add_filter( 'nav_menu_submenu_css_class', 'tailpress_nav_menu_add_submenu_class', 10, 3 ); -// require_once( __DIR__ . '/includes/errorlog.php'); require_once( __DIR__ . '/includes/blocks.php'); +require_once( __DIR__ . '/includes/post_types.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/blocks.php b/includes/blocks.php index f6599eb..a4fa026 100755 --- a/includes/blocks.php +++ b/includes/blocks.php @@ -15,7 +15,7 @@ function client_add_block_categories( $categories ) { $categories ); } -add_action( 'block_categories', 'client_add_block_categories', 10, 2 ); +add_action( 'block_categories_all', 'client_add_block_categories', 10, 2 ); // ##### Blocks 🡒 Déclaration des blocks acf custom @@ -26,10 +26,10 @@ function acf_custom_client_blocks_init() // ##### Home 🡒 Hero Section acf_register_block_type(array( - 'name' => 'home_section', + 'name' => 'home_header', 'title' => __("Home — Section d'accueil"), - 'description' => __("Brique de vidéo pour la section d'acccueil"), - 'render_template' => 'template-parts/blocks/home/home_hero/home_hero.php', + 'description' => __("Brique pour la section d'acccueil"), + 'render_template' => 'template-parts/blocks/home/home_header/home_header.php', 'category' => 'client_blocks', 'multiple' => false, 'mode' => 'auto', diff --git a/includes/shortcuts/shortcuts.php b/includes/shortcuts/shortcuts.php index f2bf549..2d50429 100644 --- a/includes/shortcuts/shortcuts.php +++ b/includes/shortcuts/shortcuts.php @@ -1,5 +1,11 @@ 'ids'); +$args = array( + 'fields' => 'ids', + 'post_type' => 'restaurants', + 'posts_per_page' => -1 + +); $posts = get_posts($args); diff --git a/includes/taxonomy.php b/includes/taxonomy.php new file mode 100644 index 0000000..b8e937f --- /dev/null +++ b/includes/taxonomy.php @@ -0,0 +1,30 @@ + true, + + // This array of options controls the labels displayed in the WordPress Admin UI + 'labels' => array( + 'name' => _x( 'Thématiques', 'taxonomy general name' ), + 'singular_name' => _x( 'Thématique', 'taxonomy singular name' ), + 'search_items' => __( 'Chercher une Thématique' ), + 'all_items' => __( 'Toutes les Thématiques' ), + 'parent_item' => __( 'Thématique Parent' ), + 'parent_item_colon' => __( 'Thématique Parent:' ), + 'edit_item' => __( 'Editer la Thématique' ), + 'update_item' => __( 'Mettre à jour la Thématique' ), + 'add_new_item' => __( 'Ajouter une Thématique' ), + 'new_item_name' => __( 'Nom de la nouvelle Thématique' ), + 'menu_name' => __( 'Thématiques' ), + ), + // Control the slugs used for this taxonomy + 'rewrite' => array( + 'slug' => 'thematiques', // This controls the base slug that will display before each term + // 'with_front' => false, // Don't display the category base before "/locations/" + 'hierarchical' => true // This will allow URL's like "/locations/boston/cambridge/" + ), + )); +} +add_action( 'init', 'add_custom_taxonomies', 0 ); \ No newline at end of file diff --git a/resources/css/app.css b/resources/css/app.css index ffcbf94..de9f0b1 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -2,4 +2,20 @@ @import "tailwindcss/components"; @import "tailwindcss/utilities"; -@import "custom.css"; \ No newline at end of file +@import "custom.css"; + +/* ########### GENERAL ############ */ +@import "typography.css"; + +/* ########### COMPONENTS ############ */ +@import "components/header.css"; +@import "components/cta.css"; +@import "components/section.css"; +@import "components/footer.css"; + + + +/* ########### BLOCKS ############ */ + + /* Home */ + @import "../../template-parts/blocks/home/home_header/home_header.css"; diff --git a/resources/css/components/cta.css b/resources/css/components/cta.css new file mode 100644 index 0000000..e69de29 diff --git a/resources/css/components/footer.css b/resources/css/components/footer.css new file mode 100644 index 0000000..e69de29 diff --git a/resources/css/components/header.css b/resources/css/components/header.css new file mode 100644 index 0000000..e69de29 diff --git a/resources/css/components/section.css b/resources/css/components/section.css new file mode 100644 index 0000000..e69de29 diff --git a/resources/css/typography.css b/resources/css/typography.css new file mode 100644 index 0000000..e69de29 diff --git a/template-parts/blocks/home/home_header/home_header.css b/template-parts/blocks/home/home_header/home_header.css new file mode 100755 index 0000000..e69de29 diff --git a/template-parts/blocks/home/home_header/home_header.php b/template-parts/blocks/home/home_header/home_header.php new file mode 100755 index 0000000..3b225e8 --- /dev/null +++ b/template-parts/blocks/home/home_header/home_header.php @@ -0,0 +1,17 @@ + + + + +

+ + +
+
+ +

+

+
+
+ diff --git a/template-parts/blocks/home/home_hero/home_hero.css b/template-parts/blocks/home/home_hero/home_hero.css deleted file mode 100755 index 5571f2b..0000000 --- a/template-parts/blocks/home/home_hero/home_hero.css +++ /dev/null @@ -1,42 +0,0 @@ -.video_hero{ - @apply bg-primary; - height: 100vh; - min-height: 650px; - position: relative; - - video{ - width: 100%; - height: 100%; - object-fit: cover; - position: absolute; - } - .hero_content{ - opacity: 0.9999; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - height: 100%; - - h1 { - font-family: "Causten"; - font-weight: 700; - font-size: 50px; - line-height: 50px; - max-width: 700px; - text-transform: uppercase; - - } - p{ - @apply max-w-md; - padding: 40px 0; - text-align:center; - } - a{ - border: 1px solid white; - padding: 10px 40px; - border-radius: 28px; - } - } - -} \ No newline at end of file diff --git a/template-parts/blocks/home/home_hero/home_hero.php b/template-parts/blocks/home/home_hero/home_hero.php deleted file mode 100755 index bd9839a..0000000 --- a/template-parts/blocks/home/home_hero/home_hero.php +++ /dev/null @@ -1,18 +0,0 @@ - - -
- -
- -

-

- -
-
-