editorial-autogestiva-jekyll-theme 0.2.3 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md.orig +118 -0
  3. data/_data/en.yml +49 -0
  4. data/_data/es.yml +2 -1
  5. data/_data/forms/contacto.yml +49 -0
  6. data/_data/forms/contacto.yml~ +45 -0
  7. data/_data/layouts/book.yml +22 -0
  8. data/_includes/boolean.html +30 -0
  9. data/_includes/contact.html +16 -29
  10. data/_includes/contact.html.orig +55 -0
  11. data/_includes/editorial.html +14 -22
  12. data/_includes/email.html +1 -0
  13. data/_includes/footer.html +2 -1
  14. data/_includes/form/boolean.html +1 -0
  15. data/_includes/form/email.html +1 -0
  16. data/_includes/form/hidden.html +1 -0
  17. data/_includes/form/input.html +1 -0
  18. data/_includes/form/number.html +1 -0
  19. data/_includes/form/predefined_array.html +1 -0
  20. data/_includes/form/section.html +1 -0
  21. data/_includes/form/separator.html +1 -0
  22. data/_includes/form/string.html +1 -0
  23. data/_includes/form/submit.html +1 -0
  24. data/_includes/form/text.html +1 -0
  25. data/_includes/form/url.html +1 -0
  26. data/_includes/hidden.html +5 -0
  27. data/_includes/input.html +33 -0
  28. data/_includes/navbar.html +7 -3
  29. data/_includes/navbar.html.orig +44 -0
  30. data/_includes/number.html +1 -0
  31. data/_includes/predefined_array.html +39 -0
  32. data/_includes/section.html +1 -0
  33. data/_includes/separator.html +1 -0
  34. data/_includes/string.html +3 -0
  35. data/_includes/submit.html +1 -0
  36. data/_includes/text.html +32 -0
  37. data/_includes/url.html +1 -0
  38. data/_layouts/book.html +13 -3
  39. data/_layouts/default.html +2 -2
  40. data/_layouts/editorial.html +2 -96
  41. data/_layouts/home.html +5 -12
  42. data/_sass/home.scss +4 -0
  43. metadata +50 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a58a7b252535c1e3ed8ac724e40a257bb72bc18a17b46cc313d606b7c0eb8cda
4
- data.tar.gz: b805146a659ef86507e9885a3b0bbe4d4e56447019aab96457617ad00ffa4116
3
+ metadata.gz: 7292c5833189d4f7f9006f5bd180e4e2d96071d159449083574de39067bf4170
4
+ data.tar.gz: 5c52becac753eb35242323c3e96b4dc9a762c40335928ad3afb00ef55a0571ce
5
5
  SHA512:
