editorial-autogestiva-jekyll-theme 0.2.7 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -2
  3. data/_config.yml +73 -0
  4. data/_data/en.yml +129 -27
  5. data/_data/es.yml +111 -31
  6. data/_data/forms/billing_address.yml +71 -0
  7. data/_data/forms/contacto.yml +2 -2
  8. data/_data/forms/shipping_address.yml +76 -0
  9. data/_data/forms/user.yml +11 -0
  10. data/_data/layouts/book.yml +82 -93
  11. data/_data/layouts/cart.yml +198 -0
  12. data/_data/layouts/confirmation.yml +68 -0
  13. data/_data/layouts/menu.yml +65 -0
  14. data/_data/layouts/payment.yml +114 -0
  15. data/_data/layouts/post.yml +0 -1
  16. data/_data/layouts/shipment.yml +126 -0
  17. data/_includes/boolean.html +30 -0
  18. data/_includes/cart.svg +1 -0
  19. data/_includes/cart_add.html +8 -0
  20. data/_includes/cart_controller.html +10 -0
  21. data/_includes/contact.html +6 -5
  22. data/_includes/content.html +1 -0
  23. data/_includes/country.html +53 -0
  24. data/_includes/editorial.html +24 -30
  25. data/_includes/email.html +1 -0
  26. data/_includes/file.html +35 -0
  27. data/_includes/floating_alert.html +6 -0
  28. data/_includes/footer.html +10 -8
  29. data/_includes/form/boolean.html +1 -0
  30. data/_includes/form/content.html +1 -0
  31. data/_includes/form/email.html +1 -0
  32. data/_includes/form/file.html +1 -0
  33. data/_includes/form/hidden.html +1 -0
  34. data/_includes/form/image.html +1 -0
  35. data/_includes/form/input.html +1 -0
  36. data/_includes/form/markdown_content.html +1 -0
  37. data/_includes/form/number.html +1 -0
  38. data/_includes/form/predefined_array.html +1 -0
  39. data/_includes/form/section.html +1 -0
  40. data/_includes/form/separator.html +1 -0
  41. data/_includes/form/string.html +1 -0
  42. data/_includes/form/submit.html +1 -0
  43. data/_includes/form/tel.html +1 -0
  44. data/_includes/form/text.html +1 -0
  45. data/_includes/form/url.html +1 -0
  46. data/_includes/hidden.html +5 -0
  47. data/_includes/image.html +32 -0
  48. data/_includes/input.html +45 -0
  49. data/_includes/item.html +38 -0
  50. data/_includes/markdown_content.html +1 -0
  51. data/_includes/menu.html +27 -0
  52. data/_includes/navbar.html +29 -25
  53. data/_includes/notification.html +5 -0
  54. data/_includes/number.html +1 -0
  55. data/_includes/password.html +1 -0
  56. data/_includes/picture.html +23 -0
  57. data/_includes/postal_code.html +45 -0
  58. data/_includes/predefined_array.html +39 -0
  59. data/_includes/preload_font.html +1 -0
  60. data/_includes/search.html +25 -0
  61. data/_includes/section.html +1 -0
  62. data/_includes/separator.html +1 -0
  63. data/_includes/share.html +22 -0
  64. data/_includes/share_box.html +16 -0
  65. data/_includes/state.html +53 -0
  66. data/_includes/string.html +3 -0
  67. data/_includes/submit.html +1 -0
  68. data/_includes/tel.html +1 -0
  69. data/_includes/text.html +32 -0
  70. data/_includes/url.html +1 -0
  71. data/_layouts/book.html +42 -84
  72. data/_layouts/cart.html +72 -0
  73. data/_layouts/confirmation.html +17 -0
  74. data/_layouts/default.html +30 -10
  75. data/_layouts/home.html +23 -13
  76. data/_layouts/payment.html +21 -0
  77. data/_layouts/post.html +5 -5
  78. data/_layouts/shipment.html +52 -0
  79. data/_sass/accessibility.scss +37 -0
  80. data/_sass/editor.scss +8 -0
  81. data/_sass/embed.scss +5 -0
  82. data/_sass/floating_alert.scss +10 -0
  83. data/_sass/helpers.scss +318 -0
  84. data/_sass/logic.scss +17 -0
  85. data/_sass/menu.scss +20 -0
  86. data/_sass/share.html +12 -0
  87. data/_sass/share_box.html +16 -0
  88. data/_sass/share_box.scss +26 -0
  89. data/_sass/snap.scss +58 -0
  90. data/_sass/toggler.scss +39 -0
  91. data/assets/css/styles.scss +41 -5
  92. data/assets/data/site.json +24 -0
  93. data/assets/fonts/forkawesome-webfont.woff2 +0 -0
  94. data/assets/js/pack.js +16 -0
  95. data/assets/js/pack.js.map +1 -0
  96. data/assets/js/script.js +44 -0
  97. data/assets/templates/alert.html +7 -0
  98. data/assets/templates/cart.html +65 -0
  99. data/assets/templates/payment_methods.html +41 -0
  100. data/assets/templates/recover_order.html +11 -0
  101. data/assets/templates/results.html +17 -0
  102. data/assets/templates/shipping_methods.html +36 -0
  103. metadata +231 -33
  104. data/README.md.orig +0 -118
  105. data/_includes/boolean.html +0 -1
  106. data/_includes/contact.html.orig +0 -55
  107. data/_includes/email.html +0 -1
  108. data/_includes/form/boolean.html +0 -30
  109. data/_includes/form/email.html +0 -1
  110. data/_includes/form/hidden.html +0 -5
  111. data/_includes/form/input.html +0 -33
  112. data/_includes/form/number.html +0 -1
  113. data/_includes/form/predefined_array.html +0 -39
  114. data/_includes/form/section.html +0 -1
  115. data/_includes/form/separator.html +0 -1
  116. data/_includes/form/string.html +0 -3
  117. data/_includes/form/submit.html +0 -1
  118. data/_includes/form/text.html +0 -32
  119. data/_includes/form/url.html +0 -1
  120. data/_includes/hidden.html +0 -1
  121. data/_includes/input.html +0 -1
  122. data/_includes/navbar.html.orig +0 -44
  123. data/_includes/number.html +0 -1
  124. data/_includes/predefined_array.html +0 -1
  125. data/_includes/section.html +0 -1
  126. data/_includes/separator.html +0 -1
  127. data/_includes/string.html +0 -1
  128. data/_includes/submit.html +0 -1
  129. data/_includes/text.html +0 -1
  130. data/_includes/url.html +0 -1
  131. data/_sass/home.scss +0 -22
