Compare commits

...

22 Commits

Author SHA1 Message Date
90a9d05c6f fixing pictogrammes path
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-05 13:18:09 +01:00
f3cae803cd few tweaks 2024-11-05 13:17:59 +01:00
03c00830ce stying the component 2024-11-05 13:17:46 +01:00
52fc6da464 fixing pictogrammes path 2024-11-05 13:17:36 +01:00
7dba320156 removing unecessary lineskips 2024-11-05 13:17:29 +01:00
715f0a61cc impoorting the form classes from homegrade theme 2024-11-05 13:17:14 +01:00
77e1a1ac71 commenting properly 2024-11-05 13:16:58 +01:00
26318ce487 fixing pictogrammes path 2024-11-05 13:16:47 +01:00
2efd6d9b09 update 2024-11-05 13:16:29 +01:00
5d89fb307d including search artisan 2024-11-05 13:16:11 +01:00
7881ea7449 including error logs and blocks 2024-11-05 13:15:57 +01:00
e650a9abf9 removing unecessary linesckips 2024-11-05 13:15:42 +01:00
74c37791ab introducing the block search artisan 2024-11-05 13:15:23 +01:00
8dc982c8c7 updating categories Icons 2024-11-05 13:14:47 +01:00
5b4688b034 return if no form 2024-11-05 13:13:56 +01:00
12185e7261 introducing artisan cards 2024-11-05 13:13:25 +01:00
7d1bd39704 handling the watch js 2024-11-05 13:13:13 +01:00
0a3f5d833b introducing the custom blocks 2024-11-05 13:12:59 +01:00
1a03d63810 hadnling the search artisan 2024-11-05 13:12:40 +01:00
8130bf674a enqueuing theme editor file 2024-11-05 13:12:29 +01:00
2cc6a15c10 handling the write log file 2024-11-05 13:12:13 +01:00
8e9529bddb reordering pictures 2024-11-05 13:11:47 +01:00
34 changed files with 443 additions and 50 deletions

View File

@ -0,0 +1,26 @@
{
"name": "acf/search-artisan-btn",
"title": "Bouton de recherche d'artisan",
"category": "metiers-patrimoine-blocks",
"multiple": false,
"icon": {
"foreground": "#8B2FF7",
"src": "groups"
},
"keywords": [
"artisan",
"bouton",
"rechercher",
"recherche"
],
"supports": {
"align": [
"full"
]
},
"acf": {
"mode": "auto",
"renderTemplate": "search-artisan-btn.php"
},
"align": "full"
}

View File

@ -0,0 +1,14 @@
<?php
// $dates_seminaire = get_field('dates_seminaire_datas');
$searchPageId = 43;
$searchPageTitle = get_the_title($searchPageId);
$searchPageUrl = get_post_permalink($searchPageId);
$searchPageIcon = get_field('page_icon', $searchPageId) ?? null;
?>
<a class="search-artisan-btn" href="<?php echo $searchPageUrl ?>">
<img class="search-artisan-btn__page-icon" src="<?php echo $searchPageIcon['sizes']['medium_large'] ?> " alt="">
<?php echo __("Chercher une entreprise", "metiers-patrimoine-theme") ?>
</a>

View File

@ -2,8 +2,10 @@
require_once(__DIR__ . '/includes/errorlog.php');
require_once(__DIR__ . '/includes/init.php'); require_once(__DIR__ . '/includes/init.php');
require_once(__DIR__ . '/includes/post_types.php'); require_once(__DIR__ . '/includes/post_types.php');
require_once(__DIR__ . '/includes/admin.php'); require_once(__DIR__ . '/includes/admin.php');
require_once(__DIR__ . '/includes/taxonomy.php'); require_once(__DIR__ . '/includes/taxonomy.php');
require_once(__DIR__ . '/includes/api.php'); require_once(__DIR__ . '/includes/api.php');
require_once(__DIR__ . '/includes/blocks.php');

View File

@ -1,6 +1,4 @@
<?php <?php
/* --------------------------- /* ---------------------------
ADMIN STYLES ADMIN STYLES
---------------------------*/ ---------------------------*/

43
includes/blocks.php Normal file
View File

@ -0,0 +1,43 @@
<?php
/**
* Plugin Name: Homegrade Blocks
* Description: Un série de Blocks sur mesure pour l'écriture du contenu Homegrade
* Author: Deligraph
* Text Domain: homegrade-blocks
*/
/* ---------------------------
BLOCK CATEGORY
---------------------------*/
function metiers_patrimoine_add_block_categories($categories)
{
return array_merge(
[
[
'slug' => 'metiers-patrimoine-blocks',
'title' => __('Blocs Métiers du patrimoine ', 'metiers-patrimoine-blocks'),
// the icon is modified in the editor.js adjustement file
],
],
$categories
);
}
add_action('block_categories_all', 'metiers_patrimoine_add_block_categories', 25, 2);
/* ---------------------------
REGISTER BLOCKS
---------------------------*/
function metiers_patrimoine_create_blocks_init()
{
// ACF
// register_block_type(dirname(__DIR__) . '/blocks/btn-search-artisan');
register_block_type(dirname(__DIR__) . '/blocks/search-artisan-btn');
}
add_action('init', 'metiers_patrimoine_create_blocks_init');

19
includes/errorlog.php Normal file
View File

