diff --git a/bower.json b/bower.json index 69fbacb7..c480ea08 100644 --- a/bower.json +++ b/bower.json @@ -19,6 +19,7 @@ "tagmanager": "^3.0.2", "eonasdan-bootstrap-datetimepicker": "^4.17.47", "swagger-ui": "^3.13.4", - "jquery-ui": "^1.12.1" + "jquery-ui": "^1.12.1", + "bootstrap-side-navbar": "^1.0.1" } } diff --git a/localization/de.php b/localization/de.php index 5ea498f2..3a5e9312 100644 --- a/localization/de.php +++ b/localization/de.php @@ -155,5 +155,7 @@ return array( 'Warranty ends' => 'Garantie endet', 'TV remote control' => 'TV Fernbedienung', 'Alarm clock' => 'Wecker', - 'Heat remote control' => 'Fernbedienung Heizung' + 'Heat remote control' => 'Fernbedienung Heizung', + 'About grocy' => 'Über grocy', + 'Close' => 'Schließen' ); diff --git a/public/css/grocy.css b/public/css/grocy.css index a393caad..c76b8c61 100644 --- a/public/css/grocy.css +++ b/public/css/grocy.css @@ -4,82 +4,78 @@ } .navbar-fixed-top { - border: 0; + background-color: #e5e5e5; + border-bottom: 2px solid; + border-color: #d6d6d6; } -.sidebar { - display: none; +.navbar-brand { + font-weight: bold; + letter-spacing: -5px; + font-size: 2.2em; + color: #0b024c !important; + margin-left: 0 !important; + padding-left: 5px !important; + +} + +.navbar-fixed-side { + top: 51px; + padding-top: 20px; + margin-bottom: 20px; + background-color: #e5e5e5; + border-right: 2px solid #d6d6d6; + max-width: 260px; + border-left: 0; +} + +#sidebar { + overflow-y: auto; } @media (min-width: 768px) { - .sidebar { - position: fixed; - top: 51px; - bottom: 0; - left: 0; - z-index: 1000; - display: block; - padding: 20px; - overflow-x: hidden; - overflow-y: auto; - background-color: #e5e5e5; - border-right: 2px solid #d6d6d6; - min-width: 220px; - max-width: 260px; - } - #navbar-mobile { display: none !important; } + + .nav-copyright { + padding-bottom: 100px; + } } -.nav-sidebar { - margin-right: -21px; - margin-bottom: 20px; - margin-left: -20px; +@media (max-width: 768px) { + .navbar-brand { + margin-left: 25px !important; + } } -.nav-sidebar > li > a { +.sidebar-nav > li > a { padding-right: 20px; padding-left: 20px; transition: all 0.3s; } -.nav-sidebar > li > a:hover { +.sidebar-nav > li > a:hover { box-shadow: inset 5px 0 0 #337ab7; transition: all 0.3s; } -.nav-sidebar > li > a:focus { +.sidebar-nav > li > a:focus { box-shadow: inset 5px 0 0 #ab2230; transition: all 0.3s; } -.nav-sidebar > .active > a, -.nav-sidebar > .active > a:hover, -.nav-sidebar > .active > a:focus { +.sidebar-nav > .active > a, +.sidebar-nav > .active > a:hover, +.sidebar-nav > .active > a:focus { background-color: #d6d6d6; box-shadow: inset 5px 0 0 #ab2230; transition: all 0.3s; } -.navbar-default { - background-color: #e5e5e5; -} - -.main { - padding: 20px; -} - -@media (min-width: 768px) { - .main { - padding-right: 40px; - padding-left: 40px; - } -} - -.main .page-header { - margin-top: 0; +.nav > li.disabled > a, +.navbar-default .navbar-nav > .disabled > a { + color: #a7a7a7; } .nav-copyright { @@ -88,6 +84,26 @@ text-align: center; } +.nav-copyright > li > a { + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +.navbar-default .navbar-nav > .open > a { + background-color: #d6d6d6 !important; +} + +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus { + background-color: #e5e5e5 !important; +} + +.well { + background-color: #e5e5e5; + padding-right: 25px; + padding-left: 25px; +} + .discrete-link { color: inherit !important; transition: all 0.3s !important; @@ -105,21 +121,6 @@ a.discrete-link:focus { transition: all 0.3s !important; } -.navbar-fixed-top { - border-bottom: 2px solid; - border-color: #d6d6d6; -} - -.navbar-brand { - font-weight: bold; - letter-spacing: -5px; - font-size: 2.2em; - color: #0b024c !important; - margin-left: 0 !important; - padding-left: 5px !important; - -} - .table td.fit-content, .table th.fit-content { white-space: nowrap; @@ -144,6 +145,11 @@ a.discrete-link:focus { margin-bottom: 2px; } +.discrete-content-separator-2x { + padding-top: 10px; + padding-bottom: 10px; +} + .warning-bg { background-color: #fcf8e3 !important; } @@ -156,44 +162,15 @@ a.discrete-link:focus { background-color: #afd9ee !important; } -.discrete-content-separator { - padding-top: 5px; - padding-bottom: 5px; -} - -.discrete-content-separator-2x { - padding-top: 10px; - padding-bottom: 10px; -} - -.well { - background-color: #e5e5e5; -} - -.nav > li.disabled > a, -.navbar-default .navbar-nav > .disabled > a -{ - color: #a7a7a7; -} - #toast-container > div { opacity: 1; filter: alpha(opacity=100); } - .toast-success { +.toast-success { background-color: #4c994c; } #toast-container > div { box-shadow: none; } - -.navbar-default .navbar-nav > .open > a { - background-color: #d6d6d6 !important; -} - -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - background-color: #e5e5e5 !important; -} diff --git a/views/batteries.blade.php b/views/batteries.blade.php index 588c8436..0fd78565 100644 --- a/views/batteries.blade.php +++ b/views/batteries.blade.php @@ -5,50 +5,46 @@ @section('viewJsName', 'batteries') @section('content') -
- -

- @yield('title') - -  {{ $L('Add') }} - -

- -
- - - - - - - - - - - @foreach($batteries as $battery) - - - - - - - @endforeach - -
#{{ $L('Name') }}{{ $L('Description') }}{{ $L('Used in') }}
- - - - - - - - {{ $battery->name }} - - {{ $battery->description }} - - {{ $battery->used_in }} -
-
+

+ @yield('title') + +  {{ $L('Add') }} + +

+
+ + + + + + + + + + + @foreach($batteries as $battery) + + + + + + + @endforeach + +
#{{ $L('Name') }}{{ $L('Description') }}{{ $L('Used in') }}
+ + + + + + + + {{ $battery->name }} + + {{ $battery->description }} + + {{ $battery->used_in }} +
@stop diff --git a/views/batteriesoverview.blade.php b/views/batteriesoverview.blade.php index cc1be1af..3e6aaad8 100644 --- a/views/batteriesoverview.blade.php +++ b/views/batteriesoverview.blade.php @@ -5,42 +5,38 @@ @section('viewJsName', 'batteriesoverview') @section('content') -
- -

@yield('title')

- -
- - - - - - - - - - @foreach($current as $curentBatteryEntry) - - - - - - @endforeach - -
{{ $L('Battery') }}{{ $L('Last charged') }}{{ $L('Next planned charge cycle') }}
- {{ FindObjectInArrayByPropertyValue($batteries, 'id', $curentBatteryEntry->battery_id)->name }} - - {{ $curentBatteryEntry->last_tracked_time }} - - - @if(FindObjectInArrayByPropertyValue($batteries, 'id', $curentBatteryEntry->battery_id)->charge_interval_days > 0) - {{ $nextChargeTimes[$curentBatteryEntry->battery_id] }} - - @else - ... - @endif -
-
+

@yield('title')

+
+ + + + + + + + + + @foreach($current as $curentBatteryEntry) + + + + + + @endforeach + +
{{ $L('Battery') }}{{ $L('Last charged') }}{{ $L('Next planned charge cycle') }}
+ {{ FindObjectInArrayByPropertyValue($batteries, 'id', $curentBatteryEntry->battery_id)->name }} + + {{ $curentBatteryEntry->last_tracked_time }} + + + @if(FindObjectInArrayByPropertyValue($batteries, 'id', $curentBatteryEntry->battery_id)->charge_interval_days > 0) + {{ $nextChargeTimes[$curentBatteryEntry->battery_id] }} + + @else + ... + @endif +
@stop diff --git a/views/batteryform.blade.php b/views/batteryform.blade.php index 2aef4538..1c064d76 100644 --- a/views/batteryform.blade.php +++ b/views/batteryform.blade.php @@ -9,8 +9,7 @@ @section('viewJsName', 'batteryform') @section('content') -
- +

@yield('title')

@@ -40,6 +39,5 @@ -
@stop diff --git a/views/batterytracking.blade.php b/views/batterytracking.blade.php index 710781ab..8a387bf9 100644 --- a/views/batterytracking.blade.php +++ b/views/batterytracking.blade.php @@ -5,8 +5,7 @@ @section('viewJsName', 'batterytracking') @section('content') -
- +

@yield('title')

@@ -36,10 +35,9 @@
-
-
+
@include('components.batterycard')
@stop diff --git a/views/components/menu.blade.php b/views/components/menu.blade.php new file mode 100644 index 00000000..90657f48 --- /dev/null +++ b/views/components/menu.blade.php @@ -0,0 +1,66 @@ + + + +
+ + + +
+ + + + + + diff --git a/views/components/usermenu.blade.php b/views/components/usermenu.blade.php new file mode 100644 index 00000000..006a5cb2 --- /dev/null +++ b/views/components/usermenu.blade.php @@ -0,0 +1,17 @@ + diff --git a/views/consume.blade.php b/views/consume.blade.php index c08c1bfa..275344e7 100644 --- a/views/consume.blade.php +++ b/views/consume.blade.php @@ -5,8 +5,7 @@ @section('viewJsName', 'consume') @section('content') -
- +

@yield('title')

@@ -37,10 +36,9 @@
-
-
+
@include('components.productcard')
@stop diff --git a/views/habitform.blade.php b/views/habitform.blade.php index bf2fea37..2dd2f923 100644 --- a/views/habitform.blade.php +++ b/views/habitform.blade.php @@ -9,8 +9,7 @@ @section('viewJsName', 'habitform') @section('content') -
- +

@yield('title')

@@ -53,6 +52,5 @@ -
@stop diff --git a/views/habits.blade.php b/views/habits.blade.php index 08fa83d5..a8bb5f14 100644 --- a/views/habits.blade.php +++ b/views/habits.blade.php @@ -5,54 +5,50 @@ @section('viewJsName', 'habits') @section('content') -
- -

- @yield('title') - -  {{ $L('Add') }} - -

- -
- - - - - - - - - - - - @foreach($habits as $habit) - - - - - - - - @endforeach - -
#{{ $L('Name') }}{{ $L('Period type') }}{{ $L('Period days') }}{{ $L('Description') }}
- - - - - - - - {{ $habit->name }} - - {{ $L($habit->period_type) }} - - {{ $habit->period_days }} - - {{ $habit->description }} -
-
+

+ @yield('title') + +  {{ $L('Add') }} + +

+
+ + + + + + + + + + + + @foreach($habits as $habit) + + + + + + + + @endforeach + +
#{{ $L('Name') }}{{ $L('Period type') }}{{ $L('Period days') }}{{ $L('Description') }}
+ + + + + + + + {{ $habit->name }} + + {{ $L($habit->period_type) }} + + {{ $habit->period_days }} + + {{ $habit->description }} +
@stop diff --git a/views/habitsoverview.blade.php b/views/habitsoverview.blade.php index c561af24..83a7f2a3 100644 --- a/views/habitsoverview.blade.php +++ b/views/habitsoverview.blade.php @@ -5,42 +5,38 @@ @section('viewJsName', 'habitsoverview') @section('content') -
- -

@yield('title')

- -
- - - - - - - - - - @foreach($currentHabits as $curentHabitEntry) - - - - - - @endforeach - -
{{ $L('Habit') }}{{ $L('Next estimated tracking') }}{{ $L('Last tracked') }}
- {{ FindObjectInArrayByPropertyValue($habits, 'id', $curentHabitEntry->habit_id)->name }} - - @if(FindObjectInArrayByPropertyValue($habits, 'id', $curentHabitEntry->habit_id)->period_type === \Grocy\Services\HabitsService::HABIT_TYPE_DYNAMIC_REGULAR) - {{ $nextHabitTimes[$curentHabitEntry->habit_id] }} - - @else - ... - @endif - - {{ $curentHabitEntry->last_tracked_time }} - -
-
+

@yield('title')

+
+ + + + + + + + + + @foreach($currentHabits as $curentHabitEntry) + + + + + + @endforeach + +
{{ $L('Habit') }}{{ $L('Next estimated tracking') }}{{ $L('Last tracked') }}
+ {{ FindObjectInArrayByPropertyValue($habits, 'id', $curentHabitEntry->habit_id)->name }} + + @if(FindObjectInArrayByPropertyValue($habits, 'id', $curentHabitEntry->habit_id)->period_type === \Grocy\Services\HabitsService::HABIT_TYPE_DYNAMIC_REGULAR) + {{ $nextHabitTimes[$curentHabitEntry->habit_id] }} + + @else + ... + @endif + + {{ $curentHabitEntry->last_tracked_time }} + +
@stop diff --git a/views/habittracking.blade.php b/views/habittracking.blade.php index 8d145227..1246289d 100644 --- a/views/habittracking.blade.php +++ b/views/habittracking.blade.php @@ -5,8 +5,7 @@ @section('viewJsName', 'habittracking') @section('content') -
- +

@yield('title')

@@ -30,10 +29,9 @@
-
-
+
@include('components.habitcard')
@stop diff --git a/views/inventory.blade.php b/views/inventory.blade.php index b422aeb5..80cb3d76 100644 --- a/views/inventory.blade.php +++ b/views/inventory.blade.php @@ -5,8 +5,7 @@ @section('viewJsName', 'inventory') @section('content') -
- +

@yield('title')

@@ -39,10 +38,9 @@
-
-
+
@include('components.productcard')
@stop diff --git a/views/layout/default.blade.php b/views/layout/default.blade.php index 09e76168..f541776b 100644 --- a/views/layout/default.blade.php +++ b/views/layout/default.blade.php @@ -22,6 +22,7 @@ + @stack('pageStyles') @@ -48,113 +49,12 @@
@@ -162,64 +62,31 @@
- - -