@@ -0,0 +1 @@
1
+ {% include text.html field=field %}
@@ -0,0 +1,53 @@
1
+ {% if include.form %}
2
+ {%- assign name = include.field[0] | append: ']' | prepend: '[' | prepend: include.form -%}
3
+ {%- assign id = include.field[1].id | default: name | replace: '[', '_' | remove: ']' -%}
4
+ {% else %}
5
+ {%- assign name = include.field[0] -%}
6
+ {%- assign id = include.field[1].id | default: name %}
7
+ {% endif %}
8
+
9
+ {%- assign label = include.field[1].label[site.locale] -%}
10
+ {%- assign help = include.field[1].help[site.locale] -%}
11
+ {%- assign error = include.field[1].error[site.locale] -%}
12
+ {%- assign autocomplete = include.field[1].autocomplete -%}
13
+
14
+ <div class="form-group" data-controller="country" data-country-group="{{ include.field[1].group }}">
15
+ <label for="{{ id }}">
16
+ {{ label }}
17
+ {% if include.field[1].required %}*{% endif %}
18
+ </label>
19
+
20
+ <input data-target="country.id" type="hidden" name="{{ name }}" id="{{ id }}" value="" />
21
+ <input data-target="country.iso" type="hidden" name="{{ include.form }}_ignore_{{ include.field[0] }}_iso" value="" />
22
+
23
+ <input
24
+ data-target="country.name"
25
+ {% if help %}
26
+ aria-describedby="help-{{ id }}"
27
+ {% endif %}
28
+ {% if include.field[1].required %}
29
+ required
30
+ {% endif %}
31
+ type="{{ include.field[1].type }}"
32
+ {% if autocomplete %}
33
+ autocomplete="{{ autocomplete }}"
34
+ {% endif %}
35
+ name="{{ include.form }}_ignore_{{ include.field[0] }}"
36
+ id="{{ include.form }}_ignore_{{ include.field[0] }}"
37
+ disabled
38
+ list="list-{{ id }}"
39
+ class="form-control" />
40
+
41
+ {%- if error -%}
42
+ <div class="invalid-feedback">{{ error }}</div>
43
+ {%- endif -%}
44
+
45
+ {%- if help -%}
46
+ <small id="help-{{ id }}" class="form-text">
47
+ {{ help }}
48
+ </small>
49
+ {%- endif -%}
50
+
51
+ <datalist id="list-{{ id }}" data-target="country.list">
52
+ </datalist>
53
+ </div>
@@ -1,19 +1,23 @@
1
- <article id="editorial" class="col h-card" itemscope itemtype="https://schema.org/Organization">
2
- <div class="media">
3
- <img
4
- itemprop="logo"
5
- class="u-photo"
6
- src="{{ include.editorial.logo.path | thumbnail: 100 }}"
7
- alt="{{ include.editorial.logo.description }}" />
8
-
9
- <div class="media-body">
10
- <h1 class="p-name" itemprop="name">{{ include.editorial.title }}</h1>
11
- <p class="lead">{{ include.editorial.description }}</p>
1
+ <article id="editorial" class="h-card" itemscope itemtype="https://schema.org/Organization">
2
+ <div class="row no-gutters mb-3">
3
+ <div class="col-12 col-md-4 mb-3 mb-md-0">
4
+ {%- include_cached
5
+ picture.html
6
+ image=include.editorial.logo
7
+ itemprop='logo' -%}
12
8
  </div>
