Compare commits

...

13 Commits

Author SHA1 Message Date
3b6e32a9f4 Add beige background to site 2024-04-29 11:13:06 +05:00
19037858b9 enable svg uploads 2024-04-29 11:07:25 +05:00
3481e1dd40 wrap site logo in link 2024-04-26 21:49:51 +05:00
c6fba96a3e tweak news pattern 2024-04-26 20:39:29 +05:00
5530baf87f Tweak news pattern 2024-04-26 20:38:35 +05:00
2d7210e352 disable comments 2024-04-26 20:30:55 +05:00
0ed8cab0ff tweak news pattern 2024-04-26 20:25:06 +05:00
960ba34458 whoops, put single page template in about pattern 2024-04-26 20:22:10 +05:00
663935dd51 tweak team page pattern 2024-04-26 20:20:12 +05:00
ec5a317ed8 set white as default bg color 2024-04-26 20:17:58 +05:00
ca117ebed7 Update team page pattern 2024-04-26 20:15:50 +05:00
2f8e7a7b93 Update history page pattern 2024-04-26 20:14:13 +05:00
d833bf811e Update about page pattern 2024-04-26 20:12:52 +05:00
10 changed files with 485 additions and 438 deletions

View File

@ -20,3 +20,84 @@ function cmt_pattern_categories() {
);
}
add_action( 'init', 'cmt_pattern_categories' );
/*== DISABLE COMMENTS ==*/
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_safe_redirect(admin_url());
exit;
}
// Remove comments metabox from dashboard
remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
// Disable support for comments and trackbacks in post types
foreach (get_post_types() as $post_type) {
if (post_type_supports($post_type, 'comments')) {
remove_post_type_support($post_type, 'comments');
remove_post_type_support($post_type, 'trackbacks');
}
}
});
// Close comments on the front-end
add_filter('comments_open', '__return_false', 20, 2);
add_filter('pings_open', '__return_false', 20, 2);
// Hide existing comments
add_filter('comments_array', '__return_empty_array', 10, 2);
// Remove comments page in menu
add_action('admin_menu', function () {
remove_menu_page('edit-comments.php');
});
// Remove comments links from admin bar
add_action('init', function () {
if (is_admin_bar_showing()) {
remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
}
});
/*== END DISABLE COMMENTS ==*/
/*== ENABLE SVG UPLOADS ==*/
// Allow SVG
add_filter( 'wp_check_filetype_and_ext', function($data, $file, $filename, $mimes) {
global $wp_version;
if ( $wp_version !== '4.7.1' ) {
return $data;
}
$filetype = wp_check_filetype( $filename, $mimes );
return [
'ext' => $filetype['ext'],
'type' => $filetype['type'],
'proper_filename' => $data['proper_filename']
];
}, 10, 4 );
function cc_mime_types( $mimes ){
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter( 'upload_mimes', 'cc_mime_types' );
function fix_svg() {
echo '<style type="text/css">
.attachment-266x266, .thumbnail img {
width: 100% !important;
height: auto !important;
}
</style>';
}
add_action( 'admin_head', 'fix_svg' );
/*== END ENABLE SVG UPLOADS ==*/

View File

@ -3,10 +3,10 @@
style="padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)"><!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"25%"} -->
<div class="wp-block-column" style="flex-basis:25%">
<!-- wp:image {"id":2132,"sizeSlug":"full","linkDestination":"none","align":"center"} -->
<figure class="wp-block-image aligncenter size-full"><img
<!-- wp:image {"lightbox":{"enabled":false},"id":2132,"sizeSlug":"full","linkDestination":"custom","align":"center"} -->
<figure class="wp-block-image aligncenter size-full"><a href="/"><img
src="http://www.cmt.localhost/wp-content/uploads/2024/04/cmt-engineering-logo.png" alt=""
class="wp-image-2132" /></figure>
class="wp-image-2132" /></a></figure>
<!-- /wp:image -->
</div>
<!-- /wp:column -->

View File

@ -8,13 +8,6 @@
*/
?>
<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group"><!-- wp:spacer {"height":"14px"} -->
<div style="height:14px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- wp:post-title {"style":{"typography":{"fontSize":"30px","fontStyle":"normal","fontWeight":"400"},"elements":{"link":{"color":{"text":"var:preset|color|primary"}}}},"textColor":"primary"} /-->
<!-- wp:paragraph -->
<p>CMT Engineering is an independent company owned by Anjali Agrawal with two divisions. Anjali is a chartered accountant; she has experience of working in various locations worldwide, giving her the opportunity to build a network of international relationships.</p>
<!-- /wp:paragraph -->
@ -101,9 +94,3 @@
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
<!-- wp:spacer {"height":"42px"} -->
<div style="height:42px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
</div>
<!-- /wp:group -->

View File

@ -8,13 +8,6 @@
*/
?>
<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|20","left":"var:preset|spacing|20"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)"><!-- wp:spacer {"height":"14px"} -->
<div style="height:14px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- wp:post-title {"style":{"typography":{"fontSize":"30px","fontStyle":"normal","fontWeight":"400"},"elements":{"link":{"color":{"text":"var:preset|color|primary"}}}},"textColor":"primary"} /-->
<!-- wp:paragraph -->
<p>CMT Engineering Ltd. has a long history stretching back over 100 years on its site in Cradley Heath.</p>
<!-- /wp:paragraph -->
@ -221,9 +214,3 @@
<!-- /wp:image -->
</div>
<!-- /wp:group -->
<!-- wp:spacer {"height":"63px"} -->
<div style="height:63px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
</div>
<!-- /wp:group -->

