adhesiones-jekyll-theme 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2b83f4669fa7fac72dcec287ba812e208141780365c4aea4d467f93d58a4004e
4
- data.tar.gz: 439a8451175bf8c903528fb0e1b24ca3020c4dfafdeceebbe54c293450c6a713
3
+ metadata.gz: dc3c11222a90efa3fbd0a04ff8b7c0f6f88b4d35347b14d13c910a38cfa62069
4
+ data.tar.gz: fa39f4de8901a80f29760d6764d9dd39a96654626a4b65264e5c86f89f112328
5
5
  SHA512:
6
- metadata.gz: 79d90bbab55dbd7b4d103694f934fa9e87e71aa040350546e107f34512e61804a83be48df5b673153f6b7d5871f77a921f4dd33b2c0a829673134e4b0395e760
7
- data.tar.gz: 60b43b3fa85db225e6d345a7bd9cc85d271cac6eb1190efaa52158f67a0b8db0c9df70d1c22eec1a627dfdc326d9f9ab0b0cf95d0adcdf1f8b2573043124c735
6
+ metadata.gz: 40a36146b85df044dec63d0c7cb983b139dc247522622a60d6c87585620891e2a51b8c3606cfeda217e51d9aeb146f6b3ae835426c628c8b4adc0cd6f9d9e281
7
+ data.tar.gz: 285fc3c51bf75b03fa0cf692abbd46b114a82054a45ce79dce73f1ef8d2087770d51f90f826d7c4d747bbcc164dcc38de774c0a7098b02240884a05b6350b12a
@@ -4,6 +4,7 @@ date: '%d/%m/%Y'
4
4
  layouts:
5
5
  post: Artículo
6
6
  adhesion: Adhesión
7
+ adhesion_individual: Adhesión individual
7
8
  home:
8
9
  campaign:
9
10
  text: Creá tu campaña
@@ -12,8 +13,10 @@ home:
12
13
  text: Imprimir
13
14
  icon: print
14
15
  form:
15
- title: Sumate a la lucha
16
+ title: Sumá tu adhesión
16
17
  submit: Adherir
18
+ adhesion: Adherir como organización
19
+ adhesion_individual: Adherir como individue
17
20
  adhesiones: Adhesiones
18
21
  metric: firmas
19
22
  share_post:
@@ -2,7 +2,7 @@
2
2
  title:
3
3
  type: 'string'
4
4
  required: true
5
- col: 4
5
+ col: 6
6
6
  label:
7
7
  es: 'Nombre de la organización'
8
8
  en: 'Organization name'
@@ -11,7 +11,7 @@ title:
11
11
  en: ''
12
12
  web:
13
13
  type: 'url'
14
- col: 4
14
+ col: 6
15
15
  label:
16
16
  es: 'Sitio de la organización'
17
17
  en: 'Organization website'
@@ -19,13 +19,15 @@ web:
19
19
  es: ''
20
20
  en: ''
21
21
  email:
22
+ private: true
22
23
  type: 'email'
23
- col: 4
24
+ col: 6
24
25
  label:
25
26
  es: 'Correo electrónico'
26
27
  en: 'E-mail'
27
28
  logo:
28
- type: 'file'
29
+ col: 6
30
+ type: 'image'
29
31
  path:
30
32
  label:
31
33
  es: 'Logo'