6
- metadata.gz: e129c73368a753234e99e0ce8eeecad5d85849ca39db1abff9ca65921b2b3b149dca8f00e56cd7a776edd56cf54e4ddf93e4709e3beeedf5f11922f3ee55db8b
7
- data.tar.gz: 2b0d26f32a8114bbea10b15bff47105aa8bcd00fc4ebcc0aba05df9ac5de1cb27a3dfd2ade0d39a47e7c1701bac3ee7ac34af3c136200a56392fcf1f4608c164
6
+ metadata.gz: 7288ad50cae6390be83bff2318e0630fad2b028a4f40ce2fda97b332d39fe152c3b54328d486e4d9257bbcbad63b058340fb5166100f85a61ef43704ea0c5e97
7
+ data.tar.gz: 02e465e387c31fb8d2fbb289df7dc34df28607169bc4294e3c41ffec8c544312c4cba7f409dadb76b61e9c61a70bc69e97e87a3def226673e3afdc8b634e11a0
@@ -0,0 +1,118 @@
1
+ # editorial-autogestiva-jekyll-theme
2
+
3
+ Una plantilla para editoriales autogestivas
4
+
5
+
6
+ <<<<<<< HEAD
7
+ ## Installation
8
+
9
+ Install Bootstrap 4.4:
10
+ =======
11
+ ```bash
12
+ # Hacer un fork local desde sutty-base-jekyll-theme a nuestra plantilla
13
+ git clone https://0xacab.org/sutty/jekyll/sutty-base-jekyll-theme.git \
14
+ CAMBIAME-jekyll-theme
15
+ cd CAMBIAME-jekyll-theme
16
+
17
+ # Sutty-base ahora es el proyecto base, desde el que podemos tomar
18
+ # cambios, pero no enviamos para no mezclar las cosas
19
+ git remote rename origin upstream
20
+
21
+ # Agregamos el repositorio donde vamos a enviar y publicar cambios
22
+ git remote add origin \
23
+ git@0xacab.org:sutty/jekyll/CAMBIAME-jekyll-theme.git
24
+
25
+ # Configuramos git para que envíe siempre los cambios al repositorio
26
+ # nuevo
27
+ git push --set-upstream origin master
28
+ ```
29
+
30
+ Para empezar, hay que buscar y reemplazar en todos los archivos donde
31
+ diga `CAMBIAME`.
32
+
33
+ También hay que instalar las dependencias de CSS y JS con `yarn`.
34
+
35
+ ## Publicación
36
+
37
+ Para publicar la plantilla, primero hay que cambiar el nombre al archivo
38
+ `sutty-base-jekyll-theme.gemspec`:
39
+
40
+ ```bash
41
+ git mv {sutty-base,CAMBIAME}-jekyll-theme.gemspec
42
+ ```
43
+
44
+ Cada vez que actualicemos la gema hay que editar
45
+ `CAMBIAME-jekyll-theme.gemspec` para cambiar la versión.
46
+
47
+ Y luego para compilar y publicar la gema:
48
+
49
+ ```bash
50
+ gem build CAMBIAME-jekyll-theme.gemspec
51
+ gem push CAMBIAME-VERSION.gemspec
52
+ ```
53
+
54
+ También hay que actualizar la versión en el
55
+ [skel](https://0xacab.org/sutty/skel.sutty.nl/).
56
+
57
+ >>>>>>> ab27eaaed5357d624edd12ea22bc4e88401b5a1d
58
+
59
+ ```bash
60
+ yarn add bootstrap@~4.4
61
+ ```
62
+
63
+ Add this line to your Jekyll site's `Gemfile`:
64
+
65
+ ```ruby
66
+ gem "editorial-autogestiva-jekyll-theme"
67
+ ```
68
+
69
+ And add this line to your Jekyll site's `_config.yml`:
70
+
71
+ ```yaml
72
+ theme: editorial-autogestiva-jekyll-theme
73
+ ```
74
+
75
+ And then execute:
76
+
77
+ $ bundle
78
+
79
+ Or install it yourself as:
80
+
81
+ $ gem install editorial-autogestiva-jekyll-theme
82
+
83
+ ## Usage
84
+
85
+ Por ahora no tenemos opciones, solo hay que agregar la gema en el sitio
86
+ y funciona :)
87
+
88
+ ## Contributing
89
+
90
+ Bug reports and pull requests are welcome on 0xacab.org at
91
+ https://0xacab.org/sutty/jekyll/editorial-autogestiva-jekyll-theme. This project is
92
+ intended to be a safe, welcoming space for collaboration, and
93
+ contributors are expected to adhere to the [Sutty's code of
94
+ conduct](http://sutty.nl/en/code-of-conduct).
95
+
96
+ ## Development
97
+
98
+ To set up your environment to develop this theme, run `bundle install`.
99
+
100
+ Your theme is setup just like a normal Jekyll site! To test your theme,
101
+ run `bundle exec jekyll serve` and open your browser at
102
+ `http://localhost:4000`. This starts a Jekyll server using your
103
+ theme. Add pages, documents, data, etc. like normal to test your theme's
104
+ contents. As you make modifications to your theme and to your content,
105
+ your site will regenerate and you should see the changes in the browser
106
+ after a refresh, just like normal.
107
+
108
+ When your theme is released, only the files in `_layouts`, `_includes`,
109
+ `_sass` and `assets` tracked with Git will be bundled.
110
+
111
+ To add a custom directory to your theme-gem, please edit the array in
112
+ `editorial-autogestiva-jekyll-theme.gemspec` accordingly.
113
+
114
+ ## License
115
+
116
+ The theme is available as open source under the terms of the [Antifacist
117
+ MIT License](LICENSE.txt).
118
+
@@ -0,0 +1,49 @@
1
+ ---
2
+ locale: English
3
+ date: '%m/%d/%Y'
4
+ menu:
5
+ title: Main Menu
6
+ items:
7
+ - text: Catalogue
8
+ url: ''
9
+ - text: About
10
+ url: '{{ editorial.url }}'
11
+ book:
12
+ pages: "Pages"
13
+ size: "Size"
14
+ availability: "Availability"
15
+ in_stock: "En stock"
16
+ out_of_stock: "Agotado temporalmente"
17
+ payment_methods: "Métodos de pago"
18
+ delivery_methods: "Métodos de entrega"
19
+ payment_url: "Comprar"
20
+ file: "Descargar"
21
+ direct_download:
22
+ schema: DirectDownload
23
+ text: Descarga
24
+ pick_up:
25
+ schema: PickUp
26
+ text: Retiro en domicilio
27
+ mail:
28
+ schema: Mail
29
+ text: Envío por correo
30
+ cash:
31
+ schema: Cash
32
+ text: Efectivo
33
+ direct_debit:
34
+ schema: DirectDebit
35
+ text: Débito
36
+ bank_transfer_in_advance:
37
+ schema: BankTransferInAdvance
38
+ text: Transferencia bancaria
39
+ footer:
40
+ made_with_sutty: |
41
+ Sitio hecho con [Sutty](https://sutty.nl/es/). [Publicá el tuyo
42
+ :)](https://panel.sutty.nl/).
43
+ links:
44
+ - text: "Política de privacidad"
45
+ url: "politica-de-privacidad/"
46
+ - text: "Código de conducta"
47
+ url: "codigo-de-conducta/"
48
+ contact:
49
+ thanks: thanks
@@ -7,7 +7,7 @@ menu:
7
7
  - text: Catálogo
8
8
  url: ''
9
9
  - text: Acerca
10
- url: 'acerca/'
10
+ url: '{{ editorial.url }}'
11
11
  book:
12
12
  pages: "Páginas"
13
13
  size: "Tamaño"
@@ -17,6 +17,7 @@ book:
17
17
  payment_methods: "Métodos de pago"
18
18
  delivery_methods: "Métodos de entrega"
19
19
  payment_url: "Comprar"
20
+ file: "Descargar"
20
21
  direct_download:
21
22
  schema: DirectDownload
22
23
  text: Descarga
@@ -0,0 +1,49 @@
1
+ ---
2
+ redirect:
3
+ type: "hidden"
4
+ value: ""
5
+ pronouns:
6
+ type: "string"
7
+ autocomplete: "sex"
8
+ label:
9
+ es: "Pronombres"
10
+ en: "Pronouns"
11
+ placeholder:
12
+ es: "¿Qué pronombres usás?"
13
+ en: "What are your pronouns?"
14
+ name:
15
+ type: "string"
16
+ autocomplete: "name"
17
+ label:
18
+ es: "Nombre"
19
+ en: "Name"
20
+ placeholder:
21
+ es: "Nombre elegido, pseudónimo, alias"
22
+ en: "Choosen name, pseudonym, alias"
23
+ from:
24
+ type: "email"
25
+ autocomplete: "email"
26
+ label:
27
+ es: "Correo electrónico"
28
+ en: "E-mail address"
29
+ contact:
30
+ type: "string"
31
+ autocomplete: "street-address"
32
+ label:
33
+ es: "Dirección de envío / Otra forma de contacto"
34
+ en: "Shipping address / Other contact info"
35
+ body:
36
+ type: text
37
+ label:
38
+ es: Mensaje
39
+ en: Message
40
+ consent:
41
+ type: boolean
42
+ label:
43
+ es: Acepto las políticas de privacidad
44
+ en: I agree to the privacy policy
45
+ submit:
46
+ type: submit
47
+ label:
48
+ es: Enviar
49
+ en: Send
@@ -0,0 +1,45 @@
1
+ ---
2
+ pronouns:
3
+ type: "string"
4
+ autocomplete: "sex"
5
+ label:
6
+ es: "Pronombres"
7
+ en: "Pronouns"
8
+ placeholder:
9
+ es: "¿Qué pronombres usás?"
10
+ en: "What are your pronouns?"
11
+ name:
12
+ type: "string"
13
+ autocomplete: "name"
14
+ label:
15
+ es: "Nombre"
16
+ en: "Name"
17
+ placeholder:
18
+ es: "Nombre elegido, pseudónimo, alias"
19
+ en: "Choosen name, pseudonym, alias"
20
+ from:
21
+ type: "email"
22
+ autocomplete: "email"
23
+ label:
24
+ es: "Correo electrónico"
25
+ en: "E-mail address"
26
+ contact:
27
+ type: "street-address"
28
+ label:
29
+ es: "Dirección de envío / Otra forma de contacto"
30
+ en: "Shipping address / Other contact info"
31
+ body:
32
+ type: text
33
+ label:
34
+ es: Mensaje
35
+ en: Message
36
+ consent:
37
+ type: boolean
38
+ label:
39
+ es: Acepto las políticas de privacidad
40
+ en: I agree to the privacy policy
41
+ submit:
42
+ type: submit
43
+ label:
44
+ es: Enviar
45
+ en: Send
@@ -31,6 +31,28 @@ availability:
31
31
  help:
32
32
  es: 'Si el libro está fuera de stock o no disponible, deshabilita esta opción'
33
33
  en: 'If the book is out of stock or not available, disable this option'
34
+ file:
35
+ type: 'file'
36
+ path:
37
+ label:
38
+ es: 'Libro en formato digital'
39
+ en: 'Ebook'
40
+ help:
41
+ es: |
42
+ Para descarga libre, en formato PDF o ePub
43
+ en: |
44
+ For free download, PDF or ePub format
45
+ description:
46
+ label:
47
+ es: 'Descripción del archivo'
48
+ en: 'File description'
49
+ help:
50
+ es: |
51
+ Describe el archivo para usuaries no videntes y
52
+ buscadores
53
+ en: |
54
+ Describe the file for blind or partially sighted users and
55
+ search engines
34
56
  price:
35
57
  type: 'string'
36
58
  label:
@@ -0,0 +1,30 @@
1
+ {%- assign name = include.field[0] -%}
2
+ {%- assign id = include.field[1].id | default: name -%}
3
+ {%- assign label = include.field[1].label[site.locale] -%}
4
+ {%- assign help = include.field[1].help[site.locale] -%}
5
+ {%- assign autocomplete = include.field[1].autocomplete -%}
6
+
7
+ <div class="form-check text-left">
8
+ <input
9
+ {% if help %}
10
+ aria-describedby="help-{{ id }}"
11
+ {% endif %}
12
+ {% if include.field[1].required %}
13
+ required
14
+ {% endif %}
15
+ type="checkbox"
16
+ name="{{ name }}"
17
+ id="{{ id }}"
18
+ {% if autocomplete %}
19
+ autocomplete="{{ autocomplete }}"
20
+ {% endif %}
21
+ class="form-check-input" />
22
+
23
+ <label class="form-check-label" for="{{ id }}">{{ label }}</label>
24
+
25
+ {%- if help -%}
26
+ <small id="help-{{ id }}" class="form-text">
27
+ {{ help }}
28
+ </small>
29
+ {%- endif -%}
30
+ </div>
@@ -1,34 +1,21 @@
1
- <form method="post" action="https://api.sutty.nl/v1/sites/{{ site.hostname }}/contact">
2
- <input
3
- type="hidden"
4
- name="redirect"
5
- value="{{ site.url }}/{{ include.url }}?{{ site.i18n.contact.thanks }}" />
1
+ {% comment %}
2
+ Esta imagen obtiene una cookie desde la API de Sutty para autorizar el
3
+ envío del formulario.
4
+ {% endcomment %}
5
+ <img class="d-none" src="https://api.sutty.nl/v1/sites/{{ site.hostname }}/contact/cookie.png" />
6
6
 
7
- {%- for field in site.i18n.contact.form.fields -%}
8
- <div class="form-group">
9
- <label for="pronouns">{{ field.label }}</label>
10
- <input
11
- type="{{ field.type }}"
12
- id="{{ field.name }}"
13
- name="{{ field.name }}"
14
- value=""
15
- class="form-control"
16
- autocomplete="{{ field.autocomplete }}"
17
- placeholder="{{ field.placeholder }}" />
7
+ {% comment %}
8
+ El formulario se envía a la API. La definición del formulario se
9
+ encuentra en _data/forms/contacto.yml
10
+ {% endcomment %}
11
+ <form action="https://api.sutty.nl/v1/sites/{{ site.hostname }}/contact/contacto"
12
+ method="post">
13
+ {%- for field in include.form -%}
14
+ {% assign template = field[1].type | append: '.html' %}
15
+ <div class="col{{ field[1].col | default: 12 | prepend: '-' }}">
16
+ {% include {{ template }} field=field %}
18
17
  </div>
19
18
  {%- endfor -%}
20
19
 
21
- <div class="form-group">
22
- <label for="body">{{ site.i18n.contact.form.body }}</label>
23
- <textarea name="body" id="body" required class="form-control"></textarea>
24
- </div>
25
-
26
- <input type="submit" class="btn btn-success" value="{{ site.i18n.contact.form.submit }}" />
27
-
28
- <div class="form-check form-check-inline">
29
- <input type="checkbox" name="gdpr" id="gdpr" value="1" required class="form-check-input" />
30
- <label class="form-check-label" for="gdpr">
31
- {{ site.i18n.contact.form.gdpr }}
32
- </label>
33
- </div>
20
+ <input type="hidden" name="redirect" value="{{ site.url }}{{ include.url }}" />
34
21
  </form>
@@ -0,0 +1,55 @@
1
+ <<<<<<< HEAD
2
+ <form method="post" action="https://api.sutty.nl/v1/sites/{{ site.hostname }}/contact">
3
+ <input
4
+ type="hidden"
5
+ name="redirect"
6
+ value="{{ site.url }}/{{ include.url }}?{{ site.i18n.contact.thanks }}" />
7
+
8
+ {%- for field in site.i18n.contact.form.fields -%}
9
+ <div class="form-group">
10
+ <label for="pronouns">{{ field.label }}</label>
11
+ <input
12
+ type="{{ field.type }}"
13
+ id="{{ field.name }}"
14
+ name="{{ field.name }}"
15
+ value=""
16
+ class="form-control"
17
+ autocomplete="{{ field.autocomplete }}"
18
+ placeholder="{{ field.placeholder }}" />
19
+ </div>
20
+ {%- endfor -%}
21
+
22
+ <div class="form-group">
23
+ <label for="body">{{ site.i18n.contact.form.body }}</label>
24
+ <textarea name="body" id="body" required class="form-control"></textarea>
25
+ </div>
26
+
27
+ <input type="submit" class="btn btn-success" value="{{ site.i18n.contact.form.submit }}" />
28
+
29
+ <div class="form-check form-check-inline">
30
+ <input type="checkbox" name="gdpr" id="gdpr" value="1" required class="form-check-input" />
31
+ <label class="form-check-label" for="gdpr">
32
+ {{ site.i18n.contact.form.gdpr }}
33
+ </label>
34
+ </div>
35
+ =======
36
+ {% comment %}
37
+ Esta imagen obtiene una cookie desde la API de Sutty para autorizar el
38
+ envío del formulario.
39
+ {% endcomment %}
40
+ <img class="d-none" src="https://api.sutty.nl/v1/sites/{{ site.hostname }}/contact/cookie.png" />
41
+
42
+ {% comment %}
43
+ El formulario se envía a la API. La definición del formulario se
44
+ encuentra en _data/forms/contacto.yml
45
+ {% endcomment %}
46
+ <form action="https://api.sutty.nl/v1/sites/{{ site.hostname }}/contact/contacto"
47
+ method="post">
48
+ {%- for field in include.form -%}
49
+ {% assign template = field[1].type | append: '.html' %}
50
+ <div class="col{{ field[1].col | default: 12 | prepend: '-' }}">
51
+ {% include {{ template }} field=field %}
52
+ </div>
53
+ {%- endfor -%}
54
+ >>>>>>> 5a59db7503af04fa49254c23ebacc03f2ee99de3
55
+ </form>
@@ -1,39 +1,32 @@
1
- {% comment %}
2
- XXX: Usamos el primer artículo de tipo Editorial. Hacemos esto
3
- porque la edición de estos datos desde Sutty solo se puede hacer
4
- como artículos.
5
- {% endcomment %}
6
- {% assign editorial = site.posts | where: 'layout', 'editorial' | first %}
7
-
8
1
  <article id="editorial" class="col h-card" itemscope itemtype="https://schema.org/Organization">
9
2
  <div class="media">
10
3
  <img
11
4
  itemprop="logo"
12
5
  class="u-photo"
13
- src="{{ editorial.logo.path | thumbnail: 100 }}"
14
- alt="{{ editorial.logo.description }}" />
6
+ src="{{ include.editorial.logo.path | thumbnail: 100 }}"
7
+ alt="{{ include.editorial.logo.description }}" />
15
8
 
16
9
  <div class="media-body">
17
- <h1 class="p-name" itemprop="name">{{ editorial.title }}</h1>
18
- <p class="lead">{{ editorial.description }}</p>
10
+ <h1 class="p-name" itemprop="name">{{ include.editorial.title }}</h1>
11
+ <p class="lead">{{ include.editorial.description }}</p>
19
12
  </div>
20
13
 
21
14
  </div>
22
15
 
23
16
  <div itemprop="location" itemscope itemtype="https://schema.org/PostalAddress">
24
- {%- if editorial.address -%}
25
- <p class="p-street-address" itemprop="streetAddress">{{ editorial.address }}</p>
17
+ {%- if include.editorial.address -%}
18
+ <p class="p-street-address" itemprop="streetAddress">{{ include.editorial.address }}</p>
26
19
  {%- endif -%}
27
- {%- if editorial.locality -%}
28
- <p class="p-locality" itemprop="addressLocality">{{ editorial.locality }}</p>
20
+ {%- if include.editorial.locality -%}
21
+ <p class="p-locality" itemprop="addressLocality">{{ include.editorial.locality }}</p>
29
22
  {%- endif -%}
30
- {%- if editorial.country -%}
31
- <p class="p-country-name" itemprop="addressCountry">{{ editorial.country }}</p>
23
+ {%- if include.editorial.country -%}
24
+ <p class="p-country-name" itemprop="addressCountry">{{ include.editorial.country }}</p>
32
25
  {%- endif -%}
33
26
  </div>
34
27
 
35
28
  <ul>
36
- {%- for social in editorial.social_networks -%}
29
+ {%- for social in include.editorial.social_networks -%}
37
30
  <li><a rel="me" href="{{ social }}">
38
31
  {% comment %}
39
32
 
@@ -54,9 +47,8 @@
54
47
  </ul>
55
48
 
56
49
  {%- if include.content -%}
57
- <div class="e-content" itemprop="articleBody">
58
- {{ editorial.content }}
59
- </div>
50
+ <div class="e-content" itemprop="articleBody">
51
+ {{ include.editorial.content }}
52
+ </div>
60
53
  {%- endif -%}
61
-
62
54
  </article>
@@ -0,0 +1 @@
1
+ {% include input.html field=field %}
@@ -1,7 +1,8 @@
1
1
  <footer>
2
2
  <div class="row align-items-end">
3
3
  {%- if include.footer -%}
4
- {% include_cached editorial.html %}
4
+ {% assign editorial = site.posts | where: 'layout', 'editorial' | first %}
5
+ {% include_cached editorial.html editorial=editorial %}
5
6
  {%- endif -%}
6
7
 
7
8
  <div class="col text-right">
@@ -0,0 +1 @@
1
+ .././boolean.html
@@ -0,0 +1 @@
1
+ .././email.html
@@ -0,0 +1 @@
1
+ .././hidden.html
@@ -0,0 +1 @@
1
+ .././input.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
+ .././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,33 @@
1
+ {%- assign name = include.field[0] -%}
2
+ {%- assign id = include.field[1].id | default: name -%}
3
+ {%- assign label = include.field[1].label[site.locale] -%}
4
+ {%- assign help = include.field[1].help[site.locale] -%}
5
+ {%- assign autocomplete = include.field[1].autocomplete -%}
6
+
7
+ <div class="form-group">
8
+ <label for="{{ id }}">
9
+ {{ label }}
10
+ {% if include.field[1].required %}*{% endif %}
11
+ </label>
12
+
13
+ <input
14
+ {% if help %}
15
+ aria-describedby="help-{{ id }}"
16
+ {% endif %}
17
+ {% if include.field[1].required %}
18
+ required
19
+ {% endif %}
20
+ type="{{ include.field[1].type }}"
21
+ name="{{ name }}"
22
+ id="{{ id }}"
23
+ {% if autocomplete %}
24
+ autocomplete="{{ autocomplete }}"
25
+ {% endif %}
26
+ class="form-control" />
27
+
28
+ {%- if help -%}
29
+ <small id="help-{{ id }}" class="form-text">
30
+ {{ help }}
31
+ </small>
32
+ {%- endif -%}
33
+ </div>
@@ -1,3 +1,5 @@
1
+ {% assign editorial = site.posts | where: 'layout', 'editorial' | first %}
2
+
1
3
  <nav class="navbar navbar-expand-lg navbar-light bg-light d-print-block" role="navigation" aria-label="{{ site.i18n.menu.title }}">
2
4
  <a class="navbar-brand" href="">
3
5
  {{ site.title }}
@@ -13,15 +15,17 @@
13
15
  to mark the active item in code rather than with JS.
14
16
  {% endcomment %}
15
17
 
18
+ {% assign url = item.url | liquify %}
19
+
16
20
  <li class="nav-item">
17
- <a class="nav-link{% if page.url == item.url %} active{% endif %}" href="{{ item.url }}">
21
+ <a class="nav-link{% if page.url == url %} active{% endif %}" href="{{ url }}">
18
22
  {{ item.text }}
19
23
 
20
- {%- if page.url == item.url -%}
24
+ {%- if page.url == url -%}
21
25
  <span class="sr-only">
22
26
  {{ site.i18n.menu.active | default: '(current)' }}
23
27
  </span>
24
- {%- endif %}
28
+ {%- endif -%}
25
29
  </a>
26
30
  </li>
27
31
  {%- endfor -%}
@@ -0,0 +1,44 @@
1
+ {% assign editorial = site.posts | where: 'layout', 'editorial' | first %}
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="">
5
+ <<<<<<< HEAD
6
+ {{ site.title }}
7
+ =======
8
+ {% include_cached logo.html %}
9
+ >>>>>>> ab27eaaed5357d624edd12ea22bc4e88401b5a1d
10
+ </a>
11
+
12
+ {% comment %}
13
+ TODO: Add CSS-only hamburger menu.
14
+ {% endcomment %}
15
+ <ul class="navbar-nav d-print-none">
16
+ {%- for item in site.i18n.menu.items -%}
17
+ {% comment %}
18
+ This makes it hard to just cache the whole navbar, but we prefer
19
+ to mark the active item in code rather than with JS.
20
+ {% endcomment %}
21
+
22
+ {% assign url = item.url | liquify %}
23
+
24
+ <li class="nav-item">
25
+ <<<<<<< HEAD
26
+ <a class="nav-link{% if page.url == url %} active{% endif %}" href="{{ url }}">
27
+ {{ item.text }}
28
+
29
+ {%- if page.url == url -%}
30
+ =======
31
+ <a class="nav-link{% if page.url == item.href %} active{% endif %}" href="{{ item.href }}">
32
+ {{ item.title }}
33
+
34
+ {%- if page.url == item.href -%}
35
+ >>>>>>> ab27eaaed5357d624edd12ea22bc4e88401b5a1d
36
+ <span class="sr-only">
37
+ {{ site.i18n.menu.active | default: '(current)' }}
38
+ </span>
39
+ {%- endif -%}
40
+ </a>
41
+ </li>
42
+ {%- endfor -%}
43
+ </ul>
44
+ </nav>
@@ -0,0 +1 @@
1
+ {% include input.html field=field %}
@@ -0,0 +1,39 @@
1
+ {%- assign name = include.field[0] -%}
2
+ {%- assign id = include.field[1].id | default: name -%}
3
+ {%- assign label = include.field[1].label[site.locale] -%}
4
+ {%- assign help = include.field[1].help[site.locale] -%}
5
+ {%- assign autocomplete = include.field[1].autocomplete -%}
6
+
7
+ <div class="form-group">
8
+ <label for="{{ id }}">
9
+ {{ label }}
10
+ {% if include.field[1].required %}*{% endif %}
11
+ </label>
12
+
13
+ <select
14
+ {% if help %}
15
+ aria-describedby="help-{{ id }}"
16
+ {% endif %}
17
+ {% if include.field[1].required %}
18
+ required
19
+ {% endif %}
20
+ name="{{ name }}"
21
+ id="{{ id }}"
22
+ {% if autocomplete %}
23
+ autocomplete="{{ autocomplete }}"
24
+ {% endif %}
25
+ class="form-control">
26
+
27
+ <option value="" selected></option>
28
+
29
+ {%- for option in include.field[1].values -%}
30
+ <option value="{{ option }}">{{ option }}</option>
31
+ {%- endfor -%}
32
+ </select>
33
+
34
+ {%- if help -%}
35
+ <small id="help-{{ id }}" class="form-text">
36
+ {{ help }}
37
+ </small>
38
+ {%- endif -%}
39
+ </div>
@@ -0,0 +1 @@
1
+ <h2 id="{{ include.field[0] }}">{{ include.field[1].title }}</h2>
@@ -0,0 +1 @@
1
+ <hr/>
@@ -0,0 +1,3 @@
1
+ {% assign f = field %}
2
+ {% assign f.type = 'text' %}
3
+ {% include input.html field=f %}
@@ -0,0 +1 @@
1
+ <input type="submit" class="btn btn-success" value="{{ include.field[1].label[site.locale] }}" />
@@ -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].label[site.locale] -%}
4
+ {%- assign help = include.field[1].help[site.locale] -%}
5
+ {%- assign autocomplete = include.field[1].autocomplete -%}
6
+
7
+ <div class="form-group">
8
+ <label for="{{ id }}">
9
+ {% if include.field[1].required %}*{% endif %}
10
+ {{ label }}
11
+ </label>
12
+
13
+ <textarea
14
+ {% if help %}
15
+ aria-describedby="help-{{ id }}"
16
+ {% endif %}
17
+ {% if include.field[1].required %}
18
+ required
19
+ {% endif %}
20
+ name="{{ name }}"
21
+ id="{{ id }}"
22
+ {% if autocomplete %}
23
+ autocomplete="{{ autocomplete }}"
24
+ {% endif %}
25
+ class="form-control"></textarea>
26
+
27
+ {%- if .help -%}
28
+ <small id="help-{{ id }}" class="form-text">
29
+ {{ help }}
30
+ </small>
31
+ {%- endif -%}
32
+ </div>
@@ -0,0 +1 @@
1
+ {% include input.html field=field %}
@@ -47,8 +47,18 @@ layout: default
47
47
  </picture>