13
9
 
10
+ <header class="col-12 col-md pl-3">
11
+ <h1 class="p-name" itemprop="name">
12
+ <a href="{{ include.editorial.url }}">
13
+ {{ include.editorial.title }}
14
+ </a>
15
+ </h1>
16
+ <p class="lead">{{ include.editorial.description }}</p>
17
+ </header>
14
18
  </div>
15
19
 
16
- <div itemprop="location" itemscope itemtype="https://schema.org/PostalAddress">
20
+ <address itemprop="location" itemscope itemtype="https://schema.org/PostalAddress">
17
21
  {%- if include.editorial.address -%}
18
22
  <p class="p-street-address" itemprop="streetAddress">{{ include.editorial.address }}</p>
19
23
  {%- endif -%}
@@ -23,26 +27,16 @@
23
27
  {%- if include.editorial.country -%}
24
28
  <p class="p-country-name" itemprop="addressCountry">{{ include.editorial.country }}</p>
25
29
  {%- endif -%}
26
- </div>
30
+ </address>
27
31
 
28
- <ul>
32
+ <ul class="list-unstyled">
29
33
  {%- for social in include.editorial.social_networks -%}
30
- <li><a rel="me" href="{{ social }}">
31
- {% comment %}
32
-
33
- Obtenemos la URL de la red social, eliminamos la www,
34
- obtenemos el tercer elemento separando por / y el primero
35
- separando por .
36
-
37
- https://www.twitter.com/SuttyWeb
38
- https://twitter.com/SuttyWeb
39
- twitter.com
40
- twitter
41
- Twitter
42
- {% endcomment %}
43
- {% assign s = social | remove: 'www.' | split: '/' %}
44
- {{ s[2] | split: '.' | first | capitalize }}
45
- </a></li>
34
+ {% assign network = social | social_network %}
35
+ <li>
36
+ <a
37
+ target="_blank"
38
+ rel="noopener noreferrer me"
39
+ href="{{ social }}">{{ network.name | capitalize }}</a></li>
46
40
  {%- endfor -%}
47
41
  </ul>
48
42
 
