diff --git a/ca-design-system-gutenberg-blocks.php b/ca-design-system-gutenberg-blocks.php index e1f7abb..5a84842 100644 --- a/ca-design-system-gutenberg-blocks.php +++ b/ca-design-system-gutenberg-blocks.php @@ -6,7 +6,7 @@ * Description: Gutenberg blocks to be used in WordPress that are compatible with the California's design system * Author: Office of Digital Innovation * Author URI: https://digital.ca.gov - * Version: 1.0.5 + * Version: 1.0.6 * License: MIT * License URI: https://opensource.org/licenses/MIT * Text Domain: ca-design-system diff --git a/includes/class-ca-design-system-gutenberg-blocks-templates.php b/includes/class-ca-design-system-gutenberg-blocks-templates.php index 0f35d16..6868bbe 100644 --- a/includes/class-ca-design-system-gutenberg-blocks-templates.php +++ b/includes/class-ca-design-system-gutenberg-blocks-templates.php @@ -126,10 +126,10 @@ private function _load_default_page_template_styles() public function ca_design_system_gutenberg_blocks_default_page_template_styles() { - wp_register_style('ca-design-system-gutenberg-blocks-page', plugins_url('styles/page.css', __DIR__), false, '1.0.3a'); + wp_register_style('ca-design-system-gutenberg-blocks-page', plugins_url('styles/page.css', __DIR__), false, '1.0.6'); wp_enqueue_style('ca-design-system-gutenberg-blocks-page'); - wp_register_style('ca-design-system-gutenberg-blocks-announcement', plugins_url('styles/announcement.css', __DIR__), false, '1.0.3'); + wp_register_style('ca-design-system-gutenberg-blocks-announcement', plugins_url('styles/announcement.css', __DIR__), false, '1.0.6'); wp_enqueue_style('ca-design-system-gutenberg-blocks-announcement'); // Default post // wp_register_style('ca-design-system-gutenberg-blocks-event', plugins_url('styles/event.css', __DIR__), false, '1.0.3'); diff --git a/includes/class-ca-design-system-gutenberg-blocks.php b/includes/class-ca-design-system-gutenberg-blocks.php index 6642d77..ce17abb 100644 --- a/includes/class-ca-design-system-gutenberg-blocks.php +++ b/includes/class-ca-design-system-gutenberg-blocks.php @@ -51,7 +51,6 @@ private function __construct() $this->_load_block_category(); add_action('ca_design_system_breadcrumb', array($this, 'get_breadcrumb_callback')); - } /** @@ -197,6 +196,8 @@ public function get_breadcrumb_callback() { /* Quick breadcrumb function, @TODO Register in plugin to call as a shortcode or function */ + global $post; + $separator = "/"; $linkOff = true; $items = wp_get_nav_menu_items('header-menu'); @@ -208,6 +209,7 @@ public function get_breadcrumb_callback() ); + foreach ($items as $item) { if ($item->current_item_ancestor) { if ($linkOff == true) { @@ -216,20 +218,23 @@ public function get_breadcrumb_callback() $crumbs[] = "url}\" title=\"{$item->title}\">{$item->title}"; } } else if ($item->current) { - $crumbs[] = "{$item->title}"; + $crumbs[] = "{$item->title}"; } } - if (is_category()) { + if (is_category()) { global $wp_query; $category = get_category(get_query_var('cat'), false); - $crumbs[] = "{$category->name}"; + $crumbs[] = "{$category->name}"; + } + if (count($items) == 0 && !is_category()) { + $category = get_the_category($post->ID); + $crumbs[] = "" . $category->name . ""; } - + echo implode($separator, $crumbs); } - } diff --git a/includes/templates/template-single.php b/includes/templates/template-single.php index 2e71633..fede326 100644 --- a/includes/templates/template-single.php +++ b/includes/templates/template-single.php @@ -16,7 +16,7 @@ } ?> -
+
-
- - +
+
- -
> - - +
+ ID, 'ca_custom_post_title_display', true)) { - $caweb_padding = get_option('ca_default_post_date_display') ? ' pb-0' : ''; + while (have_posts()) : + the_post(); + ?> - esc_html(the_title(sprintf('

', $caweb_padding), '

')); - } +
> + + + ID, 'ca_custom_post_title_display', true)) { + $caweb_padding = get_option('ca_default_post_date_display') ? ' pb-0' : ''; - if (get_option('ca_default_post_date_display') && !$caweb_is_page_builder_used) { - printf('

Published:

', get_the_date('M d, Y')); - } + esc_html(the_title(sprintf('

', $caweb_padding), '

')); + } - print '
'; + // if (get_option('ca_default_post_date_display') && !$caweb_is_page_builder_used) { + printf('

', get_the_date('M d, Y')); + // } - the_content(); - if (!$caweb_is_page_builder_used) { - wp_link_pages( - array( - 'before' => '', - ) - ); - } - print '
'; + print '
'; - ?> + the_content(); + + if (!$caweb_is_page_builder_used) { + wp_link_pages( + array( + 'before' => '', + ) + ); + } + + print '
'; + + ?> -
+
- +
diff --git a/styles/editor.css b/styles/editor.css index 438954d..e69de29 100644 --- a/styles/editor.css +++ b/styles/editor.css @@ -1,3 +0,0 @@ -body { - background-color: red; -} \ No newline at end of file diff --git a/styles/page.css b/styles/page.css index 26a53ad..1554346 100644 --- a/styles/page.css +++ b/styles/page.css @@ -3,10 +3,6 @@ margin-top: 1.5rem; } -/* .page-container-ds .cagov-stack * + * { - margin-top: inherit -} */ - .page-container-ds { max-width: 1280px; margin: 0 auto; @@ -45,6 +41,7 @@ transform: translate(-0%, -0%); */ } + .sidebar-container { display: block; width: 276px; @@ -79,7 +76,7 @@ .breadcrumb { display: block; margin-top: 32px; - margin-bottom: 64px; + margin-bottom: 0px; background-color: #F9F9FA; padding: 8px 16px; font-size: 16px; @@ -99,8 +96,39 @@ padding-right: 5px; } -/* CONTENT NAVIGATION */ +.page-container-ds main category-label ul:not([class*="menu"]):not([class*="nav"]):not([class*="footer-links"]), +.page-container-ds main category-label ul { + margin: 0; + text-indent: 0; + padding: 0; +} + +category-label { + color: #000; + margin-bottom: 24px; + font-weight: 700; +} +category-label a { + color: #000; + font-weight: 700; +} + +time { + margin-top: 24px; + margin-bottom: 24px; + color: #000; + font-weight: 700; +} +} + + +category-label a { + color: #000; + font-weight: 700; +} + +/* CONTENT NAVIGATION */ sidebar cagov-content-navigation .label { font-weight: 700; font-size: 24px; @@ -139,7 +167,6 @@ sidebar cagov-content-navigation ul li:first-child { list-style-position: inside !important; } - /* TYPOGRAPHY */ h1.page-title { font-weight: 700; diff --git a/styles/style.css b/styles/style.css index 438954d..e69de29 100644 --- a/styles/style.css +++ b/styles/style.css @@ -1,3 +0,0 @@ -body { - background-color: red; -} \ No newline at end of file