48
48
  {%- endif -%}
49
49
 
50
- {%- if page.payment_url -%}
51
50
  <hr/>
51
+
52
+ {%- if page.file.path -%}
53
+ <a
54
+ href="{{ page.file.path }}"
55
+ alt="{{ page.file.description }}"
56
+ class="btn btn-info btn-block btn-lg">
57
+ {{ site.i18n.book.file }}
58
+ </a>
59
+ {%- endif %}
60
+
61
+ {%- if page.payment_url -%}
52
62
  <a
53
63
  href="{{ page.payment_url }}"
54
64
  class="btn btn-success btn-block btn-lg">
@@ -93,7 +103,7 @@ layout: default
93
103
  {%- for dm in page.delivery_methods -%}
94
104
  <dd>{{ site.i18n.book[dm].text }}</dd>
95
105
  <meta
96
- itemprop="acceptedPaymentMethod"
106
+ itemprop="availableDeliveryMethod"
97
107
  content="http://purl.org/goodrelations/v1#{{ site.i18n.book[pm].schema }}" />
98
108
  {%- endfor -%}
99
109
  </dl>
@@ -115,7 +125,7 @@ layout: default
115
125
 
116
126
  <div class="row">
117
127
  <div class="col">
118
- {% include contact.html url=page.url %}
128
+ {% include contact.html form=site.data.forms.contacto url=page.url %}
119
129
  </div>