@@ -0,0 +1,114 @@
1
+ ---
2
+ title:
3
+ private: true
4
+ type: 'number'
5
+ required: true
6
+ label:
7
+ es: 'Documento Nacional de Identidad'
8
+ en: 'National ID number'
9
+ help:
10
+ es: ''
11
+ en: ''
12
+ autocomplete: 'off'
13
+ name:
14
+ type: 'string'
15
+ col: 6
16
+ label:
17
+ es: 'Nombres'
18
+ en: 'Given names'
19
+ help:
20
+ es: ''
21
+ en: ''
22
+ autocomplete: 'given-name'
23
+ last_name:
24
+ private: true
25
+ type: 'string'
26
+ col: 6
27
+ label:
28
+ es: 'Apellidos'
29
+ en: 'Family name'
30
+ help:
31
+ es: ''
32
+ en: ''
33
+ autocomplete: 'family-name'
34
+ locality:
35
+ private: true
36
+ type: 'string'
37
+ col: 6
38
+ label:
39
+ es: 'Localidad'
40
+ en: 'Locality'
41
+ help:
42
+ es: ''
43
+ en: ''
44
+ autocomplete: 'address-level2'
45
+ city:
46
+ private: true
47
+ type: 'string'
48
+ col: 6
49
+ label:
50
+ es: 'Ciudad'
51
+ en: 'City'
52
+ help:
53
+ es: ''
54
+ en: ''
55
+ autocomplete: 'address-level1'
56
+ phone:
57
+ private: true
58
+ type: 'tel'
59
+ col: 6
60
+ label:
61
+ es: 'Celular'
62
+ en: 'Cellphone number'
63
+ autocomplete: 'tel'
64
+ email:
65
+ private: true
66
+ type: 'email'
67
+ col: 6
68
+ label:
69
+ es: 'Correo electrónico'
70
+ en: 'E-mail'
71
+ content:
72
+ type: 'markdown_content'
73
+ label:
74
+ es: 'Adhesión'
75
+ en: 'Endorsement'
76
+ help:
77
+ es: ''
78
+ en: ''
79
+ public:
80
+ type: 'boolean'
81
+ label:
82
+ es: 'Doy permiso para que mi adhesión se publique en el sitio'
83
+ en: 'I give permission to publish my endorsement in the site'
84
+ help:
85
+ es: ''
86
+ en: ''
87
+ consent:
88
+ id: individual_consent
89
+ type: 'boolean'
90
+ required: true
91
+ label:
92
+ es: 'Acepto las políticas de privacidad'
93
+ en: 'I agree to the privacy policy'
94
+ help:
95
+ es: ''
96
+ en: ''
97
+ draft:
98
+ skip: true
99
+ type: 'boolean'
100
+ label:
101
+ es: 'Borrador'
102
+ en: 'Draft'
103
+ help:
104
+ es: 'Este artículo aun no está listo para publicar'
105
+ en: "This post isn't ready to be published yet"
106
+ order:
107
+ skip: true
108
+ type: 'order'
109
+ label:
110
+ es: 'Orden'
111
+ en: 'Order'
112
+ help:
113
+ es: 'La posición del artículo en la lista de artículos'
114
+ en: 'The post position in the posts list'
@@ -39,11 +39,17 @@ cita:
39
39
  label:
40
40
  es: 'Cita de autoridad o llamada a la acción'
41
41
  en: 'Quote or call to action'
42
+ help:
43
+ es: ''
44
+ en: ''
42
45
  cita_autore:
43
46
  type: 'string'
44
47
  label:
45
48
  es: 'Autore de la cita'
46
49
  en: 'Quote author'
50
+ help:
51
+ es: ''
52
+ en: ''
47
53
  image:
48
54
  type: 'image'
49
55
  path:
@@ -2,7 +2,9 @@
2
2
  {%- assign id = include.field[1].id | default: name -%}
3
3
  {%- assign label = include.field[1]['path'].label[site.locale] -%}
4
4
  {%- assign help = include.field[1]['path'].help[site.locale] -%}
5
- {%- assign autocomplete = include.field[1].autocomplete -%}
5
+ {%- assign accept = include.field[1].accept -%}
6
+
7
+ <label>{{ label }}</label>
6
8
 
7
9
  <div class="custom-file">
8
10
  <input
@@ -15,8 +17,8 @@
15
17
  type="{{ include.field[1].type }}"
16
18
  name="{{ name }}[path]"
17
19
  id="{{ id }}_path"
18
- {% if autocomplete %}
19
- autocomplete="{{ autocomplete }}"
20
+ {% if accept %}
21
+ accept="{{ accept }}"
20
22
  {% endif %}
21
23
  class="custom-file-input" />
22
24
 
@@ -0,0 +1 @@
1
+ ../image.html
@@ -0,0 +1 @@
1
+ ../tel.html
@@ -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>
@@ -1,9 +1,18 @@
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 %}
1
+ {% capture url %}{{ site.url }}{{ include.url }}{% endcapture %}
2
+
3
+ {% unless include.share.url == '%url' %}
4
+ {% assign url = url | cgi_escape %}
5
+ {% endunless %}
6
+ {% assign title = include.title | cgi_escape %}
7
+ {% assign description = include.description | default: '' | cgi_escape %}
4
8
 
