Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/show hide link #437

Merged
merged 6 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion resources/views/components/links/list-item.blade.php
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed overflow-hidden because truncate was already available in the

tag, and move h-12 to parent div.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
href="{{ $link->url }}"
target="_blank"
rel="me noopener"
class="h-12 flex-1 items-center justify-center overflow-hidden px-4 font-bold text-white transition duration-300 ease-in-out"
class="items-center justify-center px-4 font-bold text-white transition duration-300 ease-in-out"
>
<div class="flex h-full items-center justify-center">
<p class="truncate">
Expand Down
13 changes: 6 additions & 7 deletions resources/views/livewire/links/index.blade.php
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will persistent the link description element centered

Original file line number Diff line number Diff line change
Expand Up @@ -229,24 +229,23 @@ class="space-y-3"
>
@foreach ($links as $link)
<li
class="hover:darken-gradient group flex {{ $link->is_visible ? 'bg-gradient-to-r' : 'bg-gray-500' }}"
class="relative h-12 hover:darken-gradient group flex {{ $link->is_visible ? 'bg-gradient-to-r' : 'bg-gray-500' }}"
:class="showSettingsForm ? gradient + ' ' + link_shape : '{{ $user->gradient }} {{ $user->link_shape }}'"
x-sortable-item="{{ $link->id }}"
wire:key="link-{{ $link->id }}"
>
<div
x-sortable-handle
class="flex w-11 cursor-move items-center justify-center text-slate-300 opacity-50 hover:opacity-100 focus:outline-none"
class="absolute left-0 top-0 bottom-0 flex w-11 cursor-move items-center justify-center text-slate-300 opacity-50 hover:opacity-100 focus:outline-none"
>
<x-heroicon-o-bars-3 class="size-6 opacity-100 group-hover:opacity-100 sm:opacity-0" />
</div>

<x-links.list-item
:$user
:$link
/>
<div class="flex-grow flex items-center justify-center">
<x-links.list-item :$user :$link />
</div>

<div class="flex items-center justify-center">
<div class="absolute right-0 top-0 bottom-0 flex items-center justify-center">
<div
class="hidden min-w-fit cursor-help items-center gap-1 text-xs group-hover:flex"
title="Clicked {{ Number::format($link->click_count) }} times"
Expand Down