Imagenes proporcionales
Before Width: | Height: | Size: 240 KiB |
Before Width: | Height: | Size: 269 KiB |
Before Width: | Height: | Size: 384 KiB |
Before Width: | Height: | Size: 402 KiB |
Before Width: | Height: | Size: 378 KiB |
Before Width: | Height: | Size: 369 KiB |
Before Width: | Height: | Size: 392 KiB |
Before Width: | Height: | Size: 372 KiB |
Before Width: | Height: | Size: 418 KiB |
Before Width: | Height: | Size: 422 KiB |
Before Width: | Height: | Size: 386 KiB |
Before Width: | Height: | Size: 455 KiB |
Before Width: | Height: | Size: 405 KiB |
@ -75,7 +75,28 @@ let eventos = {
|
|||||||
$(".servicio[data-filter='" + filter + "']").addClass('active')
|
$(".servicio[data-filter='" + filter + "']").addClass('active')
|
||||||
eventos.current_tab = filter
|
eventos.current_tab = filter
|
||||||
},
|
},
|
||||||
|
resizeThumbs: () => {
|
||||||
|
let thumbs = $('#eventos_cards .image img')
|
||||||
|
thumbs.each((i, el) => {
|
||||||
|
let src = $(el).attr('src')
|
||||||
|
if (src == '#') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let w = el.width
|
||||||
|
let h = el.height
|
||||||
|
let parent = $(el).parent()
|
||||||
|
let r = w / h
|
||||||
|
if (r > 1) {
|
||||||
|
$(el).height(parent.height())
|
||||||
|
$(el).width(parent.height() * r)
|
||||||
|
} else {
|
||||||
|
$(el).width(parent.width())
|
||||||
|
$(el).height(parent.width() / r)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
setup: () => {
|
setup: () => {
|
||||||
|
eventos.resizeThumbs()
|
||||||
$('.servicio').click(function(e) {
|
$('.servicio').click(function(e) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
let filter = $(this).attr('data-filter')
|
let filter = $(this).attr('data-filter')
|
||||||
|
@ -3,6 +3,11 @@
|
|||||||
padding-top: 3.5rem;
|
padding-top: 3.5rem;
|
||||||
padding-bottom: 3.5rem;
|
padding-bottom: 3.5rem;
|
||||||
}
|
}
|
||||||
.image {
|
#thumbs .image {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
|
height: 7rem;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
#thumbs .image img {
|
||||||
|
max-width: none !important;
|
||||||
}
|
}
|
||||||
|
@ -90,10 +90,10 @@
|
|||||||
}
|
}
|
||||||
#eventos .segment .image {
|
#eventos .segment .image {
|
||||||
height: 14rem;
|
height: 14rem;
|
||||||
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
#eventos .segment .image img {
|
#eventos .segment .image img {
|
||||||
height: 100%;
|
|
||||||
max-width: none !important;
|
max-width: none !important;
|
||||||
}
|
}
|
||||||
#eventos .segment .header {
|
#eventos .segment .header {
|
||||||
|
@ -115,6 +115,6 @@
|
|||||||
]
|
]
|
||||||
imagenes.url = '{{$urls->admin}}'
|
imagenes.url = '{{$urls->admin}}'
|
||||||
imagenes.evento = '{{$evento->id}}'
|
imagenes.evento = '{{$evento->id}}'
|
||||||
$('#servicio').dropdown()
|
|
||||||
imagenes.setup()
|
imagenes.setup()
|
||||||
|
$('#servicio').dropdown()
|
||||||
@endpush
|
@endpush
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<p>
|
<p>
|
||||||
{{$evento->descripcion}}
|
{{$evento->descripcion}}
|
||||||
</p>
|
</p>
|
||||||
<div class="ui four column grid">
|
<div class="ui four column grid" id="thumbs">
|
||||||
@if ($imagenes !== false)
|
@if ($imagenes !== false)
|
||||||
@foreach (array_values($imagenes) as $i => $imagen)
|
@foreach (array_values($imagenes) as $i => $imagen)
|
||||||
<div class="column">
|
<div class="column">
|
||||||
@ -59,6 +59,24 @@
|
|||||||
'{!!$media->media->html!!}',
|
'{!!$media->media->html!!}',
|
||||||
@endforeach
|
@endforeach
|
||||||
]
|
]
|
||||||
|
let thumbs = $('#thumbs .image img')
|
||||||
|
thumbs.each((i, el) => {
|
||||||
|
let src = $(el).attr('src')
|
||||||
|
if (src == '#') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let w = el.width
|
||||||
|
let h = el.height
|
||||||
|
let parent = $(el).parent()
|
||||||
|
let r = w / h
|
||||||
|
if (r > 1) {
|
||||||
|
$(el).height(parent.height())
|
||||||
|
$(el).width(parent.height() * r)
|
||||||
|
} else {
|
||||||
|
$(el).width(parent.width())
|
||||||
|
$(el).height(parent.width() / r)
|
||||||
|
}
|
||||||
|
})
|
||||||
$('.imagen').css('cursor', 'pointer').click(function() {
|
$('.imagen').css('cursor', 'pointer').click(function() {
|
||||||
var id = $(this).attr('data-id')
|
var id = $(this).attr('data-id')
|
||||||
var src = media[id]
|
var src = media[id]
|
||||||
|