5
9
  <a
6
- target="_blank"
10
+ {% if include.share.url == '%url' %}
11
+ download
12
+ {% else %}
13
+ target="_blank"
14
+ {% endif %}
15
+ rel="nofollow"
7
16
  title="{{ include.share.title }}"
8
17
  class="d-flex flex-column align-items-center p-3"
9
18
  href="{{ include.share.url | replace: '%url', url | replace: '%title', title | replace: '%description', description }}">
@@ -0,0 +1 @@
1
+ {% include input.html field=field %}
@@ -9,7 +9,7 @@ layout: default
9
9
  <header>
10
10
  <div class="row no-gutters align-items-center justify-content-between mb-3 mt-5">
11
11
  <div class="col-6 col-lg-9">
12
- <h2 class="ml-3">{{ documento.author }}</h2>
12
+ <h2 class="m-0 pr-3">{{ documento.author }}</h2>
13
13
  </div>
14
14
 
15
15
  <div class="col-6 col-lg-3 d-print-none d-flex flex-column align-items-end justify-content-center">
@@ -23,7 +23,7 @@ layout: default
23
23
  </div>
24
24
 
25
25
  <div class="row no-gutters align-items-center justify-content-between mb-3">
26
- <div class="col-9">
26
+ <div class="col-9 pr-3">
27
27
  <h1 class="font-weight-bold">{{ documento.title }}</h1>
28
28
  &mdash;
29
29
  <time datetime="{{ documento.date }}">
@@ -57,26 +57,36 @@ layout: default
57
57
 
58
58
  <section id="sumarse" class="d-print-none">
59
59
  <h1 class="color-up">{{ site.i18n.home.form.title }}</h1>
60
+ <img class="d-none" src="{{ site.sutty }}v1/sites/{{ site.hostname }}/invitades/cookie.png" />
60
61
 
61
62
  <div class="row no-gutters align-items-center">
62
- <div class="col-12 col-lg-6">
63
- <img class="d-none" src="{{ site.sutty }}v1/sites/{{ site.hostname }}/invitades/cookie.png" />
64
- <form action="{{ site.sutty }}v1/sites/{{ site.hostname }}/posts/adhesion" method="post" enctype="multipart/form-data">
65
- <div class="row justify-content-center">
66
- {%- for field in site.data.layouts.adhesion -%}
67
- {%- if field[1].skip -%}{% continue %}{%- endif -%}
68
- {%- assign template = field[1].type | append: '.html' -%}
69
-
70
- <div class="col-12 col-lg-{{ field[1].col | default: 12 | prepend: '-' }}">
71
- {% include {{ template }} field=field %}
63
+ <div class="col-12 col-lg-6 pt-5">
64
+ {%- assign forms = 'adhesion,adhesion_individual' | split: ',' -%}
65
+ {% for form in forms %}
66
+ <input type="radio" name="adhesiones" id="toggler-{{ form }}" class="toggler" autocomplete="off" {% cycle 'checked','' %} />
67
+ <label class="btn border position-absolute top {% cycle 'left','right' %}" for="toggler-{{ form }}">
68
+ {{ site.i18n.home.form[form] }}
69
+ </label>
70
+
71
+ <div class="toggled collapsed fade">
72
+ <form action="{{ site.sutty }}v1/sites/{{ site.hostname }}/posts/{{ form }}" method="post" enctype="multipart/form-data">
73
+ <div class="row justify-content-center">
74
+ {%- for field in site.data.layouts[form] -%}
75
+ {%- if field[1].skip -%}{% continue %}{%- endif -%}
76
+ {%- assign template = field[1].type | append: '.html' -%}
77
+
78
+ <div class="col-12 col-lg-{{ field[1].col | default: 12 }}">
79
+ {% include {{ template }} field=field %}
80
+ </div>
81
+ {%- endfor -%}
82
+
83
+ <div class="col-12">
84
+ <input type="submit" value="{{ site.i18n.home.form.submit }}" class="btn btn-success btn-block" />
85
+ </div>
72
86
  </div>