View File

@ -8,18 +8,6 @@
*/
?>
<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|20","left":"var:preset|spacing|20"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)"><!-- wp:spacer {"height":"14px"} -->
<div style="height:14px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"100%"} -->
<div class="wp-block-column" style="flex-basis:100%"><!-- wp:post-title {"style":{"typography":{"fontSize":"30px","fontStyle":"normal","fontWeight":"400"},"elements":{"link":{"color":{"text":"var:preset|color|primary"}}}},"textColor":"primary"} /--></div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
<!-- wp:query {"queryId":9,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":{"category":[7]}}} -->
<div class="wp-block-query"><!-- wp:post-template -->
<!-- wp:columns -->
@ -30,7 +18,11 @@
<!-- wp:column {"width":"80%"} -->
<div class="wp-block-column" style="flex-basis:80%"><!-- wp:post-title /-->
<!-- wp:post-excerpt /-->
<!-- wp:post-excerpt {"moreText":"Read more","style":{"elements":{"link":{"color":{"text":"var:preset|color|primary"}}}}} /-->
<!-- wp:spacer {"height":"11px"} -->
<div style="height:11px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- wp:separator {"style":{"spacing":{"margin":{"top":"var:preset|spacing|30","bottom":"var:preset|spacing|30"}}},"backgroundColor":"primary","className":"is-style-wide"} -->
<hr class="wp-block-separator has-text-color has-primary-color has-alpha-channel-opacity has-primary-background-color has-background is-style-wide" style="margin-top:var(--wp--preset--spacing--30);margin-bottom:var(--wp--preset--spacing--30)" />
@ -56,9 +48,3 @@
<!-- /wp:query-no-results -->
</div>
<!-- /wp:query -->
<!-- wp:spacer {"height":"63px"} -->
<div style="height:63px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
</div>
<!-- /wp:group -->

View File

@ -8,13 +8,6 @@
*/
?>
<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|20","left":"var:preset|spacing|20"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="padding-right:var(--wp--preset--spacing--20);padding-left:var(--wp--preset--spacing--20)"><!-- wp:spacer {"height":"14px"} -->
<div style="height:14px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
<!-- wp:post-title {"style":{"typography":{"fontSize":"30px","fontStyle":"normal","fontWeight":"400"},"elements":{"link":{"color":{"text":"var:preset|color|primary"}}}},"textColor":"primary"} /-->
<!-- wp:paragraph -->
<p><strong>At CMT Engineering our primary aim is always to offer outstanding customer service to our customers each and every time they deal with our company. Our team has many years of experience and can use its wide ranging product knowledge to help meet your requirements.</strong></p>
<!-- /wp:paragraph -->
@ -114,9 +107,3 @@
<!-- /wp:columns -->
</div>
<!-- /wp:group -->
<!-- wp:spacer {"height":"63px"} -->
<div style="height:63px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->
</div>
<!-- /wp:group -->

View File

@ -1,7 +1,8 @@
<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:group {"align":"wide","style":{"spacing":{"blockGap":"0"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide">
<!-- wp:group {"align":"wide","style":{"spacing":{"blockGap":"0","padding":{"top":"0","bottom":"0","left":"0","right":"0"}}},"backgroundColor":"white","layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide has-white-background-color has-background"
style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0">
<!-- wp:template-part {"slug":"header","theme":"cmt-engineering-theme","tagName":"header","area":"header"} /-->
<!-- wp:post-content {"align":"wide","backgroundColor":"base-2"} /-->

View File

@ -1,3 +1,6 @@
<!-- wp:group {"style":{"spacing":{"padding":{"right":"0","left":"0","top":"0","bottom":"0"}}},"backgroundColor":"white","layout":{"type":"constrained"}} -->
<div class="wp-block-group has-white-background-color has-background"
style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0">
<!-- wp:template-part {"slug":"header","theme":"cmt-engineering-theme","tagName":"header","area":"header"} /-->
<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|20","left":"var:preset|spacing|20"}}},"layout":{"type":"constrained"}} -->
@ -18,3 +21,5 @@
<!-- /wp:group -->
<!-- wp:template-part {"slug":"footer","theme":"cmt-engineering-theme","tagName":"footer","area":"footer"} /-->
</div>
<!-- /wp:group -->

View File

@ -1,3 +1,6 @@
<!-- wp:group {"style":{"spacing":{"padding":{"top":"0","bottom":"0","left":"0","right":"0"}}},"backgroundColor":"white","layout":{"type":"constrained"}} -->
<div class="wp-block-group has-white-background-color has-background"
style="padding-top:0;padding-right:0;padding-bottom:0;padding-left:0">
<!-- wp:template-part {"slug":"header","theme":"cmt-engineering-theme","tagName":"header","area":"header"} /-->
<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|20","left":"var:preset|spacing|20"}}},"layout":{"type":"constrained","contentSize":"1000px","wideSize":"1300px"}} -->
@ -28,3 +31,5 @@
<!-- /wp:group -->
<!-- wp:template-part {"slug":"footer","theme":"cmt-engineering-theme","tagName":"footer","area":"footer"} /-->
</div>
<!-- /wp:group -->

View File

@ -30,6 +30,11 @@
"color": "#FFF",
"name": "White",
"slug": "white"
},
{
"color": "#F2F2F2",
"name": "Base",
"slug": "base"
}
]
},
@ -110,6 +115,9 @@
}
},
"styles": {
"color": {
"background": "var(--wp--preset--color--base)"
},
"blocks": {
"core/button": {
"border": {