Skip to content

Commit 833daf5

Browse files
authored
Merge pull request #1645 from Grandi0z/cypht-enh-wordpress-headers
refactor(frontend): update wordpress header layout for improved styling and responsiveness
2 parents d9b892e + f45e002 commit 833daf5

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

config/app.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@
795795
// |
796796
// | Github repository tracking.
797797
// */
798-
'github',
798+
// // 'github',
799799

800800
// /*
801801
// | ---------
@@ -813,7 +813,7 @@
813813
// |
814814
// | WordPress.com notifications.
815815
// */
816-
'wordpress',
816+
// // 'wordpress',
817817

818818
// /*
819819
// | -------

modules/wordpress/modules.php

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -461,14 +461,26 @@ function wp_build_notice_headers($data, $output_mod) {
461461
if (!$subject) {
462462
$subject = '[No subject]';
463463
}
464-
return '<table class="msg_headers">'.
465-
'<col class="header_name_col"><col class="header_val_col"></colgroup>'.
466-
'<tr class="header_subject"><th colspan="2">'.$output_mod->html_safe(html_entity_decode($data['subject']['text'])).
467-
'</th></tr>'.
468-
'<tr class="header_date"><th>'.$output_mod->trans('Date').'</th><td>'.date('r', $data['timestamp']).
469-
' ('.human_readable_interval(date('r', $data['timestamp'])).')</td></tr>'.
470-
'<tr class="header_type"><th>'.$output_mod->trans('Type').'</th><td>'.$data['type'].'</td></tr>'.
471-
'<tr class="header_cid"><th>'.$output_mod->trans('Id').'</th><td>'.$data['id'].'</td></tr><tr><td></td><td></td></tr></table>';
464+
$txt = '';
465+
$txt .= '<div class="container-fluid p-0 ml-0 border-bottom border-secondary-subtle text-muted">';
466+
$txt .= '<div class="row g-0 py-0 py-sm-1 small_header d-flex">';
467+
$txt .= '<div class="col-12">';
468+
$txt .= '<span class="fs-5 fw-normal text-dark">' . $output_mod->html_safe(html_entity_decode($data['subject']['text'])) . '</span>';
469+
$txt .= '</div></div>';
470+
$txt .= '<div class="row g-0 py-0 py-sm-1 small_header d-flex">';
471+
$txt .= '<div class="col-md-2 d-none d-md-block"><span class="text-muted">'.$output_mod->trans('Date').'</span></div>';
472+
$txt .= '<div class="col-md-10"><small class="text-muted">'.date('r', $data['timestamp']).' ('.human_readable_interval(date('r', $data['timestamp'])).')</small></div>';
473+
$txt .= '</div>';
474+
$txt .= '<div class="row g-0 py-0 py-sm-1 small_header d-flex">';
475+
$txt .= '<div class="col-md-2 d-none d-md-block"><span class="text-muted">'.$output_mod->trans('Type').'</span></div>';
476+
$txt .= '<div class="col-md-10">'.$output_mod->html_safe($data['type']).'</div>';
477+
$txt .= '</div>';
478+
$txt .= '<div class="row g-0 py-0 py-sm-1 small_header d-flex">';
479+
$txt .= '<div class="col-md-2 d-none d-md-block"><span class="text-muted">'.$output_mod->trans('Id').'</span></div>';
480+
$txt .= '<div class="col-md-10">'.$output_mod->html_safe($data['id']).'</div>';
481+
$txt .= '</div>';
482+
$txt .= '</div>';
483+
return $txt;
472484
}}
473485

474486
/**

0 commit comments

Comments
 (0)