Compare commits

44 Commits

Author SHA1 Message Date
512f4d354a post_by_term para evaluacion 2025-09-04 10:49:50 +00:00
89808b0c35 Cambio de circulo en que hacemos, todos como el de consultoria 2025-09-04 10:33:42 +00:00
099f7cca24 Eliminado borde superior y circulo consultoria para todos 2025-09-04 10:28:56 +00:00
b0b24a7e6a Circulo de consultoria para todos los servicios 2025-09-04 10:26:06 +00:00
515edc6974 Eliminado borde superior e inferior de servicios. Circulo de consultoria para todos 2025-09-04 10:23:57 +00:00
9383137f9b Cambio de color numeros del contados 2025-09-04 10:15:45 +00:00
b59fb050aa Contadores en portada 2025-08-07 08:21:22 +00:00
31ccfd9253 Cambio slug de menu-cabecera por defecto 2025-08-06 12:18:21 +00:00
e143774515 Clientes desde ACF 2025-08-05 16:54:18 +00:00
41eeff8bc2 ACF para clientes 2025-08-05 12:07:13 +00:00
c95dc72ce9 Nuevos campos para datos de contacto en el pie 2025-08-05 11:09:30 +00:00
ca70618978 Portada nuestra red logotipos configurables 2025-08-05 10:35:46 +00:00
d0a20314aa Nuevos campos para configuracion de contenidos en portada 2025-08-05 09:50:43 +00:00
92ab23e219 Cambio de iconos a bootstrap icons 2025-08-05 08:53:09 +00:00
8210d63c40 Oculto fontawesom 2025-08-05 08:52:45 +00:00
31790cb4ea Bootstrap icons para los enlaces a redes 2025-08-05 08:41:10 +00:00
da74405f64 Nuevos bootsrap icons 2025-08-05 08:40:53 +00:00
f316484747 Nuevos estilos para servicios 2025-08-04 16:25:44 +00:00
aaf73d811e Plantilla de pagina automatizada para servicios, verifica las paginas hijas de servicios contra los item de menu servicios 2025-08-04 16:16:36 +00:00
520142bd6a Plantilla para pagina clientes 2025-07-31 16:22:03 +00:00
9c1b8f77e2 Servicios disponibles en el filtro a partir de los items del submenu de servicios 2025-07-31 15:38:10 +00:00
7d609ff528 Cambiado numberpost deprecado por posts_per_page 2025-07-31 15:21:42 +00:00
7512e2e0a7 Cambio de section_title de Actualidad a Blog 2025-07-31 14:58:03 +00:00
c42fc0608a Listado otros servicios tirando de submenu Servicios para el template-servicio 2025-07-31 11:37:15 +00:00
62b8c14420 Otros servicios pendiente de ajustar 2025-07-30 17:54:33 +00:00
8e04b31939 Recuperado el campo de proyecto destacado 2025-07-30 17:40:48 +00:00
2e0caea5d1 Plantilla para las páginas de servicios 2025-07-30 17:28:55 +00:00
96b9586842 Listado de servicios en frontpage a partir de subitems del menu servicios 2025-07-30 17:03:12 +00:00
1f294465a3 Menu dinamico anterior para pruebas 2025-07-30 16:38:04 +00:00
ae6cb1d40b Nuevo menu principal dinamico 2025-07-30 16:22:30 +00:00
87705858c2 Logo destacado desde acf 2025-07-30 11:51:50 +00:00
3573e34ff6 Enlaces para redes sociales desde acf 2025-07-30 11:50:28 +00:00
9402ad3727 Nueva plantilla para menu del pie, items configurables en panel 2025-07-30 11:20:31 +00:00
89b925b667 Nuevo template para pagina quienes-somos 2025-07-30 10:45:33 +00:00
1d7c2c4148 Libreria mobiledetect para el context 2025-07-30 08:52:53 +00:00
651d426a19 Libreria mobiledetect 2025-07-30 08:52:28 +00:00
d37cfdb8e8 cambio de fetch por compile 2025-07-29 17:42:15 +00:00
0c10891b6c cambios en index 2025-07-29 17:41:59 +00:00
9ea2e8f69b fixes 2025-07-29 11:22:41 +00:00
825083ec5d not in use 2025-07-29 11:10:59 +00:00
a1e45e203b not in use 2025-07-29 11:10:39 +00:00
7fd20f4700 deprecated get_context 2025-07-29 11:10:06 +00:00
a648a67a0c this is working 2025-07-29 11:08:33 +00:00
192094c23a upgrading to timber v2 2025-07-29 09:35:39 +00:00
5546 changed files with 124514 additions and 27288 deletions

View File

