Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 86b3ae27

Přidáno uživatelem Marek Lovčí před asi 4 roky(ů)

Arrow style hotfix

Zobrazit rozdíly:

resources/sass/_custom.scss
965 965
            align-items: baseline;
966 966

  
967 967
            .book-arrow {
968
                &:after {
969
                    content: '';
970
                    bottom: 3rem;
971
                    position: absolute;
972
                    border-top: 1.25rem solid transparent;
973
                    border-bottom: 1.25rem solid transparent;
974
                }
968
                border-top: 1.25rem solid transparent;
969
                border-bottom: 1.25rem solid transparent;
970
                display: block;
971
                position: relative;
972
                top: 1rem;
975 973
            }
976 974

  
977 975
            .book-arrow-left {
978
                &:after {
979
                    left: 1.5625rem;
980
                    border-right: 1.25rem solid $theme-color-two;
981
                }
976
                border-right: 1.25rem solid $theme-color-two;
982 977
            }
983 978

  
984 979
            .book-arrow-right {
985
                &:after {
986
                    border-left: 1.25rem solid $theme-color-two;
987
                }
980
                border-left: 1.25rem solid $theme-color-two;
988 981
            }
989 982

  
990 983
            .likes {
......
1010 1003
                }
1011 1004

  
1012 1005
                .inter_like {
1013
                    &:before{
1006
                    &:before {
1014 1007
                        background-image: url(../images/interface/Heart_Empty.svg);
1015 1008
                    }
1016 1009
                }
1017 1010

  
1018 1011
                .inter_like_filled {
1019
                    &:before{
1012
                    &:before {
1020 1013
                        background-image: url(../images/interface/Heart_Filled.svg);
1021 1014
                    }
1022 1015
                }
resources/views/charts/index.blade.php
19 19
                                            <h5 class="card-title highlight-white">{{$artefact->name}}</h5>
20 20
                                        </a>
21 21
                                        <h6 class="card-title ">{{$artefact->author}}</h6>
22

  
23 22
                                    </div>
24
                                    <div class="p-1 flex-fill bd-highlight float-center">
23
                                    <div class="p-1 flex-fill bd-highlight">
25 24
                                        <div class="text-center right_panel_info">
26

  
27
                                            <div class="charts float-center">
25
                                            <div class="charts float-right">
28 26
                                                @if (!$artefact->favourite)
29 27
                                                    <a href="{{  action('ArtefactController@like', ['id' => $artefact->id]) }}">
30 28
                                                        <button id="like_butt_{{$artefact->id}}" type="button"
resources/views/components/books.blade.php
1 1
@foreach($artefacts as $artefact)
2
<div class="container books-component">
3
    <div class="row mt-5">
2
    <div class="container books-component">
3
        <div class="row mt-5">
4 4

  
5
        <div class="col-md-6 book-area">
6
            @if (!is_null($artefact))
7
                <div class="artefact-area">
8
                    <div class="card">
9
                        <a href="#imageModal" data-toggle="modal">
10
                            <img class="card-img-top" src="{{asset('images/artefacts/book_cover_01.jpg')}}" width="100%" height=auto alt="book_cover">
11
                        </a>
12
                    </div>
13
                </div>
14
            @endif
15
        </div>
5
            <div class="col-md-6 book-area">
6
                @if (!is_null($artefact))
7
                    <div class="artefact-area">
8
                        <div class="card">
9
                            <a href="#imageModal" data-toggle="modal">
10
                                <img class="card-img-top" src="{{asset('images/artefacts/book_cover_01.jpg')}}"
11
                                     width="100%" height=auto alt="book_cover">
12
                            </a>
16 13

  
17
        <div class="col-md-6 info-area">
18
            <div class="artefact-info">
19
                <h3 class="switch-view"><a onclick="switchView()">notes</a></h3>
20
                <h3 class="artefact-name">{{$artefact->name}}</h3>
21
                <h4 class="artefact-author">{{$artefact->author}}</h4>
22
                <p>
23
                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc tincidunt, ex id blandit placerat, dolor nibh venenatis dui, nec malesuada odio sem a leo. Nunc vulputate augue neque.
24
                    Donec pulvinar sollicitudin arcu eget sagittis. Sed auctor, enim vel facilisis sodales, felis tellus rutrum quam, ac feugiat leo mauris ac purus. Nam placerat sed risus ut suscipit.
25
                    Sed rutrum arcu eget mi fermentum ultrices. Donec egestas volutpat eros, ut tincidunt dolor pulvinar vitae.
26
                </p>
27
                <p>
28
                    Curabitur sem elit, imperdiet ac laoreet vitae, rhoncus quis risus. Suspendisse varius dolor sem, at egestas massa suscipit non.
29
                    Morbi sit amet dictum metus, sit amet sollicitudin nibh. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc mattis leo convallis aliquam scelerisque.
30
                    Praesent vulputate porttitor quam at egestas. Proin eget orci ligula. Aenean malesuada, eros vitae convallis sagittis, neque leo ullamcorper ante, eu ultricies justo justo in lacus.
31
                </p>
32
            </div>
33

  
34
            <div class="artefact-notes">
35
                <button type="button" class="btn btn-primary button-image inter_info" onclick="switchView()"></button>
36
                <h3 class="artefact-name">{{$artefact->name}}</h3>
37
                <h4 class="artefact-author">{{$artefact->author}}</h4>
38
                @if(count($artefact->metadata) > 0)
39
                    @foreach($artefact->metadata as $meta)
40
                        <div  id="row_{{$meta->id}}" class="row text-page">
41
                            <div class="pin-horizontal">
42
                                <div class="metadata">
43
                                    <a href="#meta_{{$meta->id}}" data-toggle="collapse" data-target="#meta_{{$meta->id}}" onclick="openNote('#row_{{$meta->id}}')">
44
                                        <span>page {{$meta->page}}</span>
45
                                    </a>
46
                                    <a href="#meta_{{$meta->id}}" class="arrow-down" data-toggle="collapse" data-target="#meta_{{$meta->id}}" onclick="openNote('#row_{{$meta->id}}')"></a>
47
                                </div>
48
                            </div>
49
                            <div id="meta_{{$meta->id}}" class="metadata-text collapse">
50
                                <p>
51
                                    {{$meta->noteEN}}
52
                                </p>
53
                                <div class="text-center">
54
                                    @if ($meta->favourite)
55
                                        <a href="{{  action('DetailsController@unlike', ['id' => $meta->id]) }}">
56
                                            <button id="like_butt_{{$meta->id}}" type="button" class="btn btn-primary button-image inter_like_filled"></button>
14
                            {{-- Buttons --}}
15
                            <div class="card-cus-bottom">
16
                                <a class="book-arrow book-arrow-left artefact-link previous-artefact {{$artefacts->onFirstPage() ? "invisible" : "visible"}}"
17
                                   href="{{$artefacts->previousPageUrl()}}"></a>
18
                                <div class="likes">
19
                                    @if ($artefact->favourite)
20
                                        <a href="{{  action('ArtefactController@unlike', ['id' => $artefact->id]) }}">
21
                                            <button id="like_butt_{{$artefact->id}}" type="button"
22
                                                    class="btn btn-primary button-image inter_like_filled"></button>
57 23
                                        </a>
58 24
                                    @else
59
                                        <a href="{{  action('DetailsController@like', ['id' => $meta->id]) }}">
60
                                            <button id="like_butt_{{$meta->id}}" type="button" class="btn btn-primary button-image inter_like"></button>
25
                                        <a href="{{  action('ArtefactController@like', ['id' => $artefact->id]) }}">
26
                                            <button id="like_butt_{{$artefact->id}}" type="button"
27
                                                    class="btn btn-primary button-image inter_like"></button>
61 28
                                        </a>
62 29
                                    @endif
30
                                    <h6 class="artefact-likes">{{$artefact->likes}}</h6>
63 31
                                </div>
32
                                <a class="book-arrow book-arrow-right artefact-link next-artefact {{$artefacts->hasMorePages() ? "visible" : "invisible"}}"
33
                                   href="{{$artefacts->nextPageUrl()}}"></a>
64 34
                            </div>
65
                        </div>
66 35

  
67
                    @endforeach
68
                @else
69
                    <h2>No metadata yet!</h2>
36
                        </div>
37
                    </div>
70 38
                @endif
71 39
            </div>
72
        </div>
73 40

  
74
        <div class="book-area col-md-12">
75
            <div class="card-cus-bottom">
76
                <a class="book-arrow book-arrow-left artefact-link previous-artefact {{$artefacts->onFirstPage() ? "invisible" : "visible"}}" href="{{$artefacts->previousPageUrl()}}"></a>
77
                <div class="likes offset-7">
78
                    @if ($artefact->favourite)
79
                        <a href="{{  action('ArtefactController@unlike', ['id' => $artefact->id]) }}">
80
                            <button id="like_butt_{{$artefact->id}}" type="button" class="btn btn-primary button-image inter_like_filled"></button>
81
                        </a>
41
            <div class="col-md-6 info-area">
42
                <div class="artefact-info">
43
                    <h3 class="switch-view"><a onclick="switchView()">notes</a></h3>
44
                    <h3 class="artefact-name">{{$artefact->name}}</h3>
45
                    <h4 class="artefact-author">{{$artefact->author}}</h4>
46
                    <p>
47
                        Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc tincidunt, ex id blandit placerat,
48
                        dolor nibh venenatis dui, nec malesuada odio sem a leo. Nunc vulputate augue neque.
49
                        Donec pulvinar sollicitudin arcu eget sagittis. Sed auctor, enim vel facilisis sodales, felis
50
                        tellus rutrum quam, ac feugiat leo mauris ac purus. Nam placerat sed risus ut suscipit.
51
                        Sed rutrum arcu eget mi fermentum ultrices. Donec egestas volutpat eros, ut tincidunt dolor
52
                        pulvinar vitae.
53
                    </p>
54
                    <p>
55
                        Curabitur sem elit, imperdiet ac laoreet vitae, rhoncus quis risus. Suspendisse varius dolor
56
                        sem, at egestas massa suscipit non.
57
                        Morbi sit amet dictum metus, sit amet sollicitudin nibh. Lorem ipsum dolor sit amet, consectetur
58
                        adipiscing elit. Nunc mattis leo convallis aliquam scelerisque.
59
                        Praesent vulputate porttitor quam at egestas. Proin eget orci ligula. Aenean malesuada, eros
60
                        vitae convallis sagittis, neque leo ullamcorper ante, eu ultricies justo justo in lacus.
61
                    </p>
62
                </div>
63

  
64
                <div class="artefact-notes">
65
                    <button type="button" class="btn btn-primary button-image inter_info"
66
                            onclick="switchView()"></button>
67
                    <h3 class="artefact-name">{{$artefact->name}}</h3>
68
                    <h4 class="artefact-author">{{$artefact->author}}</h4>
69
                    @if(count($artefact->metadata) > 0)
70
                        @foreach($artefact->metadata as $meta)
71
                            <div id="row_{{$meta->id}}" class="row text-page">
72
                                <div class="pin-horizontal">
73
                                    <div class="metadata">
74
                                        <a href="#meta_{{$meta->id}}" data-toggle="collapse"
75
                                           data-target="#meta_{{$meta->id}}" onclick="openNote('#row_{{$meta->id}}')">
76
                                            <span>page {{$meta->page}}</span>
77
                                        </a>
78
                                        <a href="#meta_{{$meta->id}}" class="arrow-down" data-toggle="collapse"
79
                                           data-target="#meta_{{$meta->id}}"
80
                                           onclick="openNote('#row_{{$meta->id}}')"></a>
81
                                    </div>
82
                                </div>
83
                                <div id="meta_{{$meta->id}}" class="metadata-text collapse">
84
                                    <p>
85
                                        {{$meta->noteEN}}
86
                                    </p>
87
                                    <div class="text-center">
88
                                        @if ($meta->favourite)
89
                                            <a href="{{  action('DetailsController@unlike', ['id' => $meta->id]) }}">
90
                                                <button id="like_butt_{{$meta->id}}" type="button"
91
                                                        class="btn btn-primary button-image inter_like_filled"></button>
92
                                            </a>
93
                                        @else
94
                                            <a href="{{  action('DetailsController@like', ['id' => $meta->id]) }}">
95
                                                <button id="like_butt_{{$meta->id}}" type="button"
96
                                                        class="btn btn-primary button-image inter_like"></button>
97
                                            </a>
98
                                        @endif
99
                                    </div>
100
                                </div>
101
                            </div>
102

  
103
                        @endforeach
82 104
                    @else
83
                        <a href="{{  action('ArtefactController@like', ['id' => $artefact->id]) }}">
84
                            <button id="like_butt_{{$artefact->id}}" type="button" class="btn btn-primary button-image inter_like"></button>
85
                        </a>
105
                        <h2>No metadata yet!</h2>
86 106
                    @endif
87
                    <h6 class="artefact-likes">{{$artefact->likes}}</h6>
88 107
                </div>
89
                <a class="book-arrow book-arrow-right artefact-link next-artefact {{$artefacts->hasMorePages() ? "visible" : "invisible"}}" href="{{$artefacts->nextPageUrl()}}"></a>
90 108
            </div>
91 109
        </div>
92 110
    </div>
93
</div>
94 111
@endforeach
95 112

  
96 113
<!-- Image modal -->
......
100 117
            <span aria-hidden="true">&times;</span>
101 118
        </button>
102 119
        <div class="modal-content">
103
            <img class="card-img-top" src="{{asset('images/artefacts/book_cover_01.jpg')}}" width="100%" height=auto alt="book_cover">
120
            <img class="card-img-top" src="{{asset('images/artefacts/book_cover_01.jpg')}}" width="100%" height=auto
121
                 alt="book_cover">
104 122
        </div>
105 123
    </div>
106 124
</div>
107 125

  
108 126
<script>
109
    function switchView()
110
    {
127
    function switchView() {
111 128
        let info = $('.artefact-info');
112 129
        let notes = $('.artefact-notes');
113 130

  
114
        if (notes.css('display') === 'none')
115
        {
131
        if (notes.css('display') === 'none') {
116 132
            notes.css('display', 'block');
117 133
            info.css('display', 'none');
118 134

  
119 135
            let parent_width = notes.width();
120 136

  
121
            $(".metadata").each(function() {
137
            $(".metadata").each(function () {
122 138
                let metadata = $(this);
123 139
                let width = metadata.width();
124 140

  
125
                metadata.css("margin-left", (parent_width / 2)  - width);
141
                metadata.css("margin-left", (parent_width / 2) - width);
126 142
            });
127
        }
128
        else
129
        {
143
        } else {
130 144
            notes.css('display', 'none');
131 145
            info.css('display', 'block');
132 146
        }
133 147
    }
134 148

  
135
    function openNote(element)
136
    {
149
    function openNote(element) {
137 150
        let metadata = $(element);
138 151
        let showed = metadata.find(".metadata-text").hasClass('show');
139 152

  
140
        if (showed === false)
141
        {
153
        if (showed === false) {
142 154
            metadata.find('.pin-horizontal').addClass("white-pin");
143
        }
144
        else
145
        {
155
        } else {
146 156
            metadata.find('.pin-horizontal').removeClass("white-pin");
147 157
        }
148 158

  

Také k dispozici: Unified diff