Projekt

Obecné

Profil

Stáhnout (3.78 KB) Statistiky
| Větev: | Tag: | Revize:
1
<div id="sidebar" class="sidenav">
2
    <a href="javascript:void(0)" class="arrow arrow-left" onclick="closeNav()"></a>
3
    <li class="nav-item"> &#160;</li>
4
    <li class="nav-item"> &#160;</li>
5
    <li class="nav-item"> &#160;</li>
6
    <li class="nav-item"> &#160;</li>
7
    @guest
8
        <li class="nav-item">
9
            <a class="dropdown-item text-headline" href="{{ url('/') }}">
10
                {{ __('general.home') }}
11
            </a>
12
            <a class="dropdown-item text-headline" href="{{ route('login') }}">
13
                {{ __('general.login') }}
14
            </a>
15
        </li>
16
        @if (Route::has('register'))
17
            <li class="nav-item">
18
                <a class="dropdown-item text-headline" href="{{ route('register') }}">
19
                    {{ __('general.register') }}
20
                </a>
21
            </li>
22
        @endif
23
    @else
24
        <li class="nav-item dropdown">
25
            <a class="dropdown-item text-headline" href="{{ url('/') }}">
26
                {{ __('general.home') }}
27
            </a>
28

    
29
            <a class="dropdown-item text-headline" href="{{ url('/categories') }}">
30
                {{ __('general.topics') }}
31
            </a>
32

    
33
            <a class="dropdown-item text-headline" href="{{ url('/artefact') }}">
34
                {{ __('general.artefacts') }}
35
            </a>
36

    
37
            <a class="dropdown-item text-headline" href="{{ url('/favartefacts') }}">
38
                {{ __('general.favourite_artefacts') }}
39
            </a>
40

    
41
            <a class="dropdown-item text-headline" href="{{ url('/favmetadata') }}">
42
                {{ __('general.favourite_metadata') }}
43
            </a>
44

    
45
            <a class="dropdown-item text-headline" href="{{ url('/charts') }}">
46
                {{ __('general.charts') }}
47
            </a>
48

    
49
        </li>
50
        <li class="nav-item dropdown separator">
51
            <a class="dropdown-item text-headline" href="{{ url('/czech') }}">
52
                {{ __('general.cs') }}
53
            </a>
54
        </li>
55
        <li class="nav-item dropdown">
56
            <a class="dropdown-item text-headline" href="{{ route('logout') }}" onclick="
57
            event.preventDefault();
58
            document.getElementById('logout-form').submit();">
59
                {{ __('logout') }}
60
            </a>
61

    
62
            <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
63
                @csrf
64
            </form>
65
        </li>
66
    @endguest
67

    
68
</div>
69

    
70
<nav class="navbar navbar-expand-md navbar-light black shadow-sm top-bar">
71
    <span class="arrow arrow-right" onclick="openNav()"></span>
72
    @if(!Request::is('login')&&!Request::is('register'))
73
        <a for="logo" class="logo-kaplicky kaplicky" href="{{ url('/') }}">
74
            {{ __('general.kaplicky') }}
75
        </a>
76
    @endif
77
</nav>
78
{{--<label for="logo" class="col-md-12 kaplicky" style="display: inline-block; text-align: center; padding: 1.25rem; padding-bottom: 0">{{ __('kaplicky') }}</label>
79
{{--<label for="logo" class="col-md-4 kaplicky">{{ __('kaplicky') }}</label>--}}
80
{{--<a class="navbar-brand kaplicky" href="{{ url('/') }}">
81
    {{  __('kaplicky') }}
82
</a>--}}
83

    
84
<script>
85
    function openNav() {
86
        var x = window.matchMedia("(max-width: 540px)")
87
        if (x.matches) {
88
            document.getElementById("sidebar").style.width = "50vw";
89
        } else {
90
            document.getElementById("sidebar").style.width = "250px";
91
        }
92
    }
93

    
94
    function closeNav() {
95
        document.getElementById("sidebar").style.width = "0";
96
    }
97
</script>
98

    
99
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
100
<script>
101
    $(function () {
102
        $('a').each(function () {
103
            if ($(this).prop('href') == window.location.href) {
104
                $(this).addClass('active');// $(this).parents('a').addClass('active');
105
            }
106
        });
107
    });
108
</script>
(2-2/2)