Projekt

Obecné

Profil

Stáhnout (3.31 KB) Statistiky
| Větev: | Tag: | Revize:
1 c0265e9e zabran
<div id="sidebar" class="sidenav">
2 25ec2fab Marek Lovčí
    <a href="javascript:void(0)" class="arrow arrow-left" onclick="closeNav()"></a>
3 b711d297 zabran
    <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 25ec2fab Marek Lovčí
    @guest
8 1c3121fe zabran
        <li class="nav-item">
9 927fb559 zabran
            <a class="dropdown-item text-headline" href="{{ url('/') }}">{{ __('Home') }}</a>
10
            <a class="dropdown-item text-headline" href="{{ route('login') }}">{{ __('Login') }}</a>
11 1c3121fe zabran
        </li>
12
        @if (Route::has('register'))
13 25ec2fab Marek Lovčí
            <li class="nav-item">
14
                <a class="dropdown-item text-headline" href="{{ route('register') }}">{{ __('Register') }}</a>
15
            </li>
16 1c3121fe zabran
        @endif
17 25ec2fab Marek Lovčí
    @else
18 1c3121fe zabran
        <li class="nav-item dropdown">
19 8075a85b zabran
            <a class="dropdown-item text-headline" href="{{ url('/') }}">home</a>
20 1c3121fe zabran
21 8075a85b zabran
            <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 b711d297 zabran
            <a class="dropdown-item text-headline" href="{{ url('/favartefacts') }}">my books</a>
26 8075a85b zabran
27 25ec2fab Marek Lovčí
            <a class="dropdown-item text-headline" href="{{ url('/favmetadata') }}">my notes</a>
28 b711d297 zabran
29
            <a class="dropdown-item text-headline" href="{{ url('/charts') }}">charts</a>
30 1c3121fe zabran
31 927fb559 zabran
        </li>
32
        <li class="nav-item dropdown separator">
33
            <a class="dropdown-item text-headline" href="{{ url('/czech') }}">česky</a>
34
        </li>
35
        <li class="nav-item dropdown">
36
            <a class="dropdown-item text-headline" href="{{ route('logout') }}"
37
               onclick="event.preventDefault();
38 1c3121fe zabran
                                                     document.getElementById('logout-form').submit();">
39 927fb559 zabran
                {{ __('logout') }}
40
            </a>
41 1c3121fe zabran
42 927fb559 zabran
            <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
43
                @csrf
44
            </form>
45 1c3121fe zabran
        </li>
46 25ec2fab Marek Lovčí
    @endguest
47 1c3121fe zabran
48
</div>
49
50 927fb559 zabran
<nav class="navbar navbar-expand-md navbar-light black shadow-sm top-bar">
51
    <span class="arrow arrow-right" onclick="openNav()"></span>
52
    @if(!Request::is('login')&&!Request::is('register'))
53 25ec2fab Marek Lovčí
        <a for="logo" class="logo-kaplicky kaplicky" href="{{ url('/') }}">{{ __('kaplicky') }}</a>
54 927fb559 zabran
    @endif
55
</nav>
56 f7c37047 zabran
{{--<label for="logo" class="col-md-12 kaplicky" style="display: inline-block; text-align: center; padding: 1.25rem; padding-bottom: 0">{{ __('kaplicky') }}</label>
57 c0265e9e zabran
{{--<label for="logo" class="col-md-4 kaplicky">{{ __('kaplicky') }}</label>--}}
58
{{--<a class="navbar-brand kaplicky" href="{{ url('/') }}">
59
    {{  __('kaplicky') }}
60
</a>--}}
61 1c3121fe zabran
62
<script>
63
    function openNav() {
64 8075a85b zabran
        var x = window.matchMedia("(max-width: 540px)")
65 25ec2fab Marek Lovčí
        if (x.matches) {
66 c0265e9e zabran
            document.getElementById("sidebar").style.width = "50vw";
67 25ec2fab Marek Lovčí
        } else {
68 c0265e9e zabran
            document.getElementById("sidebar").style.width = "250px";
69 8075a85b zabran
        }
70
71 1c3121fe zabran
    }
72
73
    function closeNav() {
74 c0265e9e zabran
        document.getElementById("sidebar").style.width = "0";
75 1c3121fe zabran
    }
76
</script>
77 927fb559 zabran
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
78
<script>
79 25ec2fab Marek Lovčí
    $(function () {
80
        $('a').each(function () {
81 927fb559 zabran
            if ($(this).prop('href') == window.location.href) {
82
                $(this).addClass('active');// $(this).parents('a').addClass('active');
83
            }
84
        });
85
    });
86
</script>