Style anpassungen für die Dokumentationsseite und die Produktseite. Hinzufügen eines Feeds für Produktaktualisierungen. Aktualisierung der Router- und Suchcontroller-Logik, um die neuen Seiten zu unterstützen. Anpassung der Admin-Einstellungen für die Dokumentationsseite.
This commit is contained in:
@@ -6,9 +6,9 @@ $active_version_slug = (string) ($active_version_slug ?? '');
|
||||
$active_page_slug = (string) ($active_page_slug ?? '');
|
||||
?>
|
||||
<div class="kb-docs-wrap kb-docs-app">
|
||||
<aside class="kb-app-sidebar" aria-label="<?php esc_attr_e('Documentation navigation', 'kb-markdown-importer'); ?>">
|
||||
<aside class="kb-app-sidebar" aria-label="<?php esc_attr_e('Dokumentationsnavigation', 'kb-markdown-importer'); ?>">
|
||||
<div class="kb-app-sidebar__brand">
|
||||
<a href="<?php echo esc_url($url_builder::docsIndex()); ?>"><?php esc_html_e('Knowledgebase', 'kb-markdown-importer'); ?></a>
|
||||
<a href="<?php echo esc_url($url_builder::docsIndex()); ?>"><?php esc_html_e('Dokumentation', 'kb-markdown-importer'); ?></a>
|
||||
</div>
|
||||
<div class="kb-app-sidebar__search">
|
||||
<?php echo do_shortcode('[kb_search]'); ?>
|
||||
@@ -25,25 +25,15 @@ $active_page_slug = (string) ($active_page_slug ?? '');
|
||||
<a class="kb-app-product__link" href="<?php echo esc_url($latest ? $url_builder::version($term->slug, $latest->slug) : $url_builder::product($term->slug)); ?>">
|
||||
<?php echo esc_html($term->name); ?>
|
||||
</a>
|
||||
<?php if ($versions) : ?>
|
||||
<ul class="kb-app-version-list">
|
||||
<?php foreach ($versions as $version) : ?>
|
||||
<?php $isActiveVersion = $isActiveProduct && $version->slug === $active_version_slug; ?>
|
||||
<li class="<?php echo $isActiveVersion ? 'is-active' : ''; ?>">
|
||||
<a href="<?php echo esc_url($url_builder::version($term->slug, $version->slug)); ?>"><?php echo esc_html($version->name); ?></a>
|
||||
<?php if ($isActiveVersion && ! empty($active_pages)) : ?>
|
||||
<ul class="kb-app-page-list">
|
||||
<?php foreach ((array) $active_pages as $page) : ?>
|
||||
<?php
|
||||
$pageSlug = (string) get_post_meta($page->ID, '_kb_page_slug', true);
|
||||
$isActivePage = $pageSlug === $active_page_slug || ('' === $active_page_slug && in_array($pageSlug, ['', 'index'], true));
|
||||
?>
|
||||
<li class="<?php echo $isActivePage ? 'is-active' : ''; ?>">
|
||||
<a href="<?php echo esc_url($url_builder::page($term->slug, $version->slug, $pageSlug)); ?>"><?php echo esc_html(get_the_title($page)); ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php if ($isActiveProduct && $active_version_slug && ! empty($active_pages)) : ?>
|
||||
<ul class="kb-app-page-list">
|
||||
<?php foreach ((array) $active_pages as $page) : ?>
|
||||
<?php
|
||||
$pageSlug = (string) get_post_meta($page->ID, '_kb_page_slug', true);
|
||||
$isActivePage = $pageSlug === $active_page_slug || ('' === $active_page_slug && in_array($pageSlug, ['', 'index'], true));
|
||||
?>
|
||||
<li class="<?php echo $isActivePage ? 'is-active' : ''; ?>">
|
||||
<a href="<?php echo esc_url($url_builder::page($term->slug, $active_version_slug, $pageSlug)); ?>"><?php echo esc_html(get_the_title($page)); ?></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user