Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
55b3acd
Remove vcloak so it doesn't conflict with view transitions
jaygeorge Sep 12, 2025
473dd67
Remove skeletons so they doesn't conflict with view transitions
jaygeorge Sep 12, 2025
3f2c8b9
View transitions - block the page from rendering until it's ready
jaygeorge Sep 12, 2025
a8585f8
Experiments
jaygeorge Sep 12, 2025
6f3cf6d
Merge branch 'master' into view-transitions
jaygeorge Sep 12, 2025
ada6822
Restore transitions
jaygeorge Sep 12, 2025
ef33299
Merge branch 'master' into view-transitions
jaygeorge Sep 12, 2025
569d93f
Revert some earlier experiments in favour of v-cloak
jaygeorge Sep 12, 2025
192fa94
Wrap up demo
jaygeorge Sep 12, 2025
3f3ebba
Tweak animation value
jaygeorge Sep 12, 2025
43bd996
Add view transitions back
jaygeorge Sep 12, 2025
3113a51
Merge branch 'master' into view-transitions
jaygeorge Sep 12, 2025
20291ef
Merge branch 'master' into view-transitions
jaygeorge Sep 12, 2025
36348bf
Make sibling delay a touch snappier
jaygeorge Sep 12, 2025
fea9268
Merge branch 'master' into view-transitions
jaygeorge Sep 15, 2025
9e02640
View Transitions - Fix newer global header layout on pages like Dashb…
jaygeorge Sep 15, 2025
27e5708
View Transitions / Dashboard view
jaygeorge Sep 15, 2025
e1843ce
View Transitions / rows on collection grid/dashboard
jaygeorge Sep 15, 2025
2a9d9d6
View Transitions / add animation to an entry, including setting defau…
jaygeorge Sep 15, 2025
e0fea3b
View Transitions > Blueprints > Index
jaygeorge Sep 15, 2025
5805262
View Transitions > Blueprints > Single
jaygeorge Sep 15, 2025
8110494
View Transitions > Updates
jaygeorge Sep 15, 2025
bc2d242
View Transitions > Utilities > Index
jaygeorge Sep 15, 2025
7641365
View Transitions > Utilities > sub pages
jaygeorge Sep 15, 2025
802d61e
View Transitions > nav and permissions
jaygeorge Sep 15, 2025
d5e87a1
Remove draft CSS that I moved to animations.css
jaygeorge Sep 15, 2025
95c509f
Right hand side items in global header get initially rendered with bl…
jasonvarga Sep 15, 2025
b2666f5
Right hand side items in global header with just blade/view transitions
jaygeorge Sep 15, 2025
c3415b2
Revert "Remove skeletons so they doesn't conflict with view transitions"
jaygeorge Sep 15, 2025
37f5291
fade in skeleton after a short delay
jasonvarga Sep 15, 2025
c7a2df3
extract a composable
jasonvarga Sep 15, 2025
e2fe3cc
move breadcrumbs into components
jasonvarga Sep 15, 2025
450006c
Buttons in blade to prevent pop-in
jasonvarga Sep 15, 2025
594420d
prevent breadcrumb blink
jasonvarga Sep 15, 2025
772b523
Move pro badge to component
jasonvarga Sep 15, 2025
8b400f3
prevent pop in on the pro badge
jasonvarga Sep 15, 2025
13240b7
oops. fix bits i had in for testing
jasonvarga Sep 15, 2025
762392d
Skeleton placement fixes / dashboard widgets
jaygeorge Sep 16, 2025
183c920
Use the same entry transitions for the skeleton ui for consistency
jaygeorge Sep 16, 2025
b763495
Use the same entry transitions for the skeleton ui for consistency
jaygeorge Sep 16, 2025
4fa38e5
Skeleton placement fixes / Listing
jaygeorge Sep 16, 2025
e1cd9c5
Add static global site selector to prevent pop-in
jasonvarga Sep 16, 2025
350d434
Skeleton placement fixes / Form Widget -- get this exactly correct ba…
jaygeorge Sep 16, 2025
4187b12
Whoops, put in in the right place
jaygeorge Sep 16, 2025
eb6aed2
Skeleton placement fixes / Collection Widget -- get this exactly corr…
jaygeorge Sep 16, 2025
89e7a6c
View transitions -- prevent langauge combobox arrow from collapsing i…
jaygeorge Sep 16, 2025
945a0e1
Undo because it's not necessary in the end - View transitions -- prev…
jaygeorge Sep 16, 2025
5723a0c
Remove code causing header to flicker
jaygeorge Sep 16, 2025
769529d
Remove view transitions because of render-blocking behaviour
jaygeorge Sep 16, 2025
d947462
Remove view transitions because of render-blocking behaviour
jaygeorge Sep 16, 2025
762a432
Smoothly blend the Blade > Vue replacement of the dropdowns on page load
jaygeorge Sep 17, 2025
a2d2d13
Smoothly blend the Blade > Vue replacement of the site selector on pa…
jaygeorge Sep 17, 2025
8b28d5f
Smoothly blend the Blade > Vue replacement of the site selector on pa…
jaygeorge Sep 17, 2025
90f3301
Rename entry-animation to starting-style-transition to more accuratel…
jaygeorge Sep 17, 2025
24f4668
Merge branch 'master' into view-transitions
jaygeorge Sep 17, 2025
c033009
Speed up entry animations a touch
jaygeorge Sep 17, 2025
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
6 changes: 4 additions & 2 deletions packages/ui/src/Combobox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,16 @@ defineExpose({

<button type="button" v-else class="w-full text-start bg-transparent truncate flex items-center gap-2 cursor-pointer focus:outline-none" @keydown.space="openDropdown" data-ui-combobox-selected-option>
<slot name="selected-option" v-bind="{ option: selectedOption }">
<Icon v-if="icon" :name="icon" class="text-white/85 dark:text-white dark:opacity-50" />
<div class="size-4">
<Icon v-if="icon" :name="icon" class="text-white/85 dark:text-white dark:opacity-50" />
</div>
<span v-if="labelHtml" v-html="getOptionLabel(selectedOption)" />
<span v-else v-text="getOptionLabel(selectedOption)" />
</slot>
</button>
</div>

<div class="flex gap-1.5 items-center shrink-0 ms-1.5">
<div class="flex gap-1.5 items-center shrink-0 ms-1.5 size-4">
<Button v-if="clearable && modelValue" icon="x" variant="ghost" size="xs" round @click="clear" data-ui-combobox-clear-button />
<Icon v-if="options.length || ignoreFilter" name="chevron-down" class="text-gray-400 dark:text-white/40" data-ui-combobox-chevron />
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const props = defineProps({
</script>

<template>
<header class="flex flex-wrap items-center justify-between gap-4 py-8" data-ui-header>
<header class="flex flex-wrap items-center justify-between gap-4 py-8 starting-style-transition" data-ui-header>
<h1 class="text-[25px] leading-[1.25] st-text-legibility font-medium antialiased flex items-center gap-2.5 flex-1">
<!-- Wrap icon in a fixed size div (the same size as the icon) to prevent layout shift once it loads -->
<div v-if="icon" class="size-5">
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/Panel/Panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const props = defineProps({
<div
:class="[
'relative bg-gray-200/50 dark:bg-gray-950 dark:inset-shadow-2xs dark:inset-shadow-black',
'w-full rounded-2xl mb-5 p-1.5 [&:has([data-ui-panel-header])]:pt-0 focus-none',
'w-full rounded-2xl mb-5 p-1.5 [&:has([data-ui-panel-header])]:pt-0 focus-none starting-style-transition starting-style-transition--siblings',
]"
data-ui-panel
>
Expand Down
2 changes: 1 addition & 1 deletion resources/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@
.dark .content-card {
background: var(--theme-color-dark-content-bg);
}
}
}
38 changes: 38 additions & 0 deletions resources/css/core/animation.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,41 @@
animation: rotate 4s linear infinite;
}
}

/* STARTING STYLE TRANSITIONS
=================================================== */
/* Notes...

What does it do?
----------------
- Soft-animates an element on page load using @starting-style
- These should be almost-instant otherwise they'll get annoying

*/
@media (prefers-reduced-motion: no-preference) {
.starting-style-transition,
.starting-style-transition-children > *,
.publish-fields > *,
.publish-fields-fluid > * {
transition: opacity 0.1s;
@starting-style {
opacity: 0;
}
}

.starting-style-transition--quick {
transition: opacity 0.05s;
}

.starting-style-transition--slow {
transition: opacity 1s;
}

.starting-style-transition--siblings,
/* Assume that when we're animating children we want a sibling delay */
.starting-style-transition-children > *,
.publish-fields > *,
.publish-fields-fluid > * {
transition-delay: calc(sibling-index() * 0.01s);
}
}
2 changes: 1 addition & 1 deletion resources/js/components/GlobalSiteSelector.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="flex h-full items-center" data-ui-global-site-selector>
<div class="flex h-full items-center animate-in fade-in duration-750 fill-mode-forwards" data-ui-global-site-selector>
<Select
:model-value="active"
:options="sites"
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/blueprints/Fields.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<div
class="blueprint-section-draggable-zone field-grid gap-2! mb-4"
class="blueprint-section-draggable-zone field-grid gap-2! mb-4 starting-style-transition-children"
:data-tab="tabId"
:data-section="sectionId"
>
Expand Down
12 changes: 6 additions & 6 deletions resources/js/components/collections/Listing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@
:sort-direction="collection.sort_direction"
>
<template #initializing>
<div class="flex flex-col gap-[9px] justify-between py-1 px-5">
<ui-skeleton class="h-[19px] w-full" />
<ui-skeleton class="h-[19px] w-full" />
<ui-skeleton class="h-[19px] w-full" />
<ui-skeleton class="h-[19px] w-full" />
<ui-skeleton class="h-[19px] w-full" />
<div class="flex flex-col gap-[8px] justify-between py-1 px-5">
<ui-skeleton class="h-[18px] w-full" />
<ui-skeleton class="h-[18px] w-full" />
<ui-skeleton class="h-[18px] w-full" />
<ui-skeleton class="h-[18px] w-full" />
<ui-skeleton class="h-[18px] w-full" />
</div>
</template>
<template #default="{ items }">
Expand Down
14 changes: 1 addition & 13 deletions resources/js/components/command-palette/CommandPalette.vue
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,7 @@ const modalClasses = cva({
<template>
<DialogRoot v-model:open="open" :modal="true">
<DialogTrigger>
<div class="
data-[focus-visible]:outline-focus hover flex cursor-text items-center gap-x-1.5 group h-8
rounded-lg [button:has(>&)]:rounded-md bg-black/15 text-xs text-white/70 outline-none
border-b border-b-white/20 inset-shadow-sm inset-shadow-black/20
md:w-32 md:py-[calc(5/16*1rem)] md:px-2
hover:bg-black/45 hover:text-white/70
">
<Icon name="magnifying-glass" class="size-5 flex-none text-white/50 group-hover:text-white/70" />
<span class="sr-only leading-none md:not-sr-only st-text-trim-cap">{{ __('Search') }}</span>
<kbd class="ml-auto hidden self-center rounded bg-white/5 px-[0.3125rem] py-[0.0625rem] text-[0.625rem]/4 font-medium text-white/60 group-hover:text-white/70 ring-1 ring-white/7.5 [word-spacing:-0.15em] ring-inset md:block">
<kbd class="font-sans">⌘ </kbd><kbd class="font-sans">K</kbd>
</kbd>
</div>
<slot />
</DialogTrigger>
<DialogPortal>
<DialogOverlay class="fixed inset-0 z-30 bg-gray-800/20 backdrop-blur-[2px] dark:bg-gray-800/50" />
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/entries/CollectionWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ function formatDate(value) {
>
<template #initializing>
<Widget v-bind="widgetProps">
<div class="flex flex-col gap-[9px] justify-between py-3 px-4">
<ui-skeleton v-for="i in initialPerPage" class="h-[19px] w-full" />
<div class="flex flex-col justify-between px-4 py-3">
<ui-skeleton v-for="i in initialPerPage" class="h-[1.25rem] mb-[0.375rem] w-full" />
</div>
</Widget>
</template>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/forms/FormWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ function formatDate(value) {
>
<template #initializing>
<Widget v-bind="widgetProps">
<div class="flex flex-col gap-4 justify-between p-4">
<ui-skeleton v-for="i in initialPerPage" class="h-3 w-full" />
<div class="flex flex-col justify-between px-4 py-3">
<ui-skeleton v-for="i in initialPerPage" class="h-[1.25rem] mb-[0.25rem] w-full" />
</div>
</Widget>
</template>
Expand Down
16 changes: 9 additions & 7 deletions resources/js/components/ui/Listing/Listing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const [injectListingContext, provideListingContext] = createContext('List

<script setup>
import { ref, toRef, computed, watch, nextTick, onMounted, onBeforeUnmount, useSlots } from 'vue';
import useSkeletonDelay from '@/composables/skeleton-delay.js';
import {
Icon,
Panel,
Expand Down Expand Up @@ -160,6 +161,7 @@ const hasActions = computed(() => !!props.actionUrl);
const hasFilters = computed(() => props.filters && props.filters.length > 0);
const showPresets = computed(() => props.allowPresets && props.preferencesPrefix);
const showBulkActions = computed(() => props.allowBulkActions && hasActions.value);
const shouldShowSkeleton = useSkeletonDelay(initializing);

const items = computed({
get() {
Expand Down Expand Up @@ -668,21 +670,21 @@ autoApplyState();
</script>

<template>
<slot name="initializing" v-if="initializing">
<div class="flex flex-col gap-4 justify-between mt-2">
<ui-skeleton class="h-3 w-48" />
<slot name="initializing" v-if="shouldShowSkeleton">
<div class="flex flex-col gap-4 justify-between mt-3 starting-style-transition starting-style-transition--slow">
<ui-skeleton class="h-5 w-48" />
<div class="flex gap-3">
<ui-skeleton class="h-8 w-80" />
<ui-skeleton class="h-8 w-24" />
<ui-skeleton class="h-9 w-96" />
<ui-skeleton class="h-9 w-24" />
<div class="flex-1" />
<ui-skeleton class="size-8" />
<ui-skeleton class="size-10" />
</div>
<ui-skeleton class="h-48 w-full" />
</div>
</slot>
<slot v-if="!initializing" :items="items" :is-column-visible="isColumnVisible" :loading="loading">
<Presets v-if="showPresets" />
<div v-if="allowSearch || hasFilters || allowCustomizingColumns" class="relative flex items-center gap-3 min-h-16">
<div v-if="allowSearch || hasFilters || allowCustomizingColumns" class="relative flex items-center gap-3 min-h-16 starting-style-transition starting-style-transition--siblings">
<div class="flex flex-1 items-center gap-3 w-full">
<Search v-if="allowSearch" />
<Filters v-if="hasFilters" />
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/ui/Listing/Presets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function deletePreset() {

<template>
<div
class="relative flex shrink-0 space-x-2 border-b border-gray-200 text-sm text-gray-500 dark:border-gray-700/50 dark:text-gray-500"
class="relative flex shrink-0 space-x-2 border-b border-gray-200 text-sm text-gray-500 dark:border-gray-700/50 dark:text-gray-500 starting-style-transition"
>
<PresetTrigger :active="!activePreset" @click="viewAll" :text="__('All')" />
<PresetTrigger
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/ui/Listing/TableBody.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function handleRowClick(event, index) {
<tr
v-for="(row, index) in items"
:key="row.id"
class="sortable-row outline-hidden"
class="sortable-row outline-hidden starting-style-transition starting-style-transition--siblings"
:data-row="isSelected(row.id) ? 'selected' : 'unselected'"
@click="handleRowClick($event, index)"
>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/ui/Publish/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function tabHasError(tab) {
</TabProvider>
</template>

<aside class="space-y-6" v-if="shouldShowSidebar">
<aside class="space-y-6 starting-style-transition-children" v-if="shouldShowSidebar">
<slot name="actions" />
<TabProvider v-if="sidebarTab" :tab="sidebarTab">
<Sections />
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/ui/Widget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ defineProps({
</script>

<template>
<Card inset class="@container/widget">
<div class="flex h-full min-h-54 flex-col">
<Card inset class="@container/widget min-h-54 starting-style-transition" v-cloak>
<div class="flex h-full min-h-54 flex-col starting-style-transition">
<header class="flex items-center min-h-[49px] justify-between border-b border-gray-200 px-4.5 py-2 dark:border-gray-700">
<div class="flex items-center gap-3">
<Icon :name="icon" class="hidden! size-5 text-gray-500 @xs/widget:block!" />
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/updater/Updater.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</template>
</ui-header>

<ui-card v-if="gettingChangelog" class="text-center">
<ui-card v-if="gettingChangelog" class="text-center starting-style-transition" v-cloak>
<Icon name="loading" />
</ui-card>

Expand Down
16 changes: 16 additions & 0 deletions resources/js/composables/skeleton-delay.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { ref, watch } from 'vue';

export default function useSkeletonDelay(isLoading, delay = 300) {
const shouldShowSkeleton = ref(false);

const timer = setTimeout(() => shouldShowSkeleton.value = isLoading.value, delay);

watch(isLoading, (loading) => {
if (!loading) {
clearTimeout(timer);
shouldShowSkeleton.value = false;
}
});

return shouldShowSkeleton;
}
4 changes: 2 additions & 2 deletions resources/views/blueprints/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@section('title', __('Blueprints'))

@section('content')
<ui-header title="{{ __('Blueprints') }}" icon="blueprints">
<ui-header title="{{ __('Blueprints') }}" icon="blueprints" v-cloak>
<ui-dropdown>
<template #trigger>
<ui-button
Expand Down Expand Up @@ -44,7 +44,7 @@
</ui-dropdown>
</ui-header>

<section class="space-y-6">
<section class="space-y-6 starting-style-transition-children" v-cloak>
@if (Statamic\Facades\Collection::all()->count() > 0)
<ui-subheading size="lg" class="mb-2">{{ __('Collections') }}</ui-subheading>
<ui-panel>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/collections/empty.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@section('content-card-modifiers', 'bg-architectural-lines')

@section('content')
<header class="py-8 mt-8 text-center">
<header class="py-8 mt-8 text-center starting-style-transition" v-cloak>
<h1 class="text-[25px] font-medium antialiased flex justify-center items-center gap-3">
<ui-icon name="collections" class="size-5 text-gray-500"></ui-icon>
<span v-pre>{{ $collection->title() }}</span>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/avatar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
@if ($user->avatar())
<img src="{{ $user->avatar() }}" class="size-7 rounded-xl [button:has(&)]:rounded-xl shape-squircle {{ $class ?? '' }}" alt="{{ $user->name() }}" />
@else
<div aria-label="{{ $user->name() }}" class="size-7 text-white text-2xs font-medium flex items-center justify-center rounded-xl [button:has(&)]:rounded-xl bg-gradient-to-tr from-purple-500 to-red-600 shape-squircle {{ $class ?? '' }}">{{ $user->initials() }}</div>
<div aria-label="{{ $user->name() }}" class="antialiased size-7 text-white text-2xs font-medium flex items-center justify-center rounded-xl [button:has(&)]:rounded-xl bg-gradient-to-tr from-purple-500 to-red-600 shape-squircle {{ $class ?? '' }}">{{ $user->initials() }}</div>
@endif
65 changes: 65 additions & 0 deletions resources/views/components/breadcrumbs/dropdown.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{{-- Hardcoded duplicate of the dropdown trigger in blade to prevent Vue pop in --}}
<button
:class="{'absolute right-0 animate-out fade-out duration-700 fill-mode-forwards':true}"
class="
inline-flex items-center justify-center whitespace-nowrap shrink-0
font-medium antialiased cursor-pointer no-underline
disabled:text-gray-400 dark:disabled:text-gray-600 disabled:cursor-not-allowed
[&_svg]:shrink-0 [&_svg]:text-black [&_svg]:opacity-60 dark:[&_svg]:text-white
bg-transparent hover:bg-gray-400/10 text-gray-900 dark:text-gray-300 dark:hover:bg-white/15 dark:hover:text-gray-200
h-10 text-sm rounded-lg px-0 gap-0 w-10
[&_svg]:size-4.5 [&_svg]:size-3! h-8! w-4! hover:bg-gray-300/5! -ml-3 mr-1
"
type="button"
data-ui-dropdown-trigger
>
@cp_svg('icons/chevron-vertical')
</button>

<ui-dropdown v-cloak class="relative" aria-label="{{ __('More options for') }} {{ __($breadcrumb->text()) }}">
<template #trigger>
<ui-button
variant="ghost"
icon="chevron-vertical"
class="[&_svg]:size-3! h-8! w-4! hover:bg-gray-300/5! -ml-3 mr-1 animate-in fade-in duration-500"
:aria-label="'{{ __('Options for') }} {{ __($breadcrumb->text()) }}'"
aria-haspopup="true"
aria-expanded="false"
></ui-button>
</template>
<ui-dropdown-header
class="grid grid-cols-[auto_1fr_auto] items-center"
icon="{{ $breadcrumb->icon() }}"
@if($breadcrumb->hasConfigureUrl())
append-icon="cog-solid"
append-href="{{ $breadcrumb->configureUrl() }}"
@endif
role="menuitem"
>
<a href="{{ $breadcrumb->url() }}" aria-label="{{ __('Navigate to') }} {{ __($breadcrumb->text()) }}">
{{ __($breadcrumb->text()) }}
</a>
</ui-dropdown-header>
@if($breadcrumb->hasLinks())
<ui-dropdown-menu role="menu">
@foreach($breadcrumb->links() as $link)
<ui-dropdown-item
text="{{ __($link->text) }}"
icon="{{ $link->icon }}"
href="{{ $link->url }}"
role="menuitem"
:aria-label="'{{ __($link->text) }} - {{ __('Navigate to') }}'"
></ui-dropdown-item>
@endforeach
</ui-dropdown-menu>
@endif
@if($breadcrumb->createUrl())
<ui-dropdown-footer
icon="plus"
text="{{ __($breadcrumb->createLabel()) }}"
href="{{ $breadcrumb->createUrl() }}"
role="menuitem"
:aria-label="'{{ __($breadcrumb->createLabel()) }} - {{ __('Create new') }}'"
></ui-dropdown-footer>
@endif
</ui-dropdown>
24 changes: 24 additions & 0 deletions resources/views/components/breadcrumbs/index.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div class="items-center gap-2 hidden md:flex" data-global-header-breadcrumbs>
@foreach($breadcrumbs as $breadcrumb)
<div class="items-center gap-2 md:flex relative">
<span class="text-white/30">/</span>
<a
class="
inline-flex items-center justify-center whitespace-nowrap shrink-0
font-medium antialiased cursor-pointer no-underline
disabled:text-gray-400 dark:disabled:text-gray-600 disabled:cursor-not-allowed
bg-transparent hover:bg-gray-400/10 text-gray-900 dark:text-gray-300 dark:hover:bg-white/15 dark:hover:text-gray-200 px-3 h-8
text-[0.8125rem] leading-tight gap-2 rounded-lg
dark:text-white/85! hover:text-white! px-2! mr-1.75
"
href="{{ $breadcrumb->url() }}"
>
{{ __($breadcrumb->text()) }}
</a>

@if($breadcrumb->hasLinks() || $breadcrumb->createUrl())
<x-statamic::breadcrumbs.dropdown :$breadcrumb />
@endif
</div>
@endforeach
</div>
Loading
Loading