@@ -0,0 +1 @@
1
+ {% include input.html field=field %}
@@ -0,0 +1,35 @@
1
+ {%- assign name = include.field[0] -%}
2
+ {%- assign id = include.field[1].id | default: name -%}
3
+ {%- assign label = include.field[1]['path'].label[site.locale] -%}
4
+ {%- assign help = include.field[1]['path'].help[site.locale] -%}
5
+ {%- assign accept = include.field[1].accept -%}
6
+
7
+ <label>{{ label }}</label>
8
+
9
+ <div class="custom-file">
10
+ <input
11
+ {% if help %}
12
+ aria-describedby="help-{{ id }}"
13
+ {% endif %}
14
+ {% if include.field[1].required %}
15
+ required
16
+ {% endif %}
17
+ type="{{ include.field[1].type }}"
18
+ name="{{ name }}[path]"
19
+ id="{{ id }}_path"
20
+ {% if accept %}
21
+ accept="{{ accept }}"
22
+ {% endif %}
23
+ class="custom-file-input" />
24
+
25
+ <label for="{{ id }}_path" class="custom-file-label">
26
+ {{ label }}
27
+ {% if include.field[1].required %}*{% endif %}
28
+ </label>
29
+
30
+ {%- if help -%}
31
+ <small id="help-{{ id }}" class="form-text">
32
+ {{ help }}
33
+ </small>
34
+ {%- endif -%}
35
+ </div>
@@ -0,0 +1,6 @@
1
+ <div
2
+ data-controller="floating-alert"
3
+ class="pointer-event-none floating-alert floating-alert-bottom d-flex justify-content-center w-100 position-fixed fade hide"
4
+ role="status" aria-live="polite" aria-atomic="true">
5
+ <div data-target="floating-alert.content" class="floating-alert-content white background-black-t4"></div>
6
+ </div>
@@ -1,12 +1,14 @@
1
- <footer>
2
- <div class="row align-items-end">
3
- {%- if include.footer -%}
4
- {% assign editorial = site.posts | where: 'layout', 'editorial' | first %}
5
- {% include_cached editorial.html editorial=editorial %}
6
- {%- endif -%}
1
+ <footer class="border-top pt-3 container">
2
+ <div class="row">
3
+ <div class="col">
4
+ {%- if include.footer -%}
5
+ {% assign editorial = site.posts | where: 'layout', 'editorial' | first %}
6
+ {% include_cached editorial.html editorial=editorial %}
7
+ {%- endif -%}
8
+ </div>
7
9
 
8
- <div class="col text-right">
9
- <ul class="">
10
+ <div class="col d-flex flex-column align-items-end justify-content-end">
11
+ <ul class="list-unstyled">
10
12
  {%- for link in site.i18n.footer.links %}
11
13
  <li>
12
14
  <a href="{{ link.url }}">{{ link.text }}</a>
