Commit 48f47e3b by Bagus Pambudi

berita terkini

parent c517769f
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:s8Ig1mW5Z73iyqD3l9sXbNsqzHIwUPlp7qKy/GVwWiE=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
...@@ -201,4 +201,21 @@ class PostController extends Controller ...@@ -201,4 +201,21 @@ class PostController extends Controller
return $data; return $data;
} }
// public function ShareWidget()
// {
// // $setting = webprofilesetting();
// $shareComponent = \Share::page(
// 'https://www.positronx.io/create-autocomplete-search-in-laravel-with-typeahead-js/',
// 'Your share text comes here',
// )
// ->facebook()
// ->twitter()
// ->linkedin()
// ->telegram()
// ->whatsapp()
// ->reddit();
// return view('webprofile.front.'.$setting['theme'].'.post', $data, compact('shareComponent'));
// }
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
"fideloper/proxy": "^4.0", "fideloper/proxy": "^4.0",
"guzzlehttp/guzzle": "^6.4", "guzzlehttp/guzzle": "^6.4",
"jenssegers/agent": "^2.6", "jenssegers/agent": "^2.6",
"jorenvanhocht/laravel-share": "^4.1",
"laravel/framework": "5.8.*", "laravel/framework": "5.8.*",
"laravel/tinker": "^1.0", "laravel/tinker": "^1.0",
"laravelcollective/html": "^5.8.0", "laravelcollective/html": "^5.8.0",
......
...@@ -161,6 +161,7 @@ return [ ...@@ -161,6 +161,7 @@ return [
Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class, Illuminate\View\ViewServiceProvider::class,
Jorenvh\Share\Providers\ShareServiceProvider::class,
/* /*
* Package Service Providers... * Package Service Providers...
...@@ -227,6 +228,7 @@ return [ ...@@ -227,6 +228,7 @@ return [
'View' => Illuminate\Support\Facades\View::class, 'View' => Illuminate\Support\Facades\View::class,
'Image' => Intervention\Image\Facades\Image::class, 'Image' => Intervention\Image\Facades\Image::class,
'InseoHelper' => App\Helpers\InseoHelper::class, 'InseoHelper' => App\Helpers\InseoHelper::class,
'Share' => Jorenvh\Share\ShareFacade::class,
], ],
......
<?php
return [
/*
|--------------------------------------------------------------------------
| Services
|--------------------------------------------------------------------------
|
| Specify the base uri for each service.
|
|
|
*/
'services' => [
'facebook' => [
'uri' => 'https://www.facebook.com/sharer/sharer.php?u=',
],
'twitter' => [
'uri' => 'https://twitter.com/intent/tweet',
'text' => 'Default share text',
],
'linkedin' => [
'uri' => 'https://www.linkedin.com/sharing/share-offsite', // oud: http://www.linkedin.com/shareArticle
'extra' => ['mini' => 'true'],
],
'whatsapp' => [
'uri' => 'https://wa.me/?text=',
'extra' => ['mini' => 'true'],
],
'pinterest' => [
'uri' => 'https://pinterest.com/pin/create/button/?url=',
],
'reddit' => [
'uri' => 'https://www.reddit.com/submit',
'text' => 'Default share text',
],
'telegram' => [
'uri' => 'https://telegram.me/share/url',
'text' => 'Default share text',
],
],
/*
|--------------------------------------------------------------------------
| Font Awesome
|--------------------------------------------------------------------------
|
| Specify the version of Font Awesome that you want to use.
| We support version 4 and 5.
|
|
*/
'fontAwesomeVersion' => 5,
];
var popupSize = {
width: 780,
height: 550
};
$(document).on('click', '.social-button', function (e) {
var verticalPos = Math.floor(($(window).width() - popupSize.width) / 2),
horisontalPos = Math.floor(($(window).height() - popupSize.height) / 2);
var popup = window.open($(this).prop('href'), 'social',
'width=' + popupSize.width + ',height=' + popupSize.height +
',left=' + verticalPos + ',top=' + horisontalPos +
',location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1');
if (popup) {
popup.focus();
e.preventDefault();
}
});
\ No newline at end of file
<?php
return [
'facebook' => '<li><a href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-facebook-square"></span></a></li>',
'twitter' => '<li><a href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-twitter"></span></a></li>',
'linkedin' => '<li><a href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-linkedin"></span></a></li>',
'whatsapp' => '<li><a target="_blank" href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-whatsapp"></span></a></li>',
'pinterest' => '<li><a href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-pinterest"></span></a></li>',
'reddit' => '<li><a target="_blank" href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-reddit"></span></a></li>',
'telegram' => '<li><a target="_blank" href=":url" class="social-button :class" id=":id" title=":title" rel=":rel"><span class="fab fa-telegram"></span></a></li>',
];
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<h2>آخر المقالات</h2> <h2>آخر المقالات</h2>
<ul class="nav nav-tabs nav-stacked"> <ul class="nav nav-tabs nav-stacked">
@foreach($hot as $value) @foreach($resend as $value)
@if ($value->rSa) @if ($value->rSa)
<li><a class="unesa-link" href="{!! url('post/'.$value->slug) !!}">{!! $value->rSa->title !!}</a></li> <li><a class="unesa-link" href="{!! url('post/'.$value->slug) !!}">{!! $value->rSa->title !!}</a></li>
@endif @endif
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<h2>Neuster Artikel</h2> <h2>Neuster Artikel</h2>
<ul class="nav nav-tabs nav-stacked"> <ul class="nav nav-tabs nav-stacked">
@foreach($hot as $value) @foreach($resend as $value)
@if ($value->rDe) @if ($value->rDe)
<li><a class="unesa-link" href="{!! url('post/'.$value->slug) !!}">{!! $value->rDe->title !!}</a></li> <li><a class="unesa-link" href="{!! url('post/'.$value->slug) !!}">{!! $value->rDe->title !!}</a></li>
@endif @endif
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
@endif @endif
@endif @endif
<br> <br>
<div class="widget col-md-4 pull-right related hidden-sm hidden-xs kaitan" style="margin-bottom: 5px;"> <div class="widget col-md-4 pull-right related hidden-sm hidden-xs kaitan" style="margin-bottom: 5px; text-transform: capitalize;">
<h4 class="h4_kaitan"><strong>related news </strong></h4> <h4 class="h4_kaitan"><strong>related news </strong></h4>
<div class="isi_kaitan"> <div class="isi_kaitan">
<div class="content_kaitan"> <div class="content_kaitan">
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<h2>latest article</h2> <h2>latest article</h2>
<ul class="nav nav-tabs nav-stacked"> <ul class="nav nav-tabs nav-stacked">
@foreach($hot as $value) @foreach($resend as $value)
@if ($value->rEn) @if ($value->rEn)
<li><a class="unesa-link" href="{!! url('post/'.$value->slug) !!}">{!! $value->rEn->title !!}</a></li> <li><a class="unesa-link" href="{!! url('post/'.$value->slug) !!}">{!! $value->rEn->title !!}</a></li>
@endif @endif
......
...@@ -68,6 +68,10 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= ...@@ -68,6 +68,10 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
a:active { a:active {
text-decoration: underline; text-decoration: underline;
} }
</style> </style>
<!-- Styles --> <!-- Styles -->
......
...@@ -28,6 +28,21 @@ ...@@ -28,6 +28,21 @@
overflow-y: scroll; overflow-y: scroll;
} }
div#social-links {
margin: 0 auto;
max-width: 500px;
}
div#social-links ul li {
display: inline-block;
}
div#social-links ul li a {
padding: 20px;
border: 1px solid #ccc;
margin: 1px;
font-size: 30px;
color: #222;
background-color: #ccc;
}
div#navbar-collapse-1.navbar-collapse.collapse.navbar-right{ div#navbar-collapse-1.navbar-collapse.collapse.navbar-right{
margin-left: 150px; margin-left: 150px;
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
</div> </div>
</div> </div>
{!! $data->content !!} {!! $data->content !!}
{{-- $shareComponent --}}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<h2>artikel terkini</h2> <h2>artikel terkini</h2>
<ul class="nav nav-tabs nav-stacked"> <ul class="nav nav-tabs nav-stacked">
@foreach($hot as $value) @foreach($resend as $value)
<li><a class="unesa-link" href="{!! url('post/'.$value->slug) !!}">{!! $value->title !!}</a></li> <li><a class="unesa-link" href="{!! url('post/'.$value->slug) !!}">{!! $value->title !!}</a></li>
@endforeach @endforeach
</ul> </ul>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<h2>最新文章</h2> <h2>最新文章</h2>
<ul class="nav nav-tabs nav-stacked"> <ul class="nav nav-tabs nav-stacked">
@foreach($hot as $value) @foreach($resend as $value)
@if ($value->rZh) @if ($value->rZh)
<li><a class="unesa-link" href="{!! url('post/'.$value->slug) !!}">{!! $value->rZh->title !!}</a></li> <li><a class="unesa-link" href="{!! url('post/'.$value->slug) !!}">{!! $value->rZh->title !!}</a></li>
@endif @endif
......
...@@ -14,4 +14,5 @@ Route::group(['namespace' => 'Webprofile\Front'], function () { ...@@ -14,4 +14,5 @@ Route::group(['namespace' => 'Webprofile\Front'], function () {
Route::get('download', 'DownloadController@index')->name('download'); Route::get('download', 'DownloadController@index')->name('download');
Route::get('downloadlink/{data}', 'DownloadController@downloadFile')->name('downloadFile'); Route::get('downloadlink/{data}', 'DownloadController@downloadFile')->name('downloadFile');
Route::get('team/{name}', 'PersonController@index')->name('team'); Route::get('team/{name}', 'PersonController@index')->name('team');
Route::get('share/{id}', 'PostController@ShareWidget')->name('share');
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment