galeri.blade.php
6.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<style>
body {
min-height: 100vh;
}
body.custom-background {
background-image: url(http://diskominfotik.riau.go.id/wp-content/uploads/2019/05/webtreatsetc-1.jpg);
background-position: center top;
background-size: auto;
background-repeat: repeat;
background-attachment: fixed;
}
* {
box-sizing: border-box;
}
.styled-card {
border-collapse: collapse;
margin: 25px 0;
font-size: 0.9em;
font-family: sans-serif;
min-width: 400px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}
/* Tabel Attracted */
/* end Table Attracted */
.card {
transition: 1s;
}
#inner-card:hover {
background: whitesmoke;
/* font-style: oblique; */
transform:translateY(5px)
}
.center {
margin-left: auto;
margin-right: auto;
}
.card-footer {
clear: both;
position: relative;
height: 40px;
/* margin-top: -200px; */
background: PapayaWhip;
}
.a, #a {
/* font-style:oblique; */
color: cadetblue;
}
p, .p, #p{
color: #00001f!important;
font-weight: 900;
}
</style>
@extends('frontend.layout.app')
@section('content')
<body class="custom-background">
<div class="container-fluid" style="">
<div class="row">
<div class="row" style="margin-top: 40px!important;">
<div class="col-md-1" style="width: 6.25%"><a href="/franperda" style="text-indent: 0px;"><i class="fa " aria-hidden="true"></i></a></div>
<div class="col-md-11">
{{-- <h3 class="page-title"><strong>Galeri Kegiatan</strong></h3> --}}
</div>
</div>
<div class="row">
<div class="col-md-12 ">
<div class="card">
<div class="card-header bg-info">
<h3 class="card-title text-white mb-0">Galeri Kegiatan</h3>
</div>
<div class="card-body">
<div id="w1" class="grid-view">
<div class="summary"></div>
<div class="row" style="display: flex; justify-content:center;">
@foreach ($galeris as $galeri)
<div class="card styled-card mx-3 my-3 justify-content-center" id="inner-card" style="width: 18rem;">
<div class="card-header text-center"><a href="galeri_detail/{{ $galeri->album_id }}">
{{ $galeri->album->nama_album ?? '' }} </a>
</div>
<div class="card-body">
{{-- <img src="{{ storage_path('app/' . $galeri->gambar) }}"/> --}}
{{-- <img src="{{ url('/gambar_galeri')}}"/> --}}
<img src="{{ $galeri->file_url }}" alt="Galeri" style="height:180px !important; width:216px !important">
<div class="card-subtitle mb-2 text-muted"></div>
{{-- <p class="card-text text-center">{{ $galeri->keterangan }}</p> --}}
<div class="card-footer">
<div class="card-title text-center">
{{-- {{ $galeri->caption }} --}}
<div class="card-title text-center">{{ $galeri->keterangan }}</div>
{{-- <div> --}}
<script>
var clicks = 0;
function clickME(el) {
el.disabled = true;
clicks += 1;
document.getElementById("clicks").innerHTML = clicks;
}
function myFunction() {
let count = Number(localStorage.getItem('count')) || 0;
alert(`count ${count}`);
localStorage.setItem('count', count + 1);
}
</script>
{{-- <a class="float-right" id="clicks">
<button type="button btn-md" style="border:none;bgcolor:none;" onClick="clickME(this)" onload=""><span><i class="fa fa-heart" style="color:red" style=""></i></span></button>
</a> --}}
{{-- </div> --}}
</div>
</div>
</div>
</div>
@endforeach
{{-- {!! $galeris->links('pagination::bootstrap-4') !!} --}}
</div>
</div>
</div>
</div>
<br>
@include('frontend.layout.agenda');
</div>
</div>
{{-- Tabel Main --}}
@endsection
</body>
<script>
// var clicks = 0
// function clickME(event) {
// clicks += 1
// document.getElementById("clicks").innerText = clicks // innerText is more suitable in this case
// if (event.target.className.includes(`auto-disable`)) {
// event.target.disabled = true // auto disabling if you need it
// }
// }
// document.querySelectorAll(`button`) // select all buttons
// .forEach( // loop through the elements
// // addEventListener with options once:true. once option designed exactly for your purposes, to fire event only once
// el => el.addEventListener(`click`, clickME, {once: true})
// )
</script>