1617457913
Hello readers, Today in this blog you’ll learn how to create Social Media Buttons with Hover Effect Using HTML & CSS. In this program (Social Media Buttons with Tooltip), at first, on the webpage, there are five social media buttons - Facebook, Twitter, Instagram, Github, and YouTube. When you hover on a particular button or icon then the tooltip appears with sliding animation and the background color of a button also changes with the default icon color. Inside the tooltip, there is the name of a particular hovered social media icon as you have seen in the image.
#html #css #social-icon #button
1625749260
Social Media Share Button Design With Hover Effects in Pure HTML and CSS | Tutorial
Using font awesome icon.
Like our Facebook Page
https://www.facebook.com/easywebcode7
How To Create Social Media Buttons Hover Effect Only HTML and CSS: https://youtu.be/hqlu47FX_q8
Search Box Design Tutorial Using Only HTML and CSS : https://youtu.be/_F4DdlgQX5U
How To Create Website Preloader in HTML and CSS : https://youtu.be/c9tElJYxyxQ
How to Create Simple Registration Form using only HTML and CSS || Sign up Page Design Tutorial : https://youtu.be/Pcrd_ObbScs
#Tutorial #EasyWebCode
#css #html #social media share button design with hover effects #social media share button design
1658359680
O pacote Laravel Share permite que você gere dinamicamente botões de compartilhamento social de redes sociais populares para aumentar o engajamento de mídia social.
Isso permite que os visitantes do site compartilhem facilmente o conteúdo com suas conexões e redes de mídia social.
Neste tutorial, mostro como você pode adicionar links de compartilhamento social em seu projeto Laravel 8 usando o pacote Laravel Share.
Instale o pacote usando o compositor –
composer require jorenvanhocht/laravel-share
config/app.php
arquivo.Jorenvh\Share\Providers\ShareServiceProvider::class
em 'providers'
–'providers' => [
....
....
....
Jorenvh\Share\Providers\ShareServiceProvider::class,
];
'Share' => Jorenvh\Share\ShareFacade::class
em 'aliases'
–'aliases' => [
....
....
....
'Share' => Jorenvh\Share\ShareFacade::class,
];
Execute o comando -
php artisan vendor:publish --provider="Jorenvh\Share\Providers\ShareServiceProvider"
routes/web.php
arquivo.Código concluído
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\PageController;
Route::get('/', [PageController::class, 'index']);
PageController
controlador.php artisan make:controller PageController
app/Http/Controllers/PageController.php
arquivo.index() – Crie um link de compartilhamento usando Share::page()
e atribua a $shareButtons1
. Da mesma forma, crie mais 2 links e atribua as variáveis.
Carregue index
a visualização e passe $shareButtons1
, $shareButtons2
, e $shareButtons3
.
Código concluído
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PageController extends Controller
{
public function index(){
// Share button 1
$shareButtons1 = \Share::page(
'https://makitweb.com/datatables-ajax-pagination-with-search-and-sort-in-laravel-8/'
)
->facebook()
->twitter()
->linkedin()
->telegram()
->whatsapp()
->reddit();
// Share button 2
$shareButtons2 = \Share::page(
'https://makitweb.com/how-to-make-autocomplete-search-using-jquery-ui-in-laravel-8/'
)
->facebook()
->twitter()
->linkedin()
->telegram();
// Share button 3
$shareButtons3 = \Share::page(
'https://makitweb.com/how-to-upload-multiple-files-with-vue-js-and-php/'
)
->facebook()
->twitter()
->linkedin()
->telegram()
->whatsapp()
->reddit();
// Load index view
return view('index')
->with('shareButtons1',$shareButtons1 )
->with('shareButtons2',$shareButtons2 )
->with('shareButtons3',$shareButtons3 );
}
}
Criar index.blade.php
arquivo na resources/views/
pasta.
Inclua Bootstrap, CSS de fonte incrível, jQuery e js/share.js. –
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- Share JS -->
<script src="{{ asset('js/share.js') }}"></script>
Adicionado CSS para personalizar links de compartilhamento social.
Exiba links de compartilhamento social usando –
{!! $shareButtons1 !!}
Da mesma forma, exiba outros 2 – {!! $shareButtons2 !!} e {!! $shareButtons3 !!}.
Código concluído
<!DOCTYPE html>
<html>
<head>
<title>Add social share button in Laravel 8 with Laravel Share</title>
<!-- Meta -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- Share JS -->
<script src="{{ asset('js/share.js') }}"></script>
<style>
#social-links ul{
padding-left: 0;
}
#social-links ul li {
display: inline-block;
}
#social-links ul li a {
padding: 6px;
border: 1px solid #ccc;
border-radius: 5px;
margin: 1px;
font-size: 25px;
}
#social-links .fa-facebook{
color: #0d6efd;
}
#social-links .fa-twitter{
color: deepskyblue;
}
#social-links .fa-linkedin{
color: #0e76a8;
}
#social-links .fa-whatsapp{
color: #25D366
}
#social-links .fa-reddit{
color: #FF4500;;
}
#social-links .fa-telegram{
color: #0088cc;
}
</style>
</head>
<body>
<div class='container'>
<!-- Post 1 -->
<div class='row mt-5'>
<h2>Datatables AJAX pagination with Search and Sort in Laravel 8</h2>
<p>With pagination, it is easier to display a huge list of data on the page.</p>
<p>You can create pagination with and without AJAX.</p>
<p>There are many jQuery plugins are available for adding pagination. One of them is DataTables.</p>
<p>In this tutorial, I show how you can add Datatables AJAX pagination without the Laravel package in Laravel 8.</p>
<!-- Social Share buttons 1 -->
<div class="social-btn-sp">
{!! $shareButtons1 !!}
</div>
</div>
<!-- Post 2 -->
<div class='row mt-5'>
<h2>How to make Autocomplete search using jQuery UI in Laravel 8</h2>
<p>jQuery UI has different types of widgets available, one of them is autocomplete.</p>
<p>Data is loaded according to the input after initialize autocomplete on a textbox. User can select an option from the suggestion list.</p>
<p>In this tutorial, I show how you can make autocomplete search using jQuery UI in Laravel 8.</p>
<!-- Social Share buttons 2 -->
<div class="social-btn-sp">
{!! $shareButtons2 !!}
</div>
</div>
<!-- Post 3 -->
<div class='row mt-5 mb-5'>
<h2>How to upload multiple files with Vue.js and PHP</h2>
<p>Instead of adding multiple file elements, you can use a single file element for allowing the user to upload more than one file.</p>
<p>Using the FormData object to pass the selected files to the PHP for upload.</p>
<p>In this tutorial, I show how you can upload multiple files using Vue.js and PHP.</p>
<!-- Social Share buttons 3 -->
<div class="social-btn-sp">
{!! $shareButtons3 !!}
</div>
</div>
</div>
</body>
</html>
No exemplo, consertei os links, mas você pode configurá-los dinamicamente.
Personalize o design usando CSS e o número de ícones sociais visíveis usando o controlador.
Usando o pacote Laravel Share, você pode compartilhar links para –
Fonte: https://makitweb.com
1658370780
Le package Laravel Share vous permet de générer dynamiquement des boutons de partage social à partir de réseaux sociaux populaires pour augmenter l'engagement sur les réseaux sociaux.
Ceux-ci permettent aux visiteurs du site Web de partager facilement le contenu avec leurs connexions et réseaux de médias sociaux.
Dans ce didacticiel, je montre comment vous pouvez ajouter des liens de partage social dans votre projet Laravel 8 à l'aide du package Laravel Share.
Installez le package à l'aide de composer -
composer require jorenvanhocht/laravel-share
config/app.php
le fichier.Jorenvh\Share\Providers\ShareServiceProvider::class
dans 'providers'
-'providers' => [
....
....
....
Jorenvh\Share\Providers\ShareServiceProvider::class,
];
'Share' => Jorenvh\Share\ShareFacade::class
dans 'aliases'
-'aliases' => [
....
....
....
'Share' => Jorenvh\Share\ShareFacade::class,
];
Exécutez la commande -
php artisan vendor:publish --provider="Jorenvh\Share\Providers\ShareServiceProvider"
routes/web.php
le fichier.Code terminé
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\PageController;
Route::get('/', [PageController::class, 'index']);
PageController
un contrôleur.php artisan make:controller PageController
app/Http/Controllers/PageController.php
le fichier.index() - Créez un lien de partage en utilisant Share::page()
et attribuez-le à $shareButtons1
. De même, créez 2 autres liens et affectez-les aux variables.
Charger la index
vue et passer $shareButtons1
, $shareButtons2
et $shareButtons3
.
Code terminé
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PageController extends Controller
{
public function index(){
// Share button 1
$shareButtons1 = \Share::page(
'https://makitweb.com/datatables-ajax-pagination-with-search-and-sort-in-laravel-8/'
)
->facebook()
->twitter()
->linkedin()
->telegram()
->whatsapp()
->reddit();
// Share button 2
$shareButtons2 = \Share::page(
'https://makitweb.com/how-to-make-autocomplete-search-using-jquery-ui-in-laravel-8/'
)
->facebook()
->twitter()
->linkedin()
->telegram();
// Share button 3
$shareButtons3 = \Share::page(
'https://makitweb.com/how-to-upload-multiple-files-with-vue-js-and-php/'
)
->facebook()
->twitter()
->linkedin()
->telegram()
->whatsapp()
->reddit();
// Load index view
return view('index')
->with('shareButtons1',$shareButtons1 )
->with('shareButtons2',$shareButtons2 )
->with('shareButtons3',$shareButtons3 );
}
}
Créer index.blade.php
un fichier dans resources/views/
le dossier.
Incluez Bootstrap, CSS font-awesome, jQuery et js/share.js. –
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- Share JS -->
<script src="{{ asset('js/share.js') }}"></script>
CSS ajouté pour personnaliser les liens de partage social.
Afficher les liens de partage social en utilisant –
{!! $shareButtons1 !!}
De même, affichez les autres 2 – {!! $shareButtons2 !!}, et { !! $shareButtons3 !!}.
Code terminé
<!DOCTYPE html>
<html>
<head>
<title>Add social share button in Laravel 8 with Laravel Share</title>
<!-- Meta -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- Share JS -->
<script src="{{ asset('js/share.js') }}"></script>
<style>
#social-links ul{
padding-left: 0;
}
#social-links ul li {
display: inline-block;
}
#social-links ul li a {
padding: 6px;
border: 1px solid #ccc;
border-radius: 5px;
margin: 1px;
font-size: 25px;
}
#social-links .fa-facebook{
color: #0d6efd;
}
#social-links .fa-twitter{
color: deepskyblue;
}
#social-links .fa-linkedin{
color: #0e76a8;
}
#social-links .fa-whatsapp{
color: #25D366
}
#social-links .fa-reddit{
color: #FF4500;;
}
#social-links .fa-telegram{
color: #0088cc;
}
</style>
</head>
<body>
<div class='container'>
<!-- Post 1 -->
<div class='row mt-5'>
<h2>Datatables AJAX pagination with Search and Sort in Laravel 8</h2>
<p>With pagination, it is easier to display a huge list of data on the page.</p>
<p>You can create pagination with and without AJAX.</p>
<p>There are many jQuery plugins are available for adding pagination. One of them is DataTables.</p>
<p>In this tutorial, I show how you can add Datatables AJAX pagination without the Laravel package in Laravel 8.</p>
<!-- Social Share buttons 1 -->
<div class="social-btn-sp">
{!! $shareButtons1 !!}
</div>
</div>
<!-- Post 2 -->
<div class='row mt-5'>
<h2>How to make Autocomplete search using jQuery UI in Laravel 8</h2>
<p>jQuery UI has different types of widgets available, one of them is autocomplete.</p>
<p>Data is loaded according to the input after initialize autocomplete on a textbox. User can select an option from the suggestion list.</p>
<p>In this tutorial, I show how you can make autocomplete search using jQuery UI in Laravel 8.</p>
<!-- Social Share buttons 2 -->
<div class="social-btn-sp">
{!! $shareButtons2 !!}
</div>
</div>
<!-- Post 3 -->
<div class='row mt-5 mb-5'>
<h2>How to upload multiple files with Vue.js and PHP</h2>
<p>Instead of adding multiple file elements, you can use a single file element for allowing the user to upload more than one file.</p>
<p>Using the FormData object to pass the selected files to the PHP for upload.</p>
<p>In this tutorial, I show how you can upload multiple files using Vue.js and PHP.</p>
<!-- Social Share buttons 3 -->
<div class="social-btn-sp">
{!! $shareButtons3 !!}
</div>
</div>
</div>
</body>
</html>
Dans l'exemple, j'ai corrigé les liens mais vous pouvez les définir dynamiquement.
Personnalisez la conception à l'aide de CSS et du nombre d'icônes sociales visibles à l'aide du contrôleur.
En utilisant le package Laravel Share, vous pouvez partager des liens vers -
Source : https://makitweb.com
1658363460
El paquete Laravel Share le permite generar dinámicamente botones para compartir en redes sociales populares para aumentar la participación en las redes sociales.
Estos permiten a los visitantes del sitio web compartir fácilmente el contenido con sus conexiones y redes sociales.
En este tutorial, muestro cómo puede agregar enlaces para compartir en redes sociales en su proyecto Laravel 8 usando el paquete Laravel Share.
Instale el paquete usando composer –
composer require jorenvanhocht/laravel-share
config/app.php
archivo.Jorenvh\Share\Providers\ShareServiceProvider::class
en 'providers'
–'providers' => [
....
....
....
Jorenvh\Share\Providers\ShareServiceProvider::class,
];
'Share' => Jorenvh\Share\ShareFacade::class
en 'aliases'
–'aliases' => [
....
....
....
'Share' => Jorenvh\Share\ShareFacade::class,
];
Ejecute el comando –
php artisan vendor:publish --provider="Jorenvh\Share\Providers\ShareServiceProvider"
routes/web.php
archivo.Código completado
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\PageController;
Route::get('/', [PageController::class, 'index']);
PageController
controlador.php artisan make:controller PageController
app/Http/Controllers/PageController.php
archivo.index (): cree un enlace compartido usando Share::page()
y asigne a $shareButtons1
. Del mismo modo, cree 2 enlaces más y asígnelos a variables.
Cargue la index
vista y pase $shareButtons1
, $shareButtons2
y $shareButtons3
.
Código completado
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PageController extends Controller
{
public function index(){
// Share button 1
$shareButtons1 = \Share::page(
'https://makitweb.com/datatables-ajax-pagination-with-search-and-sort-in-laravel-8/'
)
->facebook()
->twitter()
->linkedin()
->telegram()
->whatsapp()
->reddit();
// Share button 2
$shareButtons2 = \Share::page(
'https://makitweb.com/how-to-make-autocomplete-search-using-jquery-ui-in-laravel-8/'
)
->facebook()
->twitter()
->linkedin()
->telegram();
// Share button 3
$shareButtons3 = \Share::page(
'https://makitweb.com/how-to-upload-multiple-files-with-vue-js-and-php/'
)
->facebook()
->twitter()
->linkedin()
->telegram()
->whatsapp()
->reddit();
// Load index view
return view('index')
->with('shareButtons1',$shareButtons1 )
->with('shareButtons2',$shareButtons2 )
->with('shareButtons3',$shareButtons3 );
}
}
Crear index.blade.php
archivo en resources/views/
carpeta.
Incluya Bootstrap, font-awesome CSS, jQuery y js/share.js. –
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- Share JS -->
<script src="{{ asset('js/share.js') }}"></script>
Se agregó CSS para personalizar los enlaces para compartir en redes sociales.
Mostrar enlaces para compartir en redes sociales usando –
{!! $shareButtons1 !!}
Del mismo modo, muestra otros 2 – {!! $shareButtons2 !!}, y {!! $compartirBotones3 !!}.
Código completado
<!DOCTYPE html>
<html>
<head>
<title>Add social share button in Laravel 8 with Laravel Share</title>
<!-- Meta -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- Share JS -->
<script src="{{ asset('js/share.js') }}"></script>
<style>
#social-links ul{
padding-left: 0;
}
#social-links ul li {
display: inline-block;
}
#social-links ul li a {
padding: 6px;
border: 1px solid #ccc;
border-radius: 5px;
margin: 1px;
font-size: 25px;
}
#social-links .fa-facebook{
color: #0d6efd;
}
#social-links .fa-twitter{
color: deepskyblue;
}
#social-links .fa-linkedin{
color: #0e76a8;
}
#social-links .fa-whatsapp{
color: #25D366
}
#social-links .fa-reddit{
color: #FF4500;;
}
#social-links .fa-telegram{
color: #0088cc;
}
</style>
</head>
<body>
<div class='container'>
<!-- Post 1 -->
<div class='row mt-5'>
<h2>Datatables AJAX pagination with Search and Sort in Laravel 8</h2>
<p>With pagination, it is easier to display a huge list of data on the page.</p>
<p>You can create pagination with and without AJAX.</p>
<p>There are many jQuery plugins are available for adding pagination. One of them is DataTables.</p>
<p>In this tutorial, I show how you can add Datatables AJAX pagination without the Laravel package in Laravel 8.</p>
<!-- Social Share buttons 1 -->
<div class="social-btn-sp">
{!! $shareButtons1 !!}
</div>
</div>
<!-- Post 2 -->
<div class='row mt-5'>
<h2>How to make Autocomplete search using jQuery UI in Laravel 8</h2>
<p>jQuery UI has different types of widgets available, one of them is autocomplete.</p>
<p>Data is loaded according to the input after initialize autocomplete on a textbox. User can select an option from the suggestion list.</p>
<p>In this tutorial, I show how you can make autocomplete search using jQuery UI in Laravel 8.</p>
<!-- Social Share buttons 2 -->
<div class="social-btn-sp">
{!! $shareButtons2 !!}
</div>
</div>
<!-- Post 3 -->
<div class='row mt-5 mb-5'>
<h2>How to upload multiple files with Vue.js and PHP</h2>
<p>Instead of adding multiple file elements, you can use a single file element for allowing the user to upload more than one file.</p>
<p>Using the FormData object to pass the selected files to the PHP for upload.</p>
<p>In this tutorial, I show how you can upload multiple files using Vue.js and PHP.</p>
<!-- Social Share buttons 3 -->
<div class="social-btn-sp">
{!! $shareButtons3 !!}
</div>
</div>
</div>
</body>
</html>
En el ejemplo, arreglé los enlaces pero puedes configurarlos dinámicamente.
Personaliza el diseño usando CSS y la cantidad de íconos sociales visibles usando el controlador.
Usando el paquete Laravel Share puede compartir enlaces a –
Fuente: https://makitweb.com
1658389080
Gói Laravel Share cho phép bạn tạo động các nút chia sẻ xã hội từ các mạng xã hội phổ biến để tăng mức độ tương tác trên mạng xã hội.
Những điều này cho phép khách truy cập trang web dễ dàng chia sẻ nội dung với các kết nối và mạng xã hội của họ.
Trong hướng dẫn này, tôi chỉ cách bạn có thể thêm liên kết chia sẻ xã hội trong dự án Laravel 8 của mình bằng cách sử dụng gói Laravel Share.
Cài đặt gói bằng trình soạn nhạc -
composer require jorenvanhocht/laravel-share
config/app.php
tệp.Jorenvh\Share\Providers\ShareServiceProvider::class
vào 'providers'
-'providers' => [
....
....
....
Jorenvh\Share\Providers\ShareServiceProvider::class,
];
'Share' => Jorenvh\Share\ShareFacade::class
vào 'aliases'
-'aliases' => [
....
....
....
'Share' => Jorenvh\Share\ShareFacade::class,
];
Chạy lệnh -
php artisan vendor:publish --provider="Jorenvh\Share\Providers\ShareServiceProvider"
routes/web.php
tệp.Mã đã hoàn thành
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\PageController;
Route::get('/', [PageController::class, 'index']);
PageController
Bộ điều khiển.php artisan make:controller PageController
app/Http/Controllers/PageController.php
tệp.index () - Tạo một liên kết chia sẻ bằng cách sử dụng Share::page()
và gán cho $shareButtons1
. Tương tự, tạo thêm 2 liên kết và gán cho các biến.
Tải index
chế độ xem và vượt qua $shareButtons1
, $shareButtons2
và $shareButtons3
.
Mã đã hoàn thành
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class PageController extends Controller
{
public function index(){
// Share button 1
$shareButtons1 = \Share::page(
'https://makitweb.com/datatables-ajax-pagination-with-search-and-sort-in-laravel-8/'
)
->facebook()
->twitter()
->linkedin()
->telegram()
->whatsapp()
->reddit();
// Share button 2
$shareButtons2 = \Share::page(
'https://makitweb.com/how-to-make-autocomplete-search-using-jquery-ui-in-laravel-8/'
)
->facebook()
->twitter()
->linkedin()
->telegram();
// Share button 3
$shareButtons3 = \Share::page(
'https://makitweb.com/how-to-upload-multiple-files-with-vue-js-and-php/'
)
->facebook()
->twitter()
->linkedin()
->telegram()
->whatsapp()
->reddit();
// Load index view
return view('index')
->with('shareButtons1',$shareButtons1 )
->with('shareButtons2',$shareButtons2 )
->with('shareButtons3',$shareButtons3 );
}
}
Tạo index.blade.php
tệp trong resources/views/
thư mục.
Bao gồm Bootstrap, CSS font-awesome, jQuery và js / share.js. -
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- Share JS -->
<script src="{{ asset('js/share.js') }}"></script>
Đã thêm CSS để tùy chỉnh các liên kết chia sẻ trên mạng xã hội.
Hiển thị các liên kết chia sẻ xã hội bằng cách sử dụng -
{!! $shareButtons1 !!}
Tương tự, hiển thị 2 - {!! $ shareButtons2 !!} và {!! $ shareButtons3 !!}.
Mã đã hoàn thành
<!DOCTYPE html>
<html>
<head>
<title>Add social share button in Laravel 8 with Laravel Share</title>
<!-- Meta -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"/>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- Share JS -->
<script src="{{ asset('js/share.js') }}"></script>
<style>
#social-links ul{
padding-left: 0;
}
#social-links ul li {
display: inline-block;
}
#social-links ul li a {
padding: 6px;
border: 1px solid #ccc;
border-radius: 5px;
margin: 1px;
font-size: 25px;
}
#social-links .fa-facebook{
color: #0d6efd;
}
#social-links .fa-twitter{
color: deepskyblue;
}
#social-links .fa-linkedin{
color: #0e76a8;
}
#social-links .fa-whatsapp{
color: #25D366
}
#social-links .fa-reddit{
color: #FF4500;;
}
#social-links .fa-telegram{
color: #0088cc;
}
</style>
</head>
<body>
<div class='container'>
<!-- Post 1 -->
<div class='row mt-5'>
<h2>Datatables AJAX pagination with Search and Sort in Laravel 8</h2>
<p>With pagination, it is easier to display a huge list of data on the page.</p>
<p>You can create pagination with and without AJAX.</p>
<p>There are many jQuery plugins are available for adding pagination. One of them is DataTables.</p>
<p>In this tutorial, I show how you can add Datatables AJAX pagination without the Laravel package in Laravel 8.</p>
<!-- Social Share buttons 1 -->
<div class="social-btn-sp">
{!! $shareButtons1 !!}
</div>
</div>
<!-- Post 2 -->
<div class='row mt-5'>
<h2>How to make Autocomplete search using jQuery UI in Laravel 8</h2>
<p>jQuery UI has different types of widgets available, one of them is autocomplete.</p>
<p>Data is loaded according to the input after initialize autocomplete on a textbox. User can select an option from the suggestion list.</p>
<p>In this tutorial, I show how you can make autocomplete search using jQuery UI in Laravel 8.</p>
<!-- Social Share buttons 2 -->
<div class="social-btn-sp">
{!! $shareButtons2 !!}
</div>
</div>
<!-- Post 3 -->
<div class='row mt-5 mb-5'>
<h2>How to upload multiple files with Vue.js and PHP</h2>
<p>Instead of adding multiple file elements, you can use a single file element for allowing the user to upload more than one file.</p>
<p>Using the FormData object to pass the selected files to the PHP for upload.</p>
<p>In this tutorial, I show how you can upload multiple files using Vue.js and PHP.</p>
<!-- Social Share buttons 3 -->
<div class="social-btn-sp">
{!! $shareButtons3 !!}
</div>
</div>
</div>
</body>
</html>
Trong ví dụ, tôi đã sửa các liên kết nhưng bạn có thể đặt chúng động.
Tùy chỉnh thiết kế bằng cách sử dụng CSS và số lượng biểu tượng xã hội có thể nhìn thấy bằng bộ điều khiển.
Sử dụng gói Chia sẻ Laravel, bạn có thể chia sẻ các liên kết đến -
Nguồn: https://makitweb.com