@@ -0,0 +1 @@
1
+ ../boolean.html
@@ -0,0 +1 @@
1
+ ../content.html
@@ -0,0 +1 @@
1
+ ../email.html
@@ -0,0 +1 @@
1
+ ../file.html
@@ -0,0 +1 @@
1
+ ../hidden.html
@@ -0,0 +1 @@
1
+ ../image.html
@@ -0,0 +1 @@
1
+ ../input.html
@@ -0,0 +1 @@
1
+ ../markdown_content.html
@@ -0,0 +1 @@
1
+ ../number.html
@@ -0,0 +1 @@
1
+ ../predefined_array.html
@@ -0,0 +1 @@
1
+ ../section.html
@@ -0,0 +1 @@
1
+ ../separator.html
@@ -0,0 +1 @@
1
+ ../string.html
@@ -0,0 +1 @@
1
+ ../submit.html
@@ -0,0 +1 @@
1
+ ../tel.html
@@ -0,0 +1 @@
1
+ ../text.html
@@ -0,0 +1 @@
1
+ ../url.html
@@ -0,0 +1,5 @@
1
+ {%- assign name = include.field[0] -%}
2
+ {%- assign id = include.field[1].id | default: name -%}
3
+ {%- assign value = include.field[1].value -%}
4
+
5
+ <input type="hidden" value="{{ value }}" name="{{ name }}" id="{{ id }}" />
@@ -0,0 +1,32 @@
1
+ {%- assign name = include.field[0] -%}
2
+ {%- assign id = include.field[1].id | default: name -%}
3
+ {%- assign label = include.field[1]['path'].label[site.locale] -%}
4
+ {%- assign help = include.field[1]['path'].help[site.locale] -%}
5
+
6
+ <label>{{ label }}</label>
7
+
8
+ <div class="custom-file">
9
+ <input
10
+ {% if help %}
11
+ aria-describedby="help-{{ id }}"
12
+ {% endif %}
13
+ {% if include.field[1].required %}
14
+ required
15
+ {% endif %}
16
+ type="{{ include.field[1].type }}"
17
+ name="{{ name }}[path]"
18
+ id="{{ id }}_path"
19
+ accept="image/*"
20
+ class="custom-file-input" />
21
+
22
+ <label for="{{ id }}_path" class="custom-file-label">
23
+ {{ label }}
24
+ {% if include.field[1].required %}*{% endif %}
25
+ </label>
26
+
27
+ {%- if help -%}
28
+ <small id="help-{{ id }}" class="form-text">
29
+ {{ help }}
30
+ </small>
31
+ {%- endif -%}
32
+ </div>
@@ -0,0 +1,45 @@
1
+ {% if include.form %}
2
+ {%- assign name = include.field[0] | append: ']' | prepend: '[' | prepend: include.form -%}
3
+ {%- assign id = include.field[1].id | default: name | replace: '[', '_' | remove: ']' -%}
4
+ {% else %}
5
+ {%- assign name = include.field[0] -%}
6
+ {%- assign id = include.field[1].id | default: name %}
7
+ {% endif %}
8
+
9
+ {%- assign label = include.field[1].label[site.locale] -%}
10
+ {%- assign help = include.field[1].help[site.locale] -%}
11
+ {%- assign error = include.field[1].error[site.locale] -%}
12
+ {%- assign autocomplete = include.field[1].autocomplete -%}
13
+
14
+ <div class="form-group">
15
+ <label for="{{ id }}">
16
+ {{ label }}
17
+ {% if include.field[1].required %}*{% endif %}
18
+ </label>
19
+
20
+ <input
21
+ {{ include.field[1].extra.input }}
22
+ {% if help %}
23
+ aria-describedby="help-{{ id }}"
24
+ {% endif %}
25
+ {% if include.field[1].required %}
26
+ required
27
+ {% endif %}
28
+ type="{{ include.field[1].type }}"
29
+ name="{{ name }}"
30
+ id="{{ id }}"
31
+ {% if autocomplete %}
32
+ autocomplete="{{ autocomplete }}"
33
+ {% endif %}
34
+ class="form-control" />
35
+
36
+ {%- if error -%}
37
+ <div class="invalid-feedback">{{ error }}</div>
38
+ {%- endif -%}
39
+
40
+ {%- if help -%}
41
+ <small id="help-{{ id }}" class="form-text">
42
+ {{ help }}
43
+ </small>
44
+ {%- endif -%}
45
+ </div>
@@ -0,0 +1,38 @@
1
+ {%- comment -%}
2
+ El ítem tiene un dropdown si tiene sub ítems o si tiene categorías.
3
+ {%- endcomment -%}
4
+ {%- assign dropdown = include.item.items | present -%}
5
+ {%- unless dropdown -%}
6
+ {%- assign dropdown = include.item.categories | present -%}
7
+ {%- endunless -%}
8
+
9
+ <div class="nav-item w-100 w-lg-auto {{ dropdown | value_if: 'dropdown d-flex flex-wrap' }}">
10
+ {%- comment -%}
11
+ La URL del item puede ser:
12
+ * El artículo vinculado
13
+ * El vínculo escrito manualmente
14
+ * La primera categoría de la lista
15
+ * La dirección propia (en el caso de categorías)
16
+ {%- endcomment -%}
17
+ <a
18
+ href="{{ include.item.post.url | default: include.item.link | default: include.item.categories[0].url | default: include.item.url }}"
19
+ class="nav-link flex-grow-1 flex-grow-lg-0">
20
+ {{ include.item.title }}
21
+ </a>
22
+
23
+ {%- if dropdown -%}
24
+ <button class="dropdown-toggle border-0 background-white w-5 w-lg-auto pl-lg-3"></button>
25
+ <div class="dropdown-menu w-100 w-lg-auto flex-grow-1 flex-grow-lg-0">
26
+ {% for item in include.item.items %}
27
+ {%- include_cached item.html item=item -%}
28
+ {% endfor %}
29
+
30
+ {%- comment -%}
31
+ Esto necesita `replace` en sutty-archives
32
+ {%- endcomment -%}
33
+ {%- for item in include.item.categories offset: 1 -%}
34
+ {%- include_cached item.html item=item -%}
35
+ {%- endfor -%}
36
+ </div>
37
+ {%- endif -%}
38
+ </div>
@@ -0,0 +1 @@
1
+ {% include text.html field=field %}
@@ -0,0 +1,27 @@
1
+ {%- comment -%}
2
+ Empezamos con los ítems que no dependen de otros e implementamos
3
+ recursivamente.
4
+ {%- endcomment -%}
5
+ {%- assign items = site.posts | where: 'layout', 'menu' | where: 'item', nil -%}
6
+
7
+ <nav class="navbar navbar-expand-lg navbar-light">
8
+ <button class="navbar-toggler"
9
+ type="button"
10
+ data-toggle="collapse"
11
+ data-target="#menu"
12
+ aria-label="{{ site.i18n.menu.title }}">
13
+ <span class="navbar-toggler-icon"></span>
14
+ </button>
15
+
16
+ <div class="collapse navbar-collapse" id="menu">
17
+ <div class="navbar-nav w-100 d-flex align-items-start justify-content-center">
18
+ {% for item in items %}
19
+ {%- include_cached item.html item=item -%}
20
+ {% endfor %}
21
+
22
+ <div class="nav-item w-100 w-lg-auto">
23
+ {%- include_cached search.html -%}
24
+ </div>
25
+ </div>
26
+ </div>
27
+ </nav>
@@ -1,33 +1,37 @@
1
- {% assign editorial = site.posts | where: 'layout', 'editorial' | first %}
1
+ {%- assign items = site.posts | where: 'layout', 'menu' | where: 'item', nil -%}
2
2
 
