Projekt

Obecné

Profil

Stáhnout (1.66 KB) Statistiky
| Větev: | Tag: | Revize:
1
@extends('layouts.app')
2

    
3
@section('title', 'Categories')
4

    
5
@section('content')
6
    @if(isset($user))
7
        {{--<p><?php dd($categories); ?></p>--}}
8
        <div class="cat-main-div" onclick="resetEnter()">
9
            <div class="head-title text-center">
10
                <h1>choose a few topics</h1>
11
            </div>
12
            <div class="row">
13
                {{--@for($k = 1; $k <= count($categories);$k++)--}}
14
                @for($k = 0; $k < $count;$k++)
15
                    <div class="col-md-2">
16
                        <button class="btn btn-dark cat-tile" onclick="showEnterButton({{$categoryNames[$k]->id}})">
17
                            {{$categoryNames[$k]->nameCZ}}
18
                        </button>
19
                    </div>
20
                @endfor
21
            </div>
22
            <div class="carousel-button">
23
                <a class="btn button-square cat-enter-butt" role="button">enter</a>
24
            </div>
25
        </div>
26
        <script>
27
            var catId = -1;
28
            var show = 0;
29

    
30
            function showEnterButton(id)
31
            {
32
                catId = id;
33
                show = 1;
34
                $(".cat-enter-butt").css('display', "inline");
35
            }
36

    
37
            function resetEnter()
38
            {
39
                if(show == 0)
40
                {
41
                    catId = -1;
42
                    $(".cat-enter-butt").css('display', "none");
43
                }
44
                show = 0;
45
            }
46
        </script>
47
    @else
48
        <ul class="list-group">
49
            <li class="list-group-item">
50
                <h3>Not found the USER in the database with number id {{$user->id}}!</h3>
51
            </li>
52
        </ul>
53
    @endif
54
@endsection
    (1-1/1)