120
130
  </div>
121
131
 
@@ -31,8 +31,8 @@
31
31
  </div>
32
32
  </div>
33
33
 
34
- {%- if page contains 'footer' -%}
35
- {%- assign footer = page.footer -%}
34
+ {%- if page.layout == 'editorial' -%}
35
+ {%- assign footer = false -%}
36
36
  {%- else -%}
37
37
  {%- assign footer = true -%}
38
38
  {%- endif -%}
@@ -1,100 +1,6 @@
1
1
  ---
2
2
  layout: default
3
+ footer: false
3
4
  ---
4
5
 
5
- <article class="h-card" itemscope itemtype="http://schema.org/Organization">
6
- <header>
7
- <div class="media">
8
- <img
9
- itemprop="logo"
10
- class="u-photo"
11
- src="{{ editorial.logo.path | thumbnail: 100 }}"
12
- alt="{{ editorial.logo.description }}" />
13
-
14
- <div class="media-body">
15
- <h1 class="p-name" itemprop="name">{{ editorial.title }}</h1>
16
- <p class="lead">{{ editorial.description }}</p>
17
- </div>
18
- </div>
19
-
20
- <div itemprop="location" itemscope itemtype="https://schema.org/PostalAddress">
21
- {%- if editorial.address -%}
22
- <p class="p-street-address" itemprop="streetAddress">{{ editorial.address }}</p>
23
- {%- endif -%}
24
- {%- if editorial.locality -%}
25
- <p class="p-locality" itemprop="addressLocality">{{ editorial.locality }}</p>
26
- {%- endif -%}
27
- {%- if editorial.country -%}
28
- <p class="p-country-name" itemprop="addressCountry">{{ editorial.country }}</p>
29
- {%- endif -%}
30
- </div>
31
-
32
- <ul>
33
- {%- for social in editorial.social_networks -%}
34
- <li><a rel="me" href="{{ social }}">
35
- {% comment %}
36
-
37
- obtenemos la url de la red social, eliminamos la www,
38
- obtenemos el tercer elemento separando por / y el primero
39
- separando por .
40
-
41
- https://www.twitter.com/suttyweb
42
- https://twitter.com/suttyweb
43
- twitter.com
44
- twitter
45
- twitter
46
- {% endcomment %}
47
- {% assign s = social | remove: 'www.' | split: '/' %}
48
- {{ s[2] | split: '.' | first | capitalize }}
49
- </a></li>
50
- {%- endfor -%}
51
- </ul>
52
-
53
- <p>
54
- <time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
55
- {%- assign date_format = site.i18n.date | default: "%b %-d, %Y" -%}
56
- {{ page.date | date: date_format }}
57
- </time>
58
- {%- for author in page.author -%}
59
-
60
- <span itemprop="author" itemscope itemtype="http://schema.org/Person">
61
- <span class="p-author h-card" itemprop="name">
62
- {{ author | escape }}
63
- </span>
64
- </span>
65
- {%- endfor -%}
66
- </p>
67
- </header>
68
-
69
- <div class="e-content" itemprop="articleBody">
70
- {{ content }}
71
- </div>
72
-
73
- <footer>
74
- <a class="u-url" itemprop="url" href="{{ page.url }}" hidden>
75
- {{ site.url }}/{{ page.url }}
76
- </a>
77
-
78
- {%- if page.uuid -%}
79
- <span hidden itemprop="identifier">{{ page.uuid }}</span>
80
- {%- endif -%}
81
-
82
- {%- if page.license.url -%}
83
- <p itemprop="license" itemtype="http://schema.org/CreativeWork">
84
- <a rel="license" itemprop="url" href="{{ page.license.url }}">
85
- <span itemprop="articleBody">
86
- {{ page.license.description }}
87
- </span>
88
- </a>
89
- </p>
90
- {%- endif -%}
91
-
92
- {%- if page.tags %}
93
- <span itemprop="keywords" hidden>{{ page.tags | join: ', ' }}</span>
94
- {%- for tag in page.tags -%}
95
- <span hidden class="h-category">{{ tag }}</span>
96
- {%- endfor -%}
97
- {%- endif -%}
98
- </footer>
99
- </article>
100
-
6
+ {% include editorial.html editorial=page content=true %}
@@ -7,21 +7,14 @@ layout: default
7
7
  {%- for book in books -%}
