Files
coolify/resources/views/components/section-heading.blade.php
T
Andras Bacsai 4f32548e09 feat(tags): connect resources to a tag from the tag page
Add a "Connect to resources" modal to the tag show page for small
screens, where the tags canvas is hidden. A new toggleResource action
attaches or detaches the tag on a team resource after an authorization
check, then refreshes the tag's applications and services.

Also improve responsive layouts:
- Wrap section headings, project/environment toolbars and view toggles
  on narrow screens; keep modal headers from shrinking.
- Move the environment settings link to an icon next to the environment
  name and link the project name back to its environments.
- Group project icon, name and description into one "Project details"
  form with an unsaved-changes bar.
- Show dashboard "view all" links for projects and servers only when
  there are more items than the dashboard limit.
2026-10-15 13:19:18 +02:00

44 lines
1.6 KiB
PHP

@props([
'title',
'subtitle' => null,
'href' => null,
'actionLabel' => 'View all',
'icon' => null,
])
{{--
Shared section heading: a 14px title, an optional 11px muted subtitle, and an
optional action. Pass `href` for a small "View all" link and an
`<x-slot:actions>` for a right-aligned control; with both, the link sits
before the control, otherwise next to the title. `<x-slot:titleAction>`
puts a small control (such as a + button) right after the title.
--}}
<div {{ $attributes->merge(['class' => 'mb-3 min-w-0']) }}>
<div class="flex flex-wrap items-center justify-between gap-x-4 gap-y-2">
<div class="flex min-w-0 items-baseline gap-2">
<div class="flex min-w-0 items-center gap-1">
<h2 class="min-w-0 truncate text-[14px]! leading-5! font-semibold! text-black dark:text-fg">
{{ $title }}
</h2>
@isset($titleAction)
{{ $titleAction }}
@endisset
</div>
@if (filled($href) && ! isset($actions))
@include('components.section-heading-link')
@endif
</div>
@isset($actions)
<div class="ml-auto flex shrink-0 items-center gap-3">
@if (filled($href))
@include('components.section-heading-link')
@endif
{{ $actions }}
</div>
@endisset
</div>
@if (filled($subtitle))
<p class="mt-0.5 text-[11px] text-neutral-500 dark:text-fg-faint">{{ $subtitle }}</p>
@endif
</div>