diff --git a/js-src/index.js b/js-src/index.js index 92556d6..72fe80d 100644 --- a/js-src/index.js +++ b/js-src/index.js @@ -3,6 +3,8 @@ import Tablesort from 'tablesort'; window.Tablesort = require('tablesort'); require('tablesort/src/sorts/tablesort.number'); +let fakeSearchInput +let searchMobile window.onload = () => { const menu_expand = document.querySelector('a.menu-expand'); const mobile_foldable = document.querySelector('nav.mobile-foldable'); @@ -31,14 +33,27 @@ window.onload = () => { } if (window !== undefined && window.Android !== undefined) { executeAndroidExclusiveCode(Android) - } + } + searchMobile = document.querySelector('nav.mobile-shortcuts div.search') + fakeSearchInput = searchMobile.querySelector('input') addListenersSearch() }; function addListenersSearch() { - const searchMobile = document.querySelector('nav.mobile-shortcuts div.search') if (searchMobile !== null) { searchMobile.addEventListener('click', onFakeSearchClick); + fakeSearchInput.addEventListener('focus', (e) => { + onFakeSearchClick(e) + }); + fakeSearchInput.addEventListener('change', (e) => { + if (fakeSearchInput.value !== "") { + const searchOverlay = document.querySelector('div.search-overlay'); + const searchInput = searchOverlay.querySelector('div.search input'); + searchInput.value = fakeSearchInput.value; + onSearchChange(e) + } + onFakeSearchClick(e) + }); } const exitSearch = document.querySelector('a.exit-search') if (exitSearch !== null) { @@ -57,6 +72,7 @@ function onSearchChange() { return; } const query = search.value; + fakeSearchInput.value = search.value const url = new URL(window.location.protocol + "//" + window.location.hostname @@ -77,6 +93,7 @@ function onSearchChange() { } showResults(searchResults, json.searchObjects); }) + search.focus() } function showResults(searchResults, searchObjects) { diff --git a/lib/BurguillosInfo/Command/index.pm b/lib/BurguillosInfo/Command/index.pm index f7ea8dc..3accfe8 100644 --- a/lib/BurguillosInfo/Command/index.pm +++ b/lib/BurguillosInfo/Command/index.pm @@ -17,6 +17,9 @@ use Mojo::UserAgent; use BurguillosInfo::Posts; use BurguillosInfo::Categories; +use BurguillosInfo::IndexUtils; + +my $index_utils = BurguillosInfo::IndexUtils->new; sub run ( $self, @args ) { require BurguillosInfo; @@ -38,36 +41,47 @@ sub run ( $self, @args ) { sub _index_categories ( $self, $index, $categories ) { my @categories_keys = keys %$categories; for my $category_key (@categories_keys) { - my $category = $categories->{$category_key}; + my $category = $categories->{$category_key}; my $slug = $category->{slug}; my $url = "/$slug"; my $content = - Mojo::DOM->new( '' . $category->{description} =~ s/\s+/ /gr . '' )->all_text; - my $title = $category->{title}; + Mojo::DOM->new( + '' . $category->{description} =~ s/\s+/ /gr . '' ) + ->all_text; + my $title = $category->{title}; my $attributes = $category->{attributes}; - $self->_index_attributes($index, $slug, $attributes); + $self->_index_attributes( $index, $slug, $attributes ); push @$index, { - title => $title, - content => $content, - url => $url, + title => $title, + titleNormalized => $index_utils->n($title), + content => $content, + contentNormalized => $index_utils->n( $content =~ s/\s+/ /gr ), + url => $url, + urlNormalized => $index_utils->n($url), }; } } -sub _index_attributes($self, $index, $category_slug, $attributes) { +sub _index_attributes ( $self, $index, $category_slug, $attributes ) { my @attributes_keys = keys %$attributes; for my $attribute_key (@attributes_keys) { my $attribute = $attributes->{$attribute_key}; - my $slug = $attribute->{identifier}; - my $url = "/$category_slug/atributo/$slug"; - my $title = $attribute->{title}; - my $content = Mojo::DOM->new( '' . $attribute->{description} . '' )->all_text; - push @$index, { - title => $title, - content => $content =~ s/\s+/ /gr, - url => $url, - }; + my $slug = $attribute->{identifier}; + my $url = "/$category_slug/atributo/$slug"; + my $title = $attribute->{title}; + my $content = + Mojo::DOM->new( '' . $attribute->{description} . '' ) + ->all_text; + push @$index, + { + titleNormalized => $index_utils->n($title), + title => $title, + contentNormalized => $index_utils->n( $content =~ s/\s+/ /gr ), + content => $content =~ s/\s+/ /gr, + urlNormalized => $index_utils->n($url), + url => $url, + }; } } @@ -84,11 +98,16 @@ sub _index_posts ( $self, $index, $posts ) { my $author = $post->{author}; push @$index, { - title => $title, - author => $author, - content => $content =~ s/\s+/ /gr, - url => $url, - urlImage => $urlImage, + titleNormalized => $index_utils->n($title), + title => $title, + authorNormalized => $index_utils->n($author), + author => $author, + contentNormalized => $index_utils->n( $content =~ s/\s+/ /gr ), + content => $content =~ s/\s+/ /gr, + urlNormalized => $index_utils->n($url), + url => $url, + urlImageNormalized => $index_utils->n($urlImage), + urlImage => $urlImage, }; } } diff --git a/lib/BurguillosInfo/Controller/Search.pm b/lib/BurguillosInfo/Controller/Search.pm index 617e6c6..09a05ac 100644 --- a/lib/BurguillosInfo/Controller/Search.pm +++ b/lib/BurguillosInfo/Controller/Search.pm @@ -10,14 +10,20 @@ use Data::Dumper; use Mojo::Base 'Mojolicious::Controller', '-signatures'; use Mojo::UserAgent; +use BurguillosInfo::IndexUtils; + +my $index_utils = BurguillosInfo::IndexUtils->new; + sub search ($self) { my $ua = Mojo::UserAgent->new; my $query = $self->param('q'); my $config = $self->config; my $search_backend = $config->{search_backend}; my $search_index = $config->{search_index}; + $query =~ s/\btitle:/titleNormalized:/g; + $query =~ s/\bcontent:/contentNormalized:/g; my $tx = $ua->get( $search_backend . '/search/' . $search_index, - {}, form => { q => $query } ); + {}, form => { q => $index_utils->n($query) } ); my $result = $tx->result; my $output = $result->json; diff --git a/lib/BurguillosInfo/IndexUtils.pm b/lib/BurguillosInfo/IndexUtils.pm new file mode 100644 index 0000000..c6e7e9d --- /dev/null +++ b/lib/BurguillosInfo/IndexUtils.pm @@ -0,0 +1,27 @@ +package BurguillosInfo::IndexUtils; + +use v5.36.0; + +use strict; +use warnings; +use utf8; + +use feature 'signatures'; + +use Unicode::Normalize qw/NFKD/; + +use Moo; + +sub normalize($self, $text) { + return undef if !defined $text; + my $decomposed = NFKD( $text ); + $decomposed =~ s/\p{NonspacingMark}//g; + $decomposed =~ s/s\b//g; + $decomposed =~ s/a\b/o/g; + return $decomposed; +} + +sub n(@args) { + normalize(@args); +} +1; diff --git a/public/js/bundle.js b/public/js/bundle.js index 56f4701..e902476 100644 --- a/public/js/bundle.js +++ b/public/js/bundle.js @@ -16,7 +16,7 @@ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var tablesort__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tablesort */ \"./node_modules/tablesort/src/tablesort.js\");\n/* harmony import */ var tablesort__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tablesort__WEBPACK_IMPORTED_MODULE_0__);\n\n\nwindow.Tablesort = __webpack_require__(/*! tablesort */ \"./node_modules/tablesort/src/tablesort.js\");\n__webpack_require__(/*! tablesort/src/sorts/tablesort.number */ \"./node_modules/tablesort/src/sorts/tablesort.number.js\");\n\nwindow.onload = () => {\n const menu_expand = document.querySelector('a.menu-expand');\n const mobile_foldable = document.querySelector('nav.mobile-foldable');\n const tables = document.querySelectorAll('table')\n\n loadAd()\n addEasterEggAnimation()\n\n if (menu_expand !== null && mobile_foldable !== null) {\n menu_expand.addEventListener('click', () => {\n mobile_foldable.classList.toggle('show');\n });\n }\n\n for (const table of tables) {\n const header = table.querySelector('tr');\n if (header !== null) {\n header.setAttribute('data-sort-method', 'none')\n for (const th of header.querySelectorAll('th')) {\n if (th.getAttribute('data-sort-method') == null) {\n th.setAttribute('data-sort-method', 'thead')\n }\n }\n }\n new (tablesort__WEBPACK_IMPORTED_MODULE_0___default())(table)\n }\n if (window !== undefined && window.Android !== undefined) {\n executeAndroidExclusiveCode(Android)\n }\n addListenersSearch()\n};\n\nfunction addListenersSearch() {\n const searchMobile = document.querySelector('nav.mobile-shortcuts div.search')\n if (searchMobile !== null) {\n searchMobile.addEventListener('click', onFakeSearchClick);\n }\n const exitSearch = document.querySelector('a.exit-search')\n if (exitSearch !== null) {\n exitSearch.addEventListener('click', onExitSearch)\n }\n const search = document.querySelector('div.search-overlay div.search input');\n if (search !== null) {\n search.addEventListener('change', onSearchChange);\n }\n}\n\nfunction onSearchChange() {\n const search = document.querySelector('div.search-overlay div.search input');\n const searchResults = document.querySelector('div.search-overlay div.search-results');\n if (search === null || searchResults === null) {\n return;\n }\n const query = search.value;\n const url = new URL(window.location.protocol\n + \"//\"\n + window.location.hostname\n + \":\"\n + window.location.port\n + '/search.json');\n url.searchParams.set('q', query);\n fetch(url).then(async (res) => {\n const json = await res.json()\n if (!json.ok) {\n noResults(searchResults);\n return\n }\n console.log(json.searchObjects.length)\n if (json.searchObjects.length < 1) {\n noResults(searchResults);\n return;\n }\n showResults(searchResults, json.searchObjects);\n })\n}\n\nfunction showResults(searchResults, searchObjects) {\n searchResults.innerHTML = \"\";\n for (let searchObject of searchObjects) {\n const searchResultContainer = document.createElement('div')\n searchResultContainer.classList.add('search-result')\n const title = document.createElement('b')\n const url = document.createElement('a')\n const content = document.createElement('p')\n\n title.innerText = searchObject.title\n if (searchObject.url.match(/^\\//)) {\n searchObject.url = window.location.protocol \n + \"//\" + window.location.hostname \n + \":\" + window.location.port \n + searchObject.url\n }\n url.href = searchObject.url\n url.innerText = searchObject.url\n content.innerText = searchObject.content\n\n searchResultContainer.appendChild(title)\n searchResultContainer.appendChild(document.createElement('br'))\n searchResultContainer.appendChild(url)\n searchResultContainer.appendChild(content)\n searchResults.appendChild(searchResultContainer)\n }\n}\n\nfunction noResults(searchResults) {\n searchResults.innerHTML = \"\"\n const p = document.createElement('p')\n p.innerText = 'No se han encontrado resultados.'\n searchResults.appendChild(p)\n}\n\nfunction onExitSearch() {\n const searchOverlay = document.querySelector('div.search-overlay');\n if (searchOverlay !== null) {\n searchOverlay.classList.toggle('active');\n }\n}\n\nfunction onFakeSearchClick(e) {\n e.preventDefault();\n const searchOverlay = document.querySelector('div.search-overlay');\n if (searchOverlay === null) {\n return\n }\n searchOverlay.classList.toggle('active');\n const search = searchOverlay.querySelector('div.search input');\n if (search !== null) {\n search.focus()\n }\n return false;\n}\n\nfunction absoluteToHost(imageUrl) {\n if (imageUrl.match(/^\\//)) {\n imageUrl = window.location.protocol + \"//\" + window.location.host + imageUrl \n }\n return imageUrl.replace(/\\?.*$/, '');\n}\n\nfunction addListenerOpenInBrowserButton(android) {\n const openInBrowserLink = document.querySelector('a.open-in-browser')\n if (openInBrowserLink === null) {\n return\n }\n openInBrowserLink.addEventListener('click', () => {\n android.openInBrowser(window.location.href)\n })\n}\nfunction executeAndroidExclusiveCode(android) {\n document.querySelectorAll('*.android').forEach((element) => {\n element.classList.remove('android')\n })\n addListenerOpenInBrowserButton(android)\n const pinToHomeUrl = document.querySelector('a.pin-to-home')\n if (pinToHomeUrl === null) {\n return;\n }\n pinToHomeUrl.addEventListener('click', () => {\n const url = new URL(window.location.href)\n const pathandQuery = url.pathname + url.search;\n const label = (url.pathname.replace(/^.*\\//g, '')\n .replace(/(?:^|-)\\w/g, function(character) {\n return character.toUpperCase() \n })\n .replace(/-/g, ' ')) + ' - Burguillos.info';\n const firstImg = document.querySelector('div.description img');\n let iconUrl;\n if (firstImg !== null) {\n if (!firstImg.src.match(/\\.svg(?:\\?|$)/)) {\n iconUrl = absoluteToHost(firstImg.src);\n }\n }\n if (iconUrl === undefined) {\n const imagePreview = document.querySelector('meta[name=\"image\"]');\n iconUrl = absoluteToHost(imagePreview.content);\n }\n android.pinPage(pathandQuery, label, iconUrl)\n })\n}\n\nfunction addEasterEggAnimation() {\n const logoContainer = document.querySelector('div.burguillos-logo-container')\n if (logoContainer === null) {\n return;\n }\n logoContainer.addEventListener('click', () => {\n logoContainer.classList.toggle('active')\n })\n}\n\nlet current_ad_number = null\n\nfunction expand_page_contents() {\n const page_contents = document.querySelector('div.page-contents'); \n if (page_contents === null) {\n return;\n }\n page_contents.classList.add('no-carousel');\n}\n\nfunction no_more_ads() {\n const carousel = document.querySelector('.carousel');\n if (carousel !== null) {\n carousel.remove();\n }\n expand_page_contents();\n}\n\nfunction loadAd() {\n const params = new URLSearchParams();\n if (current_ad_number !== null) {\n params.append('n', \"\"+current_ad_number);\n }\n fetch('/next-ad.json?' + params).then((res) => {\n return res.json()\n }).then((res) => {\n current_ad_number = res.current_ad_number\n const ad = res.ad\n const must_continue = res.continue\n const carousel = document.querySelector('.carousel');\n if (must_continue === 0\n || carousel === null\n || carousel.offsetWidth === 0) {\n no_more_ads();\n return;\n }\n const a = _retrieveLinkCarousel(carousel)\n a.innerHTML = \"\"\n const image = document.createElement('img')\n const text_container = document.createElement('div')\n const text = document.createElement('h4')\n const promoted = document.createElement('p')\n\n promoted.classList.add('promoted-tag')\n promoted.innerText = \"Promocionado\"\n image.src = ad.img\n image.alt = \"\"\n text.innerText = ad.text\n a.href = ad.href\n\n a.append(image)\n text_container.append(promoted)\n text_container.append(text)\n a.append(text_container)\n\n window.setTimeout(() => {\n loadAd()\n }, ad.seconds * 1000)\n }).catch(() => {\n window.setTimeout(() => {\n loadAd()\n }, 1000)\n });\n}\n\nfunction _retrieveLinkCarousel(carousel) {\n const maybeA = carousel.querySelector('a')\n if (maybeA !== null) {\n return maybeA\n }\n const a = document.createElement('a')\n carousel.innerHTML = \"\"\n carousel.append(a)\n return a\n}\n\n\n//# sourceURL=webpack://BurguillosInfo/./js-src/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var tablesort__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tablesort */ \"./node_modules/tablesort/src/tablesort.js\");\n/* harmony import */ var tablesort__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tablesort__WEBPACK_IMPORTED_MODULE_0__);\n\n\nwindow.Tablesort = __webpack_require__(/*! tablesort */ \"./node_modules/tablesort/src/tablesort.js\");\n__webpack_require__(/*! tablesort/src/sorts/tablesort.number */ \"./node_modules/tablesort/src/sorts/tablesort.number.js\");\n\nlet fakeSearchInput\nlet searchMobile\nwindow.onload = () => {\n const menu_expand = document.querySelector('a.menu-expand');\n const mobile_foldable = document.querySelector('nav.mobile-foldable');\n const tables = document.querySelectorAll('table')\n\n loadAd()\n addEasterEggAnimation()\n\n if (menu_expand !== null && mobile_foldable !== null) {\n menu_expand.addEventListener('click', () => {\n mobile_foldable.classList.toggle('show');\n });\n }\n\n for (const table of tables) {\n const header = table.querySelector('tr');\n if (header !== null) {\n header.setAttribute('data-sort-method', 'none')\n for (const th of header.querySelectorAll('th')) {\n if (th.getAttribute('data-sort-method') == null) {\n th.setAttribute('data-sort-method', 'thead')\n }\n }\n }\n new (tablesort__WEBPACK_IMPORTED_MODULE_0___default())(table)\n }\n if (window !== undefined && window.Android !== undefined) {\n executeAndroidExclusiveCode(Android)\n } \n searchMobile = document.querySelector('nav.mobile-shortcuts div.search')\n fakeSearchInput = searchMobile.querySelector('input')\n addListenersSearch()\n};\n\nfunction addListenersSearch() {\n if (searchMobile !== null) {\n searchMobile.addEventListener('click', onFakeSearchClick);\n fakeSearchInput.addEventListener('change', (e) => {\n if (fakeSearchInput.value !== \"\") {\n const searchOverlay = document.querySelector('div.search-overlay');\n const searchInput = searchOverlay.querySelector('div.search input');\n searchInput.value = fakeSearchInput.value;\n onSearchChange(e)\n }\n onFakeSearchClick(e)\n });\n }\n const exitSearch = document.querySelector('a.exit-search')\n if (exitSearch !== null) {\n exitSearch.addEventListener('click', onExitSearch)\n }\n const search = document.querySelector('div.search-overlay div.search input');\n if (search !== null) {\n search.addEventListener('change', onSearchChange);\n }\n}\n\nfunction onSearchChange() {\n const search = document.querySelector('div.search-overlay div.search input');\n const searchResults = document.querySelector('div.search-overlay div.search-results');\n if (search === null || searchResults === null) {\n return;\n }\n const query = search.value;\n fakeSearchInput.value = search.value\n const url = new URL(window.location.protocol\n + \"//\"\n + window.location.hostname\n + \":\"\n + window.location.port\n + '/search.json');\n url.searchParams.set('q', query);\n fetch(url).then(async (res) => {\n const json = await res.json()\n if (!json.ok) {\n noResults(searchResults);\n return\n }\n console.log(json.searchObjects.length)\n if (json.searchObjects.length < 1) {\n noResults(searchResults);\n return;\n }\n showResults(searchResults, json.searchObjects);\n })\n search.focus()\n}\n\nfunction showResults(searchResults, searchObjects) {\n searchResults.innerHTML = \"\";\n for (let searchObject of searchObjects) {\n const searchResultContainer = document.createElement('div')\n searchResultContainer.classList.add('search-result')\n const title = document.createElement('b')\n const url = document.createElement('a')\n const content = document.createElement('p')\n\n title.innerText = searchObject.title\n if (searchObject.url.match(/^\\//)) {\n searchObject.url = window.location.protocol \n + \"//\" + window.location.hostname \n + \":\" + window.location.port \n + searchObject.url\n }\n url.href = searchObject.url\n url.innerText = searchObject.url\n content.innerText = searchObject.content\n\n searchResultContainer.appendChild(title)\n searchResultContainer.appendChild(document.createElement('br'))\n searchResultContainer.appendChild(url)\n searchResultContainer.appendChild(content)\n searchResults.appendChild(searchResultContainer)\n }\n}\n\nfunction noResults(searchResults) {\n searchResults.innerHTML = \"\"\n const p = document.createElement('p')\n p.innerText = 'No se han encontrado resultados.'\n searchResults.appendChild(p)\n}\n\nfunction onExitSearch() {\n const searchOverlay = document.querySelector('div.search-overlay');\n if (searchOverlay !== null) {\n searchOverlay.classList.toggle('active');\n }\n}\n\nfunction onFakeSearchClick(e) {\n e.preventDefault();\n const searchOverlay = document.querySelector('div.search-overlay');\n if (searchOverlay === null) {\n return\n }\n searchOverlay.classList.toggle('active');\n const search = searchOverlay.querySelector('div.search input');\n if (search !== null) {\n search.focus()\n }\n return false;\n}\n\nfunction absoluteToHost(imageUrl) {\n if (imageUrl.match(/^\\//)) {\n imageUrl = window.location.protocol + \"//\" + window.location.host + imageUrl \n }\n return imageUrl.replace(/\\?.*$/, '');\n}\n\nfunction addListenerOpenInBrowserButton(android) {\n const openInBrowserLink = document.querySelector('a.open-in-browser')\n if (openInBrowserLink === null) {\n return\n }\n openInBrowserLink.addEventListener('click', () => {\n android.openInBrowser(window.location.href)\n })\n}\nfunction executeAndroidExclusiveCode(android) {\n document.querySelectorAll('*.android').forEach((element) => {\n element.classList.remove('android')\n })\n addListenerOpenInBrowserButton(android)\n const pinToHomeUrl = document.querySelector('a.pin-to-home')\n if (pinToHomeUrl === null) {\n return;\n }\n pinToHomeUrl.addEventListener('click', () => {\n const url = new URL(window.location.href)\n const pathandQuery = url.pathname + url.search;\n const label = (url.pathname.replace(/^.*\\//g, '')\n .replace(/(?:^|-)\\w/g, function(character) {\n return character.toUpperCase() \n })\n .replace(/-/g, ' ')) + ' - Burguillos.info';\n const firstImg = document.querySelector('div.description img');\n let iconUrl;\n if (firstImg !== null) {\n if (!firstImg.src.match(/\\.svg(?:\\?|$)/)) {\n iconUrl = absoluteToHost(firstImg.src);\n }\n }\n if (iconUrl === undefined) {\n const imagePreview = document.querySelector('meta[name=\"image\"]');\n iconUrl = absoluteToHost(imagePreview.content);\n }\n android.pinPage(pathandQuery, label, iconUrl)\n })\n}\n\nfunction addEasterEggAnimation() {\n const logoContainer = document.querySelector('div.burguillos-logo-container')\n if (logoContainer === null) {\n return;\n }\n logoContainer.addEventListener('click', () => {\n logoContainer.classList.toggle('active')\n })\n}\n\nlet current_ad_number = null\n\nfunction expand_page_contents() {\n const page_contents = document.querySelector('div.page-contents'); \n if (page_contents === null) {\n return;\n }\n page_contents.classList.add('no-carousel');\n}\n\nfunction no_more_ads() {\n const carousel = document.querySelector('.carousel');\n if (carousel !== null) {\n carousel.remove();\n }\n expand_page_contents();\n}\n\nfunction loadAd() {\n const params = new URLSearchParams();\n if (current_ad_number !== null) {\n params.append('n', \"\"+current_ad_number);\n }\n fetch('/next-ad.json?' + params).then((res) => {\n return res.json()\n }).then((res) => {\n current_ad_number = res.current_ad_number\n const ad = res.ad\n const must_continue = res.continue\n const carousel = document.querySelector('.carousel');\n if (must_continue === 0\n || carousel === null\n || carousel.offsetWidth === 0) {\n no_more_ads();\n return;\n }\n const a = _retrieveLinkCarousel(carousel)\n a.innerHTML = \"\"\n const image = document.createElement('img')\n const text_container = document.createElement('div')\n const text = document.createElement('h4')\n const promoted = document.createElement('p')\n\n promoted.classList.add('promoted-tag')\n promoted.innerText = \"Promocionado\"\n image.src = ad.img\n image.alt = \"\"\n text.innerText = ad.text\n a.href = ad.href\n\n a.append(image)\n text_container.append(promoted)\n text_container.append(text)\n a.append(text_container)\n\n window.setTimeout(() => {\n loadAd()\n }, ad.seconds * 1000)\n }).catch(() => {\n window.setTimeout(() => {\n loadAd()\n }, 1000)\n });\n}\n\nfunction _retrieveLinkCarousel(carousel) {\n const maybeA = carousel.querySelector('a')\n if (maybeA !== null) {\n return maybeA\n }\n const a = document.createElement('a')\n carousel.innerHTML = \"\"\n carousel.append(a)\n return a\n}\n\n\n//# sourceURL=webpack://BurguillosInfo/./js-src/index.js?"); /***/ }), diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index 3131cc4..5e7c7b1 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -35,7 +35,7 @@
diff --git a/templates/page/_search_bar.html.ep b/templates/page/_search_bar.html.ep index 11fd6a0..cde3202 100644 --- a/templates/page/_search_bar.html.ep +++ b/templates/page/_search_bar.html.ep @@ -1,4 +1,4 @@ -