recursero-jekyll-theme 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +168 -0
  3. data/README.md +113 -0
  4. data/_data/en.yml +38 -0
  5. data/_data/es.yml +49 -0
  6. data/_data/forms/contacto.yml +40 -0
  7. data/_data/layouts/about.yml +109 -0
  8. data/_data/layouts/category.yml +106 -0
  9. data/_data/layouts/page.yml +124 -0
  10. data/_data/layouts/place.yml +186 -0
  11. data/_data/layouts/post.yml +124 -0
  12. data/_includes/boolean.html +30 -0
  13. data/_includes/burger.svg +1 -0
  14. data/_includes/contact.html +19 -0
  15. data/_includes/content.html +1 -0
  16. data/_includes/email.html +1 -0
  17. data/_includes/file.html +35 -0
  18. data/_includes/footer.html +14 -0
  19. data/_includes/form/boolean.html +1 -0
  20. data/_includes/form/content.html +1 -0
  21. data/_includes/form/email.html +1 -0
  22. data/_includes/form/file.html +1 -0
  23. data/_includes/form/hidden.html +1 -0
  24. data/_includes/form/image.html +1 -0
  25. data/_includes/form/input.html +1 -0
  26. data/_includes/form/markdown_content.html +1 -0
  27. data/_includes/form/number.html +1 -0
  28. data/_includes/form/predefined_array.html +1 -0
  29. data/_includes/form/section.html +1 -0
  30. data/_includes/form/separator.html +1 -0
  31. data/_includes/form/string.html +1 -0
  32. data/_includes/form/submit.html +1 -0
  33. data/_includes/form/tel.html +1 -0
  34. data/_includes/form/text.html +1 -0
  35. data/_includes/form/url.html +1 -0
  36. data/_includes/hidden.html +5 -0
  37. data/_includes/image.html +32 -0
  38. data/_includes/input.html +33 -0
  39. data/_includes/logo.svg +5 -0
  40. data/_includes/markdown_content.html +1 -0
  41. data/_includes/navbar.html +53 -0
  42. data/_includes/number.html +1 -0
  43. data/_includes/predefined_array.html +39 -0
  44. data/_includes/search.html +15 -0
  45. data/_includes/section.html +1 -0
  46. data/_includes/separator.html +1 -0
  47. data/_includes/share.html +21 -0
  48. data/_includes/share_box.html +16 -0
  49. data/_includes/string.html +3 -0
  50. data/_includes/submit.html +1 -0
  51. data/_includes/tel.html +1 -0
  52. data/_includes/text.html +32 -0
  53. data/_includes/url.html +1 -0
  54. data/_includes/x.svg +1 -0
  55. data/_layouts/about.html +71 -0
  56. data/_layouts/archive.html +21 -0
  57. data/_layouts/category.html +70 -0
  58. data/_layouts/default.html +28 -0
  59. data/_layouts/home.html +23 -0
  60. data/_layouts/page.html +71 -0
  61. data/_layouts/place.html +133 -0
  62. data/_layouts/post.html +84 -0
  63. data/_sass/accessibility.scss +13 -0
  64. data/_sass/embed.scss +5 -0
  65. data/_sass/helpers.scss +54 -0
  66. data/_sass/navbar.scss +56 -0
  67. data/_sass/share.html +12 -0
  68. data/_sass/share_box.html +16 -0
  69. data/_sass/share_box.scss +26 -0
  70. data/_sass/toggler.scss +39 -0
  71. data/assets/css/styles.scss +42 -0
  72. data/assets/css/styles.scss.orig +45 -0
  73. data/assets/fonts/forkawesome-webfont.woff2 +0 -0
  74. data/assets/js/entry.js +8 -0
  75. data/assets/js/script.js +65 -0
  76. data/assets/js/script.js.orig +72 -0
  77. data/assets/js/search.js +3 -0
  78. data/assets/templates/result.html +9 -0
  79. metadata +400 -0