@ -4,13 +4,13 @@ global $params;
//~ global $paged;
//~ if (!isset($paged) || !$paged){ $paged = 1; }
$context = Timber::get_context();
$context = Timber::context();
$templates = array('actualidad.twig');
$mainargs = array(
'post_type' => 'post',
'post_status' => 'publish',
'numberposts' => 1,
'posts_per_page' => 1,
'orderby' => array(
'date' => 'DESC'
),
@ -31,7 +31,7 @@ $args = array(
'post_type' => 'post',
'post_status' => 'publish',
'offset' => 1,
'numberposts' => 50,
'posts_per_page' => 50,
'orderby' => array(
'date' => 'DESC'
),
@ -73,10 +73,10 @@ $args = array(
//~ }
//~ }
$context['posts'] = new Timber\PostQuery($args);
$context['mainpost'] = new Timber\PostQuery($mainargs);
$context['posts'] = Timber::get_posts($args);
$context['mainpost'] = Timber::get_posts($mainargs);
$context['section_title'] = 'actualidad';
$context['section_title'] = 'Blog';
//~ $context['pagination'] = Timber::get_pagination();
Timber::render( $templates, $context );

344
assets/css/audioplayer.css Normal file
View File

@ -0,0 +1,344 @@
.audioplayer
{
height: 2.5em; /* 40 */
color: #fff;
text-shadow: 1px 1px 0 #000;
border: 1px solid #222;
position: relative;
z-index: 1;
background: #333;
background: -webkit-gradient( linear, left top, left bottom, from( #444 ), to( #222 ) );
background: -webkit-linear-gradient( top, #444, #222 );
background: -moz-linear-gradient( top, #444, #222 );
background: -ms-radial-gradient( top, #444, #222 );
background: -o-linear-gradient( top, #444, #222 );
background: linear-gradient( top, #444, #222 );
-webkit-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, .15 ), 0 0 1.25em rgba( 0, 0, 0, .5 ); /* 20 */
-moz-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, .15 ), 0 0 1.25em rgba( 0, 0, 0, .5 ); /* 20 */
box-shadow: inset 0 1px 0 rgba( 255, 255, 255, .15 ), 0 0 1.25em rgba( 0, 0, 0, .5 ); /* 20 */
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
}
.audioplayer-mini
{
width: 2.5em; /* 40 */
margin: 0 auto;
}
.audioplayer > div
{
position: absolute;
}
.audioplayer-playpause
{
width: 2.5em; /* 40 */
height: 100%;
text-align: left;
text-indent: -9999px;
cursor: pointer;
z-index: 2;
top: 0;
left: 0;
}
.audioplayer:not(.audioplayer-mini) .audioplayer-playpause
{
border-right: 1px solid #555;
border-right-color: rgba( 255, 255, 255, .1 );
}
.audioplayer-mini .audioplayer-playpause
{
width: 100%;
}
.audioplayer-playpause:hover,
.audioplayer-playpause:focus
{
background-color: #222;
}
.audioplayer-playpause a
{
display: block;
}
.audioplayer:not(.audioplayer-playing) .audioplayer-playpause a
{
width: 0;
height: 0;
border: 0.5em solid transparent; /* 8 */
border-right: none;
border-left-color: #fff;
content: '';
position: absolute;
top: 50%;
left: 50%;
margin: -0.5em 0 0 -0.25em; /* 8 4 */
}
.audioplayer-playing .audioplayer-playpause a
{
width: 0.75em; /* 12 */
height: 0.75em; /* 12 */
position: absolute;
top: 50%;
left: 50%;
margin: -0.375em 0 0 -0.375em; /* 6 */
}
.audioplayer-playing .audioplayer-playpause a:before,
.audioplayer-playing .audioplayer-playpause a:after
{
width: 40%;
height: 100%;
background-color: #fff;
content: '';
position: absolute;
top: 0;
}
.audioplayer-playing .audioplayer-playpause a:before
{
left: 0;
}
.audioplayer-playing .audioplayer-playpause a:after
{
right: 0;
}
.audioplayer-time
{
width: 4.375em; /* 70 */
height: 100%;
line-height: 2.375em; /* 38 */
text-align: center;
z-index: 2;
top: 0;
}
.audioplayer-time-current
{
border-left: 1px solid #111;
border-left-color: rgba( 0, 0, 0, .25 );
left: 2.5em; /* 40 */
}
.audioplayer-time-duration
{
border-right: 1px solid #555;
border-right-color: rgba( 255, 255, 255, .1 );
right: 2.5em; /* 40 */
}
.audioplayer-novolume .audioplayer-time-duration
{
border-right: 0;
right: 0;
}
.audioplayer-bar
{
height: 0.875em; /* 14 */
background-color: #222;
cursor: pointer;
z-index: 1;
top: 50%;
right: 6.875em; /* 110 */
left: 6.875em; /* 110 */
margin-top: -0.438em; /* 7 */
}
.audioplayer-novolume .audioplayer-bar
{
right: 4.375em; /* 70 */
}
.audioplayer-bar div
{
width: 0;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.audioplayer-bar-loaded
{
background-color: #333;
z-index: 1;
}
.audioplayer-bar-played
{
background: #007fd1;
background: -webkit-gradient( linear, left top, right top, from( #007fd1 ), to( #c600ff ) );
background: -webkit-linear-gradient( left, #007fd1, #c600ff );
background: -moz-linear-gradient( left, #007fd1, #c600ff );
background: -ms-radial-gradient( left, #007fd1, #c600ff );
background: -o-linear-gradient( left, #007fd1, #c600ff );
background: linear-gradient( left, #007fd1, #c600ff );
z-index: 2;
}
.audioplayer-volume
{
width: 2.5em; /* 40 */
height: 100%;
border-left: 1px solid #111;
border-left-color: rgba( 0, 0, 0, .25 );
text-align: left;
text-indent: -9999px;
cursor: pointer;
z-index: 2;
top: 0;
right: 0;
}
.audioplayer-volume:hover,
.audioplayer-volume:focus
{
background-color: #222;
}
.audioplayer-volume-button
{
width: 100%;
height: 100%;
}
.audioplayer-volume-button a
{
width: 0.313em; /* 5 */
height: 0.375em; /* 6 */
background-color: #fff;
display: block;
position: relative;
z-index: 1;
top: 40%;
left: 35%;
}
.audioplayer-volume-button a:before,
.audioplayer-volume-button a:after
{
content: '';
position: absolute;
}
.audioplayer-volume-button a:before
{
width: 0;
height: 0;
border: 0.5em solid transparent; /* 8 */
border-left: none;
border-right-color: #fff;
z-index: 2;
top: 50%;
right: -0.25em;
margin-top: -0.5em; /* 8 */
}
.audioplayer:not(.audioplayer-mute) .audioplayer-volume-button a:after
{
/* "volume" icon by Nicolas Gallagher, http://nicolasgallagher.com/pure-css-gui-icons */
width: 0.313em; /* 5 */
height: 0.313em; /* 5 */
border: 0.25em double #fff; /* 4 */
border-width: 0.25em 0.25em 0 0; /* 4 */
left: 0.563em; /* 9 */
top: -0.063em; /* 1 */
-webkit-border-radius: 0 0.938em 0 0; /* 15 */
-moz-border-radius: 0 0.938em 0 0; /* 15 */
border-radius: 0 0.938em 0 0; /* 15 */
-webkit-transform: rotate( 45deg );
-moz-transform: rotate( 45deg );
-ms-transform: rotate( 45deg );
-o-transform: rotate( 45deg );
transform: rotate( 45deg );
}
.audioplayer-volume-adjust
{
height: 6.25em; /* 100 */
cursor: default;
position: absolute;
left: 0;
right: -1px;
top: -9999px;
background: #222;
background: -webkit-gradient( linear, left top, left bottom, from( #444 ), to( #222 ) );
background: -webkit-linear-gradient( top, #444, #222 );
background: -moz-linear-gradient( top, #444, #222 );
background: -ms-radial-gradient( top, #444, #222 );
background: -o-linear-gradient( top, #444, #222 );
background: linear-gradient( top, #444, #222 );
-webkit-border-top-left-radius: 2px;
-webkit-border-top-right-radius: 2px;
-moz-border-radius-topleft: 2px;
-moz-border-radius-topright: 2px;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.audioplayer-volume:not(:hover) .audioplayer-volume-adjust
{
opacity: 0;
}
.audioplayer-volume:hover .audioplayer-volume-adjust
{
top: auto;
bottom: 100%;
}
.audioplayer-volume-adjust > div
{
width: 40%;
height: 80%;
background-color: #222;
cursor: pointer;
position: relative;
z-index: 1;
margin: 30% auto 0;
}
.audioplayer-volume-adjust div div
{
width: 100%;
height: 100%;
position: absolute;
bottom: 0;
left: 0;
background: #007fd1;
background: -webkit-gradient( linear, left bottom, left top, from( #007fd1 ), to( #c600ff ) );
background: -webkit-linear-gradient( bottom, #007fd1, #c600ff );
background: -moz-linear-gradient( bottom, #007fd1, #c600ff );
background: -ms-radial-gradient( bottom, #007fd1, #c600ff );
background: -o-linear-gradient( bottom, #007fd1, #c600ff );
background: linear-gradient( bottom, #007fd1, #c600ff );
}
.audioplayer-novolume .audioplayer-volume
{
display: none;
}
.audioplayer-play,
.audioplayer-pause,
.audioplayer-volume a
{
-webkit-filter: drop-shadow( 1px 1px 0 #000 );
-moz-filter: drop-shadow( 1px 1px 0 #000 );
-ms-filter: drop-shadow( 1px 1px 0 #000 );
-o-filter: drop-shadow( 1px 1px 0 #000 );
filter: drop-shadow( 1px 1px 0 #000 );
}
.audioplayer-bar,
.audioplayer-bar div,
.audioplayer-volume-adjust div
{
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.audioplayer-bar,
.audioplayer-volume-adjust > div
{
-webkit-box-shadow: -1px -1px 0 rgba( 0, 0, 0, .5 ), 1px 1px 0 rgba( 255, 255, 255, .1 );
-moz-box-shadow: -1px -1px 0 rgba( 0, 0, 0, .5 ), 1px 1px 0 rgba( 255, 255, 255, .1 );
box-shadow: -1px -1px 0 rgba( 0, 0, 0, .5 ), 1px 1px 0 rgba( 255, 255, 255, .1 );
}
.audioplayer-volume-adjust div div,
.audioplayer-bar-played
{
-webkit-box-shadow: inset 0 0 5px rgba( 255, 255, 255, .5 );
-moz-box-shadow: inset 0 0 5px rgba( 255, 255, 255, .5 );
box-shadow: inset 0 0 5px rgba( 255, 255, 255, .5 );
}
.audioplayer-volume-adjust
{
-webkit-box-shadow: -2px -2px 2px rgba( 0, 0, 0, .15 ), 2px -2px 2px rgba( 0, 0, 0, .15 );
-moz-box-shadow: -2px -2px 2px rgba( 0, 0, 0, .15 ), 2px -2px 2px rgba( 0, 0, 0, .15 );
box-shadow: -2px -2px 2px rgba( 0, 0, 0, .15 ), 2px -2px 2px rgba( 0, 0, 0, .15 );
}
.audioplayer *,
.audioplayer *:before,
.audioplayer *:after
{
-webkit-transition: color .25s ease, background-color .25s ease, opacity .5s ease;
-moz-transition: color .25s ease, background-color .25s ease, opacity .5s ease;
-ms-transition: color .25s ease, background-color .25s ease, opacity .5s ease;
-o-transition: color .25s ease, background-color .25s ease, opacity .5s ease;
transition: color .25s ease, background-color .25s ease, opacity .5s ease;
}

1
assets/css/blueimp-gallery.min.css vendored Normal file

File diff suppressed because one or more lines are too long

7
assets/css/bootstrap-grid.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

8
assets/css/bootstrap-reboot.min.css vendored Normal file
View File

@ -0,0 +1,8 @@
/*!
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */

File diff suppressed because one or more lines are too long

7
assets/css/bootstrap.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

423
assets/css/custom.css Normal file
View File

@ -0,0 +1,423 @@
/*-----------------------------------------------------------------------------------
CSS Name: CGTnews over Hashnews - Modern Magazine & Newspaper HTML Template
Description: CGTnews
Author: Estudio Nexos
Author URI: https://www.estudionexos.com/
Version: 1.0
-----------------------------------------------------------------------------------*/
/*----------------------------------------*/
/* 1. Theme default CSS
/*----------------------------------------*/
/*-- Colors --*/
/* maincolor = '#b4061b'
highlight1 = '#b4061b'
highlight1hover = '#8d0801'
highlight2 = '#b4061b'
bgdark = '#001427'
bgdarkhover = '#002548'
/*--
Sections colors
-----------------------------------------*/
/*
dark-red = #d40000 //accion sindical
dark-brown = #986601 //agitacion
light-brown = #ae906d //confederacion
dark-green = #029502 //sin fronteras
light-green = #339900 //cultura libre
violet = #a54bff //eje violeta
dark-blue = #0147d1 //ideas
*/
/*-- Fonts --*/
@font-face {
font-family: "AvenirBold";
src: url(/wp-content/themes/ryn/src/fonts/AvenirNextLTPro-Bold.otf);
font-weight:600;
}
@font-face {
font-family: "AvenirRegular";
src: url(/wp-content/themes/ryn/src/fonts/AvenirNextLTPro-Regular.otf);
font-weight:600;
}
/*-- Google Font --*/
@import url("https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,900");
/*-- Common Style --*/
body { font-family: "AvenirRegular", "Roboto", sans-serif; background-color:#f5f5f5; font-weight:400; }
h1, h2, h3, h4, h5, h6 { font-family: "AvenirBold", "Roboto", sans-serif; }
ul { list-style: square outside none; margin: 0px; padding: 0 0 0px 20px; }
ul.sub-menu, ul.sub-menu ul, ul.breaking-news-ticker { list-style: none; margin: 0px; padding: 0px; }
.bg-dark { background-color: #001427 !important; }
.text-danger { color: #b4061b; }
.badge-danger { background-color: #b4061b; }
a { color:#001427; }
a:hover { text-decoration: none; color: #d40000; }
/*-- --
Scroll Up
-----------------------------------------*/
#scrollUp { background-color: #b4061b; }
/*--
Youtube Video PlayList
-----------------------------------------*/
.RYPP { padding: 18px 18px 100px 18px; }
.RYPP .RYPP-playlist { height: 75px; }
.playlist { background-color: #000; }
/*--
Page Banner
-----------------------------------------*/
/*-- Page Banner --*/
.page-banner { padding: 30px 0px 0px; }
@media only screen and (min-width: 992px) and (max-width: 1200px) { .page-banner { padding: 20px 0px 0px; } }
@media only screen and (min-width: 768px) and (max-width: 991px) { .page-banner { padding: 20px 0px 0px; } }
@media only screen and (max-width: 767px) { .page-banner { padding: 20px 0px 0px; } }
.page-banner h2 { color: #000; text-transform: none; }
/*--
Instagram Carousel
-----------------------------------------*/
.instagram-carousel .video.instagram-item::before { content: "\f03d"; }
.instagram-carousel .galeria.instagram-item::before { content: "\f03e"; }
.instagram-carousel .publicacion.instagram-item::before { content: "\f0f6"; color:#666; }
/*--
Blockquote
-----------------------------------------*/
blockquote { text-align: left; background-color: #ccc; color: #000; position: relative; overflow: hidden; width: 100%; float: left; padding: 35px 35px 10px 80px; }
blockquote::before { font-family: 'Fontawesome'; content: "\f10d"; position: absolute; left: -2px; top: 3px; font-size: 60px; color: #ffffff; }
/*--
Background color
-----------------------------------------*/
/*
.bg-red { background-color: #b4061b; }
*/
.bg-red { background-color: #f05555; }
.bg-red .post-block-wrapper { background-color: #f69e9e; }
/*----------------------------------------*/
/* 2. Header
/*----------------------------------------*/
/*----
Header Section
------------------------------------------*/
.header-section { background-color: #ffffff; }
@media only screen and (min-width: 777px) {
.header-logo .logo { float:right; }
.header-section {
background-image: url("/wp-content/themes/ryn/src/img/g4841.png");
background-position: top right;
background-repeat: no-repeat;
background-size: 85px auto;
}
.header-banner { text-align:left; }
}
@media only screen and (min-width: 777px) and (max-width: 1024px) {
.header-section {
padding:10px 0;
background-size: 90px auto;
}
}
@media only screen and (min-width: 741px) and (max-width: 777px) {
.header-section { background-image:none; }
.header-banner { line-height: 20px; }
}
@media only screen and (max-width: 740px) {
.header-top-links ul.header-links { padding:0px; float:none; width:65%; margin:0 auto; text-align:center;}
.header-top-links .header-links li::before { background-color: transparent; }
.header-top-social { text-align:center; }
.header-top-social .header-social { float:none; }
.header-top-social .header-social a { display:inline; float:none; }
.header-section { display:none; }
}
/*-- Header Logo --*/
/*
.header-logo .logo img { height:100px; }
*/
/*-- Header Banner --*/
.header-banner .banner a img { max-width:auto; width:auto; }
/*----
Menu Section
------------------------------------------*/
/*-- Main Menu --*/
.main-menu nav > ul > li.active > a,
.main-menu nav > ul > li:hover > a { color: #b4061b; }
/*-- Sub Menu --*/
.sub-menu li.active a, .sub-menu li:hover a, .sub-menu li a:hover { color: #b4061b; }
.sub-sub-menu { border-top: 1px solid #f1f1f1; }
.sub-sub-menu li { padding-left: 10px }
.sub-menu li:hover .sub-sub-menu li a { color: #666666; }
.sub-menu li:hover .sub-sub-menu li a:hover { color:red; }
/*----
Header Top
------------------------------------------*/
.header-top-links .header-links li.disabled a { background-color: #f05555; }
.header-top-links .header-links li a:hover { color: #b4061b; }
.header-top-social .header-social a:hover {color: #b4061b;}
/*--
Breaking News Section
------------------------------------------*/
.breaking-news-section { background-color: #b4061b; /*-- Breaking News Section Two --*/ /*-- Breaking News Section Three --*/ }
.breaking-news-wrapper .breaking-news-nav button { background-color: red; /*-- Hover --*/ }
/*-- Breaking News Wrapper --*/
.breaking-news-wrapper .breaking-news-ticker li a { font-family: "Roboto", sans-serif; }
/*----------------------------------------*/
/* 3. Post Common Style For Post Block, Carousel & Nav Etc
/*----------------------------------------*/
/*-- Popular Section --*/
.single-publicacion .popular-section { background-color: #1f2024; }
.popular-section .popular-section-title { align-self:center; }
.popular-section h2.title { text-align:center; text-transform:uppercase; font-size:18px; font-weight:600; color:#fff; margin:auto 0px; }
/*-- Post Block Wrapper --*/
.post-block-wrapper { border: 1px solid #f1f1f1; background-color: #ffffff; }
.single-galeria .post-block-wrapper.post-content,
.single-video .post-block-wrapper.post-content,
.single-publicacion .post-block-wrapper.post-content,
.single-audio .post-block-wrapper.post-content { border: none; }
.post-header .teaser,
.single-video .teaser,
.single-publicacion .teaser,
.single-audio .teaser { color:#fff; }
@media only screen and (min-width: 992px) {
.single-video .teaser { position:absolute; bottom:30px; font-size:18px; }
.post-header .teaser,
.single-audio .teaser { font-size:16px; }
.single-publicacion .teaser { font-size:18px; }
}
.post-block-wrapper .head { border-bottom: 3px solid #f1f1f1; }
.post-block-wrapper.dark-red .head { border-bottom: 3px solid #d40000; }
.post-block-wrapper.dark-green .head { border-bottom: 3px solid #029502; }
.post-block-wrapper.light-green .head { border-bottom: 3px solid #339900; }
.post-block-wrapper.dark-brown .head { border-bottom: 3px solid #986601; }
.post-block-wrapper.light-brown .head { border-bottom: 3px solid #ae906d; }
.post-block-wrapper.violet .head { border-bottom: 3px solid #a54bff; }
/*
.post-block-wrapper.violet .head { background: linear-gradient(to left, #fff, #a54bff); border-bottom: 3px solid #fff; }
*/
.post-block-wrapper.dark-blue .head { border-bottom: 3px solid #0147d1; }
.post-block-wrapper.violet { background-color:#a54bff; color:#f5f5f5; }
.post-block-wrapper.violet .head { border-bottom: 3px solid #f1f1f1; }
.post-block-wrapper.violet a { color:#fff; }
.post-block-wrapper.violet a:hover { color:#d40000; }
.post-block-wrapper.bg-dark a { color:#f1f1f1; }
.post-block-wrapper.bg-dark a:hover { color:#d40000; }
.post-block-wrapper .head h2,
.post-block-wrapper .head h3 { font-size: 18px; line-height: 24px; }
.post-block-wrapper .head::before, .post-block-wrapper .head::after { background-color: #b4061b; }
.post-block-wrapper .head .title { color: #b4061b; }
.post-block-wrapper .head .post-block-tab-list > li > a { font-family: "AvenirRegular","Roboto", sans-serif; font-weight: bold; }
.post-block-wrapper .head .post-block-tab-list > li .dropdown-menu li a { font-family: "Roboto", sans-serif; }
.post-block-wrapper .head .post-block-tab-list.feature-post-tab-list > li > a:hover,
.post-block-wrapper .head .post-block-tab-list.feature-post-tab-list > li > a.active { color: #b4061b; }
.post-block-wrapper.dark-red .head .post-block-tab-list.feature-post-tab-list > li > a:hover,
.post-block-wrapper.dark-red .head .post-block-tab-list.feature-post-tab-list > li > a.active { color: #d40000; }
.post-block-wrapper.dark-blue .head .post-block-tab-list.feature-post-tab-list > li > a:hover,
.post-block-wrapper.dark-blue .head .post-block-tab-list.feature-post-tab-list > li > a.active { color: #0147d1; }
.post-block-wrapper .head .post-block-tab-list.feature-post-tab-list > li .dropdown-menu li a:hover,
.post-block-wrapper .head .post-block-tab-list.feature-post-tab-list > li .dropdown-menu li a.active { color: red; }
.post-block-wrapper .body .single-post .content { font-size:18px; line-height: 28px; }
.post-carousel-1 .slick-arrow { background-color: #000; color:#fff; }
/*
.post-block-carousel .slick-arrow:hover { color: #b4061b; border-color: #b4061b; }
*/
.page-pagination ul li a { width:auto; min-width:30px; }
/*----------------------------------------*/
/* 4. Post Styles
/*----------------------------------------*/
.post .post-wrap .category { font-family: "Roboto", sans-serif; }
.post .post-wrap .content .title { font-size: 22px; line-height: 24px; }
@media only screen and (min-width: 992px) and (max-width: 1200px) { .post .post-wrap .content .title { font-size: 20px; } }
@media only screen and (max-width: 479px) { .post .post-wrap .content .title { font-size: 14px; line-height: 18px; } }
.post.post-small .post-wrap .content .title { font-size: 16px; line-height: 18px; }
@media only screen and (min-width: 992px) and (max-width: 1200px) { .post.post-small .post-wrap .content .title { font-size: 12px; line-height: 16px; } }
.post.post-large .post-wrap .content .title { font-size: 32px; line-height: 36px; }
@media only screen and (min-width: 992px) and (max-width: 1200px) { .post.post-large .post-wrap .title { font-size: 28px; line-height: 32px; } }
@media only screen and (max-width: 767px) { .post.post-large .post-wrap .content .title { font-size: 24px; line-height: 30px; } }
@media only screen and (max-width: 479px) { .post.post-large .post-wrap .content .title { font-size: 14px; line-height: 18px; } }
.post .post-wrap .content .title a:hover { color: #b4061b; }
.post .post-wrap .content .meta .meta-item.date { font-size:0.8rem; }
.post .post-wrap .content .meta .meta-item.date.event { font-size:0.9rem; line-height:1.3rem; font-family:"AvenirBold", Roboto, sans-serif; }
.post .post-wrap .content .meta .meta-item i { line-height:18px; }
.post-header .meta .meta-item.author i { color:#17a2b8; }
.post-header .meta .meta-item.category.politic { background-color: #b4061b; }
.post-header .meta .meta-item.category.politic:hover { background-color:#8d0801; }
.post-header .meta .meta-item i { color: /*#b4061b*/#bbb; }
.post.post-overlay.post-large .content { left:50px; right:50px; }
.post.post-overlay .post-wrap .category { position: static; left: auto; top: auto; float:left; margin-right:3px; }
.post.post-overlay .post-wrap .categories { position: absolute; left: 3px; top: 3px; z-index:100; }
/*----------------------------------------*/
/* 5. Single Post Details
/*----------------------------------------*/
/*-- Post Header --*/
.post-header { padding: 50px 30px; background-color: rgba(98, 28, 28, 0.65) }
.post-header .title { font-size: 3rem; line-height: 4rem; font-weight: 700; }
@media only screen and (min-width: 992px) and (max-width: 1200px) { .post-header .title { font-size: 28px; line-height: 32px; } }
@media only screen and (max-width: 767px) { .post-header .title { font-size: 24px; line-height: 30px; } }
@media only screen and (max-width: 479px) { .post-header .title { font-size: 18px; line-height: 24px; } }
.post-header-section { box-shadow: 0 16px 32px 0 rgba(52,58,64,.24); }
@media only screen and (max-width: 767px) { .post-header { padding-bottom: 40px; } }
.post-header .meta .meta-item { font-family: "AvenirRegular","Roboto", sans-serif; }
.post-header .meta .meta-item.category { margin-right:5px; border-radius:0px; }
/*-- Single Post --*/
.single-post .post-wrap .content p { margin-bottom: 30px; display: block; float: none; }
.single-post .post-wrap .content p:first-child { font-family: "AvenirBold", "Roboto"; font-weight:bold; line-height: 24px; font-size: 18px; }
.single-blog .blog-wrap .meta .meta-item.category { margin-right:5px; }
/*-- Single post Publicacion --*/
.single-publicacion .post-content .post-header { padding: 30px 0px 10px; background-color:transparent; }
.single-publicacion .post-header .meta .meta-item { color:#666; }
.single-publicacion .post-header .meta .meta-item.category { color:#fff; }
.single-publicacion .post-header .title { color: #000; }
/*----------------------------------------*/
/* 6. Blog & Blog Details
/*----------------------------------------*/
/*-- Single Post --*/
.single-blog .blog-wrap .meta .meta-item { font-family:"AvenirRegular","Roboto", sans-serif; }
/*----------------------------------------*/
/* 7. Sidebar
/*----------------------------------------*/
/*-- Sidebar Block Wrapper --*/
.sidebar-block-wrapper .head::before, .sidebar-block-wrapper .head::after { background-color: #b4061b; }
.sidebar-block-wrapper .head .title { color: #b4061b; }
/*-- Sidebar Social Follow --*/
.sidebar-social-follow > div { padding: 1px; width: 33%; float: left; }
/*-- Sidebar Tab List For Latest & Popular News --*/
.sidebar-tab-list a { font-family: "AvenirRegular","Roboto", sans-serif; }
.sidebar-tab-list.sidebar-tab-list-3-tabs a { width: 33.33%; }
.sidebar-tab-list.sidebar-tab-list-3-tabs a:last-child::after { right: -1.1px; }
.sidebar-tab-list a::before,
.sidebar-tab-list a::after,
.sidebar-tab-list a.active { background-color: #b4061b; }
/*-- Sidebar Category --*/
.sidebar-category li a { font-family: "AvenirRegular","Roboto", sans-serif; }
/*----------------------------------------*/
/* 8. Contact
/*----------------------------------------*/
/*-- Contact Form --*/
.contact-form input[type="checkbox"] { width: auto; height: auto; border: 1px solid #f1f1f1; line-height: 24px; padding: 7px 15px; }
.contact-form button[type="submit"] { width: auto; border-radius: 5px; background-color: #00c8fa; color: #ffffff; text-transform: capitalize; border: none; padding: 8px 30px; }
.contact-form legend { display: block; line-height: 18px; font-size:14px; font-weight:600; }
.contact-form button[type="submit"]:focus { border: none; }
/*----------------------------------------*/
/* 9. Footer
/*----------------------------------------*/
/*--
Footer Top
----------------------------------------*/
/*-- Footer Widget --*/
.footer-widget .widget-title { border-left: 4px solid #b4061b; }
.footer-widget .widget-title { font-family: "AvenirRegular","Roboto", sans-serif; }
.footer-widget .footer-widget-post .post-wrap .content .meta .meta-item { font-family: "AvenirRegular","Roboto", sans-serif; }
.footer-widget .single-tweet .content .head h5 { font-family: "AvenirRegular","Roboto", sans-serif; }
.footer-top-section a, .footer-bottom-section a {color:#fff; }
.footer-widget .content .footer-social a.rss { background-color: orange; }
.not-front .footer-widget .content .footer-social a { width: 56px; height: 56px; border-radius: 3px; text-align: center; color: #ffffff; text-shadow: 0 2px 2px rgba(0, 0, 0, 0.4); }
.not-front .footer-widget .content .footer-social a i { font-size: 28px; line-height: 58px; }
/*----------------------------------------*/
/* 10. Extra CSS
/*----------------------------------------*/
/*--
Masonry
----------------------------------------*/
.grid-sizer,
.grid-item { float:left; width: 100%; margin-bottom: 10px;}
.grid-item--width2 { width:100%; }
.grid-item img { max-width:100%; }
@media only screen and (min-width: 1501px) {
.grid-sizer,
.grid-item { float:left; width: 16.1%;}
.grid-item--width2 { width: 49.5%; }
.grid-item img { max-width:100%; }
}
@media only screen and (min-width: 1370px) and (max-width: 1500px) {
.grid-sizer,
.grid-item { float:left; width: 16.05%;}
.grid-item--width2 { width: 49.4%; }
}
@media only screen and (min-width: 1274px) and (max-width: 1369px) {
.grid-sizer,
.grid-item { float:left; width: 16%;}
.grid-item--width2 { width: 49.3%; }
}
@media only screen and (min-width: 1185px) and (max-width: 1273px) {
.grid-sizer,
.grid-item { float:left; width: 15.95%;}
.grid-item--width2 { width: 49.3%; }
}
@media only screen and (min-width: 1050px) and (max-width: 1184px) {
.grid-sizer,
.grid-item { float:left; width: 15.85%;}
.grid-item--width2 { width: 49.25%; }
}
@media only screen and (min-width: 955px) and (max-width: 1049px) {
.grid-sizer,
.grid-item { float:left; width: 24.2%;}
.grid-item--width2 { width: 49.3%; }
}
@media only screen and (min-width: 860px) and (max-width: 954px) {
.grid-sizer,
.grid-item { float:left; width: 24.1%;}
.grid-item--width2 { width: 49.3%; }
}
@media only screen and (min-width: 650px) and (max-width: 859px) {
.grid-sizer,
.grid-item { float:left; width: 49%;}
.grid-item--width2 { width: 49%; }
}

4
assets/css/font-awesome.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,16 @@
#!/bin/sh
rm $0
./style
echo "
------------------
(program exited with code: $?)"
echo "Press return to continue"
#to be more compatible with shells like dash
dummy_var=""
read dummy_var

44
assets/css/plugins.css Normal file

File diff suppressed because one or more lines are too long

131
assets/css/rypp.css Normal file
View File

@ -0,0 +1,131 @@
@charset "UTF-8";
.RYPP {
/* Youtube Player With Playlist */
width: 100%;
position: relative;
padding-right: 250px;
background: #1a1a1a;
overflow: hidden;
font: 400 14px/120% Arial, Helvetica, sans-serif;
color: #999; }
.RYPP .RYPP-video {
width: 100%;
padding-top: 56.25%;
float: left;
position: relative; }
.RYPP .RYPP-video > iframe {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 2; }
.RYPP.r16-9 .RYPP-video {
padding-top: 56.25%; }
.RYPP.r4-3 .RYPP-video {
padding-top: 75%; }
.RYPP.r2-1 .RYPP-video {
padding-top: 50%; }
.RYPP .RYPP-items {
width: 100%;
position: absolute;
left: 0;
top: 64px;
right: 0;
bottom: 0;
overflow-y: auto; }
.RYPP .RYPP-playlist {
width: 250px;
position: absolute;
right: 0;
top: 0;
bottom: 0;
background: #222; }
.RYPP .RYPP-playlist a {
color: #999; }
.RYPP .RYPP-playlist a:hover {
color: #fff; }
.RYPP .RYPP-playlist > header {
width: 100%;
height: 64px;
padding: 16px 0 0 8px;
background: #222;
border-left: 8px solid #222;
border-right: 8px solid #222;
border-bottom: 1px solid #3a3a3a;
z-index: 2; }
.RYPP .RYPP-playlist > header ._h1 {
margin: 0 0 4px 0;
padding: 0;
font-size: 16px;
font-weight: 400;
color: #fff; }
.RYPP .RYPP-playlist > header p {
margin: 0;
padding: 0; }
.RYPP .RYPP-playlist ol {
padding: 0 0 16px 0;
margin: 0;
list-style: none;
counter-reset: item; }
.RYPP .RYPP-playlist ol li {
position: relative;
vertical-align: middle;
overflow: hidden;
padding: 12px 0 12px 12px; }
.RYPP .RYPP-playlist ol li > img {
width: 18%;
display: inline-block;
vertical-align: middle;
border: 2px solid transparent; }
.RYPP .RYPP-playlist ol li > p {
width: 76%;
margin: 0;
padding: 0 16px 0 0;
float: right;
display: inline-block;
vertical-align: middle;
text-align: left;
color: #cacaca; }
.RYPP .RYPP-playlist ol li > p > small {
margin: 0;
padding: 0;
font-size: 80%; }
.RYPP .RYPP-playlist ol li:hover {
background-color: #3a3a3a;
cursor: pointer; }
.RYPP .RYPP-playlist ol li.selected {
background-color: #3a3a3a;
cursor: pointer; }
.RYPP .RYPP-playlist ol li.selected > p {
color: #fff; }
.RYPP .RYPP-playlist ol li.selected > img {
border: 2px solid #c03636; }
.RYPP .RYPP-playlist ol li.selected:before {
content: '▶';
font-size: 10px;
color: #c03636; }
.RYPP .RYPP-playlist ol li:before {
counter-increment: item;
content: counter(item);
font-size: 80%; }
.RYPP-items::-webkit-scrollbar {
width: 6px;
background: #3a3a3a; }
.RYPP-items::-webkit-scrollbar-thumb {
background: #999; }
@media only screen and (max-width: 639px) {
.RYPP {
padding-right: 0; }
.RYPP .RYPP-playlist {
width: 100%;
position: static;
float: left; }
.RYPP .RYPP-playlist .RYPP-items {
position: static;
max-height: 350px;
overflow: auto; } }

2283
assets/css/style.css Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
assets/img/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
assets/img/g4840.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
assets/img/g4841.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
assets/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
assets/img/map/marker.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
assets/img/shape/mail-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/img/shape/mail-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
assets/img/tweets/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

48
assets/js/ajax-mail.js Normal file
View File

@ -0,0 +1,48 @@
$(function() {
// Get the form.
var form = $('#contact-form');
// Get the messages div.
var formMessages = $('.form-messege');
// Set up an event listener for the contact form.
$(form).submit(function(e) {
// Stop the browser from submitting the form.
e.preventDefault();
// Serialize the form data.
var formData = $(form).serialize();
// Submit the form using AJAX.
$.ajax({
type: 'POST',
url: $(form).attr('action'),
data: formData
})
.done(function(response) {
// Make sure that the formMessages div has the 'success' class.
$(formMessages).removeClass('error');
$(formMessages).addClass('success');
// Set the message text.
$(formMessages).text(response);
// Clear the form.
$('#contact-form input,#contact-form textarea').val('');
})
.fail(function(data) {
// Make sure that the formMessages div has the 'error' class.
$(formMessages).removeClass('success');
$(formMessages).addClass('error');
// Set the message text.
if (data.responseText !== '') {
$(formMessages).text(data.responseText);
} else {
$(formMessages).text('Oops! An error occured and your message could not be sent.');
}
});
});
});

5
assets/js/audioplayer.min.js vendored Normal file
View File

@ -0,0 +1,5 @@
/*
AUTHOR: Osvaldas Valutis, www.osvaldas.info
*/
(function(e,t,n,r){var i="ontouchstart"in t,s=i?"touchstart":"mousedown",o=i?"touchmove":"mousemove",u=i?"touchend":"mouseup",a=i?"touchcancel":"mouseup",f=function(e){var t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.ceil(e%3600%60);return(t==0?"":t>0&&t.toString().length<2?"0"+t+":":t+":")+(n.toString().length<2?"0"+n:n)+":"+(r.toString().length<2?"0"+r:r)},l=function(e){var t=n.createElement("audio");return!!(t.canPlayType&&t.canPlayType("audio/"+e.split(".").pop().toLowerCase()+";").replace(/no/,""))};e.fn.audioPlayer=function(t){var t=e.extend({classPrefix:"audioplayer",strPlay:"Play",strPause:"Pause",strVolume:"Volume"},t),n={},r={playPause:"playpause",playing:"playing",time:"time",timeCurrent:"time-current",timeDuration:"time-duration",bar:"bar",barLoaded:"bar-loaded",barPlayed:"bar-played",volume:"volume",volumeButton:"volume-button",volumeAdjust:"volume-adjust",noVolume:"novolume",mute:"mute",mini:"mini"};for(var u in r)n[u]=t.classPrefix+"-"+r[u];this.each(function(){if(e(this).prop("tagName").toLowerCase()!="audio")return false;var r=e(this),u=r.attr("src"),c=r.get(0).getAttribute("autoplay"),c=c===""||c==="autoplay"?true:false,h=r.get(0).getAttribute("loop"),h=h===""||h==="loop"?true:false,p=false;if(typeof u==="undefined"){r.find("source").each(function(){u=e(this).attr("src");if(typeof u!=="undefined"&&l(u)){p=true;return false}})}else if(l(u))p=true;var d=e('<div class="'+t.classPrefix+'">'+(p?e("<div>").append(r.eq(0).clone()).html():'<embed src="'+u+'" width="0" height="0" volume="100" autostart="'+c.toString()+'" loop="'+h.toString()+'" />')+'<div class="'+n.playPause+'" title="'+t.strPlay+'"><a href="#">'+t.strPlay+"</a></div></div>"),v=p?d.find("audio"):d.find("embed"),v=v.get(0);if(p){d.find("audio").css({width:0,height:0,visibility:"hidden"});d.append('<div class="'+n.time+" "+n.timeCurrent+'"></div><div class="'+n.bar+'"><div class="'+n.barLoaded+'"></div><div class="'+n.barPlayed+'"></div></div><div class="'+n.time+" "+n.timeDuration+'"></div><div class="'+n.volume+'"><div class="'+n.volumeButton+'" title="'+t.strVolume+'"><a href="#">'+t.strVolume+'</a></div><div class="'+n.volumeAdjust+'"><div><div></div></div></div></div>');var m=d.find("."+n.bar),g=d.find("."+n.barPlayed),y=d.find("."+n.barLoaded),b=d.find("."+n.timeCurrent),w=d.find("."+n.timeDuration),E=d.find("."+n.volumeButton),S=d.find("."+n.volumeAdjust+" > div"),x=0,T=function(e){theRealEvent=i?e.originalEvent.touches[0]:e;v.currentTime=Math.round(v.duration*(theRealEvent.pageX-m.offset().left)/m.width())},N=function(e){theRealEvent=i?e.originalEvent.touches[0]:e;v.volume=Math.abs((theRealEvent.pageY-(S.offset().top+S.height()))/S.height())},C=setInterval(function(){y.width(v.buffered.end(0)/v.duration*100+"%");if(v.buffered.end(0)>=v.duration)clearInterval(C)},100);var k=v.volume,L=v.volume=.111;if(Math.round(v.volume*1e3)/1e3==L)v.volume=k;else d.addClass(n.noVolume);w.html("…");b.text(f(0));v.addEventListener("loadeddata",function(){w.text(f(v.duration));S.find("div").height(v.volume*100+"%");x=v.volume});v.addEventListener("timeupdate",function(){b.text(f(v.currentTime));g.width(v.currentTime/v.duration*100+"%")});v.addEventListener("volumechange",function(){S.find("div").height(v.volume*100+"%");if(v.volume>0&&d.hasClass(n.mute))d.removeClass(n.mute);if(v.volume<=0&&!d.hasClass(n.mute))d.addClass(n.mute)});v.addEventListener("ended",function(){d.removeClass(n.playing)});m.on(s,function(e){T(e);m.on(o,function(e){T(e)})}).on(a,function(){m.unbind(o)});E.on("click",function(){if(d.hasClass(n.mute)){d.removeClass(n.mute);v.volume=x}else{d.addClass(n.mute);x=v.volume;v.volume=0}return false});S.on(s,function(e){N(e);S.on(o,function(e){N(e)})}).on(a,function(){S.unbind(o)})}else d.addClass(n.mini);if(c)d.addClass(n.playing);d.find("."+n.playPause).on("click",function(){if(d.hasClass(n.playing)){e(this).attr("title",t.strPlay).find("a").html(t.strPlay);d.removeClass(n.playing);p?v.pause():v.Stop()}else{e(this).attr("title",t.strPause).find("a").html(t.strPause);d.addClass(n.playing);p?v.play():v.Play()}return false});r.replaceWith(d)});return this}})(jQuery,window,document)

1
assets/js/blueimp-gallery.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery","./blueimp-gallery"],a):a(window.jQuery,window.blueimp.Gallery)}(function(a,b){"use strict";a.extend(b.prototype.options,{useBootstrapModal:!0});var c=b.prototype.close,d=b.prototype.imageFactory,e=b.prototype.videoFactory,f=b.prototype.textFactory;a.extend(b.prototype,{modalFactory:function(a,b,c,d){if(!this.options.useBootstrapModal||c)return d.call(this,a,b,c);var e=this,f=this.container.children(".modal"),g=f.clone().show().on("click",function(a){(a.target===g[0]||a.target===g.children()[0])&&(a.preventDefault(),a.stopPropagation(),e.close())}),h=d.call(this,a,function(a){b({type:a.type,target:g[0]}),g.addClass("in")},c);return g.find(".modal-title").text(h.title||String.fromCharCode(160)),g.find(".modal-body").append(h),g[0]},imageFactory:function(a,b,c){return this.modalFactory(a,b,c,d)},videoFactory:function(a,b,c){return this.modalFactory(a,b,c,e)},textFactory:function(a,b,c){return this.modalFactory(a,b,c,f)},close:function(){this.container.find(".modal").removeClass("in"),c.call(this)}})});

7
assets/js/bootstrap.bundle.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6
assets/js/bootstrap.min-4.0.0.js vendored Normal file

File diff suppressed because one or more lines are too long

7
assets/js/bootstrap.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

23
assets/js/custom.js Normal file
View File

@ -0,0 +1,23 @@
/* Hero carousel height */
//var rypp_height = $(".RYPP").innerHeight();
//$(".hero-post .image").css( "height" , rypp_height );
/* Video resize */
$(".playlist iframe").attr({
width: $( ".playlist .videoframe" ).width(),
height: Math.floor($( ".playlist .videoframe" ).width()/1.78),
});
//~ var hero_height = $(".playlist").height();
var hero_height = Math.floor($(".playlist .videoframe").height()*2);
$(".hero-post .image").css( "height" , hero_height );
/* Playlist */
//var api_key = 'AIzaSyAsvJPKTArFviBbDntKU4sHxkl8fYrj1uM';
/* Initialize all the player in the page with default options*/
//$('.RYPP').rypp(api_key, {
// //autoplay: false,
//});

7
assets/js/imagesloaded.pkgd.min.js vendored Normal file

File diff suppressed because one or more lines are too long

13
assets/js/jquery-ui.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

362
assets/js/main.js Normal file
View File

@ -0,0 +1,362 @@
(function ($) {
"use strict";
/*--
Menu Sticky
-----------------------------------*/
var windows = $(window);
var sticky = $('.header-sticky');
/*--
Mobile Menu
------------------------*/
$('.mobile-menu-wrap').meanmenu({
meanScreenWidth: '767',
meanMenuContainer: '.mobile-menu',
meanMenuClose: '<span class="menu-close"></span>',
meanMenuOpen: '<span class="menu-bar"></span>',
meanRevealPosition: 'left',
meanMenuCloseSize: '0',
});
/*--
Header Search
--------------------------------------------*/
var searchToggle = $('.header-search-toggle');
var searchForm = $('.header-search-form');
searchForm.hide();
/*-- Search Toggle --*/
searchToggle.on('click', function(){
if( searchToggle.hasClass('open') ) {
searchForm.animate({
width: "toggle",
});
$(this).removeClass('open').find('i').removeClass('fa-close').addClass('fa-search');
}else{
searchForm.animate({
width: "toggle",
});
$(this).addClass('open').find('i').removeClass('fa-search').addClass('fa-close');
}
});
/*--
Breaking News Ticker
--------------------------------------------*/
$('.breaking-news-ticker').newsTicker({
row_height: 40,
max_rows: 1,
speed: 600,
duration: 5000,
prevButton: $('.news-ticker-prev'),
nextButton: $('.news-ticker-next'),
});
/*--
Slick Slider
-----------------------------------*/
/*-- Post Carousel --*/
$('.post-carousel-1').slick({
autoplay: true,
autoplaySpeed: 5000,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
slidesToShow: 1,
prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-angle-left"></i></button>',
nextArrow: '<button type="button" class="slick-next"><i class="fa fa-angle-right"></i></button>',
responsive: [
{
breakpoint: 350,
settings: {
arrows: false,
}
}
]
});
/*-- Popular Post Slider --*/
$('.popular-post-slider').slick({
arrows: false,
autoplay: true,
autoplaySpeed: 5000,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
slidesToShow: 3,
responsive: [
{
breakpoint: 1199,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 991,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 1,
}
}
]
});
/*-- Five Row Post Carousel --*/
$('.five-row-post-carousel').slick({
autoplay: false,
autoplaySpeed: 5000,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
slidesToShow: 1,
rows: 5,
prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-angle-left"></i></button>',
nextArrow: '<button type="button" class="slick-next"><i class="fa fa-angle-right"></i></button>',
responsive: [
{
breakpoint: 991,
settings: {
slidesToShow: 2,
rows: 4,
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 1,
}
}
]
});
/*-- Four Row Post Carousel --*/
$('.four-row-post-carousel').slick({
autoplay: false,
autoplaySpeed: 5000,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
slidesToShow: 1,
rows: 4,
prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-angle-left"></i></button>',
nextArrow: '<button type="button" class="slick-next"><i class="fa fa-angle-right"></i></button>',
});
/*-- Three Row Post Carousel --*/
$('.three-row-post-carousel').slick({
autoplay: false,
autoplaySpeed: 5000,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
slidesToShow: 1,
rows: 3,
prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-angle-left"></i></button>',
nextArrow: '<button type="button" class="slick-next"><i class="fa fa-angle-right"></i></button>',
});
/*-- Two Row Post Carousel --*/
$('.two-row-post-carousel').slick({
autoplay: false,
autoplaySpeed: 5000,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
slidesToShow: 1,
rows: 2,
prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-angle-left"></i></button>',
nextArrow: '<button type="button" class="slick-next"><i class="fa fa-angle-right"></i></button>',
});
/*-- Sidebar Post Carousel --*/
$('.sidebar-post-carousel').slick({
autoplay: true,
autoplaySpeed: 5000,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
slidesToShow: 1,
prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-angle-left"></i></button>',
nextArrow: '<button type="button" class="slick-next"><i class="fa fa-angle-right"></i></button>',
});
/*-- Video Post Slider --*/
$('.video-post-slider').slick({
arrows: true,
autoplay: true,
autoplaySpeed: 5000,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
slidesToShow: 3,
prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-angle-left"></i></button>',
nextArrow: '<button type="button" class="slick-next"><i class="fa fa-angle-right"></i></button>',
});
/*-- Four Column Post Carousel --*/
$('.four-column-post-carousel').slick({
arrows: false,
autoplay: true,
autoplaySpeed: 5000,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
slidesToShow: 4,
responsive: [
{
breakpoint: 1199,
settings: {
slidesToShow: 3,
}
},
{
breakpoint: 991,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 1,
}
}
]
});
/*-- Three Column Post Carousel --*/
$('.three-column-post-carousel').slick({
arrows: true,
autoplay: true,
autoplaySpeed: 5000,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
slidesToShow: 3,
prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-angle-left"></i></button>',
nextArrow: '<button type="button" class="slick-next"><i class="fa fa-angle-right"></i></button>',
responsive: [
{
breakpoint: 1199,
settings: {
slidesToShow: 3,
}
},
{
breakpoint: 991,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 1,
}
}
]
});
/*-- Two Column Post Carousel --*/
$('.two-column-post-carousel').slick({
arrows: true,
autoplay: true,
autoplaySpeed: 5000,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
slidesToShow: 2,
prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-angle-left"></i></button>',
nextArrow: '<button type="button" class="slick-next"><i class="fa fa-angle-right"></i></button>',
responsive: [
{
breakpoint: 767,
settings: {
slidesToShow: 1,
}
}
]
});
/*-- Full Width Instagram Carousel --*/
$('.fullwidth-instagram-carousel').slick({
arrows: false,
autoplay: true,
autoplaySpeed: 5000,
pauseOnFocus: false,
pauseOnHover: false,
infinite: true,
slidesToShow: 5,
responsive: [
{
breakpoint: 1199,
settings: {
slidesToShow: 4,
}
},
{
breakpoint: 991,
settings: {
slidesToShow: 3,
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 350,
settings: {
slidesToShow: 1,
}
}
]
});
/*--
Custom Scroll
-----------------------------------*/
$(".customScroll").niceScroll();
/*--
Scroll Up
-----------------------------------*/
$.scrollUp({
easingType: 'linear',
scrollSpeed: 900,
animation: 'fade',
scrollText: '<i class="fa fa-angle-up"></i>',
});
/*--
Magnific Video Popup
--------------------------------*/
var imagePopup = $('.image-popup');
imagePopup.magnificPopup({
type: 'image',
tLoading: 'Loading image #%curr%...',
gallery: {
enabled: true,
},
});
var videoPopup = $('.video-popup');
videoPopup.magnificPopup({
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
zoom: {
enabled: true,
}
});
})(jQuery);

9
assets/js/masonry.pkgd.min.js vendored Normal file

File diff suppressed because one or more lines are too long

50
assets/js/plugins.js Normal file

File diff suppressed because one or more lines are too long

4
assets/js/popper.min.js vendored Normal file

File diff suppressed because one or more lines are too long

368
assets/js/rypp.js Normal file
View File

@ -0,0 +1,368 @@
/*
Youtube Player with Playlist (v2.22)
https://github.com/carloscabo/responsive-youtube-player-with-playlist
by Carlos Cabo (@putuko)
*/
var RYPP = (function($, undefined) {
'use strict';
function Rypp(el, api_key, options) {
if (typeof api_key === 'undefined') {
console.log("Youtube API V3 requires a valid API KEY.\nFollow the instructions at: https://developers.google.com/youtube/v3/getting-started");
return false;
}
// DOM Elements container
this.DOM = {};
// Default settings container
this.options = {};
// Data / urls
this.data = {
// Playlist url
ytapi: {
playlist_info: 'https://www.googleapis.com/youtube/v3/playlists?part=snippet&id={{RESOURCES_ID}}&key={{YOUR_API_KEY}}',
playlist: 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=50&playlistId={{RESOURCES_ID}}&key={{YOUR_API_KEY}}',
pl_ID: '',
videolist: 'https://www.googleapis.com/youtube/v3/videos?part=snippet,status&maxResults=50&id={{RESOURCES_ID}}&key={{YOUR_API_KEY}}',
},
temp_vl: [], // Temporary videolist
firsttime: true,
ismobile: (typeof window.orientation !== 'undefined'),
ispopulated: false
};
// Initialize
this.init(el, api_key, options);
}
// Prototype for the instance
Rypp.prototype = {
init: function(el, api_key, options) {
// Api key
this.api_key = api_key;
// Default options
this.options = {
update_title_desc: false,
autoplay: true,
autonext: true,
loop: true,
mute: false,
debug: false
};
// Merge initial options
if (typeof options !== 'undefined') {
$.extend(this.options, options);
}
// DOM elements
this.DOM = {};
this.DOM.$el = $(el);
this.DOM.$playlc = this.DOM.$el.find('.RYPP-playlist');
this.DOM.$items = this.DOM.$el.find('.RYPP-items');
this.DOM.$videoc = this.DOM.$el.find('.RYPP-video');
this.DOM.$title = this.DOM.$el.find('.RYPP-title');
this.DOM.$desc = this.DOM.$el.find('.RYPP-desc');
// YT Player object
this.DOM.$el[0].ytplayer = null;
// Unique player ID
this.data.player_uid = (Math.random().toString(16).substr(2,8));
this.DOM.$el.attr('data-rypp',this.data.player_uid).find('.RYPP-video-player').attr('id','RYPP-vp-'+this.data.player_uid).attr('name','RYPP-vp-'+this.data.player_uid);
if (this.options.debug) console.log('Unique ID: RYPP-vp-'+this.data.player_uid);
// Link JS only once
if (typeof window.YT === 'undefined') {
var
tag = document.createElement('script'),
hID = document.getElementsByTagName('head')[0];
// Add youtube API in HEAD
// tag.src = "https://www.youtube.com/iframe_api";
tag.src = 'https://www.youtube.com/iframe_api?version=3';
hID.appendChild(tag);
} else {
this.addAPIPlayer();
}
},
onYTIframeAPIReadyCallback: function() {
this.addAPIPlayer();
},
updateTitleDesc: function() {
var
that = this,
resources_id = this.DOM.$el.attr('data-playlist'),
url = this.data.ytapi.playlist_info.replace('{{RESOURCES_ID}}', resources_id).replace('{{YOUR_API_KEY}}', this.api_key);
$.ajaxSetup ({cache: false});
$.ajax(url, {
context: this,
dataType: 'json',
crossDomain: true,
error: function(){
// Not successful
},
success: function(data){
// console.log(data);
this.DOM.$title.html( data.items[0].snippet.title );
this.DOM.$desc.html( data.items[0].snippet.description );
}
});
},
populatePlaylist: function() {
if( this.options.update_title_desc ) {
if (this.options.debug) console.log(this.data.player_uid+': Updating playlist title / desc');
this.updateTitleDesc();
}
// Empty playlist
if (this.options.debug) console.log(this.data.player_uid+': Populating playlist');
this.DOM.$items.html('').append($('<ol>'));
// Now we read the video list from playlist data or from IDs...
if (this.DOM.$el.attr('data-playlist')) {
this.data.pl_ID = this.DOM.$el.attr('data-playlist');
this.getVideosFrom(
'playlist',
this.data.pl_ID
);
} else if (this.DOM.$el.attr('data-ids')) {
var vl = this.DOM.$el.attr('data-ids');
// Clean spaces
vl = ($.map(vl.split(','),$.trim)).join(',');
this.getVideosFrom(
'videolist',
vl
);
}
},
addAPIPlayer: function() {
var that = this;
window.YTConfig = { 'host': 'https://www.youtube.com' };
this.DOM.$el[0].ytplayer = new YT.Player('RYPP-vp-'+that.data.player_uid, {
// height: '390',
// width: '640',
playerVars: {
// controls: 0,
// showinfo: 0 ,
// autoplay: 0,
// html5: 1,
enablejsapi: 1,
rel: 0,
modestbranding: 1,
wmode: 'transparent'
},
events: {
'onReady': function(){
if (that.options.debug)console.log(that.data.player_uid+': ytplayer ready');
that.onPlayerReady();
},
'onStateChange': function(e){
that.onPlayerStateChange(e);
},
'onError': function(e) {
console.log(e);
}
}
});
},
// Ready to play
onPlayerReady: function() {
if (this.options.debug) console.log(this.data.player_uid+': ytplayer ready callback');
this.populatePlaylist();
// this.startPlayList();
},
// When video finish
onPlayerStateChange: function(e){
var
that = this;
if (typeof e !== 'undefined') {
// On video loaded?
if(e.data === -1 && this.data.firsttime) {
if(!this.options.autoplay && !this.data.ismobile) { // Is desktop
this.DOM.$el[0].ytplayer.stopVideo();
this.data.firsttime = false;
}
if(this.options.mute) {
this.DOM.$el[0].ytplayer.mute();
}
}
// If mobile and stored in buffer we STOP the video in mobile devices
if(e.data === 3 && this.data.ismobile && this.data.firsttime) {
setTimeout(function(){
that.DOM.$el[0].ytplayer.stopVideo();
that.data.firsttime = false;
}, 500);
}
// Play next only if not mobile
var next = null;
if(e.data === 0 && !this.data.ismobile && this.options.autonext) {
next = this.DOM.$items.find('li.selected').next();
if (next.length === 0 && this.options.loop) {
next = this.DOM.$items.find('li').first();
}
next.trigger('click');
}
}
},
// Get video from data-ids or playlist
// It's impossible to know if a video in a playlist its available or currently deleted. So we do 2 request, first we get all the video IDs an then we ask for info about them.
getVideosFrom: function(kind, resources_id, page_token) {
var
that = this,
url = this.data.ytapi[kind].replace('{{RESOURCES_ID}}', resources_id).replace('{{YOUR_API_KEY}}', this.api_key);
if (typeof page_token !== 'undefined') {
url += '&pageToken=' + page_token;
}
$.ajaxSetup ({cache: false});
$.ajax(url, {
context: this,
dataType: 'json',
crossDomain: true,
error: function(){
// Not successful
},
success: function(data){
// We queried for a playlist
if (data.kind === 'youtube#playlistItemListResponse') {
var video_set = [];
// We get the video IDs and query gain, its the only way to be sure that all the videos are available, and not were deleted :(
$.map(data.items, function(val,idx) {
if (typeof val.snippet.resourceId.videoId !== 'undefined') {
// Add video to temporary list
video_set.push( val.snippet.resourceId.videoId );
// return val.snippet.resourceId.videoId;
}
});
that.data.temp_vl.push( video_set );
// If there are several pages we ask for next
if (typeof data.nextPageToken !== 'undefined' && data.nextPageToken !== '') {
that.getVideosFrom(
'playlist',
that.data.pl_ID,
data.nextPageToken
);
} else {
// No more pages... we process the videos
for (var j = 0, len_pl = that.data.temp_vl.length; j < len_pl; j++) {
video_set = that.data.temp_vl.shift();
that.getVideosFrom('videolist', video_set.join(','));
}
}
} else if (data.kind === 'youtube#videoListResponse') {
// Videos froma Videolist
for (var i = 0, len = data.items.length; i < len; i++) {
var item = data.items[i];
// Videos without thumbnail, deleted or rejected are not included in the player!
if (
$.inArray(item.status.uploadStatus, ['rejected', 'deleted', 'failed']) === -1 &&
typeof item.snippet.thumbnails !== 'undefined'
) {
var
vid = item.id,
tit = item.snippet.title,
aut = item.snippet.channelTitle,
thu = item.snippet.thumbnails.default.url;
that.addVideo2Playlist(vid, tit, aut, thu);
}
if ( $.isEmptyObject( that.data.temp_vl ) ) {
this.startPlayList();
}
}
}
}
});
},
// All videos are supossed to be loaded
// lets start the playlist
startPlayList: function() {
var
D = this.DOM,
vid = null,
that = this;
// Click on playlist elemnts
D.$items.on('click', 'li', function(e) {
e.preventDefault();
D.$items.find('li').removeClass('selected');
$(this).addClass('selected');
vid = $(this).data('video-id');
// Call YT API function
that.DOM.$el[0].ytplayer.loadVideoById(vid);
// If we are in mobile we must stop
if (that.data.ismobile) {
that.data.firsttime = true;
}
});
// Select first if none
if (D.$items.find('li.selected').length === 0) {
if ( this.options.autoplay ) {
D.$items.find('li').first().click();
}
}
},
// Add video block to playlist
addVideo2Playlist: function(vid, tit, aut, thu) {
var
D = this.DOM;
$('<li data-video-id="'+vid+'"><p class="title">'+tit+'<small class="author"><br>'+aut+'</small></p><img src="'+thu+'" class="thumb"></li>').appendTo(D.$items.find('ol'));
},
}; // prototypes
return Rypp;
}(jQuery));
// YOUTUBE API CALLBACK
function onYouTubeIframeAPIReady() {
// console.log( 'Youtube API script loaded. Start players.' );
$('[data-rypp]').each(function(idx, el) {
$(el)[0].rypp_data_obj.onYTIframeAPIReadyCallback();
});
}
// JQuery hook
$.fn.rypp = function(api_key, options) {
return this.each(function() {
// Store object in DOM element
this.rypp_data_obj = new RYPP(this, api_key, options);
});
};

15
assets/js/single-video.js Normal file
View File

@ -0,0 +1,15 @@
/* Video resize */
$(".post-video iframe").attr({
width : $( ".post-video" ).width(),
height: Math.floor($( ".post-video" ).width()/1.78),
});
/* Video field from iframe in content */
var $isrc = $('.content iframe').attr('src');
var $clean1src = $isrc.replace('https://www.youtube.com/watch?v=','https://www.youtube.com/embed/');
var $clean2src = $clean1src.replace('http://www.youtube.com/v/','https://www.youtube.com/embed/');
var $cleansrc = $clean2src.replace('&hl=es&fs=1&','');
$('iframe.video-content').attr({
src: $cleansrc,
});
$('.content iframe').remove();

5
assets/js/vendor/jquery-1.12.0.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,7 @@
var api_key = 'AIzaSyAsvJPKTArFviBbDntKU4sHxkl8fYrj1uM';
/* Initialize all the player in the page with default options*/
$('.RYPP').rypp(api_key, {
autoplay: false,
});

102
assets/map/map.js Normal file
View File

@ -0,0 +1,102 @@
var myCenter=new google.maps.LatLng(40.8654939,-74.0402033);
function initialize()
{
var mapProp = {
center:myCenter,
scrollwheel: false,
zoom:10,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById("contact-map"),mapProp);
var marker=new google.maps.Marker({
position:myCenter,
icon:'img/map/marker.png',
map: map,
});
var styles = [
{
"featureType": "administrative",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#444444"
}
]
},
{
"featureType": "landscape",
"elementType": "all",
"stylers": [
{
"color": "#f2f2f2"
}
]
},
{
"featureType": "poi",
"elementType": "all",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "road",
"elementType": "all",
"stylers": [
{
"saturation": -100
},
{
"lightness": 45
}
]
},
{
"featureType": "road.highway",
"elementType": "all",
"stylers": [
{
"visibility": "simplified"
}
]
},
{
"featureType": "road.arterial",
"elementType": "labels.icon",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "transit",
"elementType": "all",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "water",
"elementType": "all",
"stylers": [
{
"color": "#46bcec"
},
{
"visibility": "on"
}
]
}
];
map.setOptions({styles: styles});
marker.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);

View File

@ -1,11 +1,23 @@
{
"require": {
"tightenco/collect": "^7.5",
"twig/twig": "2.12.5",
"gregwar/formidable": "^2.1",
"rmccue/requests": "^1.7"
"rmccue/requests": "^1.7",
"timber/timber": "^2.3",
"illuminate/collections": "^12.21",
"upstatement/routes": "^0.9.2",
"hellonico/timber-dump-extension": "^2.0",
"mobiledetect/mobiledetectlib": "^4.8",
"twbs/bootstrap-icons": "^1.13"
},
"require-dev": {
"agencearcange/wp-twig-dump": "^1.1"
}
"config": {
"allow-plugins": {
"composer/installers": true
}
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
}
}

1337
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,50 +0,0 @@
<?php
include(__DIR__.'/vendor/autoload.php');
$context = Timber::get_context();
$post = new TimberPost();
$context['post'] = $post;
//~ $site->CONTACT_FORM = dirname( __FILE__ ).'/templates/solicita-presupuesto.html';
$compiled = Timber::compile( CONTACT_FORM, $context );
$subject_prefix = '[Presupuesto] ';
$form = new Gregwar\Formidable\Form($compiled);
$form->setLanguage(new Gregwar\Formidable\Language\Spanish);
$messages = array();
if ($form->posted()) {
if (count($form->check()) == 0) {
$subject = "";
$body = "\r\n";
$messages = ["Gracias por contactar!"];
$to = 'hola@estudionexos.com';
$subject = $subject_prefix.$form->subject;
$body = $body.$form->message."\r\n\r\n";
$body = $body.'Nombre'.$form->name."\r\n";
$body = $body.'Email'.$form->email."\r\n";
$body = $body.'Organizacion'.$form->organization."\r\n";
$body = $body.'Acepto las condiciones de <a href="/politica-de-privacidad">política de privacidad</a>'.$form->rgpd."\r\n";
$post = [
'comment_status' => 'closed',
'ping_status' => 'closed',
'post_content' => $body,
'post_title' => $subject,
'post_status' => 'private',
'post_type' => 'messages'
];
wp_insert_post( $post );
wp_mail( $to, $subject, $body );
} else {
$messages = $form->check();
}
}
$context['contactform'] = $form;
$context['messages'] = $messages;
$context['check'] = $form->check();
$context['posted'] = $form->posted();
$templates = array( 'contacto.twig' );
//~ if ( is_home() ) {
//~ array_unshift( $templates, 'page.twig' );
//~ }
Timber::render( $templates, $context );

View File

@ -1,54 +1,85 @@
<?php
require_once(get_template_directory().'/app.php');
namespace App;
use Timber\Timber;
//require_once(get_template_directory().'/app.php');
include(__DIR__ .'/vendor/autoload.php');
//~ use WeDevs\ORM\WP\Post as Post;
//~ composer require jgrossi/corcel
function create_team_type() {
$obj = new BaseCPT('team','Miembro del equipo');
$obj->menu_icon = 'dashicons-id-alt';
$obj->rewrite = array('slug' => 'equipo');
/*dump($obj->build_cpt());*/
register_post_type( $obj->slug, $obj->build_cpt() );
}
add_action( 'init', 'create_team_type' );
// function get_posts_by_term_args($taxonomy_slug,$term_slug,$numberposts=8,$post_type='post') {
// $args = array(
// 'post_type' => $post_type,
// 'posts_per_page' => $numberposts,
// 'tax_query' => array(
// array(
// 'taxonomy' => $taxonomy_slug,
// 'field' => 'slug',
// 'terms' => $term_slug,
// ),
// )
// );
// return $args;
// }
Routes::map('equipo/:slug', function($params){
$query = '';
Routes::load('team-member.php', $params, $query, 200);
});
Routes::map('actualidad', function($params){
$query = '';
Routes::load('actualidad.php', $params, $query, 200);
});
//~ Routes::map('actualidad/page/:page', function($params){
//~ $query = '';
//~ $params = [
//~ 'pg' => $params['page']
//~ ];
//~ $query = 'posts_per_page=3&paged='.intval($params['pg']);
//~ Routes::load('actualidad.php', $params, $query, 200);
//~ });
// function get_posts_by_term($taxonomy_slug,$term_slug,$numberposts=8,$post_type='post') {
// $args = get_posts_by_term_args($taxonomy_slug, $term_slug, $numberposts, $post_type);
// return Timber::get_posts( $args );
// }
Routes::map('proyectos', function($params){
$query = '';
Routes::load('proyectos.php', $params, $query, 200);
});
// function posts_by_term($taxonomy_slug, $term_slug, $numberposts=8, $post_type='post', $template_name='posts_by_taxonomy.twig') {
// $ctx = array('posts' => get_posts_by_term($taxonomy_slug,$term_slug,$numberposts,$post_type));
// $ctx['taxonomy'] = get_taxonomy($taxonomy_slug);
// $ctx['term'] = get_term($term_slug, $taxonomy_slug);
// return Timber::fetch($template_name, $ctx);
// }
// templatetag para rellenar con contenido dinamico la plantilla en desarollo
function frontpage_posts($numberposts=-1,$template_name='frontpage_post.twig') {
$args = [
'numberposts' => $numberposts,
'post_type' => 'post',
];
$ctx = ['posts' => Timber::get_posts( $args )];
return Timber::fetch($template_name, $ctx);
}
add_filter( 'timber/twig', function( \Twig_Environment $twig ) {
$twig->addFunction( new Timber\Twig_Function( 'frontpage_posts', 'frontpage_posts' ) );
// function get_posts_by_type($post_type,$numberposts=8) {
// $args = array(
// 'post_type' => $post_type,
// 'posts_per_page' => $numberposts,
// );
// return Timber::get_posts( $args );
// }
// function posts_by_type($post_type,$numberposts=8,$template_name='posts_by_taxonomy.twig') {
// $ctx = array('posts' => get_posts_by_type($post_type,$numberposts));
// return Timber::fetch($template_name, $ctx);
// }
/*
add_filter( 'timber/twig/functions', function( \Twig\Environment $twig ) {
$twig->addFunction( new \Twig\TwigFunction( 'posts_by_term', 'posts_by_term' ) );
return $twig;
} );
add_filter( 'timber/twig/functions', function( \Twig\Environment $twig ) {
$twig->addFunction( new \Twig\TwigFunction( 'posts_by_type', 'posts_by_type' ) );
return $twig;
} );
*/
// templatetag para rellenar con contenido dinamico la plantilla en desarollo
// function frontpage_posts($numberposts=-1,$template_name='frontpage_post.twig') {
// $args = [
// 'posts_per_page' => $numberposts,
// 'post_type' => 'post',
// ];
// $ctx = ['posts' => Timber::get_posts( $args )];
// return Timber::fetch($template_name, $ctx);
// }
// // Añadir al
// add_filter( 'timber/twig', function( \Twig\Environment $twig ) {
// $twig->addFunction( new \Twig\TwigFunction( 'frontpage_posts', 'frontpage_posts' ) );
// return $twig;
// } );
// fin del templatetag para rellenar con contenido dinamico la plantilla en desarollo
// Galeria
@ -85,55 +116,17 @@ function andaira_gallery($attr) {
}
// Fin galeria
class AndairaSite extends StarterSite{
public $enable_ua = true;
function __construct() {
parent::__construct();
$this->recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
$this->recaptcha_secret = '6Ldp7-cUAAAAALND-F6N211yRaam8jBF_W_jkzg_';
$this->recaptcha_public = '6Ldp7-cUAAAAANJ68d2DomQJn-TbnUxfVPNHm95K';
$this->CONTACT_FORM = dirname( __FILE__ ).'/templates/form_contact.html';
}
function add_to_context( $context ) {
$context = parent::add_to_context($context);
// Servicios
$svs = array(
'child_of' => 27,
'parent ' => 27,
'hierarchical' => 0,
'sort_column' => 'menu_order',
'sort_order' => 'asc',
'post_type' => 'page',
'post_status' => 'publish',
);
$servicios = get_pages( $svs );
$context['servicios'] = new Timber\PostQuery($servicios);
//return $context;
// Areas
$areas = get_terms( [
'taxonomy' => 'category',
'parent' => 29,
'hide_empty' => false,
]
);
//dump($areas);
$context['areas'] = $areas;
//Logotipos
$context['logotipo_cabecera'] = get_field('logotipo_cabecera', 'option');
return $context;
}
}
// Paginacion
$context['pagination'] = Timber::get_pagination();
//$context['pagination'] = Timber::get_pagination();
// Galeria
add_shortcode('gallery', 'andaira_gallery');
Timber::init();
$site = new AndairaSite();
//~ $site->main_menu_id = 2;
if (defined('WP_CLI') && WP_CLI) {require_once dirname(__FILE__).'/scripts/commands.php';}
?>

View File

@ -1,18 +0,0 @@
<?php
/**
* Third party plugins that hijack the theme will call wp_head() to get the header template.
* We use this to start our output buffer and render into the view/page-plugin.twig template in footer.php
*
* If you're not using a plugin that requries this behavior (ones that do include Events Calendar Pro and
* WooCommerce) you can delete this file and footer.php
*/
global $params;
$templates = array('header.twig');
$context = Timber::get_context();
//$GLOBALS['timberContext'] = Timber::get_context();
//ob_start();
Timber::render( $templates, $context );

View File

@ -1 +1,19 @@
<?php
if ( ! class_exists( 'Timber' ) ) {
echo 'Timber not installed';
return;
}
$context = Timber::context();
$context['posts'] = Timber::get_posts(array('post_type' => array('post', 'evento', 'galeria', 'audio', 'video', 'publicacion')));
$templates = array( 'index.twig' );
if ( is_home() ) {
array_unshift( $templates, 'home.twig' );
}
if ( is_front_page() ) {
array_unshift( $templates, 'frontpage.twig' );
}
Timber::render( $templates, $context );

View File

@ -1,6 +1,6 @@
<?php
$context = Timber::get_context();
$post = new TimberPost();
$context = Timber::context();
$post = Timber::get_post();
$context['post'] = $post;
$context['entries'] = Timber::get_posts('post_type = post');
//var_dump( Timber::get_posts('post_type = post'));
@ -45,16 +45,17 @@ function posts_by_service($numberposts=-1,$postslug,$slug,$template_name='posts_
)
),
];
$context = Timber::get_context();
$context = Timber::context();
$ctx = ['posts' => Timber::get_posts( $args ), 'areas' => $context['areas']];
return Timber::fetch($template_name, $ctx);
}
add_filter( 'timber/twig', function( \Twig_Environment $twig ) {
$twig->addFunction( new Timber\Twig_Function( 'posts_by_service', 'posts_by_service' ) );
/*
add_filter( 'timber/twig', function( \Twig\Environment $twig ) {
$twig->addFunction( new \Twig\TwigFunction( 'posts_by_service', 'posts_by_service' ) );
return $twig;
} );
*/
// fin del templatetag
Timber::render( $templates, $context );
//var_dump($context);
Timber::render($templates, $context );

View File

@ -2,7 +2,7 @@
global $params;
$context = Timber::get_context();
$context = Timber::context();
$templates = array('proyectos.twig');
// Areas de proyectos
$areas = get_terms( [
@ -26,7 +26,7 @@ $context['serviciosterms'] = $serviciosterms;
$projects = array(
'post_type' => 'post',
'post_status' => 'publish',
'numberposts' => -1,
'posts_per_page' => -1,
'orderby' => array(
'date' => 'DESC'
),
@ -44,7 +44,7 @@ $projects = array(
$projects1 = array(
'post_type' => 'post',
'post_status' => 'publish',
'numberposts' => -1,
'posts_per_page' => -1,
'orderby' => array(
'date' => 'DESC'
),
@ -57,9 +57,8 @@ $projects1 = array(
),
);
$context['posts'] = new Timber\PostQuery($projects);
$context['projects1'] = new Timber\PostQuery($projects1);
$context['posts'] = Timber::get_posts($projects);
$context['projects1'] = Timber::get_posts($projects1);
$context['section_title'] = 'proyectos';
Timber::render( $templates, $context );

View File

@ -9,8 +9,8 @@
* @since Timber 0.1
*/
$context = Timber::get_context();
$post = new TimberPost();
$context = Timber::context();
$post = Timber::get_post();
$context['post'] = $post;
// Relacionados -> general
@ -27,7 +27,7 @@ function get_related_posts($terms) {
$args = array(
'post_type' => 'post',
'numberposts' => 3,
'posts_per_page' => 3,
'tax_query' => array(
array(
'taxonomy' => 'category',
@ -39,28 +39,12 @@ function get_related_posts($terms) {
'post__not_in' => array( get_the_ID() )
);
return Timber::get_posts($args);
}
//~ $context = Timber::get_context();
//~ $post = Timber::query_post();
//~ $context['post'] = $post;
$context['related'] = get_related_posts($post->get_terms());
if ( post_password_required( $post->ID ) ) {
Timber::render( 'single-password.twig', $context );
} else {
Timber::render( array( 'single-' . $post->ID . '.twig', 'single-' . $post->post_type . '.twig', 'single.twig' ), $context );
}
//~ $timber_post = Timber::query_post();
//~ $context['post'] = $timber_post;
//~ $context['related'] = get_related_posts($timber_post->get_terms());
//~ if ( post_password_required( $timber_post->ID ) ) {
//~ Timber::render( 'single-password.twig', $context );
//~ } else {
//~ Timber::render( array( 'single-' . $timber_post->ID . '.twig', 'single-' . $timber_post->post_type . '.twig', 'single-' . $timber_post->slug . '.twig', 'single.twig' ), $context );
//~ }
}

72
site.js
View File

@ -72,3 +72,75 @@ jQuery(document).ready(function($) {
//~ }
});
// Función para animar un contador individual
function animateCounter(element, target, duration = 2000) {
const start = 0;
const increment = target / (duration / 16); // 60 FPS
let current = start;
const timer = setInterval(() => {
current += increment;
if (current >= target) {
element.textContent = target.toLocaleString();
clearInterval(timer);
} else {
element.textContent = Math.floor(current).toLocaleString();
}
}, 16);
}
// Función para iniciar todos los contadores
function startCounters() {
const counters = document.querySelectorAll('.counter');
counters.forEach((counter, index) => {
const target = parseInt(counter.getAttribute('data-target'));
// Añadir un pequeño retraso entre cada contador para un efecto escalonado
setTimeout(() => {
animateCounter(counter, target);
}, index * 200);
});
}
// Configurar el Intersection Observer
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
// Añadir clase de animación al contenedor
entry.target.classList.add('animate');
// Iniciar contadores después de un pequeño retraso
setTimeout(() => {
startCounters();
}, 300);
// Dejar de observar una vez que se ha activado
observer.unobserve(entry.target);
}
});
}, {
threshold: 0.3, // Se activa cuando el 30% del elemento es visible
rootMargin: '-50px' // Margen adicional para un mejor control
});
// Iniciar la observación cuando el DOM esté listo
document.addEventListener('DOMContentLoaded', () => {
const counterContainer = document.getElementById('counterContainer');
observer.observe(counterContainer);
});
// Función opcional para reiniciar los contadores (útil para testing)
function resetCounters() {
const counters = document.querySelectorAll('.counter');
counters.forEach(counter => {
counter.textContent = '0';
});
const container = document.getElementById('counterContainer');
container.classList.remove('animate');
// Reiniciar la observación
observer.observe(container);
}

225
src/AndairaSite.php Normal file
View File

@ -0,0 +1,225 @@
<?php
namespace App;
use Timber\Site;
use Timber\Timber;
use Twig\Environment;
use Twig\TwigFilter;
use Detection\MobileDetect;
\Routes::map('equipo/:slug', function($params){
$query = '';
\Routes::load('team-member.php', $params, $query, 200);
});
\Routes::map('actualidad', function($params){
$query = '';
\Routes::load('actualidad.php', $params, $query, 200);
});
\Routes::map('proyectos', function($params){
$query = '';
\Routes::load('proyectos.php', $params, $query, 200);
});
class AndairaSite extends Site {
public $enable_ua = true;
function __construct() {
$this->detect = new MobileDetect();
add_action('after_setup_theme', array($this, 'theme_supports'));
//$this->recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify';
//$this->recaptcha_secret = '6Ldp7-cUAAAAALND-F6N211yRaam8jBF_W_jkzg_';
//$this->recaptcha_public = '6Ldp7-cUAAAAANJ68d2DomQJn-TbnUxfVPNHm95K';
//$this->CONTACT_FORM = dirname( __FILE__ ).'/templates/form_contact.html';
add_filter('timber/context', array($this, 'add_to_context'));
add_filter('timber/twig/environment/options', [$this, 'update_twig_environment_options']);
add_filter('timber/twig', array($this, 'add_to_twig'));
add_action('wp_enqueue_scripts', [$this,'load_assets']);
parent::__construct();
}
public function theme_supports()
{
add_theme_support('automatic-feed-links');
add_theme_support( 'disable-layout-styles' );
add_theme_support('title-tag');
add_theme_support('post-thumbnails');
add_theme_support(
'html5',
[
'gallery',
'caption',
]
);
add_theme_support(
'post-formats',
array(
'aside',
'image',
'video',
'quote',
'link',
'gallery',
'audio',
)
);
add_theme_support('menus');
}
function update_twig_environment_options($options)
{
// $options['autoescape'] = true;
return $options;
}
public function add_to_twig($twig)
{
$twig->addFunction(
new \Twig\TwigFunction( 'frontpage_posts', [$this, 'frontpage_posts'] )
);
$twig->addFunction(
new \Twig\TwigFunction( 'posts_by_term', [$this, 'posts_by_term'] )
);
$twig->addFunction(
new \Twig\TwigFunction( 'posts_by_type', [$this, 'posts_by_type'] )
);
$twig->addFunction(
new \Twig\TwigFunction( 'posts_by_service', 'posts_by_service' )
);
return $twig;
}
public function frontpage_posts($numberposts=-1,$template_name='frontpage_post.twig')
{
$args = [
'posts_per_page' => $numberposts,
'post_type' => 'post',
];
$ctx = [
'posts' => Timber::get_posts( $args )
];
return Timber::compile($template_name, $ctx);
}
public function posts_by_type($post_type, $numberposts=8, $template_name='posts_by_taxonomy.twig')
{
$args = [
'post_type' => $post_type,
'posts_per_page' => $numberposts,
];
$ctx = [
'posts' => Timber::get_posts( $args ),
];
return Timber::compile($template_name, $ctx);
}
public function posts_by_term($taxonomy_slug, $term_slug, $numberposts=8, $post_type='post', $template_name='posts_by_taxonomy.twig')
{
$args = [
'post_type' => $post_type,
'posts_per_page' => $numberposts,
'tax_query' => [
[
'taxonomy' => $taxonomy_slug,
'field' => 'slug',
'terms' => $term_slug,
],
]
];
$ctx = [
'posts' => Timber::get_posts( $args ),
'taxonomy' => get_taxonomy($taxonomy_slug),
'term' => get_term($term_slug, $taxonomy_slug),
];
return Timber::compile($template_name, $ctx);
}
function add_to_context( $context ) {
// $context = parent::add_to_context($context);
$context['menu'] = Timber::get_menu('menu-cabecera');
$context['menu_old'] = Timber::get_menu('menu-cabecera_OLD');
$context['footer_menu'] = Timber::get_menu('menu-pie');
// Servicios
$svs = array(
'child_of' => 27,
'parent' => 27,
'hierarchical' => 0,
'sort_column' => 'menu_order',
'sort_order' => 'asc',
'post_type' => 'page',
'post_status' => 'publish',
);
$servicios = get_pages( $svs );
// dump($servicios);
$context['servicios'] = Timber::get_posts($servicios);
//return $context;
// Areas
$areas = get_terms( [
'taxonomy' => 'category',
'parent' => 29,
'hide_empty' => false,
]
);
//dump($areas);
$context['areas'] = $areas;
//Campos de opciones
$context['logotipo_cabecera'] = get_field('logotipo_cabecera', 'option');
$context['logotipo_destacado_portada'] = get_field('logotipo_destacado_portada', 'option');
$context['enlaces_redes'] = get_field('enlaces_redes', 'option');
$context['slogan'] = get_field('slogan', 'option');
$context['quienes_somos'] = get_field('quienes_somos', 'option');
$context['presupuesto'] = get_field('presupuesto', 'option');
$context['contadores'] = get_field('contadores', 'option');
$context['nuestra_red'] = get_field('nuestra_red', 'option');
$context['email'] = get_field('email', 'option');
$context['telefonos'] = get_field('telefonos', 'option');
$context['direccion'] = get_field('direccion', 'option');
$context['clientes'] = get_field('categoria_de_cliente', 'option');
//Mobile Detect
$context['is_desktop'] = false;
if ($this->detect->isMobile() == false and $this->detect->isTablet() == false)
{
$context['is_desktop'] = true;
}
$context['is_mobile'] = $this->detect->isMobile();
$context['is_tablet'] = $this->detect->isTablet();
return $context;
}
function load_assets() {
$version = 4;
// $version_for_app = $version;
$version_for_app = time();
wp_enqueue_style( 'twbsi', get_template_directory_uri() . '/assets/css/bootstrap.min.css', [], $version, 'all');
wp_enqueue_style( 'twbs', get_template_directory_uri() . '/vendor/twbs/bootstrap-icons/font/bootstrap-icons.min.css', [], $version, 'all');
//wp_enqueue_style( 'lust', get_template_directory_uri() . '/style.css', [], $version, 'all');
// wp_enqueue_script( 'pop', get_template_directory_uri() . '/static/popper.min.js', [], $version, false);
// wp_enqueue_script( 'twbs', get_template_directory_uri() . '/vendor/twbs/bootstrap/dist/js/bootstrap.min.js', [], $version, false);
// wp_enqueue_script( 'lust', get_template_directory_uri() . '/assets/scripts/site.js', [], $version, false);
}
}

View File

@ -5,7 +5,6 @@ Version: 1.0
Description: Child Theme de Timber adpatado para este sitio web.
Author: Freepress S. Coop. Mad. y Estudio Nexos
Author URI: http://www.freepress.coop
Template: TimberBase
*/
body { font-family: 'Karla', sans-serif; font-size:16px; line-height:25px; }
@ -89,7 +88,8 @@ img { opacity:.9; }
.linea { height:10px; border-radius:5px; }
.linea-consultoria { background-color:#FF8D76; }
.linea-investigacion { background-color:#9dcd8f; }
.linea-investigacion,
.linea-investigacion-social-aplicada { background-color:#9dcd8f; }
.linea-evaluacion { background-color:#fba451; }
.linea-intervencion { background-color:#63B0B6; }
.linea-formacion { background-color:#f3bd48; }
@ -242,6 +242,8 @@ nav.navbar, .nav-link, .navbar-brand, .navbar-brand img { transition: all 1s eas
* FRONTPAGE
*/
.lead p { margin-bottom:0; }
/* Video */
.header-video { position: relative; background-color: black; height: 100vh; min-height: 25rem; width: 100%; overflow: hidden; }
@ -357,10 +359,14 @@ nav.navbar, .nav-link, .navbar-brand, .navbar-brand img { transition: all 1s eas
#section-1-bis { font-size:22px; transition: all .5s ease-in-out 0s; -webkit-transition: all .5s ease-in-out 0s; -moz-transition: all .5s ease-in-out 0s; -o-transition: all .5s ease-in-out 0s; -ms-transition: all .5s ease-in-out 0s; }
.frontpage-servicios-row .frontpage-servicios-title,
.frontpage-servicios-row .section-title { font-size:22px; }
#section-1-bis.pt-150 { padding-top:120px; }
@media (min-width:768px) {
#section-1-bis .frontpage-servicios-row { height:300px; }
#section-1-bis .frontpage-servicios-row,
.page-servicios .frontpage-servicios-row { height:300px; }
}
@media (max-width:768px) {
#section-1-bis .row .col-md-4 { margin-top:1rem; }
@ -416,7 +422,7 @@ nav.navbar, .nav-link, .navbar-brand, .navbar-brand img { transition: all 1s eas
/* Section 2 bis */
@media (min-width:768px) {
#section-2-bis .project-row { height:300px; }
/* #section-2-bis .project-row { height:300px; } */
}
@media (max-width:768px) {
#section-2-bis .col-md-4 h3.text-white { padding:2rem .5rem 1rem; font-size:22px; letter-spacing:3px; margin:0px; height:100%; }
@ -522,6 +528,7 @@ nav.navbar, .nav-link, .navbar-brand, .navbar-brand img { transition: all 1s eas
#section-5 { padding-top:5rem; }
#section-5 .network-logos img { max-height:50px; margin:3rem 0; -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -o-filter: grayscale(100%); -ms-filter: grayscale(100%); filter: grayscale(100%);}
#section-5 .network-logos img:hover { -webkit-filter: none; -moz-filter: none; -o-filter: none; -ms-filter: none; filter: none; }
#section-5 .section-5-title img { max-height:90px; margin:3rem 0; }
#section-5 p { font-size: 22px; line-height: 29px; }
@ -565,6 +572,7 @@ nav.navbar, .nav-link, .navbar-brand, .navbar-brand img { transition: all 1s eas
}
#clientsSlider a { border-bottom:none; }
#clientsSlider img { max-height:90px; filter: grayscale(100%); }
#clientsSlider img:hover {filter: none;}
#clientsSlider .carousel-control-next, #clientsSlider .carousel-control-prev { width:20px; height:20px; top:40%; background-color:#fff; color:#000; border-radius:20px; text-decoration:none; }
#clientsSlider .carousel-control-prev { left:5px; padding:15px 16px 15px 14px; }
#clientsSlider .carousel-control-next { right:5px; padding:15px 14px 15px 16px; }

View File

@ -1,23 +1,5 @@
<?php
global $params;
require_once(get_template_directory().'/app.php');
include(__DIR__ .'/vendor/autoload.php');
$context = Timber::get_context();
$templates = ['team-member.twig'];
$q = array(
'post_type' => 'team',
'name' => $params['slug'],
'post_status' => 'publish',
//'numberposts' => -1
);
$posts = Timber::get_posts($q);
$post = $posts[0];
$quienes = Timber::get_post(1059);
$context['quienes'] = $quienes;
$context['post'] = $post;
Timber::render( $templates, $context );
$context = Timber::context();
$context['quienes'] = Timber::get_post(1059);
$context['post'] = Timber::get_post();
Timber::render( ['team-member.twig'], $context );

12
template-servicio.php Normal file
View File

@ -0,0 +1,12 @@
<?php
/**
* Template Name: Plantilla de Servicio
* Description: Para páginas donde se describe un servicio.
*/
$context = Timber::context();
$timber_post = Timber::get_post();
$context['post'] = $timber_post;
Timber::render( ['template-servicio.twig'], $context );

View File

@ -1,48 +0,0 @@
<div id="section-5" class="container-fluid">
<div class="section-5-heading text-left">
<div class="container">
<h2 class="title clientes-title">Nuestra red</h2>
</div>
</div>
<div class="nuestra-red">
<div class="row">
<div class="col-md-4">
<div class="text-left section-5-title">
<img src="{{site.theme.link}}/public/img/tangente-logo.jpg" class="mb-4 img-fluid" alt="Tangente">
<p class="font-weight-bold">Andaira pertence al Grupo Cooperativo Tagente y se coordina con entidades de la economía social y solidaria</p>
</div>
</div>
<div class="col-md-8">
<div class="h-100 d-inline-block d-flex justify-content-between align-items-center pt-3 network-logos">
<div>
<img src="{{site.theme.link}}/public/img/mercadosocial_logo.jpg" class="img-fluid" alt="Mercado Social">
</div>
<div>
<img src="{{site.theme.link}}/public/img/coop57_logo.jpg" class="img-fluid" alt="Coop57">
</div>
<div class="d-none d-sm-block">
<img src="{{site.theme.link}}/public/img/reas_logo.png" class="img-fluid" alt="REAS">
</div>
<div class="d-none d-sm-block">
<img src="{{site.theme.link}}/public/img/coop_logo.jpg" class="img-fluid" alt="Coop">
</div>
<div class="d-none d-sm-block">
<img src="{{site.theme.link}}/public/img/cooperama_logo.jpg" class="img-fluid" alt="Cooperama">
</div>
{#<!--<div class="col-md-3 col text-center">
<img src="{{site.theme.link}}/public/img/demos_DEF.png" class="img-fluid" alt="Demos">
</div>
<div class="col-md-3 text-center d-none d-sm-block">
<img src="{{site.theme.link}}/public/img/move-commons_logo.png" class="img-fluid" alt="Move Commons">
</div>
<div class="col-md-3 text-center d-none d-sm-block">
<img src="{{site.theme.link}}/public/img/emprender_logoweb.png" class="img-fluid" alt="Emprender">
</div>-->#}
</div>
</div>
</div>
</div>
</div>

View File

@ -1,92 +0,0 @@
<div id="section-7" class="container-fluid">
<div class="footer pt-5 pb-5">
<div class="row">
<div class="col-sm-4 footer-social">
{#<!--<img src="{{site.theme.link}}/public/img/logotipo-andaira.png" class="img-fluid" alt="">
<p class="slogan pt-4 font-weight-bold">Consultoría<br />e investigación social</p>-->#}
<ul class="nav flex-column menu font-weight-bold text-uppercase">
<li class="nav-item"><a class="nav-link pt-0" href="{{site.url}}/quienes-somos">Quiénes somos</a></li>
<li class="nav-item"><a class="nav-link" href="{{site.url}}/servicios">Servicios</a></li>
<li class="nav-item"><a class="nav-link" href="{{site.url}}/proyectos">Proyectos</a></li>
<li class="nav-item"><a class="nav-link" href="{{site.url}}/actualidad">Actualidad</a></li>
<li class="nav-item"><a class="nav-link" href="{{site.url}}/contacto">Contacto</a></li>
</ul>
</div>
<div class="col-sm-4 footer-contact">
<p class="font-weight-bold text-uppercase footer-title">Contacto</p>
<div>
<p class="pt-3">cooperativa@andaira.net</p>
<p class="pt-1 tel"><a href="tel:91 542 83 43">91 542 83 43</a><br /><a href="tel:638 82 72 15">638 82 72 15</a></p>
<p class="pt-1">Paseo de las acacias 3, 1ºA<br />28005 Madrid</p>
</div>
<p class="pt-3"><a href="{{ site.url }}/trabaja-en-andaira" class="btn btn-outline-info">Trabaja en Andaira</a></p>
{#<!--<p class="pt-3"><a href="https://es.surveymonkey.com/r/9W57TCH" target="_blank" class="btn btn-outline-info">Trabaja en Andaira</a></p>-->#}
</div>
<div class="col-sm-4 footer-newsletter">
<p class="font-weight-bold text-uppercase pb-3 footer-title">Suscríbete a nuestro boletín</p>
<!-- Begin Mailchimp Signup Form -->
<div id="mc_embed_signup">
<form action="https://andaira.us9.list-manage.com/subscribe/post?u=9c18ada0c80edb7b47126d572&amp;id=aba4b0d332" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<div class="mc-field-group form-group">
<label for="mce-FNAME" class="d-none">Nombre </label>
<input type="text" value="" name="FNAME" class="required form-control text-center" id="mce-FNAME" placeholder="Nombre">
</div>
<div class="mc-field-group form-group">
<label for="mce-EMAIL" class="d-none">Correo electrónico </label>
<input type="email" value="" name="EMAIL" class="required email form-control text-center" id="mce-EMAIL" placeholder="Correo electrónico">
</div>
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_9c18ada0c80edb7b47126d572_aba4b0d332" tabindex="-1" value=""></div>
<div class="clear">
<input type="submit" value="Suscribirme" name="subscribe" id="mc-embedded-subscribe" class="button btn btn-info">
</div>
</div>
</form>
</div>
<!--End mc_embed_signup-->
<p class="pt-5 follow">Síguenos en&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://www.instagram.com/andairacoop/?hl=es" title="Instagram" target="_blank"><i class="fa fa-instagram" aria-hidden="true"></i></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.facebook.com/andairacoop" title="Facebook" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://www.youtube.com/user/andairacooperativa" title="Youtube" target="_blank"><i class="fa fa-youtube-play" aria-hidden="true"></i></a></p>
{#<!--<form>
<div class="form-group">
<input type="text" class="form-control text-center" id="name" placeholder="Nombre">
</div>
<div class="form-group pt-1">
<input type="email" class="form-control text-center" id="email" placeholder="Correo electrónico">
</div>
<div class="form-group form-check text-left text-body pt-1 pb-1">
<input class="form-check-input" type="checkbox" value="" id="check">
<label class="form-check-label" for="check">
Acepto las condiciones de <a href="{{site.url}}/politica-de-privacidad">política de privacidad</a>.
</label>
</div>
<div class="pt-3">
<button type="submit" class="btn btn-info">Suscribirme</button>
</div>
</form>-->#}
</div>
</div>
</div>
</div>
<div id="section-8" class="footer pt-4 pb-2">
<div class="container-fluid">
<div class="d-sm-flex justify-content-between">
<div><p><a href="https://creativecommons.org/licenses/by-nc-sa/3.0/es/" target="_blank"><img src="{{site.url}}/wp-content/themes/andaira/public/img/cc/cc_icon_white_x2.png" width="32px" height="32px" />&nbsp;<img src="{{site.url}}/wp-content/themes/andaira/public/img/cc/attribution_icon_white_x2.png" width="32px" height="32px" />&nbsp;<img src="{{site.url}}/wp-content/themes/andaira/public/img/cc/nc_white_x2.png" width="32px" height="32px" />&nbsp;<img src="{{site.url}}/wp-content/themes/andaira/public/img/cc/sa_white_x2.png" width="32px" height="32px" />&nbsp;&nbsp;<strong>Reconocimiento-NoComercial-CompartirIgual</strong></a></p></div>
<div><p>
<a href="{{site.url}}/aviso-legal">Aviso legal</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="{{site.url}}/politica-de-privacidad">Política de privacidad</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="{{site.url}}/politica-de-cookies">Política de Cookies</a>
</p></div>
</div>
</div>
</div>
{{ footer_widgets }}

View File

@ -1,86 +0,0 @@
<div class="row text-right frontpage-servicios-row">
<div class="col-md-4">
<div class="h-100 p-4 d-flex align-items-end justify-content-end" style="background-color:#1E6F81; ">
<div class="section-title text-right text-white text-uppercase letter-spacing-3">Servicios</div>
</div>
</div>
<div class="col-md-4">
<a href="{{ site.url }}/servicios/consultoria" class="d-block border-bottom h-100" style="background:url('{{site.theme.link}}/public/img/icono_consultoria_2x.png') no-repeat 100% 85%;">
<div class="linea linea-consultoria mb-3"></div>
<div class="frontpage-servicios-title font-weight-bold">Consultoría</div>
</a>
</div>
<div class="col-md-4">
<a href="{{ site.url }}/servicios/investigacion-social-aplicada" class="d-block border-bottom h-100" style="background:url('{{site.theme.link}}/public/img/icono_investigacion_2x.png') no-repeat 100% 85%;">
<div class="linea linea-investigacion mb-3"></div>
<div class="frontpage-servicios-title font-weight-bold">Investigación<br />social aplicada</div>
</a>
</div>
</div>
<div class="row text-right mt-0 mt-sm-4 frontpage-servicios-row">
<div class="col-md-4">
<a href="{{ site.url }}/servicios/evaluacion" class="d-block border-bottom h-100" style="background:url('{{site.theme.link}}/public/img/icono_evaluacion_2x.png') no-repeat 100% 85%;">
<div class="linea linea-evaluacion mb-3"></div>
<div class="frontpage-servicios-title font-weight-bold">Evaluación</div>
</a>
</div>
<div class="col-md-4">
<a href="{{ site.url }}/servicios/intervencion-social-y-educativa" class="d-block border-bottom h-100" style="background:url('{{site.theme.link}}/public/img/icono_intervencion_2x.png') no-repeat 100% 85%;">
<div class="linea linea-intervencion mb-3"></div>
<div class="frontpage-servicios-title font-weight-bold">Intervención social<br />y educativa</div>
</a>
</div>
<div class="col-md-4">
<a href="{{ site.url }}/servicios/formacion" class="d-block border-bottom h-100" style="background:url('{{site.theme.link}}/public/img/icono_formacion_2x.png') no-repeat 100% 85%;">
<div class="linea linea-formacion mb-3"></div>
<div class="frontpage-servicios-title font-weight-bold">Formación</div>
</a>
</div>
</div>
{#<!--<div class="d-flex">
<h2 class="w-50 ml-auto title">Servicios</h2>
</div>
<div class="d-flex flex-column h-100">
<a href="{{ site.url }}/servicios/consultoria" class="clearfix border-bottom border-top">
<div class="w-50 float-left h-100 text-center d-flex align-items-center">
<div><img src="{{site.theme.link}}/public/img/icono_consultoria2x.png" alt=""></div>
</div>
<div class="w-50 float-right h-100 d-flex align-items-center">
<div class="font-weight-bold">Consultoría</div>
</div>
</a>
<a href="{{ site.url }}/servicios/investigacion-social-aplicada" class="clearfix border-bottom">
<div class="w-50 float-left h-100 text-center d-flex align-items-center">
<div><img src="{{site.theme.link}}/public/img/icono_investigacion2x.jpg" alt=""></div>
</div>
<div class="w-50 float-right h-100 d-flex align-items-center">
<div class="font-weight-bold">Investigación social aplicada</div>
</div>
</a>
<a href="{{ site.url }}/servicios/evaluacion-externa-y-evaluacion-participativa" class="clearfix border-bottom">
<div class="w-50 float-left h-100 text-center d-flex align-items-center">
<div><img src="{{site.theme.link}}/public/img/icono_evaluacion2x.png" alt=""></div>
</div>
<div class="w-50 float-right h-100 d-flex align-items-center">
<div class="font-weight-bold">Evaluación externa y participativa</div>
</div>
</a>
<a href="{{ site.url }}/servicios/intervencion-social-y-educativa" class="clearfix border-bottom">
<div class="w-50 float-left h-100 text-center d-flex align-items-center">
<div><img src="{{site.theme.link}}/public/img/icono_intervencion2x.png" alt=""></div>
</div>
<div class="w-50 float-right h-100 d-flex align-items-center">
<div class="font-weight-bold">Intervención social y educativa</div>
</div>
</a>
<a href="{{ site.url }}/servicios/formacion" class="clearfix border-bottom">
<div class="w-50 float-left h-100 text-center d-flex align-items-center">
<div><img src="{{site.theme.link}}/public/img/icono_formacion2x.png" alt=""></div>
</div>
<div class="w-50 float-right h-100 d-flex align-items-center">
<div class="font-weight-bold">Formación</div>
</div>
</a>
</div>-->#}

View File

@ -1,271 +0,0 @@
{% extends "base.twig" %}
{% block content %}
<div class="header-video p-0">
<div class="overlay bg-gradient-1"></div>
{#<video class="videobg" playsinline="playsinline" autoplay="autoplay" muted="muted">
<source src="{{site.theme.link}}/public/video/videowebandaira.mp4" type="video/mp4">
</video>#}
<div class="container-fluid h-100">
<div class="d-flex h-100 text-center align-items-center">
<div class="w-100">
<h1 class="scrolldown-1">
<a href="#section-1-bis">
<img src="{{site.theme.link}}/public/img/logo-central.png" alt="{{ site.name }}">
<img class="down-arrow" src="{{site.theme.link}}/public/img/flecha-logo-central.png">
</a>
</h1>
</div>
</div>
</div>
<p class="lead mb-0 text-center font-weight-bold text-white">
Andaira es una consultora social que<br />
desarrolla investigaciones y proyectos para<br />
comprender y transformar nuestro entorno
</p>
</div>
{#<!--<div id="section-1" class="container-fluid">
<div class="row">
<div class="servicios col-lg-5 item-1">
{% include 'frontpage-servicios.twig' %}
</div>
<div class="col-lg-7 item-2">
<h2 class="ml-6 title destacamos-title">Destacamos</h2>
<div class="d-flex flex-column h-100">
<div class="frontpage-slider">
{{ frontpage_posts(3,'frontpage-slider.twig') }}
</div>
<div class="somos mt-3 d-flex h-100 align-items-center">
<div>
<h3 class="mb-3 mt-1">Quiénes somos</h3>
<p class="lead font-weight-bold mb-4">Somos un equipo interdisciplinar, caracterizado por la horizontalidad, la gestión democrática y la participación.</p>
<p class="mb-0"><a href="" class="btn btn-outline-light">Conócenos</a></p>
</div>
</div>
</div>
</div>
</div>
</div>-->#}
<div id="section-1-bis" class="container mt-4">
{% include 'frontpage-servicios.twig' %}
</div>
<div id="section-1-1" class="mt-4">
<div class="quienes-somos container">
<div class="row">
<div class="col-md-5">
<h3 class="m-0 p-0 mb-4 letter-spacing-3 text-uppercase">Quiénes somos</h3>
</div>
<div class="col-md-7">
<p class="lead mb-4 font-weight-bold">Somos un equipo interdisciplinar,<br/>caracterizado por la horizontalidad,<br />la gestión democrática y la participación.</p>
<p class="mb-0"><a href="/quienes-somos" class="btn btn-danger">Conócenos</a></p>
</div>
</div>
</div>
</div>
{#<!--<div id="section-2" class="container mt-5">
<div class="d-flex justify-content-between">
<div><h2 class="title proyectos-title">Proyectos</h2></div>
<div><a href="{{ site.url }}/proyectos" class="btn btn-danger">Ver todos</a></div>
</div>
{% if is_mobile %}
{{ posts_by_term('category','proyectos',-1,'post','frontpage-proyectos-slider.twig') }}
{% elseif is_tablet %}
{{ posts_by_term('category','proyectos',-1,'post','frontpage-proyectos-slider_md.twig') }}
{% elseif is_desktop %}
{{ posts_by_term('category','proyectos',-1,'post','frontpage-proyectos-slider_lg.twig') }}
{% endif %}
</div>-->#}
<div id="section-2-bis" class="container mt-5">
<div class="row text-right project-row">
<div class="col-md-4 mb-2 mb-sm-0">
<div class="h-100 pl-3 pr-3 pb-1 d-flex align-items-end justify-content-end" style="background-color:#fba451; ">
<h3 class="text-right text-white text-uppercase letter-spacing-3">Proyectos</h3>
</div>
</div>
<div class="col-md-4 mb-2 mb-sm-0">
{{ posts_by_term('category','consultoria',1,'post','frontpage-proyectos.twig') }}
</div>
<div class="col-md-4 mb-2 mb-sm-0">
{{ posts_by_term('category','investigacion-social-aplicada',1,'post','frontpage-proyectos.twig') }}
</div>
</div>
<div class="row text-right mt-sm-4 project-row">
<div class="col-md-4 mb-2 mb-sm-0">
{{ posts_by_term('category','evaluacion-externa-y-participativa',1,'post','frontpage-proyectos.twig') }}
</div>
<div class="col-md-4 mb-2 mb-sm-0">
{{ posts_by_term('category','intervencion-social-y-educativa',1,'post','frontpage-proyectos.twig') }}
</div>
<div class="col-md-4">
{{ posts_by_term('category','formacion',1,'post','frontpage-proyectos.twig') }}
</div>
</div>
<div class="container mt-4">
<div class="row d-flex justify-content-end">
<div><a href="{{ site.url }}/proyectos" class="btn btn-danger">Ver todos</a></div>
</div>
</div>
</div>
<div id="section-2-datos" class="pt-5 pb-5 mt-5">
<div class="container">
<div class="row">
<div class="col-sm-4 text-center">
<div class="dato dato-fecha text-uppercase">Desde 2005</div>
<div class="dato dato-numero text-turquesa font-weight-bold">20</div>
<div class="dato dato-desc text-uppercase mb-0">años de<br/>experiencia</div>
</div>
<div class="col-sm-4 text-center">
<div class="dato dato-fecha text-uppercase">Más de</div>
<div class="dato dato-numero text-naranja font-weight-bold">300</div>
<div class="dato dato-desc text-uppercase mb-0">proyectos<br/>desarrollados</div>
</div>
<div class="col-sm-4 text-center">
<div class="dato dato-fecha text-uppercase">Más de</div>
<div class="dato dato-numero text-salmon font-weight-bold">40</div>
<div class="dato dato-desc text-uppercase mb-0">instituciones con las<br/>que hemos colaborado</div>
</div>
</div>
</div>
</div>
<div id="section-3">
<div class="container-fluid ">
<div class="border-bottom section-3-heading">
<div class="container">
<div class="d-flex justify-content-between">
<div><h2 class="title actualidad-title">Actualidad</h2></div>
{#<!--<div><a href="{{ site.url }}/actualidad" class="btn btn-outline-primary">Ver todo</a></div>-->#}
</div>
</div>
</div>
</div>
<div class="container-fluid mt-2 mb-4">
{% if is_desktop %}
<div id="frontpage-actualidad-lg">
{{ posts_by_type('post',5,'frontpage-actualidad.twig') }}
</div>
{% elseif is_tablet %}
<div id="frontpage-actualidad-md">
{{ posts_by_type('post',3,'frontpage-actualidad.twig') }}
</div>
{% elseif is_mobile %}
<div id="frontpage-actualidad-xs">
{{ posts_by_type('post',1,'frontpage-actualidad.twig') }}
</div>
{% endif %}
</div>
<div class="container">
<div class="d-flex justify-content-end">
<div><a href="{{ site.url }}/actualidad" class="btn btn-outline-primary">Ver todo</a></div>
</div>
</div>
</div>
{% include 'block-clientes.twig' %}
<div id="section-4 container-fluid">
<div class="presupuesto">
<div class="overlay"></div>
<div class="caption">
<div class="row d-flex justify-content-between align-items-center">
<div class="col-md-3 text-center">
<div class="title">
<h2 class="text-uppercase letter-spacing-3">Solicita<br />un presupuesto</h2>
</div>
<a href="{{site.url}}/solicita-un-presupuesto" class="btn btn-danger">Iniciar solicitud</a>
</div>
<div class="col-md-5">
<div class="text">
<p class="lead text-center font-weight-bold">Somos un equipo interdisciplinar,<br />caracterizado por la horizontalidad,<br />la gestión democrática y la participación</p>
</div>
</div>
{#<!--<div class="col-md-3 text-center">
<div class="button">
<a href="{{site.url}}/solicita-un-presupuesto" class="btn btn-info">Iniciar solicitud</a>
</div>
</div>-->#}
</div>
</div>
{#<!--<div id="budget-form" class="collapse">
<div class="row">
<div class="col-md-6 offset-md-3">
{{ function('do_shortcode', '[gravityform id="2" title="false" description="false"]') }}
<div class="form">
<form id="contact-form" name="" method="post" action="/contacto">
<div class="form-group">
<input type="text" class="form-control text-center" name="name" id="name" value="" placeholder="Nombre">
</div>
<div class="form-group">
<input type="email" class="form-control text-center" name="email" id="email" value="" placeholder="Email">
</div>
<div class="form-group">
<input type="text" class="form-control text-center" name="organization" id="organization" value="" placeholder="Organización">
</div>
<div class="form-group">
<textarea class="form-control text-center" name="message" id="message" value="" rows="10" placeholder="Mensaje"></textarea>
</div>
<div class="form-group form-check text-left text-body">
<input class="form-check-input" type="checkbox" name="rgpd" value="Si" id="rgpd">
<label class="form-check-label" for="rgpd">
Acepto las condiciones de <a href="/politica-de-privacidad">política de privacidad</a>.
</label>
</div>
<div class="text-right">
<input type="hidden" name="form_type" value="{{form_type}}" id="form_type">
<button type="submit" class="btn btn-info">Enviar solicitud</button>
</div>
</form>
</div>
</div>
</div>
</div>-->#}
</div>
</div>
{% include 'block-network.twig' %}
{#
{{ posts_by_taxonomy('confederacion',4,'posts_by_taxonomy.twig') }}
{{ posts_by_term('ideas','comunicados',4,'post','posts_by_taxonomy.twig') }}
{{ posts_by_type('publicacion',10,'posts_featured_image.twig') }}
#}
{#
{{ dump(terms) }}
#}
{% endblock %}

View File

@ -1,32 +0,0 @@
{% if menu %}
<ul>
{% for item in menu %}
{% if item.get_children is not empty %}
{% set submenu = true %}
{% else %}
{% set submenu = false %}
{% endif %}
<li class="{{item.classes | join(' ')}}{% if submenu %} has-dropdown{% endif %}">
<a
href="{{item.get_link}}"
{% if loop.first %}class="active"{% endif %}
{#{% if submenu %}
class="dropdown-toggle"
data-toggle="dropdown"
role="button"
aria-haspopup="true"
aria-expanded="false"
{% endif %}#}
>
{{item.title}}
{#{% if submenu %}<span class="caret"></span>{% endif %}#}
</a>
{% if submenu %}
{% include "dropdown-menu.twig" with {'menu': item.get_children} %}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}

View File

@ -1,357 +0,0 @@
{% extends "base.twig" %}
{% block content %}
<div id="page" class="{{post.slug}}">
<div class="page-header mb-5 pb-5" style="background-image:url({% if post.thumbnail %}{{post.thumbnail|resize(1440,400)}}{% else %}{{site.theme.link}}/public/img/cabecera-provisional.jpg{% endif %}); background-repeat:no-repeat; background-position:center center; background-size:cover;">
<div class="overlay bg-gradient-1">
<div class="container pb-5 h-100">
<div class="d-flex h-100 justify-content-center align-items-end">
<h1 class="title text-white">{{post.title}}</h1>
</div>
</div>
</div>
</div>
<div class="page-content pb-3 {% if post.id == '29' or post.id == '37' or post.id == '66' or post.id == '70' or post.id == '72' %}page-servicios{% endif %}">
<div class="container">
{{post.content}}
</div>
</div>
{% if post.id == '1059' %}
<!--Quienes somos -->
<div class="quienes-somos-tabs container-fluid mt-5 pb-3">
<div class="quienesTabs-wrapper mb-5">
<ul class="nav nav-tabs nav-fill container" id="quienesTabs" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active" id="metodologia-tab" data-toggle="tab" href="#metodologia" role="tab" aria-controls="home" aria-selected="true"><h2 class="title equipo-title">Metodología</h2></a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="mision-tab" data-toggle="tab" href="#mision" role="tab" aria-controls="profile" aria-selected="false"><h2 class="title equipo-title">Misión y visión</h2></a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="principios-tab" data-toggle="tab" href="#principios" role="tab" aria-controls="contact" aria-selected="false"><h2 class="title equipo-title">Principios y valores</h2></a>
</li>
</ul>
</div>
<div class="tab-content container" id="quienesTabsContent">
<div class="tab-pane fade show active" id="metodologia" role="tabpanel" aria-labelledby="metodologia-tab">
{{post.meta('quienes_metodologia')}}
</div>
<div class="tab-pane fade" id="mision" role="tabpanel" aria-labelledby="mision-tab">
{{post.meta('quienes_mision_y_vision')}}
</div>
<div class="tab-pane fade" id="principios" role="tabpanel" aria-labelledby="principios-tab">
<p><a href="/principios-y-valores">Ver principios y valores</a></p>
</div>
</div>
</div>
{#
<!-- Metodologia -->
<div class="container-fluid mt-5">
<div class="section-heading">
<div class="container">
<h2 class="title equipo-title">Metodología</h2>
</div>
</div>
<div class="container pt-5 pb-5">
{{post.meta('quienes_metodologia')}}
</div>
</div>
<!-- Mision -->
<div class="container-fluid mt-5">
<div class="section-heading">
<div class="container">
<h2 class="title equipo-title">Misión y visión</h2>
</div>
</div>
<div class="container pt-5 pb-5">
{{post.meta('quienes_mision_y_vision')}}
</div>
</div>
<!-- Principios -->
<div class="container-fluid mt-5">
<div class="section-heading">
<div class="container">
<h2 class="title equipo-title">Principios y valores</h2>
</div>
</div>
<div class="container pt-5 pb-5">
<p><a href="/principios-y-valores">Ver principios y valores</a></p>
</div>
</div>
#}
<!-- Equipo -->
<div class="container-fluid mt-5">
<div class="section-heading">
<div class="container">
<h2 class="title equipo-title">Equipo</h2>
</div>
</div>
<div class="container pt-5 pb-5">
<div class="row">
{{ posts_by_type('team',30,'posts-team-members.twig') }}
</div>
</div>
</div>
<!-- Transparencia -->
<div class="container-fluid transparencia">
<div class="section-heading mt-5 mb-3">
<div class="container">
<h2 class="title transparencia-title">Transparencia</h2>
</div>
</div>
<div class="row">
<div class="col-md-8 item-1">
<div class="d-flex flex-column h-100">
<div class="quienes-slider">
{% filter shortcodes %}
{{post.meta('galeria_transparencia')}}
{% endfilter %}
</div>
</div>
</div>
<div class="col-md-4 item-2">
<div class="d-flex flex-column h-100">
<div class="transparencia-block-1 p-5 d-flex flex-column h-100">
<p class="lead font-weight-bold mb-auto">{{post.meta('dossier').title}}</p>
<p class="mb-0"><a href="{{post.meta('dossier').url}}" class="btn btn-light" target="_blank">Descargar</a></p>
</div>
<div class="transparencia-block-2 p-5 d-flex flex-column h-100">
<p class="lead font-weight-bold mb-auto">{{post.meta('resumen').title}}</p>
<p class="mb-0"><a href="{{post.meta('resumen').url}}" class="btn btn-light" target="_blank">Descargar</a></p>
</div>
</div>
</div>
</div>
</div>
<!-- FIN Quienes somos -->
<div class="container-fluid mt-5 pt-5">
{% include 'block-network.twig' %}
{% include 'block-clientes.twig' %}
</div>
{% elseif post.id == '29' or post.id == '37' or post.id == '66' or post.id == '70' or post.id == '72' %}
<div class="container-fluid mt-5 pb-5 page-servicios que-hacemos" style="background-image:url({% if post.id == '29' %}{{site.theme.link}}/public/img/icono_investigacion3x.png{% elseif post.id == '37' %}{{site.theme.link}}/public/img/icono_evaluacion3x.png{% elseif post.id == '66' %}{{site.theme.link}}/public/img/icono_formacion3x.png{% elseif post.id == '70' %}{{site.theme.link}}/public/img/icono_intervencion3x.png{% elseif post.id == '72' %}{{site.theme.link}}/public/img/icono_consultoria3x.png{% endif %}); background-repeat:no-repeat; background-position:-50px 0; background-size:250px;">
<div class="section-heading border-bottom mb-3 pt-5 mb-5">
<div class="container">
<h2 class="title underline">Qué hacemos</h2>
</div>
</div>
<div class="section-body container">
<div class="row">
{#<div class="col-md-2">#}
{#{% if post.id == '29' %}
<img src="{{site.theme.link}}/public/img/icono_investigacion3x.png" alt="{{ post.title }}" />
{% elseif post.id == '37' %}
<img src="{{site.theme.link}}/public/img/icono_evaluacion3x.png" alt="{{ post.title }}" />
{% elseif post.id == '66' %}
<img src="{{site.theme.link}}/public/img/icono_formacion3x.png" alt="{{ post.title }}" />
{% elseif post.id == '70' %}
<img src="{{site.theme.link}}/public/img/icono_intervencion3x.png" alt="{{ post.title }}" />
{% elseif post.id == '72' %}
<img src="{{site.theme.link}}/public/img/icono_consultoria3x.png" alt="{{ post.title }}" />
{% endif %}#}
{#</div>#}
<div class="col-md-10 offset-md-2">
{{post.meta('que_hacemos')}}
</div>
</div>
</div>
</div>
<div class="container-fluid mt-5 pb-5 page-servicios como-hacemos">
<div class="section-heading border-bottom mb-3 pt-5 mb-2">
<div class="container">
<h2 class="title underline">Cómo lo hacemos</h2>
</div>
</div>
<div class="section-body container-fluid">
<div class="row">
<div class="col-md-4">
<img src="{{post.meta('imagen_como_lo_hacemos').url}}" class="img-fluid" alt="{{ post.title }}">
{#{% if post.id == '29' %}
<img src="{{site.theme.link}}/public/img/como-hacemos-consultoria.jpg" alt="{{ post.title }}" />
{% elseif post.id == '37' %}
<img src="{{site.theme.link}}/public/img/icono_evaluacion3x.png" alt="{{ post.title }}" />
{% elseif post.id == '66' %}
<img src="{{site.theme.link}}/public/img/icono_formacion3x.png" alt="{{ post.title }}" />
{% elseif post.id == '70' %}
<img src="{{site.theme.link}}/public/img/icono_intervencion3x.png" alt="{{ post.title }}" />
{% elseif post.id == '72' %}
<img src="{{site.theme.link}}/public/img/icono_consultoria3x.png" alt="{{ post.title }}" />
{% endif %}#}
</div>
<div class="col-md-8 pt-5 pr-5">
{{post.meta('como_lo_hacemos')}}
</div>
</div>
</div>
</div>
{#<!--<div class="container-fluid mt-5 pb-5 page-servicios proyectos servicio-{{post.id}}">
<div class="section-heading border-bottom mb-3 pt-5">
<div class="container">
<h2 class="title underline">Proyectos relacionados</h2>
</div>
</div>
<div id="areas-filter" class="mb-5 mt-5 pb-5 pt-2 collapse show" data-parent="#main-filter">
<div class="container-fluid pb-3 term-filter">
<div class="row text-uppercase font-weight-bold d-flex flex-row mr-5 ml-5">
<div class="term-filter-item">
<span class="d-block h-100 p-4 d-flex h-100 align-items-top border-right"><small>Filtrar por áreas de trabajo</small></span>
</div>
{% for term in areas %}
<div class="term-filter-item">
<a href="#projects{{loop.index}}" data-toggle="collapse" aria-expanded="true" aria-controls="projects{{loop.index}}" class="d-block h-100 p-4 d-flex h-100 align-items-center {% if not loop.last %}border-right{% endif %}"><small>{{term.name}}</small></a>
</div>
{% endfor %}
</div>
</div>
<div class="container proyectos pt-5">
{% set postslug = post.slug %}
{% for term in areas %}
<div id="projects{{loop.index}}" class="row collapse{% if loop.first %} show{% endif %}" data-parent="#areas-filter">
{% set slug = term.slug %}
{{ posts_by_service(-1,postslug,slug,'related_proyectos_item-servicio.twig') }}
</div>
{% endfor %}
</div>
</div>
</div>-->#}
<div class="container mt-5 pb-5 page-servicios proyectos servicio-{{post.id}}">
<div class="container proyectos">
<div class="lead mb-5 font-weight-bold">
{{post.meta('servicio_eslogan')}}
</div>
{#{% set postslug = post.slug %}
{{ posts_by_service(1,postslug,postslug,'related_proyectos_item-servicio-unico.twig') }}#}
<div class="row proyecto-unico h-100">
<div class="col-md-4">
<img src="{{post.meta('proyecto_destacado').thumbnail|resize(500,500)}}" class="img-fluid" alt="{{post.meta('proyecto_destacado').title}}">
</div>
<div class="col-md-8">
<div class="linea {% for term in post.meta('proyecto_destacado').terms %}{% if term.slug == 'investigacion-social-aplicada' %}linea-investigacion {% elseif term.slug == 'evaluacion-externa-y-participativa' %}linea-evaluacion {% elseif term.slug == 'formacion' %}linea-formacion {% elseif term.slug == 'intervencion-social-y-educativa' %}linea-intervencion {% elseif term.slug == 'consultoria' %}linea-consultoria {% endif %}{% endfor %} mb-3 w-50"></div>
<h3><a href="{{post.meta('proyecto_destacado').link}}">{{ post.meta('proyecto_destacado').title }}</a></h3>
<a href="{{post.meta('proyecto_destacado').link}}"><img src="/wp-content/themes/andaira/public/img/right-arrow.png" alt="{{ post.meta('proyecto_destacado').title }}" /></a>
<div class="text-right text-uppercase font-weight-bold proyecto-unico-term">
{% for term in post.meta('proyecto_destacado').terms %}
{% if term.slug == 'investigacion-social-aplicada' %}<!--investigacion-->
{{ term }}
{% elseif term.slug == 'evaluacion-externa-y-participativa' %}<!--evaluacion-->
{{ term }}
{% elseif term.slug == 'formacion' %}<!--formacion-->
{{ term }}
{% elseif term.slug == 'intervencion-social-y-educativa' %}<!--intervencion-->
{{ term }}
{% elseif term.slug == 'consultoria' %}<!--consultoria-->
{{ term }}
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<div class="servicios-info-adicional text-right text-uppercase text-white font-weight-bold pt-5 pb-5" style="background:url('{{site.theme.link}}/public/img/bg-servicios-info-adicional.png') repeat-y">
<div class="container">
<p class="mb-0">Llámanos y solicita información adicional<br>915 42 83 43</p>
</div>
</div>
<div class="container-fluid mt-3 page-servicios otros-servicios">
<div class="section-heading border-bottom mb-5 pt-5">
<div class="container">
<h2 class="title underline">Otros servicios</h2>
</div>
</div>
<div class="row">
{% for post in servicios %}
<div class="col-fifth pb-5">
<a href="{{ post.link }}" class="d-block {% if not loop.first %}border-left{% endif %} pl-4 pr-4">
{% if post.id == '29' %}
<img src="{{site.theme.link}}/public/img/icono_investigacion2x.png" alt="{{ post.title }}" />
{% elseif post.id == '37' %}
<img src="{{site.theme.link}}/public/img/icono_evaluacion2x.png" alt="{{ post.title }}" />
{% elseif post.id == '66' %}
<img src="{{site.theme.link}}/public/img/icono_formacion2x.png" alt="{{ post.title }}" />
{% elseif post.id == '70' %}
<img src="{{site.theme.link}}/public/img/icono_intervencion2x.png" alt="{{ post.title }}" />
{% elseif post.id == '72' %}
<img src="{{site.theme.link}}/public/img/icono_consultoria2x.png" alt="{{ post.title }}" />
{% endif %}
{#<img src="{{site.theme.link}}/public/img/icono_{{post.slug}}.png" alt="">#}
<div class="font-weight-bold pt-3 pb-2">{{ post.title }}</div>
</a>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -1,25 +0,0 @@
# Wordpress Twig dump()
This must use plugin allow `{{ dump() }}` for your WordPress development.
## Specifications
* Timber libray was needed
* Autoload your must-use plugins with [bedrock-autoloader](https://github.com/roots/bedrock/blob/master/web/app/mu-plugins/bedrock-autoloader.php)
Tested with :
* Wordpress 4.5.* => 5.3.*
* Wordpress single / multi website
### Installation
#### With composer
```
composer require agencearcange/wp-twig-dump --dev
```
#### Without composer
Just copy this plugin into your `plugin` / `muplugin` folder

View File

@ -1,11 +0,0 @@
{
"name": "agencearcange/wp-twig-dump",
"description": "Allow dump() in twig templates",
"keywords": ["wordpress", "plugin", "timber", "twig"],
"homepage": "https://github.com/agencearcange/arcange-wpdump",
"type": "wordpress-muplugin",
"license": "GPLv2",
"require": {
"hellonico/twig-dump-extension": "^1.0"
}
}

View File

@ -1,13 +0,0 @@
<?php
/**
* Plugin Name: WP Twig dump()
* Description: Var Dumper if WP_DEBUG_DISPLAY == true For Timber Library
* Version: 1.1
*/
if (defined('WP_DEBUG_DISPLAY') && WP_DEBUG && function_exists('add_filter')) {
add_filter('timber/loader/twig', function($twig) {
$twig->addExtension(new HelloNico\Twig\DumpExtension());
return $twig;
});
}

View File

@ -0,0 +1,20 @@
name: Check PHP syntax
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3', 'highest']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: checkout repo
uses: actions/checkout@v3
- run: composer run check-syntax

View File

@ -0,0 +1,39 @@
name: PHP
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '7.3', 'highest' ]
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer
- name: Validate composer.json and composer.lock
run: composer validate
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --no-progress
- name: Run test suite
run: composer run-script test

View File

@ -0,0 +1,300 @@
<?php
/*
MIT License
Copyright (c) 2012 Danny van Kooten <hi@dannyvankooten.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
class AltoRouter
{
/**
* @var array Array of all routes (incl. named routes).
*/
protected $routes = [];
/**
* @var array Array of all named routes.
*/
protected $namedRoutes = [];
/**
* @var string Can be used to ignore leading part of the Request URL (if main file lives in subdirectory of host)
*/
protected $basePath = '';
/**
* @var array Array of default match types (regex helpers)
*/
protected $matchTypes = [
'i' => '[0-9]++',
'a' => '[0-9A-Za-z]++',
'h' => '[0-9A-Fa-f]++',
'*' => '.+?',
'**' => '.++',
'' => '[^/\.]++'
];
/**
* Create router in one call from config.
*
* @param array $routes
* @param string $basePath
* @param array $matchTypes
* @throws Exception
*/
public function __construct(array $routes = [], string $basePath = '', array $matchTypes = [])
{
$this->addRoutes($routes);
$this->setBasePath($basePath);
$this->addMatchTypes($matchTypes);
}
/**
* Retrieves all routes.
* Useful if you want to process or display routes.
* @return array All routes.
*/
public function getRoutes(): array
{
return $this->routes;
}
/**
* Add multiple routes at once from array in the following format:
*
* $routes = [
* [$method, $route, $target, $name]
* ];
*
* @param array $routes
* @return void
* @author Koen Punt
* @throws Exception
*/
public function addRoutes($routes)
{
if (!is_array($routes) && !$routes instanceof Traversable) {
throw new RuntimeException('Routes should be an array or an instance of Traversable');
}
foreach ($routes as $route) {
call_user_func_array([$this, 'map'], $route);
}
}
/**
* Set the base path.
* Useful if you are running your application from a subdirectory.
* @param string $basePath
*/
public function setBasePath(string $basePath)
{
$this->basePath = $basePath;
}
/**
* Add named match types. It uses array_merge so keys can be overwritten.
*
* @param array $matchTypes The key is the name and the value is the regex.
*/
public function addMatchTypes(array $matchTypes)
{
$this->matchTypes = array_merge($this->matchTypes, $matchTypes);
}
/**
* Map a route to a target
*
* @param string $method One of 5 HTTP Methods, or a pipe-separated list of multiple HTTP Methods (GET|POST|PATCH|PUT|DELETE)
* @param string $route The route regex, custom regex must start with an @. You can use multiple pre-set regex filters, like [i:id]
* @param mixed $target The target where this route should point to. Can be anything.
* @param string $name Optional name of this route. Supply if you want to reverse route this url in your application.
* @throws Exception
*/
public function map(string $method, string $route, $target, ?string $name = null)
{
$this->routes[] = [$method, $route, $target, $name];
if ($name) {
if (isset($this->namedRoutes[$name])) {
throw new RuntimeException("Can not redeclare route '{$name}'");
}
$this->namedRoutes[$name] = $route;
}
}
/**
* Reversed routing
*
* Generate the URL for a named route. Replace regexes with supplied parameters
*
* @param string $routeName The name of the route.
* @param array $params Associative array of parameters to replace placeholders with.
* @return string The URL of the route with named parameters in place.
* @throws Exception
*/
public function generate(string $routeName, array $params = []): string
{
// Check if named route exists
if (!isset($this->namedRoutes[$routeName])) {
throw new RuntimeException("Route '{$routeName}' does not exist.");
}
// Replace named parameters
$route = $this->namedRoutes[$routeName];
// prepend base path to route url again
$url = $this->basePath . $route;
if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
foreach ($matches as $index => $match) {
list($block, $pre, $type, $param, $optional) = $match;
if ($pre) {
$block = substr($block, 1);
}
if (isset($params[$param])) {
// Part is found, replace for param value
$url = str_replace($block, $params[$param], $url);
} elseif ($optional && $index !== 0) {
// Only strip preceding slash if it's not at the base
$url = str_replace($pre . $block, '', $url);
} else {
// Strip match block
$url = str_replace($block, '', $url);
}
}
}
return $url;
}
/**
* Match a given Request Url against stored routes
* @param string $requestUrl
* @param string $requestMethod
* @return array|boolean Array with route information on success, false on failure (no match).
*/
public function match(?string $requestUrl = null, ?string $requestMethod = null)
{
$params = [];
// set Request Url if it isn't passed as parameter
if ($requestUrl === null) {
$requestUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '/';
}
// strip base path from request url
$requestUrl = substr($requestUrl, strlen($this->basePath));
// Strip query string (?a=b) from Request Url
if (($strpos = strpos($requestUrl, '?')) !== false) {
$requestUrl = substr($requestUrl, 0, $strpos);
}
$lastRequestUrlChar = $requestUrl ? $requestUrl[strlen($requestUrl)-1] : '';
// set Request Method if it isn't passed as a parameter
if ($requestMethod === null) {
$requestMethod = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
}
foreach ($this->routes as $handler) {
list($methods, $route, $target, $name) = $handler;
$method_match = (stripos($methods, $requestMethod) !== false);
// Method did not match, continue to next route.
if (!$method_match) {
continue;
}
if ($route === '*') {
// * wildcard (matches all)
$match = true;
} elseif (isset($route[0]) && $route[0] === '@') {
// @ regex delimiter
$pattern = '`' . substr($route, 1) . '`u';
$match = preg_match($pattern, $requestUrl, $params) === 1;
} elseif (($position = strpos($route, '[')) === false) {
// No params in url, do string comparison
$match = strcmp($requestUrl, $route) === 0;
} else {
// Compare longest non-param string with url before moving on to regex
// Check if last character before param is a slash, because it could be optional if param is optional too (see https://github.com/dannyvankooten/AltoRouter/issues/241)
if (strncmp($requestUrl, $route, $position) !== 0 && ($lastRequestUrlChar === '/' || $route[$position-1] !== '/')) {
continue;
}
$regex = $this->compileRoute($route);
$match = preg_match($regex, $requestUrl, $params) === 1;
}
if ($match) {
if ($params) {
foreach ($params as $key => $value) {
if (is_numeric($key)) {
unset($params[$key]);
}
}
}
return [
'target' => $target,
'params' => $params,
'name' => $name
];
}
}
return false;
}
/**
* Compile the regex for a given route (EXPENSIVE)
* @param string $route
* @return string
*/
protected function compileRoute(string $route): string
{
if (preg_match_all('`(/|\.|)\[([^:\]]*+)(?::([^:\]]*+))?\](\?|)`', $route, $matches, PREG_SET_ORDER)) {
$matchTypes = $this->matchTypes;
foreach ($matches as $match) {
list($block, $pre, $type, $param, $optional) = $match;
if (isset($matchTypes[$type])) {
$type = $matchTypes[$type];
}
if ($pre === '.') {
$pre = '\.';
}
$optional = $optional !== '' ? '?' : null;
//Older versions of PCRE require the 'P' in (?P<named>)
$pattern = '(?:'
. ($pre !== '' ? $pre : null)
. '('
. ($param !== '' ? "?P<$param>" : null)
. $type
. ')'
. $optional
. ')'
. $optional;
$route = str_replace($block, $pattern, $route);
}
}
return "`^$route$`u";
}
}

View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) 2012 Danny van Kooten <hi@dannyvankooten.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

57
vendor/altorouter/altorouter/README.md vendored Normal file
View File

@ -0,0 +1,57 @@
# AltoRouter ![PHP status](https://github.com/dannyvankooten/AltoRouter/workflows/PHP/badge.svg) [![Latest Stable Version](https://poser.pugx.org/altorouter/altorouter/v/stable.svg)](https://packagist.org/packages/altorouter/altorouter) [![License](https://poser.pugx.org/altorouter/altorouter/license.svg)](https://packagist.org/packages/altorouter/altorouter)
AltoRouter is a small but powerful routing class, heavily inspired by [klein.php](https://github.com/chriso/klein.php/).
```php
$router = new AltoRouter();
// map homepage
$router->map('GET', '/', function() {
require __DIR__ . '/views/home.php';
});
// dynamic named route
$router->map('GET|POST', '/users/[i:id]/', function($id) {
$user = .....
require __DIR__ . '/views/user/details.php';
}, 'user-details');
// echo URL to user-details page for ID 5
echo $router->generate('user-details', ['id' => 5]); // Output: "/users/5"
```
## Features
* Can be used with all HTTP Methods
* Dynamic routing with named route parameters
* Reversed routing
* Flexible regular expression routing (inspired by [Sinatra](http://www.sinatrarb.com/))
* Custom regexes
## Getting started
You need PHP >= 7.3 to use AltoRouter, although we highly recommend you [use an officially supported PHP version](https://secure.php.net/supported-versions.php) that is not EOL.
- [Install AltoRouter](https://dannyvankooten.github.io/AltoRouter//usage/install.html)
- [Rewrite all requests to AltoRouter](https://dannyvankooten.github.io/AltoRouter//usage/rewrite-requests.html)
- [Map your routes](https://dannyvankooten.github.io/AltoRouter//usage/mapping-routes.html)
- [Match requests](https://dannyvankooten.github.io/AltoRouter//usage/matching-requests.html)
- [Process the request your preferred way](https://dannyvankooten.github.io/AltoRouter//usage/processing-requests.html)
## Contributors
- [Danny van Kooten](https://github.com/dannyvankooten)
- [Koen Punt](https://github.com/koenpunt)
- [John Long](https://github.com/adduc)
- [Niahoo Osef](https://github.com/niahoo)
## License
MIT License
Copyright (c) 2012 Danny van Kooten <hi@dannyvankooten.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,36 @@
{
"name": "altorouter/altorouter",
"description": "A lightning fast router for PHP",
"keywords": ["router", "routing", "lightweight"],
"homepage": "https://github.com/dannyvankooten/AltoRouter",
"license": "MIT",
"authors": [
{
"name": "Danny van Kooten",
"email": "dannyvankooten@gmail.com",
"homepage": "http://dannyvankooten.com/"
},
{
"name": "Koen Punt",
"homepage": "https://github.com/koenpunt"
},
{
"name": "niahoo",
"homepage": "https://github.com/niahoo"
}
],
"require": {
"php": ">=7.3"
},
"require-dev": {
"phpunit/phpunit": "9.6.*",
"squizlabs/php_codesniffer": "3.6.2"
},
"autoload": {
"classmap": ["AltoRouter.php"]
},
"scripts": {
"test": "vendor/bin/phpunit",
"check-syntax": "find . -name '*.php' -not -path './vendor/*' -print0 | xargs -0 -n1 php -l"
}
}

10
vendor/altorouter/altorouter/phpcs.xml vendored Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0"?>
<ruleset name="rules">
<description>rules</description>
<rule ref="PSR2"/>
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<file>tests</file>
<file>AltoRouter.php</file>
<file>examples/</file>
<arg name="colors"/>
</ruleset>

18
vendor/autoload.php vendored
View File

@ -2,6 +2,24 @@
// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInite360deab1e3925e3deb6282d6a5a1f68::getLoader();

View File

@ -1 +0,0 @@
../symfony/var-dumper/Resources/bin/var-dump-server

119
vendor/bin/var-dump-server vendored Executable file
View File

@ -0,0 +1,119 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../symfony/var-dumper/Resources/bin/var-dump-server)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server');
}
}
return include __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server';

View File

@ -37,57 +37,126 @@ namespace Composer\Autoload;
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;
/** @var string|null */
private $vendorDir;
// PSR-4
/**
* @var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array<string, list<string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* List of PSR-0 prefixes
*
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/
private $prefixesPsr0 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var array<string, bool>
*/
private $missingClasses = array();
/** @var string|null */
private $apcuPrefix;
/**
* @var array<string, self>
*/
private static $registeredLoaders = array();
/**
* @param string|null $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return list<string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return list<string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return array<string, string> Array of classname => path
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
* @param array<string, string> $classMap Class to filename map
*
* @return void
*/
public function addClassMap(array $classMap)
{
@ -102,22 +171,25 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
$paths
);
}
@ -126,19 +198,19 @@ class ClassLoader
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
$this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
$paths
);
}
}
@ -147,25 +219,28 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
$paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@ -175,18 +250,18 @@ class ClassLoader
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
$this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
$paths
);
}
}
@ -195,8 +270,10 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param array|string $paths The PSR-0 base directories
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
@ -211,10 +288,12 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
@ -234,6 +313,8 @@ class ClassLoader
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
@ -256,6 +337,8 @@ class ClassLoader
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
@ -276,6 +359,8 @@ class ClassLoader
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
@ -296,33 +381,55 @@ class ClassLoader
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
$includeFile = self::$includeFile;
$includeFile($file);
return true;
}
return null;
}
/**
@ -367,6 +474,21 @@ class ClassLoader
return $file;
}
/**
* Returns the currently registered loaders keyed by their corresponding vendor directories.
*
* @return array<string, self>
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
@ -432,14 +554,26 @@ class ClassLoader
return false;
}
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*/
function includeFile($file)
{
include $file;
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}

359
vendor/composer/InstalledVersions.php vendored Normal file
View File

@ -0,0 +1,359 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/
class InstalledVersions
{
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
if (self::$installed !== array()) {
$installed[] = self::$installed;
}
return $installed;
}
}

View File

@ -2,8 +2,10 @@
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'AltoRouter' => $vendorDir . '/altorouter/altorouter/AltoRouter.php',
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
);

View File

@ -2,13 +2,20 @@
// autoload_files.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'89efb1254ef2d1c5d80096acd12c4098' => $vendorDir . '/twig/twig/src/Resources/core.php',
'ffecb95d45175fd40f75be8a23b34f90' => $vendorDir . '/twig/twig/src/Resources/debug.php',
'c7baa00073ee9c61edf148c51917cfb4' => $vendorDir . '/twig/twig/src/Resources/escaper.php',
'f844ccf1d25df8663951193c3fc307c8' => $vendorDir . '/twig/twig/src/Resources/string_loader.php',
'667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php',
'fe62ba7e10580d903cc46d808b5961a4' => $vendorDir . '/tightenco/collect/src/Collect/Support/helpers.php',
'caf31cc6ec7cf2241cb6f12c226c3846' => $vendorDir . '/tightenco/collect/src/Collect/Support/alias.php',
'8c3e128cd1b1ac75ff1847ce2e6ab3ea' => $vendorDir . '/wecodemore/wordpress-early-hook/wordpress-early-hook.php',
'37920fbd6eaeababa873d97ba1c5324c' => $vendorDir . '/hellonico/timber-dump-extension/functions.php',
'23f09fe3194f8c2f70923f90d6702129' => $vendorDir . '/illuminate/collections/functions.php',
'60799491728b879e74601d83e38b2cad' => $vendorDir . '/illuminate/collections/helpers.php',
);

View File

@ -2,11 +2,11 @@
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Twig_' => array($vendorDir . '/twig/twig/lib'),
'Routes' => array($vendorDir . '/upstatement/routes'),
'Requests' => array($vendorDir . '/rmccue/requests/library'),
'Gregwar\\Formidable' => array($vendorDir . '/gregwar/formidable'),
'Gregwar\\Cache' => array($vendorDir . '/gregwar/cache'),

View File

@ -2,15 +2,25 @@
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(dirname(__FILE__));
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Twig\\' => array($vendorDir . '/twig/twig/src'),
'Tightenco\\Collect\\' => array($vendorDir . '/tightenco/collect/src/Collect'),
'Timber\\' => array($vendorDir . '/timber/timber/src'),
'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
'Symfony\\Contracts\\Translation\\' => array($vendorDir . '/symfony/translation-contracts'),
'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'),
'Symfony\\Component\\PropertyAccess\\' => array($vendorDir . '/symfony/property-access'),
'HelloNico\\Twig\\' => array($vendorDir . '/hellonico/twig-dump-extension/src'),
'Symfony\\Bridge\\Twig\\' => array($vendorDir . '/symfony/twig-bridge'),
'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'),
'Psr\\Container\\' => array($vendorDir . '/psr/container/src'),
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
'Illuminate\\Support\\' => array($vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/conditionable', $vendorDir . '/illuminate/macroable'),
'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'),
'HelloNico\\Timber\\' => array($vendorDir . '/hellonico/timber-dump-extension/src'),
'Detection\\' => array($vendorDir . '/mobiledetect/mobiledetectlib/src'),
'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
'App\\' => array($baseDir . '/src'),
);

View File

@ -22,52 +22,29 @@ class ComposerAutoloaderInite360deab1e3925e3deb6282d6a5a1f68
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInite360deab1e3925e3deb6282d6a5a1f68', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInite360deab1e3925e3deb6282d6a5a1f68', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInite360deab1e3925e3deb6282d6a5a1f68::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$map = require __DIR__ . '/autoload_psr4.php';
foreach ($map as $namespace => $path) {
$loader->setPsr4($namespace, $path);
}
$classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
}
}
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInite360deab1e3925e3deb6282d6a5a1f68::getInitializer($loader));
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInite360deab1e3925e3deb6282d6a5a1f68::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequiree360deab1e3925e3deb6282d6a5a1f68($fileIdentifier, $file);
$filesToLoad = \Composer\Autoload\ComposerStaticInite360deab1e3925e3deb6282d6a5a1f68::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequiree360deab1e3925e3deb6282d6a5a1f68($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}

Some files were not shown because too many files have changed in this diff Show More