Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 70f69b41

Přidáno uživatelem Adam Mištera před asi 4 roky(ů)

Issue #7956 @1.5h
[+] Stylování stránky informace o artefaktu
[+] Přidání obrázků pro malé info a like

Zobrazit rozdíly:

app/Http/Controllers/ArtefactController.php
60 60
    public function view($id)
61 61
    {
62 62
        $artefact = Artefact::find($id);
63
        $artefact['likes'] = Artefact::find($id)->users()->count();
63 64

  
64 65
        return view('artefact.view', ['artefact' => $artefact]);
65 66
    }
public/css/app.css
6383 6383
  text-align: left;
6384 6384
  text-align: start;
6385 6385
  text-decoration: none;
6386
  text-shadow: none;    
6386
  text-shadow: none;
6387 6387
  text-transform: none;
6388 6388
  letter-spacing: normal;
6389 6389
  word-break: normal;
......
11148 11148
  background-repeat: no-repeat;
11149 11149
}
11150 11150

  
11151
body .artefacts-area h5 {
11151
body .artefacts-area h5,
11152
body .artefact-area h5 {
11152 11153
  color: #ddd1b9;
11153 11154
  font-weight: 600;
11154 11155
  line-height: 20pt;
11155 11156
  font-size: 21pt;
11156 11157
}
11157 11158

  
11158
body .artefacts-area h6 {
11159
body .artefacts-area h6,
11160
body .artefact-area h6 {
11159 11161
  color: #ddd1b9;
11160 11162
  font-size: 14pt;
11161 11163
  font-weight: 400;
11162 11164
}
11163 11165

  
11164
body .artefacts-area img {
11166
body .artefacts-area img,
11167
body .artefact-area img {
11165 11168
  border: transparent;
11166 11169
  border-radius: 1px;
11167 11170
}
11168 11171

  
11169
body .artefacts-area .card {
11172
body .artefacts-area .card,
11173
body .artefact-area .card {
11170 11174
  margin: 10px;
11171 11175
  border: none !important;
11172 11176
}
11173 11177

  
11174
body .artefacts-area .left_panel_info {
11178
body .artefacts-area .left_panel_info,
11179
body .artefact-area .left_panel_info {
11175 11180
  margin-top: 15px;
11176 11181
  margin-left: -10px;
11177 11182
  max-width: 250px;
11178 11183
}
11179 11184

  
11180
body .artefacts-area .right_panel_info {
11185
body .artefacts-area .right_panel_info,
11186
body .artefact-area .right_panel_info {
11181 11187
  margin-top: 15px;
11182 11188
  margin-right: -15px;
11183 11189
}
11184 11190

  
11185
body .artefacts-area .card-cus-bottom {
11191
body .artefacts-area .card-cus-bottom,
11192
body .artefact-area .card-cus-bottom {
11186 11193
  background-color: #272727;
11187 11194
}
11188 11195

  
11189
body .artefacts-area .inter_info:before {
11196
body .artefacts-area .inter_info:before,
11197
body .artefact-area .inter_info:before {
11190 11198
  background-image: url(/images/Button_Info_50.png?cf6e509b9294d4138459f1846c7effdf);
11191 11199
  width: 60px;
11192 11200
  height: 60px;
11193 11201
}
11194 11202

  
11195
body .artefacts-area .inter_like {
11203
body .artefacts-area .inter_like,
11204
body .artefact-area .inter_like {
11196 11205
  display: none;
11197 11206
}
11198 11207

  
11199
body .artefacts-area .inter_like:before {
11208
body .artefacts-area .inter_like:before,
11209
body .artefact-area .inter_like:before {
11200 11210
  background-image: url(/images/Hearth_Empty_50.png?d969cd4d381634ef975e503608b3ab48);
11201 11211
  width: 60px;
11202 11212
  height: 60px;
11203 11213
}
11204 11214

  
11205
body .artefacts-area .inter_like_filled:before {
11215
body .artefacts-area .inter_like_filled:before,
11216
body .artefact-area .inter_like_filled:before {
11206 11217
  background-image: url(/images/Hearth_Filled_50.png?77bb26c3aba063c00aba1a2f07059d71);
11207 11218
  width: 60px;
11208 11219
  height: 60px;
......
11210 11221

  
11211 11222
body .artefacts-area .inter_info,
11212 11223
body .artefacts-area .inter_like,
11213
body .artefacts-area .inter_like_filled {
11224
body .artefacts-area .inter_like_filled,
11225
body .artefact-area .inter_info,
11226
body .artefact-area .inter_like,
11227
body .artefact-area .inter_like_filled {
11214 11228
  padding: 0;
11215 11229
}
11216 11230

  
......
11222 11236
body .artefacts-area .inter_like:hover,
11223 11237
body .artefacts-area .inter_like_filled:focus,
11224 11238
body .artefacts-area .inter_like_filled:active,
11225
body .artefacts-area .inter_like_filled:hover {
11239
body .artefacts-area .inter_like_filled:hover,
11240
body .artefact-area .inter_info:focus,
11241
body .artefact-area .inter_info:active,
11242
body .artefact-area .inter_info:hover,
11243
body .artefact-area .inter_like:focus,
11244
body .artefact-area .inter_like:active,
11245
body .artefact-area .inter_like:hover,
11246
body .artefact-area .inter_like_filled:focus,
11247
body .artefact-area .inter_like_filled:active,
11248
body .artefact-area .inter_like_filled:hover {
11226 11249
  background-color: transparent !important;
11227 11250
  border-color: transparent !important;
11228 11251
  outline: none !important;
11229 11252
  box-shadow: none !important;
11230 11253
}
11231 11254

  
11255
body .artefact-area .card-cus-bottom .left_panel_info,
11256
body .artefact-area .card-cus-bottom .right_panel_info {
11257
  margin: 0.9375rem 0 0 0;
11258
}
11259

  
11260
body .artefact-area .card-cus-bottom .right_panel_info .float-right {
11261
  margin-right: -0.35rem;
11262
}
11263

  
11264
body .artefact-area .artefact-name {
11265
  font-weight: 600;
11266
  font-size: 8pt;
11267
  line-height: 10pt;
11268
  margin-bottom: 0;
11269
}
11270

  
11271
body .artefact-area .artefact-author {
11272
  font-size: 7pt;
11273
  line-height: 8pt;
11274
}
11275

  
11276
body .artefact-area .inter_like {
11277
  display: block;
11278
}
11279

  
11280
body .artefact-area .inter_like:before {
11281
  background-image: url(/images/Hearth_Empty_Small.png?252b4c7a69920aa18f2fc75a93aaa90a);
11282
  width: 25px;
11283
  height: 19px;
11284
}
11285

  
11286
body .artefact-area .inter_info {
11287
  padding-right: 1rem;
11288
}
11289

  
11290
body .artefact-area .inter_info:before {
11291
  background-image: url(/images/Button_Info_Small.png?9bc35ac07e9ec5a6b75d9af964e80512);
11292
  width: 29px;
11293
  height: 29px;
11294
}
11295

  
11296
body .artefact-area .artefact-likes {
11297
  font-weight: 600;
11298
  font-size: 5pt;
11299
  padding-right: 0.25rem;
11300
}
11301

  
11232 11302
body .metadata-area h2 {
11233 11303
  font-weight: 600;
11234 11304
  font-size: 12pt;
......
11368 11438
  color: #272727;
11369 11439
}
11370 11440

  
11441
body .cat-col-md-2 {
11442
  margin: 2%;
11443
}
11444

  
11371 11445
body .btn.btn-dark.cat-tile {
11372 11446
  border-color: #ead4b0;
11373 11447
  border-radius: 0;
......
11380 11454
  box-shadow: none !important;
11381 11455
  font-size: 8mm;
11382 11456
  word-wrap: break-word;
11383
  margin: 10pt 32pt;
11384 11457
  height: 40mm;
11385
  width: 86%;
11458
  width: 100%;
11386 11459
}
11387 11460

  
11388 11461
body .btn.btn-dark.cat-tile:active,
......
11394 11467
  color: #272727;
11395 11468
}
11396 11469

  
11397
body .btn.button-square.cat-enter-butt {
11398
  position: fixed;
11399
  bottom: 8%;
11400
  right: 40%;
11401
  display: none;
11470
body .category-h2 {
11471
  color: #ead4b0;
11402 11472
}
11403 11473

  
11404 11474
.arrow {
......
11479 11549
  .head-title.text-center h1 {
11480 11550
    font-size: 23pt;
11481 11551
    padding-top: 50pt;
11482
    margin-left: 36pt;
11483 11552
    white-space: nowrap;
11484 11553
  }
11485 11554

  
resources/sass/_custom.scss
287 287
        }
288 288
    }
289 289

  
290
    .artefacts-area {
290
    .artefacts-area, .artefact-area {
291 291

  
292 292
        h5 {
293 293
            color: $theme-color-two;
......
364 364
        }
365 365
    }
366 366

  
367
    .artefact-area {
368

  
369
        .card-cus-bottom {
370
            .left_panel_info, .right_panel_info {
371
                margin: 0.9375rem 0 0 0;
372
            }
373

  
374
            .right_panel_info {
375
                .float-right {
376
                    margin-right: -0.35rem;
377
                }
378
            }
379
        }
380

  
381
        .artefact-name {
382
            font-weight: $font-weight-two;
383
            font-size: 8pt;
384
            line-height: 10pt;
385
            margin-bottom: 0;
386
        }
387

  
388
        .artefact-author {
389
            font-size: 7pt;
390
            line-height: 8pt;
391
        }
392

  
393
        .inter_like {
394
            display: block;
395

  
396
            &:before {
397
                background-image: url(../images/interface/Hearth_Empty_Small.png);
398
                width: 25px;
399
                height: 19px;
400
            }
401
        }
402

  
403
        .inter_info {
404

  
405
            padding-right: 1rem;
406
            &:before {
407
                background-image: url(../images/interface/Button_Info_Small.png);
408
                width: 29px;
409
                height: 29px;
410
            }
411
        }
412

  
413
        .artefact-likes {
414
            font-weight: $font-weight-two;
415
            font-size: 5pt;
416
            padding-right: 0.25rem;
417
        }
418
    }
419

  
367 420
    // Metadata area
368 421
    .metadata-area {
369 422

  
resources/views/artefact/view.blade.php
10 10

  
11 11

  
12 12
@section('content')
13
    <div class="container">
14
        <div class="jumbotron mt-5">
15
            <div class="text-center">
16
                <h1>Artefact</h1>
17
                <p>
18
                    Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
19
                    Mauris dolor felis, sagittis at, luctus sed, aliquam non, tellus.
20
                    Fusce tellus odio, dapibus id fermentum quis, suscipit id erat.
21
                    Morbi scelerisque luctus velit. Vivamus porttitor turpis ac leo.
22
                    Morbi scelerisque luctus velit.
23
                    Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
24
                </p>
25
            </div>
26
        </div>
27

  
13
    <div class="container py-4">
28 14
        @if (is_null($artefact))
29 15
            <div class="text-center">
30 16
                <h2>Currently no artefacts available.</h2>
......
32 18
        @else
33 19
            <div class="artefact-area mb-5">
34 20
                <div class="card">
35
                    <div class="card-body">
36
                        <h2 class="text-uppercase card-title">{{$artefact->name}}</h2>
37
                        <h5>{{$artefact->author}}</h5>
38
                        <h6 class="card-subtitle mb-2 text-muted">{{$artefact->year}}, {{$artefact->pages}} pages</h6>
39
                        <p class="card-text">
40
                            Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
41
                            Mauris dolor felis, sagittis at, luctus sed, aliquam non, tellus.
42
                            Fusce tellus odio, dapibus id fermentum quis, suscipit id erat.
43
                            Morbi scelerisque luctus velit. Vivamus porttitor turpis ac leo.
44
                            Morbi scelerisque luctus velit.
45
                            Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
46
                        </p>
47
                        <p>
48
                            @if (count($artefact->metadata) > 0)
49
                                <a href="{{ url('/detail/' . $artefact->id) }}">Notes related to artefact</a>
50
                            @endif
51
                        </p>
21
                    <a href="{{ url('/artefact/' . $artefact->id) }}">
22
                        <img class="card-img-top" src="{{asset('images/artefacts/book_cover_01.jpg')}}" width="100%" height=auto alt="book_cover">
23
                    </a>
24
                    <div class="card-cus-bottom">
25
                        <div class="col-xs-2 float-left left_panel_info">
26
                            <h5 class="artefact-name">{{$artefact->name}}</h5>
27
                            <h6 class="artefact-author">{{$artefact->author}}</h6>
28
                        </div>
29
                        <div class="col-xs-2 float-right right_panel_info">
30
                            <div class="float-left">
31
                                <button id="info_butt_{{$artefact->id}}" type="button" class="btn btn-primary button-image inter_info"></button>
32
                            </div>
33
                            <div class="float-right text-center">
34
                                <button id="like_butt_{{$artefact->id}}" type="button" class="btn btn-primary button-image inter_like"></button>
35
                                <h6 class="artefact-likes">{{$artefact->likes}}</h6>
36
                            </div>
37
                        </div>
52 38
                    </div>
53 39
                </div>
54 40
            </div>

Také k dispozici: Unified diff