@@ -0,0 +1,13 @@
1
+ * {
2
+ scroll-behavior: smooth;
3
+ }
4
+
5
+ /*
6
+ * Deshabilita animaciones si la usuaria las tiene deshabilitadas
7
+ */
8
+ @media (prefers-reduced-motion: reduce) {
9
+ * {
10
+ scroll-behavior: auto;
11
+ animation: none !important;
12
+ }
13
+ }
@@ -0,0 +1,5 @@
1
+ iframe {
2
+ border: 0;
3
+ width: 100%;
4
+ min-height: 480px;
5
+ }
@@ -0,0 +1,54 @@
1
+ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
2
+
3
+ /*
4
+ * Crea una propiedad con prefijos de navegador
5
+ */
6
+ $vendor-prefixes: ("", "-webkit-", "-ms-", "-o-", "-moz-");
7
+ @mixin vendor-prefix($property, $definition...) {
8
+ @each $prefix in $vendor-prefixes {
9
+ #{$prefix}$property: $definition;
10
+ }
11
+ }
12
+
13
+ /*
14
+ * Crea clases para asignar colores según la lista de colores.
15
+ */
16
+ @each $color, $_ in $colors {
17
+ .background-#{$color} {
18
+ background-color: var(--#{$color});
19
+ }
20
+
21
+ .#{$color} {
22
+ color: var(--#{$color});
23
+
24
+ ::-moz-selection,
25
+ ::selection {
26
+ background: var(--#{$color});
27
+ color: white;
28
+ }
29
+
30
+ svg {
31
+ * {
32
+ fill: var(--#{$color});
33
+ }
34
+ }
35
+
36
+ .form-control {
37
+ border-color: var(--#{$color});
38
+ }
39
+
40
+ .btn {
41
+ background-color: var(--#{$color});
42
+ color: white;
43
+ border-color: var(--#{$color});
44
+ }
45
+
46
+ hr {
47
+ border-color: var(--#{$color});
48
+ }
49
+
50
+ a {
51
+ color: var(--#{$color});
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,56 @@
1
+ .navbar {
2
+ .navbar-brand {
3
+ svg {
4
+ height: 30px;
5
+ }
6
+ }
7
+
8
+ .toggler {
9
+ & + label {
10
+ .icon-open {
11
+ display: block;
12
+ }
13
+
14
+ .icon-close {
15
+ display: none;
16
+ }
17
+
18
+ @include media-breakpoint-down('md') {
19
+ .toggled {
20
+ display: none;
21
+ }
22
+ }
23
+
24
+ @include media-breakpoint-up('md') {
25
+ .toggled {
26
+ visibility: visible !important;
27
+ }
28
+ }
29
+ }
30
+
31
+ &:checked + label {
32
+ @include media-breakpoint-down('md') {
33
+ z-index: 2;
34
+ width: 100vw;
35
+ height: 100vh;
36
+ position: fixed;
37
+ top: 0;
38
+ left: 0;
39
+ background-color: white;
40
+
41
+ .icon-open {
42
+ display: none;
43
+ }
44
+
45
+ .icon-close {
46
+ display: block;
47
+ }
48
+
49
+ .toggled {
50
+ display: block !important;
51
+ z-index: 1;
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
@@ -0,0 +1,12 @@
1
+ {% assign url = site.url | append: include.url | uri_escape %}
2
+ {% assign title = include.title | default: site.title | uri_escape %}
3
+ {% assign description = include.description | default: '' | uri_escape %}
4
+
5
+ <a
6
+ target="_blank"
7
+ title="{{ include.share.title }}"
8
+ class="d-flex flex-column align-items-center p-3"
9
+ href="{{ include.share.url | replace: '%url', url | replace: '%title', title | replace: '%description', description }}">
10
+ <i class="fa fa-fw fa-2x fa-{{ include.share.icon }}"></i>
11
+ <span>{{ include.share.title }}</span>
12
+ </a>
@@ -0,0 +1,16 @@
1
+ <input type="checkbox" id="share" class="toggler" autocomplete="off" />
2
+
3
+ <label class="share btn border btn-block" for="share">
4
+ {{ site.i18n.share.text }}
5
+ <i class="fa fa-{{ site.i18n.share.icon }}"></i>
6
+
7
+ <div class="share-box toggled d-flex align-items-center justify-content-center">
8
+ <div class="box background-white color-redpink row no-gutters align-items-center justify-content-center p-3">
9
+ {% for share in site.i18n.share.items %}
10
+ <div class="col-4">
11
+ {% include_cached share.html share=share url=include.url title=include.title description=include.description %}
12
+ </div>
13
+ {% endfor %}
14
+ </div>
15
+ </div>
16
+ </label>
@@ -0,0 +1,26 @@
1
+ input[type="checkbox"].toggler {
2
+ &:focus + label {
3
+ outline: none;
4
+ }
5
+ }
6
+
7
+ .share-box {
8
+ position: fixed;
9
+ top: 0;
10
+ left: 0;
11
+ width: 100vw;
12
+ height: 100vh;
13
+ background-color: rgba(0,0,0,.5);
14
+
15
+ @include vendor-prefix(transition, all 0.2s $bezier);
16
+
17
+ a {
18
+ border: $border-width solid transparent;
19
+
20
+ &:focus,
21
+ &:hover {
22
+ text-decoration: none;
23
+ border: $border-width solid $border-color;
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Desplegar menúes sin javascript!
3
+ *
4
+ * Inspirado en https://dev.to/cydstumpel/creating-a-fold-out-navigation-with-css-only-4g9k
5
+ */
6
+
7
+ // Comenzamos con un input checkbox con la clase toggler
8
+ input[type="checkbox"].toggler {
9
+ // Lo ocultamos pero todavía queremos que se le pueda dar foco con el
10
+ // teclado
11
+ opacity: 0;
12
+ position: absolute;
13
+
14
+ // Ocultamos el elemento colapsable
15
+ & + label {
16
+ .toggled {
17
+ z-index: 10;
18
+ visibility: hidden;
19
+ }
20
+ }
21
+
22
+ // Al tildar el input, mostramos el elemento
23
+ &:checked + label {
24
+ .toggled {
25
+ visibility: visible;
26
+ }
27
+ }
28
+
29
+ & + label {
30
+ border: none;
31
+ outline: none;
32
+ z-index: 11;
33
+ }
34
+
35
+ // Dar una guía visual de que estamos enfocando el input
36
+ &:focus + label {
37
+ outline: 1px dotted grey ;
38
+ }
39
+ }
@@ -0,0 +1,42 @@
1
+ ---
2
+ # Ponemos un frontmatter porque queremos que Jekyll procese este archivo
3
+ ---
4
+
5
+ $navbar-height: 86px;
6
+ $enable-rounded: false;
7
+ $theme-colors: (
8
+ "recursero": mediumorchid
9
+ );
10
+
11
+ /*
12
+ * XXX: Solo importar los archivos necesarios de bootstrap para
13
+ * facilitar la reducción de CSS. Por ahora pedimos todo para poder
14
+ * empezar a trabajar en el HTML sin pensar en CSS.
15
+ *
16
+ * Los archivos se encuentran en node_modules/bootstrap/scss
17
+ */
18
+ @import "bootstrap/scss/bootstrap";
19
+ @import "fork-awesome/scss/fork-awesome";
20
+ @import "accessibility";
21
+ @import "helpers";
22
+ @import "toggler";
23
+ @import "share_box";
24
+ @import "navbar";
25
+ @import "embed";
26
+
27
+ .navbar {
28
+ margin-bottom: -$navbar-height; /* El alto del navbar */
29
+ }
30
+
31
+ .jumbotron {
32
+ background: #ffc0cb;
33
+ background: linear-gradient(135deg,#ffc0cb -10%, #ffffff 50%, #00ffff 110%);
34
+ background: -webkit-linear-gradient(135deg,#ffc0cb -10%, #ffffff 50%, #00ffff 110%);
35
+ background: -moz-linear-gradient(135deg,#ffc0cb -10%, #ffffff 50%, #00ffff 110%);
36
+
37
+ /* Tomar en cuenta el alto del navbar */
38
+ padding-top: calc(#{$jumbotron-padding} + #{$navbar-height});
39
+ @include media-breakpoint-up(sm) {
40
+ padding-top: calc(#{($jumbotron-padding * 2)} + #{$navbar-height});
41
+ }
42
+ }
@@ -0,0 +1,45 @@
1
+ ---
2
+ # Ponemos un frontmatter porque queremos que Jekyll procese este archivo
3
+ ---
4
+
5
+ $navbar-height: 86px;
6
+ $enable-rounded: false;
7
+ $theme-colors: (
8
+ "recursero": mediumorchid
9
+ );
10
+
11
+ /*
12
+ * XXX: Solo importar los archivos necesarios de bootstrap para
13
+ * facilitar la reducción de CSS. Por ahora pedimos todo para poder
14
+ * empezar a trabajar en el HTML sin pensar en CSS.
15
+ *
16
+ * Los archivos se encuentran en node_modules/bootstrap/scss
17
+ */
18
+ @import "bootstrap/scss/bootstrap";
19
+ @import "fork-awesome/scss/fork-awesome";
20
+ @import "accessibility";
21
+ @import "helpers";
22
+ @import "toggler";
23
+ @import "share_box";
24
+ <<<<<<< HEAD
25
+ @import "navbar";
26
+
27
+ .navbar {
28
+ margin-bottom: -$navbar-height; /* El alto del navbar */
29
+ }
30
+
31
+ .jumbotron {
32
+ background: #ffc0cb;
33
+ background: linear-gradient(135deg,#ffc0cb -10%, #ffffff 50%, #00ffff 110%);
34
+ background: -webkit-linear-gradient(135deg,#ffc0cb -10%, #ffffff 50%, #00ffff 110%);
35
+ background: -moz-linear-gradient(135deg,#ffc0cb -10%, #ffffff 50%, #00ffff 110%);
36
+
37
+ /* Tomar en cuenta el alto del navbar */
38
+ padding-top: calc(#{$jumbotron-padding} + #{$navbar-height});
39
+ @include media-breakpoint-up(sm) {
40
+ padding-top: calc(#{($jumbotron-padding * 2)} + #{$navbar-height});
41
+ }
42
+ }
43
+ =======
44
+ @import "embed";
45
+ >>>>>>> ae133915c865b686fcb7071e1cd2c8c580cb3b8c
@@ -0,0 +1,8 @@
1
+ import lunr from 'lunr'
2
+ import { Liquid } from 'liquidjs'
3
+
4
+ const engine = new Liquid()
5
+
6
+ engine.parseAndRender('', {name: 'alice'}).then(console.log)
7
+
8
+ console.log(resultTemplate)
@@ -0,0 +1,65 @@
1
+ ---
2
+ ---
3
+
4
+ {% node_module lunr/lunr.js %}
5
+ {% node_module lunr-languages/min/lunr.stemmer.support.min.js %}
6
+ {% node_module lunr-languages/min/lunr.es.min.js %}
7
+ {% node_module liquidjs/dist/liquid.browser.min.js %}
8
+
9
+ const loadEvent = () => {
10
+ try {
11
+ if (Turbolinks) return 'turbolinks:load'
12
+ } catch {
13
+ return 'DOMContentLoaded'
14
+ }
15
+ }
16
+
17
+ const renderer = new window.liquidjs.Liquid();
18
+
19
+ /*
20
+ * Buscar y mostrar los resultados
21
+ */
22
+ const q = (_q) => {
23
+ if (!_q || _q === '') return;
24
+
25
+ const _results = document.querySelector('main');
26
+
27
+ document.querySelector('form.search')
28
+ .querySelector('input[name=q]')
29
+ .value = _q;
30
+
31
+ renderer.parseAndRender(
32
+ window.template,
33
+ { results: window.index.search(`${_q}~2`).map(r => window.data.find(a => a.id == r.ref)) })
34
+ .then(html => _results.innerHTML = html);
35
+ }
36
+
37
+ document.addEventListener(loadEvent(), () => {
38
+ /*
39
+ * Solo descargar los datos de búsqueda una vez
40
+ */
41
+ if (!window.data) {
42
+ fetch('data.json').then(res => {
43
+ res.json().then(data => window.data = data);
44
+ fetch('results.liquid').then(r => r.text()).then(t => window.template = t);
45
+ fetch('idx.json').then(res => res.json()).then(idx => window.index = lunr.Index.load(idx));
46
+ });
47
+ }
48
+
49
+ /*
50
+ * Buscar
51
+ */
52
+ document.querySelectorAll('form.search').forEach(form => {
53
+ form.addEventListener('submit', event => {
54
+ event.preventDefault();
55
+ event.stopPropagation();
56
+
57
+ q(form.querySelector('input[name=q]').value);
58
+ });
59
+ });
60
+
61
+ document.querySelectorAll("a[href^='http://'],a[href^='https://'],a[href^='//']").forEach(a => {
62
+ a.rel = "noopener";
63
+ a.target = "_blank";
64
+ });
65
+ });
@@ -0,0 +1,72 @@
1
+ ---
2
+ ---
3
+
4
+ <<<<<<< HEAD
5
+ {% node_module lunr/lunr.js %}
6
+ {% node_module lunr-languages/min/lunr.stemmer.support.min.js %}
7
+ {% node_module lunr-languages/min/lunr.es.min.js %}
8
+ {% node_module liquidjs/dist/liquid.browser.min.js %}
9
+ =======
10
+ const loadEvent = () => {
11
+ try {
12
+ if (Turbolinks) return 'turbolinks:load'
13
+ } catch {
14
+ return 'DOMContentLoaded'
15
+ }
16
+ }
17
+
18
+ document.addEventListener(loadEvent(), () => {
19
+ document.querySelectorAll('.share').forEach(share => {
20
+ share.addEventListener('click', event => {
21
+ if (!Navigator.share) return;
22
+ >>>>>>> ae133915c865b686fcb7071e1cd2c8c580cb3b8c
23
+
24
+ const renderer = new window.liquidjs.Liquid();
25
+
26
+ /*
27
+ * Buscar y mostrar los resultados
28
+ */
29
+ const q = (_q) => {
30
+ if (!_q || _q === '') return;
31
+
32
+ const _results = document.querySelector('main');
33
+
34
+ document.querySelector('form.search')
35
+ .querySelector('input[name=q]')
36
+ .value = _q;
37
+
38
+ renderer.parseAndRender(
39
+ window.template,
40
+ { results: window.index.search(`${_q}~2`).map(r => window.data.find(a => a.id == r.ref)) })
41
+ .then(html => _results.innerHTML = html);
42
+ }
43
+
44
+ document.addEventListener('{%- if site.turbolinks.enabled -%}turbolinks:load{%- else -%}DOMContentLoaded{%- endif -%}', () => {
45
+ /*
46
+ * Solo descargar los datos de búsqueda una vez
47
+ */
48
+ if (!window.data) {
49
+ fetch('data.json').then(res => {
50
+ res.json().then(data => window.data = data);
51
+ fetch('results.liquid').then(r => r.text()).then(t => window.template = t);
52
+ fetch('idx.json').then(res => res.json()).then(idx => window.index = lunr.Index.load(idx));
53
+ });
54
+ }
55
+
56
+ /*
57
+ * Buscar
58
+ */
59
+ document.querySelectorAll('form.search').forEach(form => {
60
+ form.addEventListener('submit', event => {
61
+ event.preventDefault();
62
+ event.stopPropagation();
63
+
64
+ q(form.querySelector('input[name=q]').value);
65
+ });
66
+ });
67
+
68
+ document.querySelectorAll("a[href^='http://'],a[href^='https://'],a[href^='//']").forEach(a => {
69
+ a.rel = "noopener";
70
+ a.target = "_blank";
71
+ });
72
+ });