Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

index.html 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. <!DOCTYPE html>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one
  4. or more contributor license agreements. See the NOTICE file
  5. distributed with this work for additional information
  6. regarding copyright ownership. The ASF licenses this file
  7. to you under the Apache License, Version 2.0 (the
  8. "License"); you may not use this file except in compliance
  9. with the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing,
  12. software distributed under the License is distributed on an
  13. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. KIND, either express or implied. See the License for the
  15. specific language governing permissions and limitations
  16. under the License.
  17. -->
  18. <html>
  19. <head>
  20. <!--
  21. Customize this policy to fit your own app's needs. For more guidance, see:
  22. https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#content-security-policy
  23. Some notes:
  24. * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
  25. * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
  26. * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
  27. * Enable inline JS: add 'unsafe-inline' to default-src
  28. -->
  29. <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; media-src *; img-src 'self' data: content:;">
  30. <!--these three for the calendar-->
  31. <link href="https://fonts.googleapis.com/css?family=Roboto+Condensed" rel="stylesheet">
  32. <link href="css/robotocondensed.css" rel="stylesheet">
  33. <link rel="stylesheet" href="calendar_files/css/demo.css"/>
  34. <link rel="stylesheet" href="css/file.css"/>
  35. <link rel="stylesheet" href="calendar_files/css/theme1.css"/>
  36. <!--this is for the search bar-->
  37. <link rel = "stylesheet" href = "css/searchbar1.css">
  38. <meta name="format-detection" content="telephone=no">
  39. <meta name="msapplication-tap-highlight" content="no">
  40. <meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover">
  41. <link rel="stylesheet" type="text/css" href="css/index.css">
  42. <link rel="stylesheet" href="lib/OnsenUI/css/onsenui.css">
  43. <link rel="stylesheet" href="lib/OnsenUI/css/onsen-css-components.min.css">
  44. <script src="lib/OnsenUI/js/onsenui.min.js"></script>
  45. <script src="js/jquery_.js"></script>
  46. </head>
  47. <body>
  48. <ons-navigator swipeable animation="slide" id="myNavigator">
  49. <ons-page>
  50. <ons-toolbar>
  51. <div class="center">Instituto de Cultura</div>
  52. </ons-toolbar>
  53. <ons-tabbar swipeable position="auto">
  54. <ons-tab page="home.html" label="Hogar"></ons-tab>
  55. <ons-tab page="renglones.html" label="Artesanias"active></ons-tab>
  56. <ons-tab page="ferias.html" label="Ferias"></ons-tab>
  57. <ons-tab page="instituto.html" label="Instituto"></ons-tab>
  58. </ons-tabbar>
  59. </ons-page>
  60. </ons-navigator>
  61. <template id="artesanias.html">
  62. <ons-page id="artesanias">
  63. <ons-toolbar>
  64. <div class="left"><ons-back-button>Atrás</ons-back-button></div>
  65. <div class="center"></div>
  66. </ons-toolbar>
  67. <ons-pull-hook id="pull-hook" threshold-height="120px">
  68. <ons-icon id="pull-hook-icon" size="22px" class="pull-hook-content" icon="fa-arrow-down"></ons-icon>
  69. </ons-pull-hook>
  70. <ons-list id="artesania-list" src="">
  71. <ons-list-header>Artesanias</ons-list-header>
  72. </ons-list>
  73. <ons-list id="artesanos-list" src="">
  74. <ons-list-header>Artesanos</ons-list-header>
  75. </ons-list>
  76. <script>
  77. ons.getScriptPage().onInit = function () {
  78. this.querySelector('ons-toolbar div.center').textContent = this.data.title;
  79. //var File = this.data.title.toUpperCase() + '.json' ;
  80. var Esp = this.data.esp.split(', ');
  81. var artesanos_json = this.data.json;
  82. //Convertir en mayuscula primera letra del string.
  83. for(var i=0; i<Esp.length; i++) {
  84. Esp[i] = Esp[i].charAt(0).toUpperCase() + Esp[i].slice(1);
  85. };
  86. var pullHook = document.getElementById('pull-hook');
  87. var icon = document.getElementById('pull-hook-icon');
  88. pullHook.addEventListener('changestate', function (event) {
  89. switch (event.state) {
  90. case 'initial':
  91. icon.setAttribute('icon', 'fa-arrow-down');
  92. icon.removeAttribute('rotate');
  93. icon.removeAttribute('spin');
  94. break;
  95. case 'preaction':
  96. icon.setAttribute('icon', 'fa-arrow-down');
  97. icon.setAttribute('rotate', '180');
  98. icon.removeAttribute('spin');
  99. break;
  100. case 'action':
  101. icon.setAttribute('icon', 'fa-spinner');
  102. icon.removeAttribute('rotate');
  103. icon.setAttribute('spin', true);
  104. break;
  105. }
  106. });
  107. var getArtesania = function (num) {
  108. var Artesanos = ``;
  109. console.log('Filtrado de ',Esp[num])
  110. var results = [];
  111. var searchVal = "my Name";
  112. for (var i=0 ; i < artesanos_json.length ; i++)
  113. {
  114. if (artesanos_json[i].Especificaciones.includes(Esp[num])) {
  115. results.push(artesanos_json[i]);
  116. }
  117. }
  118. /*var arr1=artesanos_json.filter(function(item){
  119. return item.Nombre=="Ana";
  120. });*/
  121. for(var i=0; i<results.length; i++) {
  122. //if(Esp[num] in artesanos_json.) {}
  123. Artesanos=Artesanos+`<a id='home.html'>${results[i].Nombre} | ${results[i].Municipio}<br>`
  124. //`<a id='home.html'>${Artesania.artesano} | ${Artesania.municipio}</a> `
  125. }
  126. return {
  127. name: Esp[num],
  128. artesan: Artesanos
  129. };
  130. };
  131. var getData = function () {
  132. const data = [];
  133. for (var i = 0; i < Esp.length; i++) {
  134. data.push(getArtesania(i));
  135. }
  136. return data;
  137. };
  138. var createArtesania = function (Artesania) {
  139. //console.log('Devuelto elemento')
  140. return ons.createElement(`
  141. <ons-list-item expandable tappable>
  142. <div class="center" >${Artesania.name}</div>
  143. <div class="expandable-content"> Artesanos que trabajan con ${Artesania.name}:<br><br>${Artesania.artesan}</div>
  144. </ons-list-item>`
  145. );
  146. };
  147. var Artesanias = getData();
  148. for (Art of Artesanias) {
  149. var Artesania = createArtesania(Art);
  150. document.getElementById('artesania-list').appendChild(Artesania);
  151. };
  152. pullHook.onAction = function (done) {
  153. setTimeout(function() {
  154. document.getElementById('artesania-list').appendChild(createArtesania(getArtesania()));
  155. done();
  156. }, 400);
  157. }
  158. var createArtesano = function (Artesano) {
  159. return ons.createElement(`
  160. <ons-list-item expandable tappable>
  161. <div class="center" >${Artesano.Nombre}</div>
  162. <div class="expandable-content"> Municipio: ${Artesano.Municipio}<br>
  163. Tel\u00e9fono: ${Artesano["Tel\u00e9fono 1"]}<br>
  164. Correo Electr\u00f3nico: ${Artesano["E-mail"]}<br>
  165. Trabaja con: ${Artesano.Especificaciones}<br>
  166. </div>
  167. </ons-list-item>`
  168. );
  169. };
  170. //var Artesanias = getData();
  171. //artesanos_json
  172. for (arte of artesanos_json) {
  173. var Artesano = createArtesano(arte);
  174. document.getElementById('artesanos-list').appendChild(Artesano);
  175. };
  176. };
  177. </script>
  178. <style>
  179. .pull-hook-content {
  180. color: #333;
  181. transition: transform .25s ease-in-out;
  182. }
  183. </style>
  184. </ons-page>
  185. </template>
  186. <template id="home.html">
  187. <ons-page id="home">
  188. <p style="text-align: center;">
  189. Pagina Principal
  190. </p>
  191. </ons-page>
  192. </template>
  193. <template id="renglones.html">
  194. <ons-page id="renglones">
  195. <!--div class="search-bar">
  196. <p style="text-align: center; margin-top: 10px;">
  197. <ons-search-input placeholder="Search" onchange="ons.notification.alert('Searched for: ' + this.value)"
  198. style="width: 96%; margin: 6px auto 6px auto;"></ons-search-input>
  199. </p>
  200. </div-->
  201. <ons-card id="list">
  202. <script type="text/javascript" src="js/renglones.js"></script>
  203. </ons-card>
  204. <style>
  205. .intro {
  206. text-align: center;
  207. padding: 20px;
  208. margin-top: 30px;
  209. }
  210. ons-card {
  211. cursor: pointer;
  212. color: #333;
  213. }
  214. .card__title,
  215. .card--material__title {
  216. font-size: 15px;
  217. }
  218. </style>
  219. </ons-page>
  220. <!--script>
  221. ons.getScriptPage().onInit = function () {
  222. this.querySelector('ons-toolbar div.center').textContent = this.data.title;
  223. var createArtesania = function (Artesania) {
  224. return ons.createElement(`
  225. <ons-list-item expandable tappable>
  226. <div class="center" >${Artesania.name}</div>
  227. <div class="expandable-content"> -Artesanos que trabajan con ${Artesania.name}- <br><br> Luis Lao | Naguabo
  228. <br> <a id='home.html'>Jorge Rivera | Naguabo</a> </div>
  229. </ons-list-item>` );
  230. document.getElementById('artesania-list').appendChild(createArtesania(getArtesania())); };
  231. </script-->
  232. </template>
  233. <template id="ferias.html">
  234. <ons-page id="ferias">
  235. <div id = "caleandar" class = "calendar" style="margin-top: 50px;">
  236. <script type="text/javascript" src="calendar_files/js/caleandar.js"></script>
  237. <script type="text/javascript" src="calendar_files/js/events.js"></script>
  238. </div>
  239. </ons-page>
  240. </template>
  241. <template id="instituto.html">
  242. <ons-page id="instituto">
  243. <p style="text-align: center;">
  244. <ons-toolbar>
  245. <div class="left"><ons-back-button>Pagejjn 3</ons-back-button></div>
  246. <div class="center"></div>
  247. </ons-toolbar>
  248. <h1>Instituto de Cultura Puertorriqueña</h1>
  249. <h3>Ven, descubre lo que nuestra riqueza cultural puertorriqueña tiene para tí.<br> Disfrútala, es tu identidad.
  250. </h3>
  251. <body>
  252. <br>
  253. El Instituto de Cultura Puertorriqueña (ICP) tiene como misión investigar, conservar, promover y divulgar la cultura puertorriqueña en su diversidad y complejidad. Con la memoria y la promesa de la cultura, los distintos niveles, sectores, edades e intereses de la comunidad crean el conjunto de modos de vida, costumbres y manifestaciones artísticas que nos identifica como país. El ICP existe para preservar y divulgar estos saberes, difundir internacionalmente nuestro talento y enriquecer el amor a lo propio.
  254. <br><br>
  255. Nuestras tradiciones no son rígidos objetos de museo, sino actividades vivas en constante renovación y reapropiación, según van también desarrollándose nuevas tradiciones. El respeto a la diversidad, a lo híbrido, a lo apropiado y a lo replanteado también son parte esencial de esta institución que busca activamente la colaboración de todos en un quehacer que debe ser siempre compartido de la mano con su ingente diversidad.
  256. <br><br>
  257. Prof. Carlos R. Ruiz Cortés<br>
  258. Director Ejecutivo<br>
  259. Instituto de Cultura Puertorriqueña<br>
  260. <br><br>
  261. </body>
  262. Visita nuestra <a href="https://www.icp.pr.gov/">Página Web</a> o síguenos en nuestras redes sociales: <br>
  263. <a href="https://twitter.com/icppr"><img src="img/twitter.png" alt="Twitter" style="width:35px;height:35px;border:0;">
  264. </a>
  265. <a href="https://facebook.com/icppr"><img src="img/facebook.png" alt="Facebook" style="width:35px;height:35px;border:0;">
  266. </a>
  267. <a href="https://youtube.com/user/icppr"><img src="img/youtube.png" alt="Youtube" style="width:35px;height:35px;border:0;">
  268. </a>
  269. <a href="https://instagram.com/icppr"><img src="img/instagram.png" alt="Instagram" style="width:35px;height:35px;border:0;">
  270. </a>
  271. </p>
  272. </ons-page>
  273. </template>
  274. <script src="js/load.js"></script>
  275. <script type="text/javascript" src="cordova.js"></script>
  276. <script type="text/javascript" src="js/index.js"></script>
  277. </body>
  278. </html>