Projekt

Obecné

Profil

Stáhnout (3.39 KB) Statistiky
| Větev: | Tag: | Revize:
1
<div id="sidebar" class="sidenav">
2
    <a href="javascript:void(0)" class="arrow arrow-left" s 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('/') }}">{{ __('Home') }}</a>
10
            <a class="dropdown-item text-headline" href="{{ route('login') }}">{{ __('Login') }}</a>
11
        </li>
12
        @if (Route::has('register'))
13
        <li class="nav-item">
14
            <a class="dropdown-item text-headline" href="{{ route('register') }}">{{ __('Register') }}</a>
15
        </li>
16
        @endif
17
        @else
18
        <li class="nav-item dropdown">
19
            <a class="dropdown-item text-headline" href="{{ url('/') }}">home</a>
20

    
21
            <a class="dropdown-item text-headline" href="{{ url('/categories') }}">topics</a>
22

    
23
            <a class="dropdown-item text-headline" href="{{ url('/artefact') }}">books</a>
24

    
25
            <a class="dropdown-item text-headline" href="{{ url('/favartefacts') }}">my books</a>
26

    
27
                <a class="dropdown-item text-headline" href="{{ url('/favmetadata') }}">my notes</a>
28

    
29

    
30

    
31
            <a class="dropdown-item text-headline" href="{{ url('/charts') }}">charts</a>
32

    
33

    
34

    
35
        </li>
36
        <li class="nav-item dropdown separator">
37
            <a class="dropdown-item text-headline" href="{{ url('/czech') }}">česky</a>
38
        </li>
39
        <li class="nav-item dropdown">
40
            <a class="dropdown-item text-headline" href="{{ route('logout') }}"
41
               onclick="event.preventDefault();
42
                                                     document.getElementById('logout-form').submit();">
43
                {{ __('logout') }}
44
            </a>
45

    
46
            <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
47
                @csrf
48
            </form>
49
        </li>
50
        @endguest
51

    
52
</div>
53

    
54
<nav class="navbar navbar-expand-md navbar-light black shadow-sm top-bar">
55
    <span class="arrow arrow-right" onclick="openNav()"></span>
56
    @if(!Request::is('login')&&!Request::is('register'))
57
        <li class="nav-item dropdown col-md-4">
58
            <a for="logo" class="logo-kaplicky kaplicky" href="{{ url('/') }}">{{ __('kaplicky') }}</a>
59
        </li>
60
    @endif
61
</nav>
62
{{--<label for="logo" class="col-md-12 kaplicky" style="display: inline-block; text-align: center; padding: 1.25rem; padding-bottom: 0">{{ __('kaplicky') }}</label>
63
{{--<label for="logo" class="col-md-4 kaplicky">{{ __('kaplicky') }}</label>--}}
64
{{--<a class="navbar-brand kaplicky" href="{{ url('/') }}">
65
    {{  __('kaplicky') }}
66
</a>--}}
67

    
68
<script>
69
    function openNav() {
70
        var x = window.matchMedia("(max-width: 540px)")
71
        if(x.matches){
72
            document.getElementById("sidebar").style.width = "50vw";
73
        }
74
        else{
75
            document.getElementById("sidebar").style.width = "250px";
76
        }
77

    
78
    }
79

    
80
    function closeNav() {
81
        document.getElementById("sidebar").style.width = "0";
82
    }
83
</script>
84
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
85
<script>
86
    $(function(){
87
        $('a').each(function(){
88
            if ($(this).prop('href') == window.location.href) {
89
                $(this).addClass('active');// $(this).parents('a').addClass('active');
90
            }
91
        });
92
    });
93
</script>
(2-2/2)