3
- <nav class="navbar navbar-expand-lg navbar-light bg-light d-print-block" role="navigation" aria-label="{{ site.i18n.menu.title }}">
4
- <a class="navbar-brand" href="">
3
+ <nav class="navbar navbar-expand-lg navbar-light d-print-block" role="navigation" aria-label="{{ site.i18n.menu.title }}">
4
+ <a class="navbar-brand w-100 w-lg-auto" href="?">
5
5
  {{ site.title }}
6
6
  </a>
7
7
 
8
- {% comment %}
9
- TODO: Add CSS-only hamburger menu.
10
- {% endcomment %}
11
- <ul class="navbar-nav d-print-none">
12
- {%- for item in site.i18n.menu.items -%}
13
- {% comment %}
14
- This makes it hard to just cache the whole navbar, but we prefer
15
- to mark the active item in code rather than with JS.
16
- {% endcomment %}
8
+ <button class="navbar-toggler"
9
+ type="button"
10
+ data-toggle="collapse"
11
+ data-target="#menu"
12
+ aria-label="{{ site.i18n.menu.title }}">
13
+ <span class="navbar-toggler-icon"></span>
14
+ </button>
17
15
 
18
- {% assign url = item.url | liquify %}
16
+ <div class="collapse navbar-collapse order-last order-md-2" id="menu">
17
+ <div class="navbar-nav w-100 d-flex align-items-start justify-content-center">
18
+ {% for item in items %}
19
+ {%- include_cached item.html item=item -%}
20
+ {% endfor %}
19
21
 
20
- <li class="nav-item">
21
- <a class="nav-link{% if page.url == url %} active{% endif %}" href="{{ url }}">
22
- {{ item.text }}
22
+ {% comment %}
23
+ <div class="nav-item w-100 w-lg-auto">
24
+ {%- include_cached search.html -%}
25
+ </div>
26
+ {% endcomment %}
27
+ </div>
28
+ </div>
23
29
 
24
- {%- if page.url == url -%}
25
- <span class="sr-only">
26
- {{ site.i18n.menu.active | default: '(current)' }}
27
- </span>
28
- {%- endif -%}
29
- </a>
30
- </li>
31
- {%- endfor -%}
32
- </ul>
30
+ <a class="black pr-lg-3 pl-lg-3 order-md-last" href="{{ site.cart.url }}">
31
+ <span class="d-flex align-items-center justify-content-center" data-controller="cart-counter">
32
+ <i class="fa fa-fw fa-2x fa-shopping-cart"></i>
33
+ <span class="sr-only">{{ site.cart.title }}</span>
34
+ <span class="font-weight-bold ml-1" data-target="cart-counter.counter">0</span>
35
+ </span>
36
+ </a>
33
37
  </nav>