@ -0,0 +1,19 @@
<?php
// #################################
// FUNCTION ERROR LOG
// #################################
// Error log
if (!function_exists('write_log')) {
function write_log($log) {
if (true === WP_DEBUG) {
if (is_array($log) || is_object($log)) {
error_log(print_r($log, true));
} else {
error_log($log);
}
}
}
}

View File

@ -15,9 +15,6 @@ add_action('wp_enqueue_scripts', 'metiers_patrimoine_enqueue_scripts');
/* ----------------------------------------------------------- /* -----------------------------------------------------------
Enqueue Theme assets 🡒 Back Enqueue Theme assets 🡒 Back
-----------------------------------------------------------*/ -----------------------------------------------------------*/
@ -30,6 +27,7 @@ function metiers_patrimoine_enqueue_back_scripts()
$theme = wp_get_theme(); $theme = wp_get_theme();
wp_enqueue_style('metiers-theme-main-css', get_stylesheet_directory_uri() . '/css/app.css', array('homegrade-main-css'), $theme->get('Version')); wp_enqueue_style('metiers-theme-main-css', get_stylesheet_directory_uri() . '/css/app.css', array('homegrade-main-css'), $theme->get('Version'));
wp_enqueue_script('metiers-theme-main-js', get_stylesheet_directory_uri() . '/js/app.js', array(), $theme->get('Version')); wp_enqueue_script('metiers-theme-main-js', get_stylesheet_directory_uri() . '/js/app.js', array(), $theme->get('Version'));
wp_enqueue_script('metiers-theme-editor-js', get_stylesheet_directory_uri() . '/js/editor.js', array(), $theme->get('Version'));
} }
add_action('wp_enqueue_scripts', 'metiers_patrimoine_enqueue_scripts'); add_action('wp_enqueue_scripts', 'metiers_patrimoine_enqueue_scripts');

View File

