PageSourceSearch

https://www.bibliotecanacional.gov.co/es-co/activos/08_Banners/js/bnc_home_banners.js

js bibliotecanacional.gov.co collected 2026-10-02 03:11:00 UTC 2,045 bytes, 55 lines download raw bytes

1jQuery(document).ready(function(){
2	//url = _spPageContextInfo.webAbsoluteUrl //URL a usar en la versiópn publicada
3	url = _spPageContextInfo.siteAbsoluteUrl +'/es-co' //URL temporal para usar en la versión de prueba BORRAR AL PUBLICAR
4	//ini_carrusell('.swiper',5,20,true)
5	bnc_obtener_carrusell()
6})
7/*****************************************************************/
8/* Función que permitre traer la información de las imagenes del */
9/* carrusell de multiples elementos para armar el rotador		 */
10/*****************************************************************/
11function bnc_obtener_carrusell()
12{
13	jQuery('#BncHomeBanners .swiper-wrapper').empty()
14	
15	 var tr = '<div class="swiper-slide">'
16		tr += '   <div class="bnc-banner-image">'
17		tr += '      <img src="{img}" alt="{Titulo}">'
18		tr += '   </div>'
19		tr += '   <div class="bnc-banner-content">'
20		tr += '      <h6>{Titulo}</h6>'
21		tr += '      <div class="bnc-banner-card-content">{Contenido}</div>'
22		tr += '   </div>'
23		tr += '   <div class="bnc-banner-action">'
24		tr += '      <a href="{Url}" target="_blank">Ingresar ahora <i class="fa-solid fa-chevron-right"></i></a>'
25		tr += '   </div>'
26		tr += '</div>'
27
28	var fields = 'ID,Title,Url,Activo,Orden,FileLeafRef,FileRef,Descripcion'
29	var filter = 'Activo eq 1'
30	var expand = ''
31	var orderby = 'Orden asc'
32	var maximo = '5000'
33	consultar_lista('CarrusellHomeMultiple',fields,filter,expand,orderby,maximo,url,
34		function(Carrusell){
35			jQuery.each(Carrusell,function(index,item){
36				var aux = tr.replace('{Titulo}',item.Title)
37					aux = aux.replace('{Titulo}',item.Title)
38					aux = aux.replace('{img}',item.FileRef)
39					aux = aux.replace('{Url}',item.Url)
40					aux = aux.replace('{Contenido}',item.Descripcion)
41				jQuery('#BncHomeBanners .swiper-wrapper').append(aux)
42			})
43
44			if(screen.width > 900)
45			{
46				ini_carrusell('#BncHomeBanners',5,20,true,'bullets',true)
47			}
48			else
49			{
50				ini_carrusell('#BncHomeBanners',1,20,true,'bullets',true)
51			}
52			
53			
54		})
55}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.