71 lines
4.2 KiB
PHP
71 lines
4.2 KiB
PHP
<div class="p-6 space-y-5">
|
|
<h3 class="text-lg font-semibold text-t1">UTM Builder</h3>
|
|
|
|
<div class="space-y-3">
|
|
<div>
|
|
<label class="block text-xs font-medium text-t2 mb-1.5">Base URL *</label>
|
|
<input wire:model.live="baseUrl" type="url" placeholder="https://example.com/page"
|
|
class="block w-full px-3 py-2.5 bg-s2 border border-white/[.06] rounded-lg text-sm text-t1 placeholder-t3 focus:outline-none focus:ring-1 focus:ring-blue/50 focus:border-blue/50">
|
|
</div>
|
|
|
|
<div class="grid grid-cols-2 gap-3">
|
|
<div>
|
|
<label class="block text-xs font-medium text-t2 mb-1.5">utm_source</label>
|
|
<input wire:model.live="utmSource" type="text" placeholder="google, newsletter…"
|
|
class="block w-full px-3 py-2.5 bg-s2 border border-white/[.06] rounded-lg text-sm text-t1 placeholder-t3 focus:outline-none focus:ring-1 focus:ring-blue/50 focus:border-blue/50">
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-t2 mb-1.5">utm_medium</label>
|
|
<input wire:model.live="utmMedium" type="text" placeholder="email, cpc…"
|
|
class="block w-full px-3 py-2.5 bg-s2 border border-white/[.06] rounded-lg text-sm text-t1 placeholder-t3 focus:outline-none focus:ring-1 focus:ring-blue/50 focus:border-blue/50">
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-t2 mb-1.5">utm_campaign</label>
|
|
<input wire:model.live="utmCampaign" type="text" placeholder="spring_sale…"
|
|
class="block w-full px-3 py-2.5 bg-s2 border border-white/[.06] rounded-lg text-sm text-t1 placeholder-t3 focus:outline-none focus:ring-1 focus:ring-blue/50 focus:border-blue/50">
|
|
</div>
|
|
<div>
|
|
<label class="block text-xs font-medium text-t2 mb-1.5">utm_content</label>
|
|
<input wire:model.live="utmContent" type="text" placeholder="banner_v1…"
|
|
class="block w-full px-3 py-2.5 bg-s2 border border-white/[.06] rounded-lg text-sm text-t1 placeholder-t3 focus:outline-none focus:ring-1 focus:ring-blue/50 focus:border-blue/50">
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label class="block text-xs font-medium text-t2 mb-1.5">utm_term</label>
|
|
<input wire:model.live="utmTerm" type="text" placeholder="running+shoes…"
|
|
class="block w-full px-3 py-2.5 bg-s2 border border-white/[.06] rounded-lg text-sm text-t1 placeholder-t3 focus:outline-none focus:ring-1 focus:ring-blue/50 focus:border-blue/50">
|
|
</div>
|
|
</div>
|
|
|
|
@if($fullUrl)
|
|
<div>
|
|
<label class="block text-xs font-medium text-t2 mb-1.5">Generated URL</label>
|
|
<div class="flex items-start gap-2 p-3 bg-s2 border border-white/[.06] rounded-lg">
|
|
<span class="flex-1 text-xs text-t1 font-mono break-all">{{ $fullUrl }}</span>
|
|
<button wire:click="copyToClipboard" type="button"
|
|
class="flex-shrink-0 p-1 text-t2 hover:text-t1 transition-colors">
|
|
@if($copied)
|
|
<x-heroicon-o-check class="w-4 h-4 text-green" />
|
|
@else
|
|
<x-heroicon-o-clipboard-document class="w-4 h-4" />
|
|
@endif
|
|
</button>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="flex gap-3 pt-1">
|
|
<button wire:click="copyToClipboard" type="button" @disabled(!$fullUrl)
|
|
class="flex-1 px-4 py-2.5 bg-s2 border border-white/[.06] text-sm font-medium text-t1 rounded-lg hover:bg-s3 transition-colors disabled:opacity-40 disabled:cursor-not-allowed flex items-center justify-center gap-2">
|
|
<x-heroicon-o-clipboard-document class="w-4 h-4" />
|
|
{{ $copied ? 'Copied!' : 'Copy URL' }}
|
|
</button>
|
|
<button wire:click="createLink" type="button" @disabled(!$fullUrl)
|
|
class="flex-1 px-4 py-2.5 bg-accent-gradient text-white text-sm font-medium rounded-lg hover:opacity-90 transition-opacity disabled:opacity-40 disabled:cursor-not-allowed flex items-center justify-center gap-2">
|
|
<x-heroicon-o-plus class="w-4 h-4" />
|
|
Create Short Link
|
|
</button>
|
|
</div>
|
|
</div>
|