]> BookStack Code Mirror - bookstack/blob - resources/views/base.blade.php
Merge branch 'fix/#1110' of git://github.com/cw1998/BookStack into cw1998-fix/#1110
[bookstack] / resources / views / base.blade.php
1 <!DOCTYPE html>
2 <html class="@yield('body-class')">
3 <head>
4     <title>{{ isset($pageTitle) ? $pageTitle . ' | ' : '' }}{{ setting('app-name') }}</title>
5
6     <!-- Meta -->
7     <meta name="viewport" content="width=device-width">
8     <meta name="token" content="{{ csrf_token() }}">
9     <meta name="base-url" content="{{ baseUrl('/') }}">
10     <meta charset="utf-8">
11
12     <!-- Styles and Fonts -->
13     <link rel="stylesheet" href="{{ versioned_asset('dist/styles.css') }}">
14     <link rel="stylesheet" media="print" href="{{ versioned_asset('dist/print-styles.css') }}">
15
16     <!-- Scripts -->
17     <script src="{{ baseUrl('/translations') }}"></script>
18
19     @yield('head')
20
21     @include('partials/custom-styles')
22
23     @include('partials.custom-head')
24 </head>
25 <body class="@yield('body-class')" ng-app="bookStack">
26
27     @include('partials/notifications')
28
29     <header id="header">
30         <div class="container fluid">
31             <div class="row">
32                 <div class="col-sm-4 col-md-3">
33                     <a href="{{ baseUrl('/') }}" class="logo">
34                         @if(setting('app-logo', '') !== 'none')
35                             <img class="logo-image" src="{{ setting('app-logo', '') === '' ? baseUrl('/logo.png') : baseUrl(setting('app-logo', '')) }}" alt="Logo">
36                         @endif
37                         @if (setting('app-name-header'))
38                             <span class="logo-text">{{ setting('app-name') }}</span>
39                         @endif
40                     </a>
41                 </div>
42                 <div class="col-sm-8 col-md-9">
43                     <div class="float right">
44                         <div class="header-search">
45                             <form action="{{ baseUrl('/search') }}" method="GET" class="search-box">
46                                 <button id="header-search-box-button" type="submit">@icon('search') </button>
47                                 <input id="header-search-box-input" type="text" name="term" tabindex="2" placeholder="{{ trans('common.search') }}" value="{{ isset($searchTerm) ? $searchTerm : '' }}">
48                             </form>
49                         </div>
50                         <div class="links text-center">
51                             @if(userCan('bookshelf-view-all') || userCan('bookshelf-view-own'))
52                                 <a href="{{ baseUrl('/shelves') }}">@icon('bookshelf'){{ trans('entities.shelves') }}</a>
53                             @endif
54                             <a href="{{ baseUrl('/books') }}">@icon('book'){{ trans('entities.books') }}</a>
55                             @if(signedInUser() && userCan('settings-manage'))
56                                 <a href="{{ baseUrl('/settings') }}">@icon('settings'){{ trans('settings.settings') }}</a>
57                             @endif
58                             @if(signedInUser() && userCan('users-manage') && !userCan('settings-manage'))
59                                 <a href="{{ baseUrl('/settings/users') }}">@icon('users'){{ trans('settings.users') }}</a>
60                             @endif
61                             @if(!signedInUser())
62                                 @if(setting('registration-enabled', false))
63                                     <a href="{{ baseUrl("/register") }}">@icon('new-user') {{ trans('auth.sign_up') }}</a>
64                                 @endif
65                                 <a href="{{ baseUrl('/login') }}">@icon('login') {{ trans('auth.log_in') }}</a>
66                             @endif
67                         </div>
68                         @if(signedInUser())
69                             @include('partials._header-dropdown', ['currentUser' => user()])
70                         @endif
71
72                     </div>
73                 </div>
74             </div>
75         </div>
76     </header>
77
78     <section id="content" class="block">
79         @yield('content')
80     </section>
81
82     <div back-to-top>
83         <div class="inner">
84             @icon('chevron-up') <span>{{ trans('common.back_to_top') }}</span>
85         </div>
86     </div>
87 @yield('bottom')
88 <script src="{{ versioned_asset('dist/app.js') }}"></script>
89 @yield('scripts')
90 </body>
91 </html>