/
index.blade.php
169 lines (168 loc) · 7.27 KB
/
index.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
@php
$desktopMenu = $synthesiscmsPositionManager->getCustom('berylium', 'desktop-menu', array(Request::url()));
$mobileMenu = $synthesiscmsPositionManager->getCustom('berylium', 'mobile-menu', array(Request::url()));
@endphp
@if($desktopMenu && (is_array($desktopMenu) ? count($desktopMenu) : 1) && $model->enabled)
<nav class="col s12 {{ $synthesiscmsMainColor }} {{ $synthesiscmsMainColorClass }} darken-1 hide-on-med-and-down">
<div class="nav-wrapper">
<ul>
@php
$firstItemRandomId = "berylium-first-item-" . md5(date('Y-m-d H:i:s:u'));
@endphp
@if(!$synthesiscmsShowImageBigBanner)
<li id="{{ $firstItemRandomId }}"><a style="opacity: 0;">SynthesisCMS Logo Separator</a></li>
@endif
<script>
$(document).ready(function () {
$("#{{ $firstItemRandomId }}").width($('#synthesiscms-app-logo').width());
});
</script>
{!! $desktopMenu !!}
</ul>
</div>
</nav>
@endif
<style>
.berylium-icon-dropdown {
position: relative;
}
</style>
<script>
$('.dropdown-trigger-berylium').dropdown({
inDuration: 300,
outDuration: 225,
constrainWidth: true,
hover: true,
gutter: 0,
coverTrigger: true,
stopPropagation: false
});
</script>
<ul id="berylium-mobile-menu" class="sidenav">
<li class="no-padding">
<div class="user-view">
<div class="background">
<img src="{!! asset('img/office.jpg') !!}">
</div>
<a href="{!! url($synthesiscmsHomePage) !!}">
<img class="circle" style="border-radius: unset !important;"
src="{!! asset('img/synthesiscms-icon.svg') !!}">
</a>
<a href="{!! url($synthesiscmsHomePage) !!}">
<span class="white-text name truncate">
@if(\App\SynthesisCMS\API\Auth\UserPrivilegesManager::isGuest())
{{ trans('synthesiscms/helper.guest_username') }}
@else
{{ Auth::user()->name }}
@endif
</span>
</a>
<a href="{!! url($synthesiscmsHomePage) !!}">
<span class="white-text email truncate">
@if(\App\SynthesisCMS\API\Auth\UserPrivilegesManager::isGuest())
{{ trans('synthesiscms/helper.guest_email') }}
@else
{{ Auth::user()->email }}
@endif
</span>
</a>
</div>
</li>
@if (\App\SynthesisCMS\API\Auth\UserPrivilegesManager::isGuest())
@if($synthesiscmsShowLoginRegisterButtons)
<ul style="width: 100%;" class="collapsible collapsible-accordion">
<li class="{{ $synthesiscmsMainColor }}-text col s12 waves-effect waves-{{ $synthesiscmsMainColor }} {{ $synthesiscmsMainColorClass }}">
<a title="{!! trans('synthesiscms/menu.register') !!}" class="{{ $synthesiscmsMainColor }}-text collapsible-header" href="{{ route('register') }}"><i
class="material-icons {{ $synthesiscmsMainColor }}-text left">create</i>{!! trans('synthesiscms/menu.register') !!}
</a>
</li>
</ul>
<ul style="width: 100%;" class="collapsible collapsible-accordion">
<li class="{{ $synthesiscmsMainColor }}-text col s12 waves-effect waves-{{ $synthesiscmsMainColor }} {{ $synthesiscmsMainColorClass }}">
<a title="{!! trans('synthesiscms/menu.login') !!}" class="{{ $synthesiscmsMainColor }}-text collapsible-header" href="{{ route('login') }}"><i
class="material-icons {{ $synthesiscmsMainColor }}-text left">fingerprint</i>{!! trans('synthesiscms/menu.login') !!}
</a>
</li>
</ul>
@endif
@else
<ul style="width: 100%;" class="collapsible collapsible-accordion">
<li class="bold">
<a class="collapsible-header {{ $synthesiscmsMainColor }}-text {{ $synthesiscmsMainColorClass }} waves-effect waves-{{ $synthesiscmsMainColor }}">
<i class="material-icons {{ $synthesiscmsMainColor }}-text {{ $synthesiscmsMainColorClass }}">account_circle</i>
{{ Auth::user()->name }}
<i class="material-icons right {{ $synthesiscmsMainColor }}-text {{ $synthesiscmsMainColorClass }}">arrow_drop_down</i>
</a>
<div class="collapsible-body col s12">
<ul>
<li>
@if(Auth::user()->is_admin)
<a title="{!! trans('synthesiscms/menu.admin') !!}" class="{{ $synthesiscmsMainColor }}-text waves-effect waves-{{ $synthesiscmsMainColor }} {{ $synthesiscmsMainColorClass }}"
href="{{ route('admin') }}">
<i class="material-icons {{ $synthesiscmsMainColor }}-text left">build</i>{!! trans('synthesiscms/menu.admin') !!}
</a>
@endif
<a title="{!! trans('synthesiscms/menu.profile') !!}" class="{{ $synthesiscmsMainColor }}-text" href="{{ route('profile') }}">
<i class="material-icons {{ $synthesiscmsMainColor }}-text left">perm_identity</i>{!! trans('synthesiscms/menu.profile') !!}
</a>
<a title="{!! trans('synthesiscms/menu.logout') !!}" class="{{ $synthesiscmsMainColor }}-text" href="{{ route('logout') }}"
onclick="event.preventDefault(); document.getElementById('logout-form').submit();">
<i class="material-icons {{ $synthesiscmsMainColor }}-text left">power_settings_new</i>{!! trans('synthesiscms/menu.logout') !!}
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST"
style="display: none;">
{{ csrf_field() }}
</form>
</li>
</ul>
</div>
</li>
</ul>
@endif
@if($model->enabled)
{!! $mobileMenu !!}
@endif
{!! $synthesiscmsPositionManager->getStandard(App\SynthesisCMS\API\Positions\SynthesisPositions::InsideMenu, Request::url()) !!}
<ul style="width: 100%;" class="collapsible collapsible-accordion">
<li class="no-padding">
<a title="{!! trans('Berylium::berylium.language') !!}" class="collapsible-header {{ $synthesiscmsMainColor }}-text {{ $synthesiscmsMainColorClass }}">
<i class="material-icons left {{ $synthesiscmsMainColor }}-text {{ $synthesiscmsMainColorClass }}">public</i>
{{ trans('Berylium::berylium.language') }}
<i class="material-icons right {{ $synthesiscmsMainColor }}-text {{ $synthesiscmsMainColorClass }}">arrow_drop_down</i>
</a>
<div class="collapsible-body" style="padding: unset !important;">
<ul>
<script>
$(document).ready(function () {
$('.lang-span-berylium').each(function () {
var chk_lang_str = "{{ \App::getLocale() }}";
var element = $(this);
if (element.text().toLowerCase() == chk_lang_str.toLowerCase()) {
element.addClass("{{ $synthesiscmsMainColor }} white-text waves-light");
} else {
element.addClass("{{ $synthesiscmsMainColor }}-text waves-{{ $synthesiscmsMainColor }}");
}
});
$('.lang-span-berylium').click(function () {
SynthesisCmsJsUtils.setLanguage($(this).text().toUpperCase());
});
});
</script>
<li>
<span class="waves-effect col s12 lang-span-berylium">EN</span>
<span class="waves-effect col s12 lang-span-berylium">PL</span>
</li>
</ul>
</div>
</li>
</ul>
</ul>
<script>
$(document).ready(function () {
$('.sidenav').sidenav({
menuWidth: 300,
edge: 'left',
draggable: true
});
});
</script>