editorial-autogestiva-jekyll-theme 0.2.2 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) 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 +3 -1
  5. data/_data/forms/contacto.yml +49 -0
  6. data/_data/forms/contacto.yml~ +45 -0
  7. data/_data/layouts/book.yml +30 -0
  8. data/_includes/boolean.html +1 -0
  9. data/_includes/contact.html +16 -29
  10. data/_includes/contact.html.orig +55 -0
  11. data/_includes/editorial.html +54 -0
  12. data/_includes/email.html +1 -0
  13. data/_includes/footer.html +4 -56
  14. data/_includes/form/boolean.html +30 -0
  15. data/_includes/form/email.html +1 -0
  16. data/_includes/form/hidden.html +5 -0
  17. data/_includes/form/input.html +33 -0
  18. data/_includes/form/number.html +1 -0
  19. data/_includes/form/predefined_array.html +39 -0
  20. data/_includes/form/section.html +1 -0
  21. data/_includes/form/separator.html +1 -0
  22. data/_includes/form/string.html +3 -0
  23. data/_includes/form/submit.html +1 -0
  24. data/_includes/form/text.html +32 -0
  25. data/_includes/form/url.html +1 -0
  26. data/_includes/hidden.html +1 -0
  27. data/_includes/input.html +1 -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 +1 -0
  32. data/_includes/section.html +1 -0
  33. data/_includes/separator.html +1 -0
  34. data/_includes/string.html +1 -0
  35. data/_includes/submit.html +1 -0
  36. data/_includes/text.html +1 -0
  37. data/_includes/url.html +1 -0
  38. data/_layouts/book.html +20 -2
  39. data/_layouts/default.html +7 -1
  40. data/_layouts/editorial.html +2 -96
  41. data/_layouts/home.html +5 -4
  42. data/_sass/editorial.scss +19 -0
  43. data/_sass/footer.scss +2 -13
  44. data/_sass/home.scss +5 -1
  45. data/assets/css/styles.scss +1 -0
  46. metadata +48 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39f5a68e48791bfef3da3a7ae8127cf2b816e81e626bfa0da13df01c1e99a3aa
4
- data.tar.gz: 1a4c7f16fb92665e683632c996bbbfcf574f3d6ef1c39000632d569b6337574f
3
+ metadata.gz: d869ce07c203867e7cafc72684ae44028971c711bd59c86e010fd1dec968795c
4
+ data.tar.gz: 6ce03db92629e293a07ba10583a274de9ad1814fa2ce8f94e0aa576cfa72cd06
5
5
  SHA512:
6
- metadata.gz: 599f869cd6f49e197c2d8d0d5a93caf4279affe79bda9ccfbeb33e07a71e552224548a68d7dd3cbe5db14e42aebe5324fd4c9d7c292a732aa8797640cc5f3b7c
7
- data.tar.gz: f97c994efaae6994c573d5b8d494f192b80e845b421990aa1e0a7cbbbc72cbc43c1194526b16e74a3441ef129cc9ef9370aa8232a9f5350f45e6c6d698423537
6
+ metadata.gz: b4b10eb19d000565eb3521ce5a3d4de55068f8bfe1087b9adbcd3951189cfd07319096c5921ef7afeed4acba4a36dcc104e2f32c2c6d271c7d06ef8d786b5338
7
+ data.tar.gz: 1ab785ab4ff7ebc973fc3d36a043767709dc623a912c305286f3e28b3a3cadcd0f0a60d306ed6dadf8f7b173309fb372244b8fe055d256cc09a763f6e98b0de1
@@ -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"
@@ -16,6 +16,8 @@ book:
16
16
  out_of_stock: "Agotado temporalmente"
17
17
  payment_methods: "Métodos de pago"
18
18
  delivery_methods: "Métodos de entrega"
19
+ payment_url: "Comprar"
20
+ file: "Descargar"
19
21
  direct_download:
20
22
  schema: DirectDownload
21
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:
@@ -80,6 +102,14 @@ payment_methods:
80
102
  bank_transfer_in_advance:
81
103
  es: 'Transferencia bancaria'
82
104
  en: 'Bank transfer'
105
+ payment_url:
106
+ type: 'url'
107
+ label:
108
+ es: 'Dirección de pago electrónico'
109
+ en: 'Online payment link'
110
+ help:
111
+ es: 'El vínculo al método de pago en línea, por ejemplo la dirección generada por Mercado Pago'
112
+ en: 'The link to the online payment method, generated by a payment intermediary like Paypal'
83
113
  size:
84
114
  type: 'string'
85
115
  label:
@@ -0,0 +1 @@
1
+ _includes/form/boolean.html
@@ -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>
@@ -0,0 +1,54 @@
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>
12
+ </div>
13
+
14
+ </div>
15
+
16
+ <div itemprop="location" itemscope itemtype="https://schema.org/PostalAddress">
17
+ {%- if include.editorial.address -%}
18
+ <p class="p-street-address" itemprop="streetAddress">{{ include.editorial.address }}</p>
19
+ {%- endif -%}
20
+ {%- if include.editorial.locality -%}
21
+ <p class="p-locality" itemprop="addressLocality">{{ include.editorial.locality }}</p>
22
+ {%- endif -%}
23
+ {%- if include.editorial.country -%}
24
+ <p class="p-country-name" itemprop="addressCountry">{{ include.editorial.country }}</p>
25
+ {%- endif -%}
26
+ </div>
27
+
28
+ <ul>
29
+ {%- 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>
46
+ {%- endfor -%}
47
+ </ul>
48
+
49
+ {%- if include.content -%}
50
+ <div class="e-content" itemprop="articleBody">
51
+ {{ include.editorial.content }}
52
+ </div>
53
+ {%- endif -%}
54
+ </article>
@@ -0,0 +1 @@
1
+ _includes/form/email.html
@@ -1,61 +1,9 @@
1
1
  <footer>
2
2
  <div class="row align-items-end">
3
- {% comment %}
4
- XXX: Usamos el primer artículo de tipo Editorial. Hacemos esto
5
- porque la edición de estos datos desde Sutty solo se puede hacer
6
- como artículos.
7
- {% endcomment %}
8
- {% assign editorial = site.posts | where: 'layout', 'editorial' | first %}
9
-
10
- <div class="col h-card" itemscope itemtype="https://schema.org/Organization">
11
- <div class="media">
12
- <img
13
- itemprop="logo"
14
- class="u-photo"
15
- src="{{ editorial.logo.path | thumbnail: 100 }}"
16
- alt="{{ editorial.logo.description }}" />
17
-
18
- <div class="media-body">
19
- <h1 class="p-name" itemprop="name">{{ editorial.title }}</h1>
20
- <p class="lead">{{ editorial.description }}</p>
21
- </div>
22
-
23
- </div>
24
-
25
- <div itemprop="location" itemscope itemtype="https://schema.org/PostalAddress">
26
- {%- if editorial.address -%}
27
- <p class="p-street-address" itemprop="streetAddress">{{ editorial.address }}</p>
28
- {%- endif -%}
29
- {%- if editorial.locality -%}
30
- <p class="p-locality" itemprop="addressLocality">{{ editorial.locality }}</p>
31
- {%- endif -%}
32
- {%- if editorial.country -%}
33
- <p class="p-country-name" itemprop="addressCountry">{{ editorial.country }}</p>
34
- {%- endif -%}
35
- </div>
36
-
37
- <ul>
38
- {%- for social in editorial.social_networks -%}
39
- <li><a rel="me" href="{{ social }}">
40
- {% comment %}
41
-
42
- Obtenemos la URL de la red social, eliminamos la www,
43
- obtenemos el tercer elemento separando por / y el primero
44
- separando por .
45
-
46
- https://www.twitter.com/SuttyWeb
47
- https://twitter.com/SuttyWeb
48
- twitter.com
49
- twitter
50
- Twitter
51
- {% endcomment %}
52
- {% assign s = social | remove: 'www.' | split: '/' %}
53
- {{ s[2] | split: '.' | first | capitalize }}
54
- </a></li>
55
- {%- endfor -%}
56
- </ul>
57
-
58
- </div>
3
+ {%- if include.footer -%}
4
+ {% assign editorial = site.posts | where: 'layout', 'editorial' | first %}
5
+ {% include_cached editorial.html editorial=editorial %}
6
+ {%- endif -%}
59
7
 
60
8
  <div class="col text-right">
61
9
  <ul class="">
@@ -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>
@@ -0,0 +1 @@
1
+ {% include input.html field=field %}
@@ -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>
@@ -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 %}
@@ -0,0 +1 @@
1
+ _includes/form/hidden.html
@@ -0,0 +1 @@
1
+ _includes/form/input.html
@@ -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
+ _includes/form/number.html
@@ -0,0 +1 @@
1
+ _includes/form/predefined_array.html
@@ -0,0 +1 @@
1
+ _includes/form/section.html
@@ -0,0 +1 @@
1
+ _includes/form/separator.html
@@ -0,0 +1 @@
1
+ _includes/form/string.html
@@ -0,0 +1 @@
1
+ _includes/form/submit.html
@@ -0,0 +1 @@
1
+ _includes/form/text.html
@@ -0,0 +1 @@
1
+ _includes/form/url.html
@@ -10,7 +10,6 @@ layout: default
10
10
  <p class="lead p-summary" itemprop="description">{{ page.description | escape }}</p>
