diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8ef8ba0..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.todo \ No newline at end of file diff --git a/.todo b/.todo index cd38b72..86a1694 100644 --- a/.todo +++ b/.todo @@ -1,5 +1,5 @@ -☐ Change default font size to 18px - ☐ Change default font size for paragraph block +✔ Change default font size to 18px @done(25-07-30 16:05) + ✔ Change default font size for paragraph block @done(25-07-30 16:05) ✔ Change default font size on front page @done(25-07-30 15:48) ✔ Change default text on about page font size @done(25-07-30 15:52) ✔ Change font size on services page @done(25-07-30 15:59) @@ -7,7 +7,7 @@ ✔ Change font size on blog page @done(25-07-30 15:59) ✔ Sync all content changes to live @done(25-07-30 16:04) -☐ Fix broken full-bleed template in post editor +✔ Fix broken full-bleed template in post editor @done(25-07-30 16:20) ☐ Change services page to use tabs diff --git a/block-styles.css b/block-styles.css index e3be3f0..5c96b09 100644 --- a/block-styles.css +++ b/block-styles.css @@ -81,7 +81,12 @@ ul.is-style-arrow-list { } /* HACK: fixing stretched out post width in editor */ -.edit-post-visual-editor .editor-styles-wrapper .block-editor-block-list__layout.is-root-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)), +:where(:not(.template-full-bleed)) .edit-post-visual-editor .editor-styles-wrapper .block-editor-block-list__layout.is-root-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)), .edit-post-visual-editor .editor-styles-wrapper .editor-editor-canvas__post-title-wrapper > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { - max-width: 600px !important; + max-width: 600px !important; +} + +body.template-full-bleed :where(:not(.template-full-bleed)) .edit-post-visual-editor .editor-styles-wrapper .block-editor-block-list__layout.is-root-container > :where(:not(.alignleft):not(.alignright):not(.alignfull)), +body.template-full-bleed .edit-post-visual-editor .editor-styles-wrapper .editor-editor-canvas__post-title-wrapper > :where(:not(.alignleft):not(.alignright):not(.alignfull)) { + max-width: unset !important; } \ No newline at end of file diff --git a/functions.php b/functions.php index 0dec35f..ad14c20 100644 --- a/functions.php +++ b/functions.php @@ -76,4 +76,18 @@ function so306588_trim_excerpt_custom_restore($text) remove_filter('get_the_excerpt', 'wp_trim_excerpt'); // add custom filter -add_filter('get_the_excerpt', 'so306588_trim_excerpt_custom'); \ No newline at end of file +add_filter('get_the_excerpt', 'so306588_trim_excerpt_custom'); + +/* + * Add template class to admin body based on current page's template. + */ +function mytheme_add_template_class($classes) +{ + $template = get_page_template_slug(); + if ($template) { + $class = preg_replace('/\.php$/', '', $template); + $classes .= ' template-' . sanitize_html_class($class); + } + return $classes; +} +add_filter('admin_body_class', 'mytheme_add_template_class'); \ No newline at end of file