Compare commits

..

3 Commits

Author SHA1 Message Date
Antoine M
887aed22ab FIX color drilling
All checks were successful
continuous-integration/drone/push Build is passing
2026-04-10 10:14:33 +02:00
Antoine M
a8142549e7 FEATURE Passing link toi title when no table des matieres 2026-04-10 10:14:16 +02:00
Antoine M
c7c4781cb3 FEATURE Register post type fonds archives 2026-04-10 10:12:55 +02:00
12 changed files with 66 additions and 31 deletions

View File

@ -13,7 +13,6 @@
--------------------------------------------------*/
function carhop_create_posttype()
{
$current_site = get_current_blog_id();
if ($current_site !== 1) return;
@ -109,6 +108,28 @@ function carhop_create_posttype()
'supports' => array('title', 'revisions', 'editor', 'thumbnail'),
)
);
// -------Fonds d'archives------- //
register_post_type(
'fonds-archives',
// CPT Options
array(
'labels' => array(
'name' => __('Inventaires'),
'singular_name' => __('Inventaire'),
'menu_name' => 'Fonds d\'archives',
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'fonds-archives'),
'show_in_rest' => true,
'menu_icon' => 'data:image/svg+xml;base64,' . base64_encode('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.513 2.69841H17.4805C17.2208 2.69841 16.9935 2.92064 16.9935 3.1746V14.9524C16.9935 15.4603 16.5714 15.873 16.0519 15.873H10.4026V15.0794C10.4026 14.8254 10.1753 14.6032 9.91558 14.6032H7.31818C7.18831 14.6032 7.05844 14.6667 6.96104 14.7302C6.86364 14.7937 6.83117 14.9524 6.83117 15.0794V15.873H4.91558C4.46104 15.873 4.07143 15.619 3.94156 15.1746C3.94156 14.9841 3.94156 14.7619 4.1039 14.6032C4.3961 14.3175 4.78571 14.1587 5.20779 14.1587H14.8506C15.7273 14.1587 16.4091 13.4603 16.4091 12.6349V2.06349C16.4091 0.920635 15.4675 0 14.2987 0H5.11039C3.94156 0 3 0.920635 3 2.06349V15.3651C3.22727 16.2222 4.00649 16.8571 4.94805 16.8254H6.86364V19.5238C6.86364 19.7143 6.99351 19.873 7.15584 19.9683C7.35065 20.0317 7.54545 19.9683 7.67532 19.873L8.64935 18.9841L9.62338 19.873C9.72078 19.9683 9.85065 20 9.94805 20H10.1429C10.3377 19.9365 10.4351 19.746 10.4351 19.5556V16.8571H16.0844C17.1558 16.8571 18 16.0317 18 14.9841V3.1746C18 2.92064 17.7727 2.69841 17.513 2.69841ZM10.1104 10.5079C10.1104 10.7619 9.88312 10.9841 9.62338 10.9841C9.36364 10.9841 9.13636 10.7619 9.13636 10.5079V5.77778C9.13636 5.52381 9.36364 5.30159 9.62338 5.30159C9.88312 5.30159 10.1104 5.52381 10.1104 5.77778V10.5079ZM9.59091 3.1746H9.62338C9.91558 3.1746 10.1429 3.36508 10.2403 3.61905C10.3377 3.87302 10.2403 4.15873 10.0779 4.34921C9.91558 4.53968 9.59091 4.60317 9.33117 4.47619C9.07143 4.38095 8.90909 4.12698 8.90909 3.84127C8.90909 3.55556 9.23377 3.1746 9.59091 3.1746Z" fill="#9BA2A9"/></svg>'),
'menu_position' => 4,
'supports' => array('title', 'revisions', 'thumbnail'),
)
);
register_post_type(
'recherches',
// CPT Options

View File

@ -2,6 +2,7 @@
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/editor.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-cta a {
color: var(--cta-current-color) !important;
padding-bottom: 0 !important;
margin-bottom: 0 !important;
}

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => 'b611b7ff4b53bdf52fa8');
<?php return array('dependencies' => array('react', 'react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n'), 'version' => '0a613ff07e9924c64d7e');

View File

@ -2,6 +2,7 @@
!*** css ./node_modules/.pnpm/css-loader@6.11.0_webpack@5.103.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/.pnpm/postcss-loader@6.2.1_postcss@8.5.6_webpack@5.103.0/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/.pnpm/sass-loader@16.0.6_sass@1.94.1_webpack@5.103.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/cta/editor.scss ***!
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.wp-block-carhop-blocks-cta a {
color: var(--cta-current-color) !important;
padding-bottom: 0 !important;
margin-bottom: 0 !important;
}

View File

