Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions config/visual-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,29 @@
'redirect_param' => 'redirect_to',
],

/*
|--------------------------------------------------------------------------
| Breadcrumbs block (#565)
|--------------------------------------------------------------------------
|
| Configures the `artisanpack/breadcrumbs` block's server-side trail
| resolver. The resolver builds a default trail
| (`Home → …ancestors → current`) for every breadcrumbs block on
| render; hosts customize the trail through the
| `ap.visual-editor.breadcrumbs.trail` filter (e.g. to insert a
| "Category" hop between Home and a blog post).
|
| `home_url` overrides the root link target — leave null to fall back
| to `url('/')`. `home_label` overrides the human-readable label — leave
| null to fall back to the translated "Home" string.
|
*/

'breadcrumbs' => [
'home_url' => null,
'home_label' => null,
],

/*
|--------------------------------------------------------------------------
| Global styles
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* Breadcrumbs block styles.
*
* Loaded in the editor via `blocks/breadcrumbs/index.ts`. Host apps
* are expected to ship matching (or compatible) rules on the public
* frontend — the Blade / React / Vue renderers emit the same class names.
*/

.ap-breadcrumbs__list {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.25rem;
margin: 0;
padding: 0;
list-style: none;
}

.ap-breadcrumbs__item {
display: inline-flex;
align-items: center;
gap: 0.25rem;
}

.ap-breadcrumbs__separator {
display: inline-flex;
align-items: center;
width: 1em;
height: 1em;
opacity: 0.6;
}

.ap-breadcrumbs__separator svg {
width: 100%;
height: 100%;
}

.ap-breadcrumbs__current {
font-weight: 600;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
the `--ap-social-*` custom properties stamped by the renderers so
icon / hover / background color choices apply on the front end. --}}
<link rel="stylesheet" href="{{ $socialIconsStyleHref }}" data-ve-social-icons>
{{-- Breadcrumbs layout + separator baseline (#565). Matches the rules
the editor loads from `blocks/breadcrumbs/breadcrumbs.css` so the
server-stamped `<ol>` lays out inline with the chosen separator on
the public frontend. --}}
<link rel="stylesheet" href="{{ $breadcrumbsStyleHref }}" data-ve-breadcrumbs>
@if( '' !== $themeTokensCss )
<style data-ve-theme-tokens>{!! $themeTokensCss !!}</style>
@endif
Expand Down
Loading