8
8
  <a href="{{ book.url }}">
9
9
  <div class="col book">
10
- <img
11
- src="{{ book.image.path | thumbnail: 212, 300 }}"
12
- alt="{{ book.image.description | default: book.title }}"
13
- />
10
+ <img
11
+ src="{{ book.image.path | thumbnail: 212, 300 }}"
12
+ alt="{{ book.image.description | default: book.title }}"
13
+ loading="lazy"
14
+ />
14
15
 
15
16
  <h2>{{ book.title }}</h2>
16
17
  <p>{{ book.author | join: ', ' }}</p>
17
-
18
- {%- if book.payment_url -%}
19
- <a
20
- href="{{ book.payment_url }}"
21
- class="btn btn-success btn-block">
22
- {{ site.i18n.book.payment_url }}
23
- </a>
24
- {%- endif %}
25
18
  </div>
26
19
  </a>
27
20
  {%- endfor %}
@@ -6,6 +6,10 @@
6
6
  margin-right: 1rem;
7
7
  margin-left: 1rem;
8
8
 
9
+ img {
10
+ max-width: 212px;
11
+ }
12
+
9
13
  h2 {
10
14
  margin-top: 1rem;
11
15
  font-size: 1rem;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: editorial-autogestiva-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-04 00:00:00.000000000 Z
11
+ date: 2020-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0.1'
125
+ - !ruby/object:Gem::Dependency
126
+ name: jekyll-liquify-alt
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.1'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.1'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: bundler
127
141
  requirement: !ruby/object:Gem::Requirement
@@ -150,7 +164,7 @@ dependencies:
150
164
  - - "~>"
151
165
  - !ruby/object:Gem::Version
152
166
  version: '12.0'
153
- description:
167
+ description:
154
168
  email:
155
169
  - f@sutty.nl
156
170
  executables: []
@@ -161,14 +175,44 @@ extra_rdoc_files:
161
175
  files:
162
176
  - LICENSE.txt
163
177
  - README.md
178
+ - README.md.orig
179
+ - _data/en.yml
164
180
  - _data/es.yml
181
+ - _data/forms/contacto.yml
182
+ - _data/forms/contacto.yml~
165
183
  - _data/layouts/book.yml
166
184
  - _data/layouts/editorial.yml
167
185
  - _data/layouts/post.yml
186
+ - _includes/boolean.html
168
187
  - _includes/contact.html
188
+ - _includes/contact.html.orig
169
189
  - _includes/editorial.html
190
+ - _includes/email.html
170
191
  - _includes/footer.html
192
+ - _includes/form/boolean.html
193
+ - _includes/form/email.html
194
+ - _includes/form/hidden.html
195
+ - _includes/form/input.html
196
+ - _includes/form/number.html
197
+ - _includes/form/predefined_array.html
198
+ - _includes/form/section.html
199
+ - _includes/form/separator.html
200
+ - _includes/form/string.html
201
+ - _includes/form/submit.html
202
+ - _includes/form/text.html
203
+ - _includes/form/url.html
204
+ - _includes/hidden.html
205
+ - _includes/input.html
171
206
  - _includes/navbar.html
207
+ - _includes/navbar.html.orig
208
+ - _includes/number.html
209
+ - _includes/predefined_array.html
210
+ - _includes/section.html
211
+ - _includes/separator.html
212
+ - _includes/string.html
213
+ - _includes/submit.html
214
+ - _includes/text.html
215
+ - _includes/url.html
172
216
  - _layouts/book.html
173
217
  - _layouts/default.html
174
218
  - _layouts/editorial.html
@@ -193,7 +237,7 @@ metadata:
193
237
  source_code_uri: https://0xacab.org/sutty/jekyll/editorial-autogestiva-jekyll-theme
194
238
  changelog_uri: https://0xacab.org/sutty/jekyll/editorial-autogestiva-jekyll-theme/-/blob/master/CHANGELOG.md
195
239
  documentation_uri: https://rubydoc.info/gems/editorial-autogestiva-jekyll-theme
196
- post_install_message:
240
+ post_install_message:
197
241
  rdoc_options:
198
242
  - "--title"
199
243
  - editorial-autogestiva-jekyll-theme - Una plantilla para editoriales autogestivas
@@ -216,7 +260,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
260
  version: '0'
217
261
  requirements: []
218
262
  rubygems_version: 3.0.3
219
- signing_key:
263
+ signing_key:
220
264
  specification_version: 4
221
265
  summary: Una plantilla para editoriales autogestivas
222
266
  test_files: []