@ -1 +1 @@
{"version":3,"file":"cta/index.css","mappings":";;;AAEC;EAGC;EACA;AAHF;AAHA;EAQC;EAEA;EAAA;EACA;EACA;EACA;EACA;AAHD;AAME;EACC;EACA;AAJH;AAME;;EAEC;AAJH;AASC;EACC;AAPF;AASC;EACC;EACA;AAPF;AASC;EACC;AAPF,C","sources":["webpack://carhop-blocks/./src/cta/editor.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\t// color: var(--cta-current-color);\n\ta {\n\t\t// color: var(--cta-current-color) !important;\n\n\t\tpadding-bottom: 0 !important;\n\t\tmargin-bottom: 0 !important;\n\t}\n\tpadding: 2px;\n\n\twidth: fit-content;\n\tdisplay: flex !important;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tstroke: currentColor;\n\t\t\t// stroke: var(--cta-current-color);\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}
{"version":3,"file":"cta/index.css","mappings":";;;AAEC;EACC;EACA;EACA;AADF;AAJA;EAOC;EAEA;EAAA;EACA;EACA;EACA;EACA;AADD;AAIE;EACC;EACA;AAFH;AAIE;;EAEC;AAFH;AAOC;EACC;AALF;AAOC;EACC;EACA;AALF;AAOC;EACC;AALF,C","sources":["webpack://carhop-blocks/./src/cta/editor.scss"],"sourcesContent":[".wp-block-carhop-blocks-cta {\n\t// color: var(--cta-current-color);\n\ta {\n\t\tcolor: var(--cta-current-color) !important;\n\t\tpadding-bottom: 0 !important;\n\t\tmargin-bottom: 0 !important;\n\t}\n\tpadding: 2px;\n\n\twidth: fit-content;\n\tdisplay: flex !important;\n\talign-items: center;\n\tgap: 10px;\n\tline-height: normal;\n\n\t.icon {\n\t\tsvg {\n\t\t\twidth: 30px;\n\t\t\theight: 30px;\n\t\t}\n\t\tsvg path,\n\t\tsvg circle {\n\t\t\tstroke: currentColor;\n\t\t\t// stroke: var(--cta-current-color);\n\t\t}\n\t}\n\n\t&.align--left {\n\t\tmargin-left: 0;\n\t}\n\t&.align--right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\t&.align--center {\n\t\tmargin: 0 auto;\n\t}\n}\n"],"names":[],"ignoreList":[],"sourceRoot":""}

View File

@ -1,8 +1,7 @@
.wp-block-carhop-blocks-cta {
// color: var(--cta-current-color);
a {
// color: var(--cta-current-color) !important;
color: var(--cta-current-color) !important;
padding-bottom: 0 !important;
margin-bottom: 0 !important;
}

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-server-side-render'), 'version' => '79dc145297e0d0e5c73e');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-i18n', 'wp-server-side-render'), 'version' => '3acd866405152b084d09');

View File

@ -61,7 +61,11 @@ function Edit({
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_0__.__)("Paramètres", "dernieres-dynamiques"),
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControl, {
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CheckboxControl, {
label: "Afficher la table des mati\xE8res",
checked: showTableOfContents,
onChange: onShowTableOfContentsChange
}), showTableOfContents && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalToggleGroupControl, {
className: "homegrade-blocks-highlight__variant",
isBlock: true,
label: "Type d'affichage des posts",
@ -74,10 +78,6 @@ function Edit({
label: "Grille",
value: "grid"
})]
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CheckboxControl, {
label: "Afficher la table des mati\xE8res",
checked: showTableOfContents,
onChange: onShowTableOfContentsChange
})]
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx)("div", {

File diff suppressed because one or more lines are too long

View File

@ -59,10 +59,15 @@ $issue_related_articles = get_field('articles', $last_issue->ID);
<div class="block-dernieres-dynamiques__issue-content-wrapper">
<div class="block-dernieres-dynamiques__issue-content">
<?php if ($showTableOfContents) : ?>
<h3 class="block-dernieres-dynamiques__issue-title">
<?php echo $last_issue->post_title; ?>
</h3>
<?php else : ?>
<h3 class="block-dernieres-dynamiques__issue-title">
<a href="<?php echo get_the_permalink($last_issue->ID); ?>"><?php echo $last_issue->post_title; ?></a>
</h3>
<?php endif; ?>
<div class="block-dernieres-dynamiques__issue-parution">
<h4 class="block-dernieres-dynamiques__issue-date title">Parution</h4>
<p class="block-dernieres-dynamiques__issue-date-number">

View File

@ -25,6 +25,13 @@ export default function Edit({ attributes, setAttributes }) {
<>
<InspectorControls>
<PanelBody title={__("Paramètres", "dernieres-dynamiques")}>
<CheckboxControl
label="Afficher la table des matières"
checked={showTableOfContents}
onChange={onShowTableOfContentsChange}
/>
{showTableOfContents && (
<ToggleGroupControl
className="homegrade-blocks-highlight__variant"
isBlock
@ -35,11 +42,7 @@ export default function Edit({ attributes, setAttributes }) {
<ToggleGroupControlOption label="Slider" value="slider" />
<ToggleGroupControlOption label="Grille" value="grid" />
</ToggleGroupControl>
<CheckboxControl
label="Afficher la table des matières"
checked={showTableOfContents}
onChange={onShowTableOfContentsChange}
/>
)}
</PanelBody>
</InspectorControls>
<div {...useBlockProps({ className: "alignfull" })}>

View File

@ -59,10 +59,15 @@ $issue_related_articles = get_field('articles', $last_issue->ID);
<div class="block-dernieres-dynamiques__issue-content-wrapper">
<div class="block-dernieres-dynamiques__issue-content">
<?php if ($showTableOfContents) : ?>
<h3 class="block-dernieres-dynamiques__issue-title">
<?php echo $last_issue->post_title; ?>
</h3>
<?php else : ?>
<h3 class="block-dernieres-dynamiques__issue-title">
<a href="<?php echo get_the_permalink($last_issue->ID); ?>"><?php echo $last_issue->post_title; ?></a>
</h3>
<?php endif; ?>
<div class="block-dernieres-dynamiques__issue-parution">
<h4 class="block-dernieres-dynamiques__issue-date title">Parution</h4>
<p class="block-dernieres-dynamiques__issue-date-number">