@ -5,7 +5,6 @@
function metiers_patrimoine_create_posttype() function metiers_patrimoine_create_posttype()
{ {
// **** ARTISANS // **** ARTISANS
register_post_type( register_post_type(
'artisans', 'artisans',
@ -19,13 +18,11 @@ function metiers_patrimoine_create_posttype()
'show_in_rest' => true, 'show_in_rest' => true,
'menu_icon' => 'data:image/svg+xml;base64,' . base64_encode('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" fill="currentColor"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M72 88a56 56 0 1 1 112 0A56 56 0 1 1 72 88zM64 245.7C54 256.9 48 271.8 48 288s6 31.1 16 42.3V245.7zm144.4-49.3C178.7 222.7 160 261.2 160 304c0 34.3 12 65.8 32 90.5V416c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V389.2C26.2 371.2 0 332.7 0 288c0-61.9 50.1-112 112-112h32c24 0 46.2 7.5 64.4 20.3zM448 416V394.5c20-24.7 32-56.2 32-90.5c0-42.8-18.7-81.3-48.4-107.7C449.8 183.5 472 176 496 176h32c61.9 0 112 50.1 112 112c0 44.7-26.2 83.2-64 101.2V416c0 17.7-14.3 32-32 32H480c-17.7 0-32-14.3-32-32zm8-328a56 56 0 1 1 112 0A56 56 0 1 1 456 88zM576 245.7v84.7c10-11.3 16-26.1 16-42.3s-6-31.1-16-42.3zM320 32a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM240 304c0 16.2 6 31 16 42.3V261.7c-10 11.3-16 26.1-16 42.3zm144-42.3v84.7c10-11.3 16-26.1 16-42.3s-6-31.1-16-42.3zM448 304c0 44.7-26.2 83.2-64 101.2V448c0 17.7-14.3 32-32 32H288c-17.7 0-32-14.3-32-32V405.2c-37.8-18-64-56.5-64-101.2c0-61.9 50.1-112 112-112h32c61.9 0 112 50.1 112 112z"/></svg>'), 'menu_icon' => 'data:image/svg+xml;base64,' . base64_encode('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" fill="currentColor"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M72 88a56 56 0 1 1 112 0A56 56 0 1 1 72 88zM64 245.7C54 256.9 48 271.8 48 288s6 31.1 16 42.3V245.7zm144.4-49.3C178.7 222.7 160 261.2 160 304c0 34.3 12 65.8 32 90.5V416c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V389.2C26.2 371.2 0 332.7 0 288c0-61.9 50.1-112 112-112h32c24 0 46.2 7.5 64.4 20.3zM448 416V394.5c20-24.7 32-56.2 32-90.5c0-42.8-18.7-81.3-48.4-107.7C449.8 183.5 472 176 496 176h32c61.9 0 112 50.1 112 112c0 44.7-26.2 83.2-64 101.2V416c0 17.7-14.3 32-32 32H480c-17.7 0-32-14.3-32-32zm8-328a56 56 0 1 1 112 0A56 56 0 1 1 456 88zM576 245.7v84.7c10-11.3 16-26.1 16-42.3s-6-31.1-16-42.3zM320 32a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM240 304c0 16.2 6 31 16 42.3V261.7c-10 11.3-16 26.1-16 42.3zm144-42.3v84.7c10-11.3 16-26.1 16-42.3s-6-31.1-16-42.3zM448 304c0 44.7-26.2 83.2-64 101.2V448c0 17.7-14.3 32-32 32H288c-17.7 0-32-14.3-32-32V405.2c-37.8-18-64-56.5-64-101.2c0-61.9 50.1-112 112-112h32c61.9 0 112 50.1 112 112z"/></svg>'),
// 'menu_icon' => 'dashicons-hammer', // 'menu_icon' => 'dashicons-hammer',
'menu_position' => 5.1, 'menu_position' => 5.1,
'supports' => array('title', 'custom-fields', 'thumbnail'), 'supports' => array('title', 'custom-fields', 'thumbnail'),
) )
); );
// **** VOCABULAIRE // **** CHANTIERS
register_post_type( register_post_type(
'chantiers', 'chantiers',
array( array(

View File

@ -26,10 +26,11 @@
"watch:css-editor": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/editor-style.css -o ./css/editor-style.css --postcss --watch", "watch:css-editor": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/editor-style.css -o ./css/editor-style.css --postcss --watch",
"watch:css-admin": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/admin-style.css -o ./css/admin-style.css --postcss --watch", "watch:css-admin": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/admin-style.css -o ./css/admin-style.css --postcss --watch",
"watch:css-login": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/login-style.css -o ./css/login-style.css --postcss --watch", "watch:css-login": "cross-env NODE_ENV=development tailwindcss -i ./resources/css/login-style.css -o ./css/login-style.css --postcss --watch",
"watch:js-editor": "cross-env NODE_ENV=development ./node_modules/.bin/esbuild ./resources/js/editor.js --bundle --outfile=./js/editor.js --watch --loader:.js=jsx",
"watch:js": "cross-env NODE_ENV=development ./node_modules/.bin/esbuild ./resources/js/app.js --bundle --outfile=./js/app.js --watch", "watch:js": "cross-env NODE_ENV=development ./node_modules/.bin/esbuild ./resources/js/app.js --bundle --outfile=./js/app.js --watch",
"production": "cross-env NODE_ENV=production concurrently \"npm run production:css-app\" \"npm run production:css-editor\" \"npm run production:css-admin\" \"npm run production:css-login\" \"npm run production:js\"", "production": "cross-env NODE_ENV=production concurrently \"npm run production:css-app\" \"npm run production:css-editor\" \"npm run production:css-admin\" \"npm run production:css-login\" \"npm run production:js\"",
"dev": "cross-env NODE_ENV=development concurrently \"npm run dev:css-app\" \"npm run dev:css-admin\" \"npm run dev:css-editor\" \"npm run dev:css-login\" \"npm run dev:js\"", "dev": "cross-env NODE_ENV=development concurrently \"npm run dev:css-app\" \"npm run dev:css-admin\" \"npm run dev:css-editor\" \"npm run dev:css-login\" \"npm run dev:js\"",
"watch": "cross-env NODE_ENV=development concurrently \"npm run watch:css-app\" \"npm run watch:css-editor\" \"npm run watch:css-admin\" \"npm run watch:css-login\" \"npm run watch:js\"", "watch": "cross-env NODE_ENV=development concurrently \"npm run watch:css-app\" \"npm run watch:css-editor\" \"npm run watch:css-admin\" \"npm run watch:css-login\" \"npm run watch:js\" \"npm run watch:js-editor\"",
"browser-sync": "cross-env NODE_ENV=development browser-sync start --proxy \"tailpress.test\" --host=\"tailpress.test\" --no-inject-changes --files=\"./\"", "browser-sync": "cross-env NODE_ENV=development browser-sync start --proxy \"tailpress.test\" --host=\"tailpress.test\" --no-inject-changes --files=\"./\"",
"watch-sync": "cross-env NODE_ENV=development concurrently \"npm run browser-sync\" \"npm run watch\"" "watch-sync": "cross-env NODE_ENV=development concurrently \"npm run browser-sync\" \"npm run watch\""
}, },

View File

@ -16,9 +16,12 @@
@import './pages/repertoire-metiers.css'; @import './pages/repertoire-metiers.css';
@import './pages/single-artisans.css'; @import './pages/single-artisans.css';
/* Components */ /* COMPONENTS */
@import './components/heading-box.css'; @import './components/heading-box.css';
/* BLOCKS */
@import './blocks/search-artisan-btn.css';
/* TEMPLATES */ /* TEMPLATES */
@import '../../template-components/artisans/card-artisans.css'; @import '../../template-components/artisans/card-artisans.css';
@import '../../template-components/artisans/card-taxonomies.css'; @import '../../template-components/artisans/card-taxonomies.css';

View File

@ -0,0 +1,18 @@
.search-artisan-btn {
@apply p-3 w-fit bg-white shadowed text-patrimoine-sante-securite
font-bold rounded-2xl flex items-center justify-center my-5;
transition: transform 0.3s;
&__page-icon {
@apply w-16 h-16;
}
&:after {
@apply content-[''] w-3 h-3 block bg-no-repeat bg-center bg-contain mt-1 ml-4;
background-image: url('../resources/img/pictogrammes/Homegrade_back_icon.svg');
rotate: 180deg;
}
&:hover {
@apply translate-x-2;
}
}

View File

@ -0,0 +1,159 @@
form:not(.metabox-location-side):not(
.metabox-location-normal
):not(
.metabox-location-advanced,
.search-module__search-form
) {
select,
textarea,
input:not([type='submit']):not(
.gform_next_button,
.gform_previous_button,
.search-module__search-form__input
) {
@apply !border-neutral-400 !text-lg !font-semibold !border;
line-height: 1 !important;
&:focus-visible {
outline: solid 1px;
outline-offset: 3px !important;
@apply outline-primary;
}
}
input[type='text'] {
@apply !py-6;
text-indent: 6px !important;
}
input:not(
[type='checkbox'],
[type='submit'],
[type='file'],
[type='radio'],
.gform-theme-button,
.search-module__search-form__input
) {
@apply !rounded-lg py-6;
}
select {
@apply !rounded-lg !h-12 !pt-3 !text-base;
text-indent: 6px !important;
}
input[type='submit'] {
@apply !px-8 !py-3 !border-none !rounded-full !font-bold !text-lg;
&:hover,
&:focus-visible {
@apply !bg-primary;
/* filter: brightness(0.4); */
}
}
input[type='file'] {
@apply !rounded-lg;
}
label:not(.gform-field-label--type-sub):not(
.gform-field-label--type-inline
) {
@apply !font-bold !text-neutral-900 !text-lg;
}
legend {
@apply font-bold !text-neutral-900;
}
label {
@apply !text-neutral-700 !text-base !font-medium;
}
}
legend {
@apply !text-lg;
}
legend.gfield_label + .gfield_description {
@apply !pb-4;
}
.gform_wrapper {
.gform_title {
@apply hidden;
}
.gfield_required_asterisk {
@apply !text-3xl !inline-block;
line-height: 0.5;
transform: translateY(3px) !important;
margin-top: -10px !important;
}
.gform_required_legend {
.gfield_required {
transform: translateY(12px) !important;
}
}
.gfield_description {
@apply !text-neutral-600 !text-sm !font-medium;
}
.gf_page_steps,
.field_description_below {
@apply !border-none;
}
.gf_step_active {
@apply !text-patrimoine-sante-securite !font-semibold;
}
.gform-theme-button {
@apply !rounded-full;
}
.gform_heading {
@apply !pb-8;
}
.gf_progressbar {
@apply !py-0;
}
.gf_progressbar_title {
@apply !pb-3;
}
.gform_previous_button,
.gform_next_button {
@apply !border-none !bg-patrimoine-sante-securite !text-white !font-semibold !text-lg !px-6 !py-3;
}
.gsection_description {
@apply !text-base;
}
.gsection_title {
@apply !text-patrimoine-sante-securite !text-xl !font-bold !mb-0 !mt-4;
}
.gfield_validation_message {
@apply !text-patrimoine-sante-securite !font-semibold;
}
}
.gform_drop_area {
@apply !bg-gray !border-neutral-400;
}
.gform_validation_errors {
@apply !my-6;
}
.gform_confirmation_wrapper {
@apply py-8 rounded-xl;
}
.gform_confirmation_message {
@apply !bg-emerald-50 !text-emerald-700 !text-center !text-lg !font-semibold rounded-lg p-6;
}
.gfield_validation_message {
@apply !text-patrimoine-sante-securite !font-semibold;
}
.gform_heading {
@apply !hidden;
}
#gform_fields_18 {
.publication-list {
@apply mb-10;
}
}
.section_titling + .gform_wrapper {
@apply mt-16;
}
.homegrade-blocks-box-monoblock {
.gform_wrapper {
@apply max-w-5xl !mx-auto;
}
}

View File

@ -9,7 +9,7 @@
} }
.metier-patrimoine-searchbar { .metier-patrimoine-searchbar {
@apply max-w-xs; @apply w-80 lg:w-80 shrink-0;
h4 { h4 {
@apply my-0; @apply my-0;
} }
@ -17,8 +17,18 @@
@apply pl-0; @apply pl-0;
@apply flex flex-wrap; @apply flex flex-wrap;
ul { &__subtaxonomy-list {
@apply pl-4 my-1 w-full; @apply pl-4 my-1 w-full hidden;
}
&:has(> input[type='checkbox']:checked) {
.checkbox-choice__subtaxonomy-list {
@apply block bg-patrimoine-sante-securite-light;
}
}
li {
@apply flex w-auto flex-shrink;
} }
&:before { &:before {
content: none; content: none;
@ -29,7 +39,13 @@
/* @apply inline; */ /* @apply inline; */
} }
label { label {
@apply -translate-y-1 ml-2; @apply -translate-y-1 ml-2 flex;
}
> label {
max-width: 80%;
}
input[type='checkbox'] {
@apply shrink-0;
} }
input[type='checkbox']:before { input[type='checkbox']:before {
box-shadow: inset 1em 1em #8b2ff7; box-shadow: inset 1em 1em #8b2ff7;
@ -64,26 +80,31 @@
width: 36px; width: 36px;
} }
label[for='building_elements']:before { label[for='building_elements']:before {
background-image: url('../resources/img/Homegrade_repertoire-elements.svg'); background-image: url('../resources/img/pictogrammes/Homegrade_repertoire-elements.svg');
} }
label[for='job_types']:before { label[for='job_types']:before {
background-image: url('../resources/img/Homegrade_repertoire-metiers.svg'); background-image: url('../resources/img/pictogrammes/Homegrade_repertoire-metiers.svg');
} }
} }
} }
&__geographic-filters,
&__elements-batiments-filters, &__elements-batiments-filters,
&__metiers-filters { &__metiers-filters {
@apply border border-neutral-300 p-4 rounded-3xl my-4; @apply border border-neutral-300 p-4 rounded-3xl my-4 w-full;
}
&__elements-batiments-filters,
&__metiers-filters {
@apply hidden;
} }
/* HIDE METIERS FILTERS WHEN SEARCH IS ON ELEMENTS BATIMENTS */ /* HIDE METIERS FILTERS WHEN SEARCH IS ON ELEMENTS BATIMENTS */
&:has( &:has(
.metier-patrimoine-searchbar__search-by .metier-patrimoine-searchbar__search-by
#elements_batiments_checkbox:checked #elements_batiments_checkbox:checked
) { ) {
.metier-patrimoine-searchbar__metiers-filters { .metier-patrimoine-searchbar__elements-batiments-filters {
/* @apply hidden; */ @apply block;
@apply opacity-40; /* @apply opacity-40; */
} }
} }
@ -93,9 +114,9 @@
.metier-patrimoine-searchbar__search-by .metier-patrimoine-searchbar__search-by
#metiers_checkbox:checked #metiers_checkbox:checked
) { ) {
.metier-patrimoine-searchbar__elements-batiments-filters { .metier-patrimoine-searchbar__metiers-filters {
/* @apply hidden; */ @apply block;
@apply opacity-40; /* @apply opacity-40; */
} }
} }
} }

View File

@ -12,7 +12,7 @@
transition: margin 0.3s ease; transition: margin 0.3s ease;
@apply content-[''] inline-flex h-3 w-3 @apply content-[''] inline-flex h-3 w-3
bg-contain bg-center mr-3 bg-no-repeat; bg-contain bg-center mr-3 bg-no-repeat;
background-image: url('../resources/img/Homegrade_back_icon.svg'); background-image: url('../resources/img/pictogrammes/Homegrade_back_icon.svg');
} }
&:hover { &:hover {
@apply !text-patrimoine-sante-securite; @apply !text-patrimoine-sante-securite;
@ -68,10 +68,10 @@
} }
} }
&__city:before { &__city:before {
background-image: url('../resources/img/Homegrade_repertoire-adresse.svg'); background-image: url('../resources/img/pictogrammes/Homegrade_repertoire-adresse.svg');
} }
&__date:before { &__date:before {
background-image: url('../resources/img/Homegrade_repertoire-date-chantier.svg'); background-image: url('../resources/img/pictogrammes/Homegrade_repertoire-date-chantier.svg');
} }
&__title { &__title {
@apply text-2xl font-bold !my-0 text-patrimoine-sante-securite; @apply text-2xl font-bold !my-0 text-patrimoine-sante-securite;

View File

Before

Width:  |  Height:  |  Size: 342 B

After

Width:  |  Height:  |  Size: 342 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 843 B

After

Width:  |  Height:  |  Size: 843 B

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="repertoire-fax" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 44.54 51.9">
<defs>
<style>
.cls-1 {
fill: url(#Dégradé_sans_nom_103);
}
.cls-2 {
fill: none;
stroke: #000;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 1.96px;
}
</style>
<linearGradient id="Dégradé_sans_nom_103" data-name="Dégradé sans nom 103" x1="10.48" y1="45.36" x2="34.06" y2="45.36" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#8b2ff7"/>
<stop offset="1" stop-color="#eb79ff"/>
</linearGradient>
</defs>
<rect class="cls-2" x=".98" y="16.08" width="42.58" height="28.64" rx="5.48" ry="5.48"/>
<path class="cls-2" d="M12.78.98h18.99c1.27,0,2.3,1.03,2.3,2.3v12.52H10.48V3.28c0-1.27,1.03-2.3,2.3-2.3Z"/>
<path class="cls-1" d="M10.48,38.83h23.59v10.3c0,1.53-1.24,2.77-2.77,2.77H13.25c-1.53,0-2.77-1.24-2.77-2.77v-10.3h0Z"/>
<line class="cls-2" x1="14.89" y1="6.39" x2="29.36" y2="6.39"/>
<line class="cls-2" x1="14.89" y1="11.4" x2="23.35" y2="11.4"/>
<line class="cls-2" x1=".98" y1="31.61" x2="43.56" y2="31.61"/>
<line class="cls-2" x1="30.52" y1="23.31" x2="38.38" y2="23.31"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 989 B

After

Width:  |  Height:  |  Size: 989 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,5 +1,4 @@
import dynamicSearchInit from './dynamicSearch'; import dynamicSearchInit from './dynamicSearch';
window.addEventListener('DOMContentLoaded', (event) => { window.addEventListener('DOMContentLoaded', (event) => {
dynamicSearchInit(); dynamicSearchInit();
}); });

View File

@ -53,6 +53,9 @@ export default function dynamicSearch() {
'.metier-patrimoine-searchform' '.metier-patrimoine-searchform'
); );
if (!form) {
return;
}
form.addEventListener('change', (e) => { form.addEventListener('change', (e) => {
e.preventDefault(); e.preventDefault();

24
resources/js/editor.js Normal file
View File

@ -0,0 +1,24 @@
export default function editorInit() {
categoriesInit();
}
function categoriesInit() {
wp.blocks.updateCategory('metiers-patrimoine-blocks', {
icon: (
<svg
width="48"
height="59"
viewBox="0 0 48 59"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M47.138 22.741L25.18 0.519C25.0197 0.355198 24.8284 0.224948 24.6172 0.135843C24.406 0.0467371 24.1792 0.000559018 23.95 1.09595e-07C23.4886 -0.000163339 23.046 0.182502 22.719 0.508L0.508003 22.73C0.34656 22.8917 0.218592 23.0837 0.131423 23.2949C0.0442547 23.5061 -0.000404165 23.7325 2.75595e-06 23.961V45.554C2.75595e-06 46.0149 0.183113 46.457 0.509051 46.783C0.834989 47.1089 1.27706 47.292 1.738 47.292H10.832V56.386C10.832 56.8469 11.0151 57.289 11.3411 57.615C11.667 57.9409 12.1091 58.124 12.57 58.124H45.9C46.361 58.124 46.803 57.9409 47.129 57.615C47.4549 57.289 47.638 56.8469 47.638 56.386V23.961C47.6392 23.5042 47.4595 23.0655 47.138 22.741ZM44.147 54.632H14.309V30.174L23.817 20.66L33.27 30.141V38.027C33.27 38.4881 33.4532 38.9303 33.7792 39.2563C34.1052 39.5823 34.5474 39.7655 35.0085 39.7655C35.4696 39.7655 35.9118 39.5823 36.2378 39.2563C36.5638 38.9303 36.747 38.4881 36.747 38.027V29.427C36.7471 28.9676 36.5647 28.527 36.24 28.202L25.048 16.974C24.7223 16.6496 24.2827 16.4655 23.823 16.461C23.3609 16.4622 22.9182 16.6467 22.592 16.974L11.34 28.226C11.015 28.5508 10.8322 28.9915 10.832 29.451V43.8H3.477V24.678L23.939 4.2L44.147 24.673V54.632Z"
fill="#8B2FF7"
/>
</svg>
),
});
}
window.addEventListener('DOMContentLoaded', editorInit);

View File

@ -116,7 +116,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
?> ?>
<?php foreach ($company_members as $member): ?> <?php foreach ($company_members as $member): ?>
<div class="artisan-member"> <div class="artisan-member">
<img class="artisan-member__icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/Homegrade_repertoire-equipe.svg' ?>" alt=""> <img class="artisan-member__icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/pictogrammes/Homegrade_repertoire-equipe.svg' ?>" alt="">
<h3 class="artisan-member__name"><?php echo $member['first_name'] . ' ' . $member['last_name'] ?></h3> <h3 class="artisan-member__name"><?php echo $member['first_name'] . ' ' . $member['last_name'] ?></h3>
</div> </div>
<p class="artisan-member__description"><?php echo $member['description'] ?></p> <p class="artisan-member__description"><?php echo $member['description'] ?></p>
@ -191,7 +191,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
$prevPost = get_previous_post(); $prevPost = get_previous_post();
$nextPost = get_next_post(); $nextPost = get_next_post();
// echo $prev_post->post_title; // echo $prev_post->post_title;
write_log($nextPost); // write_log($nextPost);
echo '<pre>'; echo '<pre>';
print_r($prevPost); print_r($prevPost);

View File

@ -51,8 +51,9 @@ $adresse = get_field('adresse', $postID);
<?php if ($email): ?> <?php if ($email): ?>
<a class="card-artisans__email" href="mailto:<?php echo $email ?>"><?php echo $email ?></a> <a class="card-artisans__email" href="mailto:<?php echo $email ?>"><?php echo $email ?></a>
<?php endif; ?> <?php endif; ?>
<?php if ($website): ?> <?php $clean_website = str_replace(array('http://', 'https://'), '', $website); ?>
<?php $clean_website = str_replace(array('http://', 'https://'), '', $website); ?> <?php if ($website && !empty($clean_website)): ?>
<a class="card-artisans__website" href="<?php echo $website ?>"><?php echo $clean_website ?></a> <a class="card-artisans__website" href="<?php echo $website ?>"><?php echo $clean_website ?></a>
<?php endif; ?> <?php endif; ?>
<a href=" <?php echo get_the_permalink($postID) ?>" class="cta cta--read-more cta--with-arrow-button "> <a href=" <?php echo get_the_permalink($postID) ?>" class="cta cta--read-more cta--with-arrow-button ">

View File

@ -6,7 +6,9 @@ $post_title = $args['post_title'];
$company_members = get_field('company_members', $postID); $company_members = get_field('company_members', $postID);
$phoneNumber = get_field('phone_number', $postID); $phoneNumber = get_field('phone_number', $postID);
$faxNumber = get_field('fax_number', $postID);
$formattedPhoneNumber = preg_replace('/^(\+\d{2})(\d{3})(\d{2})(\d{2})(\d{2})$/', '$1 $2 $3 $4 $5', $phoneNumber); $formattedPhoneNumber = preg_replace('/^(\+\d{2})(\d{3})(\d{2})(\d{2})(\d{2})$/', '$1 $2 $3 $4 $5', $phoneNumber);
$formattedFaxNumber = preg_replace('/^(\+\d{2})(\d{3})(\d{2})(\d{2})(\d{2})$/', '$1 $2 $3 $4 $5', $faxNumber);
$email = get_field('email', $postID); $email = get_field('email', $postID);
$website = get_field('website', $postID); $website = get_field('website', $postID);
@ -38,10 +40,14 @@ $adresse = get_field('adresse', $postID);
<?php if ($phoneNumber): ?> <?php if ($phoneNumber): ?>
<a class="card-artisans__phone" href="tel:<?php echo $phoneNumber ?>"><?php echo $formattedPhoneNumber ?></a> <a class="card-artisans__phone" href="tel:<?php echo $phoneNumber ?>"><?php echo $formattedPhoneNumber ?></a>
<?php endif; ?> <?php endif; ?>
<?php if ($faxNumber): ?>
<a class="card-artisans__fax" href="tel:<?php echo $faxNumber ?>"><?php echo $formattedFaxNumber ?></a>
<?php endif; ?>
<?php if ($email): ?> <?php if ($email): ?>
<a class="card-artisans__email" href="mailto:<?php echo $email ?>"><?php echo $email ?></a> <a class="card-artisans__email" href="mailto:<?php echo $email ?>"><?php echo $email ?></a>
<?php endif; ?> <?php endif; ?>
<?php if ($website): ?> <?php $clean_website = str_replace(array('http://', 'https://'), '', $website); ?>
<?php if ($website && !empty($clean_website)): ?>
<?php $clean_website = str_replace(array('http://', 'https://'), '', $website); ?> <?php $clean_website = str_replace(array('http://', 'https://'), '', $website); ?>
<a class="card-artisans__website" href="<?php echo $website ?>"><?php echo $clean_website ?></a> <a class="card-artisans__website" href="<?php echo $website ?>"><?php echo $clean_website ?></a>
<?php endif; ?> <?php endif; ?>

View File

@ -24,7 +24,7 @@
&:before { &:before {
@apply inline-flex mr-3 h-6 w-6 bg-center bg-contain bg-no-repeat; @apply inline-flex mr-3 h-6 w-6 bg-center bg-contain bg-no-repeat;
content: ''; content: '';
background-image: url('../resources/img/Homegrade_repertoire-adresse.svg'); background-image: url('../resources/img/pictogrammes/Homegrade_repertoire-adresse.svg');
} }
} }
&__phone { &__phone {
@ -32,7 +32,15 @@
&:before { &:before {
@apply inline-flex mr-3 h-6 w-6 bg-center bg-contain bg-no-repeat; @apply inline-flex mr-3 h-6 w-6 bg-center bg-contain bg-no-repeat;
content: ''; content: '';
background-image: url('../resources/img/Homegrade_repertoire-telephone.svg'); background-image: url('../resources/img/pictogrammes/Homegrade_repertoire-telephone.svg');
}
}
&__fax {
@apply font-semibold underline-offset-4 inline-flex w-full;
&:before {
@apply inline-flex mr-3 h-6 w-6 bg-center bg-contain bg-no-repeat;
content: '';
background-image: url('../resources/img/pictogrammes/Homegrade_repertoire-fax.svg');
} }
} }
&__email { &__email {
@ -40,15 +48,16 @@
&:before { &:before {
@apply inline-flex mr-3 h-6 w-6 bg-center bg-contain bg-no-repeat; @apply inline-flex mr-3 h-6 w-6 bg-center bg-contain bg-no-repeat;
content: ''; content: '';
background-image: url('../resources/img/Homegrade_repertoire-mail.svg'); background-image: url('../resources/img/pictogrammes/Homegrade_repertoire-mail.svg');
} }
} }
&__website { &__website {
@apply text-primary underline font-semibold underline-offset-4 inline-flex w-full; @apply text-primary underline font-semibold underline-offset-4 inline-flex w-full;
&:before { &:before {
@apply inline-flex mr-3 h-6 w-6 bg-center bg-contain bg-no-repeat; @apply inline-flex mr-3 h-6 w-6 bg-center bg-contain bg-no-repeat;
content: ''; content: '';
background-image: url('../resources/img/Homegrade_repertoire-site.svg'); background-image: url('../resources/img/pictogrammes/Homegrade_repertoire-site.svg');
} }
} }

View File

@ -18,7 +18,7 @@ $metiersTerms = get_the_terms($postID, 'metiers');
<div class="card-taxonomies__taxo-container card-taxonomies__taxo-elementsbatiments"> <div class="card-taxonomies__taxo-container card-taxonomies__taxo-elementsbatiments">
<div class="card-taxonomies__titling"> <div class="card-taxonomies__titling">
<img class="card-taxonomies__icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/Homegrade_repertoire-elements.svg' ?>" alt=''> <img class="card-taxonomies__icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/pictogrammes/Homegrade_repertoire-elements.svg' ?>" alt=''>
<h4 class="card-taxonomies__title"><?php echo __("Éléments du bâtiment", "metiers-patrimoine-theme") ?></h4> <h4 class="card-taxonomies__title"><?php echo __("Éléments du bâtiment", "metiers-patrimoine-theme") ?></h4>
</div> </div>
<div class="taxonomy-tags card-taxonomies__taxonomy-tags"> <div class="taxonomy-tags card-taxonomies__taxonomy-tags">
@ -31,7 +31,7 @@ $metiersTerms = get_the_terms($postID, 'metiers');
<?php if ($metiersTerms): ?> <?php if ($metiersTerms): ?>
<div class="card-taxonomies__taxo-container card-taxonomies__taxo-metiers"> <div class="card-taxonomies__taxo-container card-taxonomies__taxo-metiers">
<div class="card-taxonomies__titling"> <div class="card-taxonomies__titling">
<img class="card-taxonomies__icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/Homegrade_repertoire-metiers.svg' ?>" alt=''> <img class="card-taxonomies__icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/pictogrammes/Homegrade_repertoire-metiers.svg' ?>" alt=''>
<h4 class="card-taxonomies__title"><?php echo __("Métiers du partrimoine", "metiers-patrimoine-theme") ?></h4> <h4 class="card-taxonomies__title"><?php echo __("Métiers du partrimoine", "metiers-patrimoine-theme") ?></h4>
</div> </div>
<div class="taxonomy-tags card-taxonomies__taxonomy-tags"> <div class="taxonomy-tags card-taxonomies__taxonomy-tags">

View File

@ -66,7 +66,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
<div class="search-radio-card"> <div class="search-radio-card">
<label for="building_elements"><?php echo __("Éléments du bâtiment", "metiers-patrimoine-theme") ?></label> <label for="building_elements"><?php echo __("Éléments du bâtiment", "metiers-patrimoine-theme") ?></label>
<input type="radio" id="elements_batiments_checkbox" name="search_by" value="elementsbatiments" checked /> <input type="radio" id="elements_batiments_checkbox" name="search_by" value="elementsbatiments" />
</div> </div>
<div class="search-radio-card"> <div class="search-radio-card">
@ -77,7 +77,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
<fieldset class="metier-patrimoine-searchbar__elements-batiments-filters"> <fieldset class="metier-patrimoine-searchbar__elements-batiments-filters">
<div class="fieldset-titling"> <div class="fieldset-titling">
<img class="fieldset-icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/Homegrade_repertoire-metiers.svg' ?>" alt=''> <img class="fieldset-icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/pictogrammes/Homegrade_repertoire-metiers.svg' ?>" alt=''>
<h4 class="filter-title">Éléments du bâtiment</h4> <h4 class="filter-title">Éléments du bâtiment</h4>
</div> </div>
<ul> <ul>
@ -107,9 +107,6 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
} }
} }
// Vérifier que l'organisation est correcte
// write_log($terms_by_parent); // Permet de déboguer l'organisation des termes
// Afficher les termes parents et leurs enfants // Afficher les termes parents et leurs enfants
foreach ($terms_by_parent as $parent_term_data) : foreach ($terms_by_parent as $parent_term_data) :
$parent_term = $parent_term_data['term']; $parent_term = $parent_term_data['term'];
@ -121,11 +118,11 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
</label> </label>
<?php if (!empty($parent_term_data['children'])) : ?> <?php if (!empty($parent_term_data['children'])) : ?>
<ul> <ul class="checkbox-choice__subtaxonomy-list">
<?php foreach ($parent_term_data['children'] as $child_term) : ?> <?php foreach ($parent_term_data['children'] as $child_term) : ?>
<li class="checkbox-choice"> <li class="checkbox-choice">
<input type="checkbox" name="elementsbatiments[]" value="<?php echo esc_attr($child_term->term_id); ?>" data-term="<?php echo esc_attr($child_term->slug); ?>">
<label> <label>
<input type="checkbox" name="elementsbatiments[]" value="<?php echo esc_attr($child_term->term_id); ?>" data-term="<?php echo esc_attr($child_term->slug); ?>">
<?php echo esc_html($child_term->name); ?> <?php echo esc_html($child_term->name); ?>
</label> </label>
</li> </li>
@ -142,7 +139,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
<fieldset class="metier-patrimoine-searchbar__metiers-filters"> <fieldset class="metier-patrimoine-searchbar__metiers-filters">
<div class="fieldset-titling"> <div class="fieldset-titling">
<img class="fieldset-icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/Homegrade_repertoire-elements.svg' ?>" alt=''> <img class="fieldset-icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/pictogrammes/Homegrade_repertoire-elements.svg' ?>" alt=''>
<h4 class="filter-title">Métiers</h4> <h4 class="filter-title">Métiers</h4>
</div> </div>
@ -194,7 +191,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
<!-- Afficher les enfants sous forme de checkboxes --> <!-- Afficher les enfants sous forme de checkboxes -->
<?php if (!empty($parent_term_data['children'])) : ?> <?php if (!empty($parent_term_data['children'])) : ?>
<ul> <ul class="checkbox-choice__subtaxonomy-list">
<?php foreach ($parent_term_data['children'] as $child_term) : ?> <?php foreach ($parent_term_data['children'] as $child_term) : ?>
<li class="checkbox-choice"> <li class="checkbox-choice">
@ -213,6 +210,33 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
</fieldset> </fieldset>
<fieldset class="metier-patrimoine-searchbar__geographic-filters">
<div class="fieldset-titling">
<img class="fieldset-icon" src="<?php echo get_stylesheet_directory_uri() . '/resources/img/pictogrammes/Homegrade_repertoire-elements.svg' ?>" alt=''>
<h4 class="filter-title"><?php echo __("Localisation", "metiers-patrimoine-theme") ?></h4>
</div>
<ul>
<li class="checkbox-choice">
<input type="checkbox" name="localisation[]" value="all">
<label> <?php echo __("Toute la Belgique", "metiers-patrimoine-theme") ?></label>
</li>
<li class="checkbox-choice">
<input type="checkbox" name="localisation[]" value="wallonie">
<label> <?php echo __("Wallonie", "metiers-patrimoine-theme") ?></label>
</li>
<li class="checkbox-choice">
<input type="checkbox" name="localisation[]" value="bruxelles">
<label> <?php echo __("Bruxelles", "metiers-patrimoine-theme") ?></label>
</li>
<li class="checkbox-choice">
<input type="checkbox" name="localisation[]" value="flandre">
<label> <?php echo __("Flandre", "metiers-patrimoine-theme") ?></label>
</li>
</ul>
</fieldset>
<!-- <button type="submit">submit</button> --> <!-- <button type="submit">submit</button> -->
@ -250,8 +274,6 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
?> ?>
</div> </div>
</section> </section>