11
11
  {%- endif -%}
12
12
 
13
-
14
13
  <p>
15
14
  <time
16
15
  class="dt-published"
@@ -47,6 +46,25 @@ layout: default
47
46
  alt="{{ page.image.description }}" />
48
47
  </picture>
49
48
  {%- endif -%}
49
+
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 -%}
62
+ <a
63
+ href="{{ page.payment_url }}"
64
+ class="btn btn-success btn-block btn-lg">
65
+ {{ site.i18n.book.payment_url }}
66
+ </a>
67
+ {%- endif %}
50
68
  </div>
51
69
 
52
70
  <div class="col">
@@ -107,7 +125,7 @@ layout: default
107
125
 
108
126
  <div class="row">
109
127
  <div class="col">
110
- {% include contact.html url=page.url %}
128
+ {% include contact.html form=site.data.forms.contacto url=page.url %}
111
129
  </div>
112
130
  </div>
113
131
 
@@ -31,7 +31,13 @@
31
31
  </div>
32
32
  </div>
33
33
 
34
- {% include_cached footer.html %}
34
+ {%- if page.layout == 'editorial' -%}
35
+ {%- assign footer = false -%}
36
+ {%- else -%}
37
+ {%- assign footer = true -%}
38
+ {%- endif -%}
39
+
40
+ {% include_cached footer.html footer=footer %}
35
41
  </main>
36
42
  </body>
37
43
  </html>
@@ -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,10 +7,11 @@ 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>
@@ -0,0 +1,19 @@
1
+ main {
2
+ #editorial {
3
+ .media {
4
+ img {
5
+ margin-right: 1rem;
6
+ margin-bottom: 1rem;
7
+ }
8
+ }
9
+
10
+ ul {
11
+ list-style: none;
12
+ padding: 0;
13
+ }
14
+
15
+ p {
16
+ margin-bottom: 0;
17
+ }
18
+ }
19
+ }
@@ -1,25 +1,14 @@
1
1
  main {
2
2
  & > footer {
3
+ border-top: $gray-300 1px solid;
4
+ font-size: .8rem;
3
5
  margin-top: 2rem;
4
6
  padding-top: 1rem;
5
7
  padding-bottom: 1rem;
6
- border-top: $gray-300 1px solid;
7
- font-size: .8rem;
8
-
9
- .media {
10
- img {
11
- margin-right: 1rem;
12
- margin-bottom: 1rem;
13
- }
14
- }
15
8
 
16
9
  ul {
17
10
  list-style: none;
18
11
  padding: 0;
19
12
  }
20
-
21
- p {
22
- margin-bottom: 0;
23
- }
24
13
  }
25
14
  }
@@ -1,14 +1,18 @@
1
1
  .books {
2
2
  .book {
3
+ max-width: calc(212px + 15px + 15px);
3
4
  margin-top: 2rem;
4
5
  margin-bottom: 2rem;
5
6
  margin-right: 1rem;
6
7
  margin-left: 1rem;
7
8
 
9
+ img {
10
+ max-width: 212px;
11
+ }
12
+
8
13
  h2 {
9
14
  margin-top: 1rem;
10
15
  font-size: 1rem;
11
- max-width: 212px;
12
16
  }
13
17
 
14
18
  p {
@@ -13,4 +13,5 @@
13
13
  @import "typography";
14
14
  @import "navbar";
15
15
  @import "home";
16
+ @import "editorial";
16
17
  @import "footer";
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.2
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-25 00:00:00.000000000 Z
11
+ date: 2020-06-05 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
@@ -161,18 +175,50 @@ 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
189
+ - _includes/editorial.html
190
+ - _includes/email.html
169
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
170
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
171
216
  - _layouts/book.html
172
217
  - _layouts/default.html
173
218
  - _layouts/editorial.html
174
219
  - _layouts/home.html
175
220
  - _layouts/post.html
221
+ - _sass/editorial.scss
176
222
  - _sass/footer.scss
177
223
  - _sass/home.scss
178
224
  - _sass/navbar.scss