Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
webprofile-jwg2024
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siti Aisah
webprofile-jwg2024
Commits
44f6f30d
Commit
44f6f30d
authored
Jan 13, 2020
by
Aan Choesni Herlingga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
front post
parent
c9fa7794
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
250 additions
and
2 deletions
+250
-2
app/Http/Controllers/Webprofile/Front/PageController.php
+1
-1
app/Http/Controllers/Webprofile/Front/PostController.php
+86
-0
resources/views/webprofile/front/jollyany/en/post.blade.php
+53
-0
resources/views/webprofile/front/jollyany/en/widget.blade.php
+28
-0
resources/views/webprofile/front/jollyany/post.blade.php
+53
-0
resources/views/webprofile/front/jollyany/widget.blade.php
+28
-0
routes/webprofile/front.php
+1
-1
No files found.
app/Http/Controllers/Webprofile/Front/PageController.php
View file @
44f6f30d
...
...
@@ -49,7 +49,7 @@ class PageController extends Controller
{
$setting
=
webprofilesetting
();
$data
=
Pages
::
with
([
'rEn'
])
->
where
(
'slug'
,
$title
)
->
first
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
...
...
app/Http/Controllers/Webprofile/Front/PostController.php
0 → 100644
View file @
44f6f30d
<?php
namespace
App\Http\Controllers\Webprofile\Front
;
use
Illuminate\Http\Request
;
use
App\Http\Controllers\Controller
;
use
App\Models\Webprofile\Categories
;
use
App\Models\Webprofile\Design
;
use
App\Models\Webprofile\Menu
;
use
App\Models\Webprofile\Posts
;
use
Session
;
class
PostController
extends
Controller
{
public
function
index
(
$title
)
{
$setting
=
webprofilesetting
();
if
(
!
Session
::
has
(
'selected_language'
))
{
session
([
'selected_language'
=>
'id'
]);
}
if
(
Session
::
get
(
'selected_language'
)
==
'id'
)
{
$data
=
$this
->
getDataId
(
$setting
,
$title
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.post'
,
$data
);
}
else
if
(
Session
::
get
(
'selected_language'
)
==
'en'
)
{
$data
=
$this
->
getDataEn
(
$setting
,
$title
);
return
view
(
'webprofile.front.'
.
$setting
[
'theme'
]
.
'.en.post'
,
$data
);
}
}
public
function
getDataId
(
$setting
,
$title
)
{
$setting
=
webprofilesetting
();
$data
=
Posts
::
where
(
'slug'
,
$title
)
->
first
();
$resend
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderby
(
'post_date'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$hot
=
Posts
::
where
(
'post_status'
,
'1'
)
->
orderby
(
'viewer'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$categories
=
Categories
::
where
(
'is_active'
,
'1'
)
->
get
();
$menu
=
Menu
::
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$viewer
[
'viewer'
]
=
(
int
)
$data
->
viewer
+
1
;
$data
->
update
(
$viewer
);
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
];
return
$data
;
}
public
function
getDataEn
(
$setting
,
$title
)
{
$setting
=
webprofilesetting
();
$data
=
Posts
::
with
([
'rEn'
])
->
where
(
'slug'
,
$title
)
->
first
();
$resend
=
Posts
::
with
([
'rEn'
])
->
where
(
'post_status'
,
'1'
)
->
orderby
(
'post_date'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$hot
=
Posts
::
with
([
'rEn'
])
->
where
(
'post_status'
,
'1'
)
->
orderby
(
'viewer'
,
'desc'
)
->
limit
(
'5'
)
->
get
();
$categories
=
Categories
::
with
([
'rEn'
])
->
where
(
'is_active'
,
'1'
)
->
get
();
$menu
=
Menu
::
with
([
'rEn'
])
->
orderby
(
'urutan'
,
'asc'
)
->
get
();
$widget_right
=
Design
::
where
(
'name_design'
,
'widget_right'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$widget_left
=
Design
::
where
(
'name_design'
,
'widget_left'
)
->
orderBy
(
'urutan'
,
'ASC'
)
->
get
();
$viewer
[
'viewer'
]
=
(
int
)
$data
->
viewer
+
1
;
$data
->
update
(
$viewer
);
$data
=
[
'setting'
=>
$setting
,
'data'
=>
$data
,
'menu'
=>
$menu
,
'widget_right'
=>
$widget_right
,
'widget_left'
=>
$widget_left
,
'resend'
=>
$resend
,
'hot'
=>
$hot
,
'categories'
=>
$categories
,
];
return
$data
;
}
}
resources/views/webprofile/front/jollyany/en/post.blade.php
0 → 100644
View file @
44f6f30d
@
extends
(
'webprofile.front.jollyany.master'
)
@
section
(
'content'
)
<
section
class
="
post
-
wrapper
-
top
jt
-
shadow
clearfix
">
<div class="
container
">
<div class="
col
-
lg
-
12
">
<h2>{!!
$data->rEn
->title !!}</h2>
</div>
</div>
</section><!-- end post-wrapper-top -->
<section class="
blog
-
wrapper
">
<div class="
container
">
<div class="
row
">
<div id="
main
-
content
" class="
col
-
lg
-
8
col
-
md
-
8
col
-
sm
-
12
col
-
xs
-
12
">
<div class="
row
">
<div class="
blog
-
masonry
">
<div class="
col
-
lg
-
12
">
<div class="
blog
-
carousel
">
<div class="
blog
-
carousel
-
header
">
<h1>{!!
$data->rEn
->title !!}</h1>
<div class="
blog
-
carousel
-
meta
">
<span><i class="
fa
fa
-
calendar
"></i>
<time title="
{
!!
$data
->
post_data
!!
}
" datetime="
{
!!
$data
->
post_data
!!
}
">{!! InseoHelper::tglbulanindo2(
$data->post_date
) !!}</time> - kategori <a href="
#">{!! $data->rCategory->rEn->name !!}</a></span>
<
span
><
i
class
="
fa
fa
-
eye
"></i> <a href="
#">{!! $data->viewer !!} Views</a></span>
{{
--
<
span
><
i
class
="
fa
fa
-
user
"></i> <a href="
#">Redaksi</a></span> --}}
</
div
><!--
end
blog
-
carousel
-
meta
-->
</
div
><!--
end
blog
-
carousel
-
header
-->
<
div
class
="
blog
-
carousel
-
desc
">
@if (
$data->thumbnail
)
@if(
$data->cover_status
== 1)
<center>
@if (
$setting['external_storage']
== 1)
<img src="
{{
$setting
[
'url_static'
]
.
'/'
.
$setting
[
'directory'
]
.
'/thumbnail/'
.
$data
->
thumbnail
}}
" alt="" style="
max
-
width
:
708
px
">
@else
<img src="
{{
url
(
'/storage/thumbnail/'
.
$data
->
thumbnail
)
}}
" alt="" style="
max
-
width
:
708
px
">
@endif
</center>
@endif
@endif
{!!
$data->rEn
->content !!}
</div>
</div>
</div>
</div>
</div>
</div>
@include('webprofile.front.jollyany.en.widget')
</div>
</div><!-- end container -->
</section><!--end white-wrapper -->
@endsection
resources/views/webprofile/front/jollyany/en/widget.blade.php
0 → 100644
View file @
44f6f30d
<div
id=
"sidebar"
class=
"col-lg-4 col-md-4 col-sm-12 col-xs-12"
>
<div
class=
"widget"
>
<div
class=
"title"
><h2>
<h2>
Category
</h2>
<ul
class=
"nav nav-tabs nav-stacked"
>
@foreach($categories as $value)
<li><a
class=
"unesa-link"
href=
"{!! url('category/'.$value->name) !!}"
>
{!! $value->rEn->name !!}
</a></li>
@endforeach
</ul>
<h2>
latest article
</h2>
<ul
class=
"nav nav-tabs nav-stacked"
>
@foreach($hot as $value)
<li><a
class=
"unesa-link"
href=
"{!! url('post/'.$value->slug) !!}"
>
{!! $value->rEn->title !!}
</a></li>
@endforeach
</ul>
@foreach ($widget_right as $vwidget_right)
<div
class=
"widget"
>
<div
class=
"title"
>
<h2>
{!! $vwidget_right->title_design !!}
</h2>
</div>
<!-- end title -->
{!! $vwidget_right->value_design !!}
</div>
<!-- end widget -->
@endforeach
</div>
</div>
</div>
resources/views/webprofile/front/jollyany/post.blade.php
0 → 100644
View file @
44f6f30d
@
extends
(
'webprofile.front.jollyany.master'
)
@
section
(
'content'
)
<
section
class
="
post
-
wrapper
-
top
jt
-
shadow
clearfix
">
<div class="
container
">
<div class="
col
-
lg
-
12
">
<h2>{!!
$data->title
!!}</h2>
</div>
</div>
</section><!-- end post-wrapper-top -->
<section class="
blog
-
wrapper
">
<div class="
container
">
<div class="
row
">
<div id="
main
-
content
" class="
col
-
lg
-
8
col
-
md
-
8
col
-
sm
-
12
col
-
xs
-
12
">
<div class="
row
">
<div class="
blog
-
masonry
">
<div class="
col
-
lg
-
12
">
<div class="
blog
-
carousel
">
<div class="
blog
-
carousel
-
header
">
<h1>{!!
$data->title
!!}</h1>
<div class="
blog
-
carousel
-
meta
">
<span><i class="
fa
fa
-
calendar
"></i>
<time title="
{
!!
$data
->
post_data
!!
}
" datetime="
{
!!
$data
->
post_data
!!
}
">{!! InseoHelper::tglbulanindo2(
$data->post_date
) !!}</time> - kategori <a href="
#">{!! $data->rCategory->name !!}</a></span>
<
span
><
i
class
="
fa
fa
-
eye
"></i> <a href="
#">{!! $data->viewer !!} Views</a></span>
{{
--
<
span
><
i
class
="
fa
fa
-
user
"></i> <a href="
#">Redaksi</a></span> --}}
</
div
><!--
end
blog
-
carousel
-
meta
-->
</
div
><!--
end
blog
-
carousel
-
header
-->
<
div
class
="
blog
-
carousel
-
desc
">
@if (
$data->thumbnail
)
@if(
$data->cover_status
== 1)
<center>
@if (
$setting['external_storage']
== 1)
<img src="
{{
$setting
[
'url_static'
]
.
'/'
.
$setting
[
'directory'
]
.
'/thumbnail/'
.
$data
->
thumbnail
}}
" alt="" style="
max
-
width
:
708
px
">
@else
<img src="
{{
url
(
'/storage/thumbnail/'
.
$data
->
thumbnail
)
}}
" alt="" style="
max
-
width
:
708
px
">
@endif
</center>
@endif
@endif
{!!
$data->content
!!}
</div>
</div>
</div>
</div>
</div>
</div>
@include('webprofile.front.jollyany.widget')
</div>
</div><!-- end container -->
</section><!--end white-wrapper -->
@endsection
resources/views/webprofile/front/jollyany/widget.blade.php
0 → 100644
View file @
44f6f30d
<div
id=
"sidebar"
class=
"col-lg-4 col-md-4 col-sm-12 col-xs-12"
>
<div
class=
"widget"
>
<div
class=
"title"
><h2>
<h2>
kategori
</h2>
<ul
class=
"nav nav-tabs nav-stacked"
>
@foreach($categories as $value)
<li><a
class=
"unesa-link"
href=
"{!! url('category/'.$value->name) !!}"
>
{!! $value->name !!}
</a></li>
@endforeach
</ul>
<h2>
artikel terkini
</h2>
<ul
class=
"nav nav-tabs nav-stacked"
>
@foreach($hot as $value)
<li><a
class=
"unesa-link"
href=
"{!! url('post/'.$value->slug) !!}"
>
{!! $value->title !!}
</a></li>
@endforeach
</ul>
@foreach ($widget_right as $vwidget_right)
<div
class=
"widget"
>
<div
class=
"title"
>
<h2>
{!! $vwidget_right->title_design !!}
</h2>
</div>
<!-- end title -->
{!! $vwidget_right->value_design !!}
</div>
<!-- end widget -->
@endforeach
</div>
</div>
</div>
routes/webprofile/front.php
View file @
44f6f30d
...
...
@@ -2,7 +2,7 @@
Route
::
group
([
'namespace'
=>
'Webprofile\Front'
],
function
()
{
Route
::
get
(
'/'
,
'FrontController@index'
);
Route
::
get
(
'page/{id}'
,
'PageController@index'
)
->
name
(
'page'
);
Route
::
get
(
'post/{id}'
,
'
FrontController@post
'
)
->
name
(
'post'
);
Route
::
get
(
'post/{id}'
,
'
PostController@index
'
)
->
name
(
'post'
);
Route
::
get
(
'archive'
,
'FrontController@archive'
)
->
name
(
'archive'
);
Route
::
get
(
'category/{id}'
,
'FrontController@category'
)
->
name
(
'category'
);
Route
::
get
(
'info/{id}'
,
'FrontController@info'
)
->
name
(
'infomation'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment