Compare commits

...

9 Commits

Author SHA1 Message Date
fa7ed5355d removing unecessary lineskips
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-22 09:47:02 +01:00
3553e7add4 introducing logo purple version 2024-11-22 09:46:46 +01:00
943c345375 one liner for search results 2024-11-22 09:46:37 +01:00
3ad7f51b2e styling draft status 2024-11-22 09:46:24 +01:00
fd94a1e3a4 styling login 2024-11-22 09:46:13 +01:00
0117693fcc custom status style for en-attente 2024-11-21 15:36:41 +01:00
3837ee8f18 locking to read only for old websites datas 2024-11-21 15:36:23 +01:00
67cc7b3696 no comments 2024-11-21 15:36:06 +01:00
59ce40b458 no comments 2024-11-21 15:35:39 +01:00
11 changed files with 159 additions and 5 deletions

View File

@ -11,3 +11,4 @@ require_once(__DIR__ . '/includes/taxonomy.php');
require_once(__DIR__ . '/includes/api.php'); require_once(__DIR__ . '/includes/api.php');
require_once(__DIR__ . '/includes/blocks.php'); require_once(__DIR__ . '/includes/blocks.php');
require_once(__DIR__ . '/includes/utilities.php'); require_once(__DIR__ . '/includes/utilities.php');
require_once(__DIR__ . '/includes/acf-fields.php');

17
includes/acf-fields.php Normal file
View File

@ -0,0 +1,17 @@
<?php
function acf_read_only_fields_in_group($field)
{
// READ ONLY FOR OLD WEBSITES DATA IN ARTISANS & CHANTIERS
$target_groups = ['group_672358433051b', 'group_673610d8e548a'];
$parent_id = $field['parent']; // ID du groupe parent
$parent_group = get_post($parent_id);
if (in_array($parent_group->post_name, $target_groups)) {
$field['readonly'] = 1;
$field['disabled'] = true;
}
return $field;
}
add_filter('acf/load_field', 'acf_read_only_fields_in_group');

View File

@ -10,3 +10,20 @@ function metiers_du_patrimoine_custom_admin_stylesheet()
} }
add_action('admin_head', 'metiers_du_patrimoine_custom_admin_stylesheet'); add_action('admin_head', 'metiers_du_patrimoine_custom_admin_stylesheet');
/* ---------------------------
COMMENTS REMOVAL
---------------------------*/
function metiers_remove_meta_boxes()
{
# Removes meta from Posts #
// remove_meta_box('postexcerpt', 'post', 'normal');
// remove_meta_box('postcustom', 'post', 'normal');
// remove_meta_box('trackbacksdiv', 'post', 'normal');
remove_meta_box('commentstatusdiv', 'page', 'normal');
remove_meta_box('commentsdiv', 'page', 'normal');
remove_post_type_support('artisans', 'comments');
remove_post_type_support('chantiers', 'comments');
}
add_action('admin_init', 'metiers_remove_meta_boxes');

View File

@ -118,7 +118,6 @@ function debugQueryTest()
'field' => 'term_id' 'field' => 'term_id'
); );
$metaQuery = array( $metaQuery = array(
array( array(
'key' => 'state', 'key' => 'state',
@ -127,7 +126,6 @@ function debugQueryTest()
) )
); );
$args = array( $args = array(
"status" => "publish", "status" => "publish",
"post_type" => "artisans", "post_type" => "artisans",

View File

@ -38,6 +38,7 @@ function metiers_patrimoine_create_posttype()
'menu_position' => 5.1, 'menu_position' => 5.1,
'supports' => array('title', 'custom-fields', 'thumbnail', 'author', 'revisions'), 'supports' => array('title', 'custom-fields', 'thumbnail', 'author', 'revisions'),
'comment_status' => 'closed',
) )
); );
} }

View File

@ -5,6 +5,43 @@ body.post-type-artisans {
} }
} }
.iedit.type-artisans.status-pending.hentry {
/* @apply bg-rose-50; */
.column-title {
color: transparent;
a {
/* @apply text-red-900; */
}
.post-state {
/* @apply text-white bg-rose-700 px-3 py-1 rounded-2xl font-medium text-sm; */
@apply text-rose-700 px-3 py-1 rounded-2xl font-medium text-sm border-2 border-rose-700 border-solid;
}
}
}
.iedit.type-artisans.status-draft.hentry {
/* @apply bg-rose-50; */
.column-title {
color: transparent;
a {
/* @apply text-red-900; */
}
.post-state {
/* @apply text-white bg-rose-700 px-3 py-1 rounded-2xl font-medium text-sm; */
@apply text-sky-700 px-3 py-1 rounded-2xl font-medium text-sm border-2 border-sky-700 border-solid;
}
}
}
#acf-group_672358433051b,
#acf-group_673610d8e548a {
@apply opacity-60;
* {
cursor: not-allowed;
pointer-events: none;
}
}
.edit-post-visual-editor__post-title-wrapper { .edit-post-visual-editor__post-title-wrapper {
h1 { h1 {
font-weight: revert; font-weight: revert;

View File

@ -0,0 +1,37 @@
:root {
--purple: #8b2ff7;
}
body {
background: white;
}
#loginform {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
border-radius: 10px;
padding: 30px;
}
#login h1 a,
.login h1 a {
background-image: url('./resources/img/logos/metiers_logo_purple.svg');
height: 100px;
width: 300px;
background-size: 300px 100px;
background-repeat: no-repeat;
padding-bottom: 10px;
}
#wp-submit {
background-color: var(--purple) !important;
border-color: var(--purple) !important;
}
#nav a,
#backtoblog a {
/* color: var(--purple) !important; */
/* color: white !important; */
}
#loginform {
border: none;
}
.wp-pwd span {
color: var(--purple) !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

38
style-login.css Normal file
View File

@ -0,0 +1,38 @@
:root {
--purple: #8b2ff7;
}
body {
background: white;
}
#loginform {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
border-radius: 10px;
padding: 30px;
}
#login h1 a,
.login h1 a {
background-image: url('./resources/img/logos/metiers_logo_purple.png');
height: 100px;
width: 300px;
/* background-size: 300px 100px; */
background-size: contain;
background-repeat: no-repeat;
padding-bottom: 10px;
}
#wp-submit {
background-color: var(--purple) !important;
border-color: var(--purple) !important;
}
#nav a,
#backtoblog a {
/* color: var(--purple) !important; */
/* color: white !important; */
}
#loginform {
border: none;
}
.wp-pwd span {
color: var(--purple) !important;
}

View File

@ -50,8 +50,7 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
<p class="metier-patrimoine-searchbar__posts-results-amount" role="status" aria-live="polite"> <p class="metier-patrimoine-searchbar__posts-results-amount" role="status" aria-live="polite">
<span class="results-amount"> <span class="results-amount">
4 </span> 4 </span>
<span class="results-text"> <span class="results-text">résultat(s) </span>
résultat(s) </span>
</p> </p>
@ -198,7 +197,6 @@ $pageIcon = get_field('page_icon', get_queried_object_id()) ?? null;
"post_type" => "artisans", "post_type" => "artisans",
"posts_per_page" => -1, "posts_per_page" => -1,
"paged" => 1, "paged" => 1,
]); ]);