73
- {%- endfor -%}
74
-
75
- <div class="col-12">
76
- <input type="submit" value="{{ site.i18n.home.form.submit }}" class="btn btn-success btn-block" />
77
- </div>
87
+ </form>
78
88
  </div>
79
- </form>
89
+ {% endfor %}
80
90
  </div>
81
91
 
82
92
  <div class="col-12 col-lg-6 mt-5 mt-lg-0 pl-lg-5">
@@ -108,7 +118,9 @@ layout: default
108
118
  </div>
109
119
  </section>
110
120
 
111
- {% assign adhesiones = site.posts | where: 'layout', 'adhesion' %}
121
+ {%- assign adhesiones = site.posts | where: 'layout', 'adhesion' -%}
122
+ {%- assign adhesiones_individuales = site.posts | where: 'layout', 'adhesion_individual' -%}
123
+
112
124
  <section class="mt-5" id="adhesiones">
113
125
  <header class="row align-items-center justify-content-between">
114
126
  <div class="col-12 col-lg-4">
@@ -5,25 +5,59 @@
5
5
  */
6
6
 
7
7
  // Comenzamos con un input checkbox con la clase toggler
8
- input[type="checkbox"].toggler {
8
+ input.toggler {
9
9
  // Lo ocultamos pero todavía queremos que se le pueda dar foco con el
10
10
  // teclado
11
11
  opacity: 0;
12
12
  position: absolute;
13
13
 
14
14
  // Ocultamos el elemento colapsable
15
- & ~ label {
15
+ & + label {
16
+ &.top {
17
+ top: 0
18
+ }
19
+
20
+ &.left {
21
+ left: 0
22
+ }
23
+
24
+ &.right {
25
+ right: 0
26
+ }
27
+
28
+ & + .toggled,
16
29
  .toggled {
17
30
  z-index: 10;
18
31
  visibility: hidden;
19
32
  }
33
+
34
+ & + .toggled {
35
+ &.fade {
36
+ opacity: 0
37
+ }
38
+
39
+ &.collapsed {
40
+ height: 0;
41
+ }
42
+ }
20
43
  }
21
44
 
22
45
  // Al tildar el input, mostramos el elemento
23
- &:checked ~ label {
46
+ &:checked + label {
47
+ & + .toggled,
24
48
  .toggled {
25
49
  visibility: visible;
26
50
  }
51
+
52
+ & + .toggled {
53
+ &.fade {
54
+ opacity: 1
55
+ }
56
+
57
+ &.collapsed {
58
+ height: auto;
59
+ }
60
+ }
27
61
  }
28
62
 
29
63
  & + label {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adhesiones-jekyll-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-07-23 00:00:00.000000000 Z
13
+ date: 2020-08-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: jekyll
@@ -169,6 +169,7 @@ files:
169
169
  - _data/en.yml
170
170
  - _data/es.yml
171
171
  - _data/layouts/adhesion.yml
172
+ - _data/layouts/adhesion_individual.yml
172
173
  - _data/layouts/post.yml
173
174
  - _includes/boolean.html
174
175
  - _includes/contact.html
@@ -180,6 +181,7 @@ files:
180
181
  - _includes/form/email.html
181
182
  - _includes/form/file.html
182
183
  - _includes/form/hidden.html
184
+ - _includes/form/image.html
183
185
  - _includes/form/input.html
184
186
  - _includes/form/markdown_content.html
185
187
  - _includes/form/number.html
@@ -188,9 +190,11 @@ files:
188
190
  - _includes/form/separator.html
189
191
  - _includes/form/string.html
190
192
  - _includes/form/submit.html
193
+ - _includes/form/tel.html
191
194
  - _includes/form/text.html
192
195
  - _includes/form/url.html
193
196
  - _includes/hidden.html
197
+ - _includes/image.html
194
198
  - _includes/input.html
195
199
  - _includes/markdown_content.html
196
200
  - _includes/navbar.html
@@ -202,6 +206,7 @@ files:
202
206
  - _includes/share_box.html
203
207
  - _includes/string.html
204
208
  - _includes/submit.html
209
+ - _includes/tel.html
205
210
  - _includes/text.html
206
211
  - _includes/url.html
207
212
  - _layouts/default.html