-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from tomatophp/develop
add like feature and share buttons
- Loading branch information
Showing
21 changed files
with
448 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
namespace Modules\CircleXO\App\View\Components; | ||
|
||
use Illuminate\View\Component; | ||
use Illuminate\View\View; | ||
use ProtoneMedia\Splade\Components\Form; | ||
use ProtoneMedia\Splade\Components\Form\InteractsWithFormElement; | ||
|
||
class Recap extends Component | ||
{ | ||
use InteractsWithFormElement; | ||
|
||
/** | ||
* Create a new component instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct( | ||
public string $name = '', | ||
public string $vModel = '', | ||
public string $type = 'text', | ||
public string $label = '', | ||
public string $validationKey = '', | ||
public bool $showErrors = true, | ||
public string $prepend = '', | ||
public string $append = '', | ||
public string $help = '', | ||
public bool $alwaysEnablePrepend = false, | ||
public bool $alwaysEnableAppend = false, | ||
public bool $disabled = false, | ||
) | ||
{ | ||
Form::allowAttribute($name); | ||
} | ||
|
||
public function isHidden(): bool | ||
{ | ||
return $this->type === 'hidden'; | ||
} | ||
|
||
|
||
|
||
/** | ||
* Get the view/contents that represent the component. | ||
*/ | ||
public function render(): View|string | ||
{ | ||
return view('circle-xo::components.recap'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Modules\CircleXO\App\View\Components; | ||
|
||
use Illuminate\View\Component; | ||
use Illuminate\View\View; | ||
use Modules\CircleXO\App\Models\AccountListing; | ||
|
||
class Share extends Component | ||
{ | ||
/** | ||
* Create a new component instance. | ||
*/ | ||
public function __construct( | ||
public string $title, | ||
public ?string $description=null, | ||
public ?string $url=null, | ||
) | ||
{ | ||
// | ||
} | ||
|
||
/** | ||
* Get the view/contents that represent the component. | ||
*/ | ||
public function render(): View|string | ||
{ | ||
return view('circle-xo::components.share'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<Recap | ||
{{ $attributes->only(['v-if', 'v-show', 'class', 'v-model', 'v-bind:hasError'])->class(['hidden' => $isHidden()]) }} | ||
v-model="{{ $vueModel() }}" | ||
siteKey="6LfudzMnAAAAAPyF1Z1wXFBEve9KqZE8ykJEZNsR" | ||
> | ||
</Recap> |
96 changes: 96 additions & 0 deletions
96
Modules/CircleXO/resources/views/components/share.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<x-tomato-admin-dropdown> | ||
<x-slot:button> | ||
{{ $slot }} | ||
</x-slot:button> | ||
|
||
<ShareNetwork | ||
network="facebook" | ||
url="{{$url ?? url()->current()}}" | ||
title="{{$title}}" | ||
description="{{$description}}" | ||
quote="{{$description}}" | ||
> | ||
<div class="whitespace-nowrap block w-full px-4 py-2 text-sm leading-5 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:outline-none focus:bg-zinc-100 dark:focus:bg-zinc-800 transition duration-150 ease-in-out"> | ||
<div class="flex justify-start gap-2 "> | ||
<div class="flex flex-col items-center justify-center"> | ||
<i class="bx bxl-facebook text-sm"></i> | ||
</div> | ||
<div class="text-sm "> | ||
{{__('Share On Facebook')}} | ||
</div> | ||
</div> | ||
</div> | ||
</ShareNetwork> | ||
<ShareNetwork | ||
network="twitter" | ||
url="{{$url ?? url()->current()}}" | ||
title="{{$title}}" | ||
description="{{$description}}" | ||
quote="{{$description}}" | ||
> | ||
<div class="whitespace-nowrap block w-full px-4 py-2 text-sm leading-5 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:outline-none focus:bg-zinc-100 dark:focus:bg-zinc-800 transition duration-150 ease-in-out"> | ||
<div class="flex justify-start gap-2 "> | ||
<div class="flex flex-col items-center justify-center"> | ||
<i class="bx bxl-twitter text-sm"></i> | ||
</div> | ||
<div class="text-sm "> | ||
{{__('Share On Twitter')}} | ||
</div> | ||
</div> | ||
</div> | ||
</ShareNetwork> | ||
<ShareNetwork | ||
network="linkedin" | ||
url="{{$url ?? url()->current()}}" | ||
title="{{$title}}" | ||
description="{{$description}}" | ||
quote="{{$description}}" | ||
> | ||
<div class="whitespace-nowrap block w-full px-4 py-2 text-sm leading-5 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:outline-none focus:bg-zinc-100 dark:focus:bg-zinc-800 transition duration-150 ease-in-out"> | ||
<div class="flex justify-start gap-2 "> | ||
<div class="flex flex-col items-center justify-center"> | ||
<i class="bx bxl-linkedin text-sm"></i> | ||
</div> | ||
<div class="text-sm "> | ||
{{__('Share On Linkedin')}} | ||
</div> | ||
</div> | ||
</div> | ||
</ShareNetwork> | ||
<ShareNetwork | ||
network="whatsapp" | ||
url="{{$url ?? url()->current()}}" | ||
title="{{$title}}" | ||
description="{{$description}}" | ||
quote="{{$description}}" | ||
> | ||
<div class="whitespace-nowrap block w-full px-4 py-2 text-sm leading-5 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:outline-none focus:bg-zinc-100 dark:focus:bg-zinc-800 transition duration-150 ease-in-out"> | ||
<div class="flex justify-start gap-2 "> | ||
<div class="flex flex-col items-center justify-center"> | ||
<i class="bx bxl-whatsapp text-sm"></i> | ||
</div> | ||
<div class="text-sm "> | ||
{{__('Share On Whatsapp')}} | ||
</div> | ||
</div> | ||
</div> | ||
</ShareNetwork> | ||
<ShareNetwork | ||
network="telegram" | ||
url="{{$url ?? url()->current()}}" | ||
title="{{$title}}" | ||
description="{{$description}}" | ||
quote="{{$description}}" | ||
> | ||
<div class="whitespace-nowrap block w-full px-4 py-2 text-sm leading-5 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-100 dark:hover:bg-zinc-800 focus:outline-none focus:bg-zinc-100 dark:focus:bg-zinc-800 transition duration-150 ease-in-out"> | ||
<div class="flex justify-start gap-2 "> | ||
<div class="flex flex-col items-center justify-center"> | ||
<i class="bx bxl-telegram text-sm"></i> | ||
</div> | ||
<div class="text-sm "> | ||
{{__('Share On Telegram')}} | ||
</div> | ||
</div> | ||
</div> | ||
</ShareNetwork> | ||
</x-tomato-admin-dropdown> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.