Skip to content

Commit

Permalink
Updated the sidebar open/close functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
PavlosIsaris committed Oct 25, 2024
1 parent d89f2f7 commit 46ffe8b
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function store(Request $request) {
'problem-description' => ['required'],
'problem-status' => ['required'], // bookmark2
'problem-default-language' => ['required'], // bookmark2
'problem-slug' => ['required','unique:crowd_sourcing_project_problems,slug'],
'problem-slug' => ['required', 'unique:crowd_sourcing_project_problems,slug'],
]);

$crowdSourcingProjectProblem = CrowdSourcingProjectProblem::create([
Expand Down
2 changes: 0 additions & 2 deletions app/Providers/ComposerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ class ComposerServiceProvider extends ServiceProvider {
* @return void
*/
public function boot() {
View::composer('loggedin-environment.partials.menu', 'App\ViewComposers\MenuComposer');

View::composer('errors::layout', 'App\ViewComposers\ErrorPagesComposer');

View::composer('partials.language-selector', 'App\ViewComposers\LanguageSelectorComposer');
Expand Down
19 changes: 0 additions & 19 deletions app/ViewComposers/MenuComposer.php

This file was deleted.

8 changes: 5 additions & 3 deletions resources/assets/sass/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,16 @@
.sidebar-menu-toggler-container {
background-color: var(--clr-secondary-grey);
border-radius: 100%;
width: 60px;
height: 60px;
width: 55px;
height: 55px;
padding: 10px;
#sidebar-menu-toggler {
text-align: center;
width: 100%;
height: 100%;
i {
color: var(--clr-secondary-light-grey);
font-size: 40px;
font-size: 33px;
width: 100%;
height: 100%;
}
Expand Down
5 changes: 4 additions & 1 deletion resources/views/loggedin-environment/layout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
</head>
<body class="logged-in-env {{ !app(Gate::class)->check("moderate-content-by-users")? "no-sidebar": "" }} hold-transition skin-white sidebar-mini layout-fixed layout-navbar-fixed @yield('body_class')">
<div id="app" class="wrapper">
@include("loggedin-environment.partials.menu")
@include("loggedin-environment.partials.header-controls")
@canany(['moderate-content-by-users'])
@include("loggedin-environment.partials.sidebar-menu")
@endcanany
<div class="content-wrapper">
<section class="content">
<div class="container" id="main-content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ class="fa fa-chevron-left"></i></a>
<li class="nav-item {{ UrlMatchesMenuItem('my-dashboard') }}">
<a class="nav-link" href="{{ route('my-dashboard') }}"> {{ __('menu.my_dashboard') }} </a>
</li>
@if($userHasContributedToAProject)
<li class="nav-item {{ UrlMatchesMenuItem('my-contributions') }}">
<a class="nav-link"
href="{{ route('my-contributions') }}"> {{ __('my-history.my_contributions') }} </a>
</li>
@endif
<li class="nav-item {{ UrlMatchesMenuItem('my-contributions') }}">
<a class="nav-link"
href="{{ route('my-contributions') }}"> {{ __('my-history.my_contributions') }} </a>
</li>
<li class="nav-item dropdown user user-menu">
<a class="nav-link dropdown-toggle" href="#" id="userMenu" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
Expand Down
57 changes: 0 additions & 57 deletions resources/views/loggedin-environment/partials/menu.blade.php

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<div class="sidebar">
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu">
@can("manage-platform-content")
<li class="nav-header">CONTENT MANAGEMENT</li>

<li class="nav-item {{UrlMatchesMenuItem('projects')}}">
<a class="nav-link" href="{{ route('projects.index') }}"><i
class="nav-icon fa fa-list "></i>
<p>See all Projects</p></a>
</li>
<li class="nav-item {{UrlMatchesMenuItem('projects/create')}}">
<a class="nav-link" href="{{ route('projects.create') }}"><i
class="nav-icon fa fa-plus "></i>
<p>Create new Project</p></a>
</li>
@endcan
@can("moderate-content-by-users")
<li class="nav-item {{UrlMatchesMenuItem("questionnaires")}}">
<a class="nav-link" href="{{ route('questionnaires.all') }}"><i
class="nav-icon fa fa-question-circle "></i>
<p>Questionnaires</p></a>
</li>
<li class="nav-item {{UrlMatchesMenuItem("questionnaires/reports")}}">
<a class="nav-link" href="{{ route('questionnaires.reports') }}"><i
class="nav-icon fa fa-question-circle "></i>
<p>Responses</p></a>
</li>
@endcan
@can("manage-platform")
<li class="nav-header">COMMUNICATION</li>

<li class="nav-item {{UrlMatchesMenuItem("communication/mailchimp")}}">
<a class="nav-link" href="{{ route('mailchimp-integration.get') }}"><i
class="nav-icon fa fa-envelope"></i>
<p>MailChimp</p></a>
</li>
@endcan
@can("manage-users")
<li class="nav-header">PLATFORM MANAGEMENT</li>

<li class="nav-item {{UrlMatchesMenuItem("admin/manage-users")}}">
<a class="nav-link" href="{{ url("admin/manage-users") }}"><i
class="nav-icon fa fa-users"></i>
<p>Manage Users</p></a>
</li>
@endcan
</ul>
</nav>
</div>
</aside>

0 comments on commit 46ffe8b

Please sign in to comment.