adhesiones-jekyll-theme 0.4.1 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/_data/schema.yml ADDED
@@ -0,0 +1,13 @@
1
+ ---
2
+ organization:
3
+ home:
4
+ - "adhesion"
5
+ - "adhesion_individual"
6
+ post: []
7
+ about:
8
+ - "menu_internal"
9
+ - "menu_external"
10
+ theme:
11
+ - "privacy_policy"
12
+ - "code_of_conduct"
13
+ - "license"
data/_data/sutty.yml ADDED
@@ -0,0 +1,6 @@
1
+ ---
2
+ colaboracion_anonima: true
3
+ contact: false
4
+ acepta_invitades: false
5
+ slugify_mode: "default"
6
+ pagination: true
@@ -18,7 +18,7 @@
18
18
 
19
19
  {% if privacy_policy %}
20
20
  <li>
21
- <a href="{{ privacy_policy.url }}" rel="privacy-policy">{{ privacy_policy.title }}</a>
21
+ <a href="{{ privacy_policy.url }}" rel="privacy-policy" id="privacy-policy">{{ privacy_policy.title }}</a>
22
22
  </li>
23
23
  {% endif %}
24
24
 
@@ -1,35 +1,19 @@
1
- <nav class="navbar navbar-expand-lg navbar-light bg-light d-print-block" role="navigation" aria-label="{{ site.i18n.menu.title }}">
2
- <a class="navbar-brand" href="">
3
- {% include_cached logo.svg %}
4
- </a>
1
+ {% assign about = site.posts | find: 'layout', 'about' %}
2
+ {% assign menu = site.posts | where: 'layout', 'menu_internal' %}
3
+ {% assign menu = site.posts | where: 'layout', 'menu_external' | concat: menu | order %}
5
4
 
6
- <ul class="navbar-nav d-print-none" data-controller="menu">
7
- {%- for item in site.i18n.menu.items -%}
8
- {% comment %}
9
- Algunos items del menú tienen layouts para indicar que
10
- queremos el primero de esos artículos independientemente de
11
- la URL.
5
+ <nav class="navbar navbar-expand-lg navbar-light d-print-block" role="navigation" aria-label="{{ site.i18n.menu.title }}">
6
+ {% if about.logo.path %}
7
+ <a class="navbar-brand" href="?#">
8
+ <img src="{{ about.logo.path | thumbnail: nil, 80 | component_escape }}" alt="{{ about.logo.description | escape_once }}" />
9
+ </a>
10
+ {% endif %}
12
11
 
13
- XXX: Como las asignaciones sobreviven a este archivo hay que
14
- convertirlas a nil cuando se las deja de usar.
15
- {% endcomment %}
16
- {%- if item.layout -%}
17
- {%- assign post = site.posts | find: 'layout', item.layout -%}
18
- {%- else -%}
19
- {%- assign post = nil -%}
20
- {%- endif -%}
21
-
22
- {%- assign href = post.url | default: item.href -%}
23
- {%- assign active = include.active_cache_key | equals: href -%}
12
+ <ul class="navbar-nav d-print-none">
13
+ {%- for item in menu -%}
24
14
  <li class="nav-item">
25
- <a data-target="menu.item" class="nav-link {{ active | ternary: 'active', '' }}" href="{{ href }}">
15
+ <a data-target="menu.item" class="nav-link" href="{{ item.link | component_escape }}">
26
16
  {{ item.title }}
27
-
28
- {%- if active -%}
29
- <span class="sr-only">
30
- {{ site.i18n.menu.active | default: '(current)' }}
31
- </span>
32
- {%- endif -%}
33
17
  </a>
34
18
  </li>
35
19
  {%- endfor -%}
@@ -0,0 +1 @@
1
+ {% include text.html field=field %}
@@ -0,0 +1,5 @@
1
+ {% comment %}
2
+ @param :src [String]
3
+ {% endcomment %}
4
+
5
+ <script defer src="{{ include.src | uri_escape }}" data-turbo-track="reload"></script>
@@ -1,6 +1,6 @@
1
1
  <input type="checkbox" id="share" class="toggler" autocomplete="off" />
2
2
 
3
- <label class="share btn border btn-block" for="share">
3
+ <label class="share btn border btn-block" for="share" data-action="share#share">
4
4
  {{ site.i18n.share.text }}
5
5
  <i class="fa fa-{{ site.i18n.share.icon }}"></i>
6
6
 
@@ -11,14 +11,16 @@
11
11
 
12
12
  <link href="assets/css/styles.css?{{ site.time | date: '%s' }}" rel="stylesheet" data-turbo-track="reload">
13
13
 
14
- {% comment %}
15
- Webpack. La configuración se pasa por variables de entorno, en
16
- desarrollo hay que evitar el archivo .env (copiarlo de .env.example
17
- si no existe.
18
- {% endcomment %}
19
- <link rel="preload" as="script" type="text/javascript" href="env.js" />
20
- <script type="text/javascript" src="env.js"></script>
21
- <script defer type="text/javascript" src="assets/js/pack.js"></script>
14
+ {%- include script.html src="assets/js/env.js" -%}
15
+ {%- if jekyll.environment == 'production' -%}
16
+ {%- for pack in site.data.manifest.outputs -%}
17
+ {%- unless pack[1].entryPoint -%}{%- continue -%}{%- endunless -%}
18
+ {%- assign src = pack[0] -%}
19
+ {%- include script.html src=src -%}
20
+ {%- endfor -%}
21
+ {%- else -%}
22
+ {%- include script.html src="pack.js" -%}
23
+ {%- endif -%}
22
24
 
23
25
  {% comment %}
24
26
  Agregar otras tipografías. Esto hace que las tipografías se carguen
@@ -47,6 +49,8 @@
47
49
  {%- endif -%}
48
50
  </head>
49
51
  <body>
52
+ {% include_cached navbar.html %}
53
+
50
54
  <main class="container">
51
55
  <div class="row justify-content-center d-print-block">
52
56
  <div class="col">
data/_layouts/home.html CHANGED
@@ -1,22 +1,26 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
-
5
- {% assign documento = site.posts | where: 'layout', 'post' | first %}
4
+ {%- assign adhesiones = site.posts | where: 'layout', 'adhesion' -%}
5
+ {%- assign adhesiones_individuales = site.posts | where: 'layout', 'adhesion_individual' -%}
6
+ {%- assign total = adhesiones_individuales | size %}
7
+ {%- assign total = adhesiones | size | plus: total -%}
8
+ {%- assign adhesiones_individuales = adhesiones_individuales | where: 'public', true | where: 'draft', false -%}
6
9
 
7
10
  <section id="documento">
8
11
  <article>
9
12
  <header>
10
13
  <div class="row no-gutters align-items-center justify-content-between mb-3 mt-5">
11
14
  <div class="col-6 col-lg-9">
12
- <h2 class="m-0 pr-3">{{ documento.author }}</h2>
15
+ <h2 class="m-0 pr-3">{{ page.author }}</h2>
13
16
  </div>
14
17
 
15
18
  <div class="col-6 col-lg-3 d-print-none d-flex flex-column align-items-end justify-content-center">
16
19
  <a
17
- href="{{ site.i18n.home.campaign.url }}"
20
+ href="{{ site.i18n.home.campaign.url | component_escape }}"
18
21
  class="btn btn-primary btn-sm-sm btn-xs-sm btn-block"
19
- target="_blank">
22
+ target="_blank"
23
+ rel="noopener">
20
24
  {{ site.i18n.home.campaign.text }}
21
25
  </a>
22
26
  </div>
@@ -24,40 +28,47 @@ layout: default
24
28
 
25
29
  <div class="row no-gutters align-items-center justify-content-between mb-3">
26
30
  <div class="col-9 pr-3">
27
- <h1 class="font-weight-bold">{{ documento.title }}</h1>
31
+ <h1 class="font-weight-bold">{{ page.title }}</h1>
28
32
  &mdash;
29
- <time datetime="{{ documento.date }}">
30
- {{ documento.date | date: site.i18n.date.format }}
33
+ <time datetime="{{ page.date }}">
34
+ {{ page.date | date: site.i18n.date.format }}
31
35
  </time>
32
36
  </div>
33
37
 
34
- <div class="col-12 col-lg-3 d-print-none d-flex flex-column align-items-end justify-content-center">
35
- <button class="print btn border-left btn-block mb-3">
38
+ <div
39
+ data-controller="print share"
40
+ data-share-title-value="{{ page.title | escape_once }}"
41
+ data-share-text-value="{{ page.description | escape_once }}"
42
+ data-share-url-value="{{ page.url | absolute | component_escape }}"
43
+ class="col-12 col-lg-3 d-print-none d-flex flex-column align-items-end justify-content-center">
44
+ <button data-action="print#print" class="btn border-left btn-block mb-3">
36
45
  {{ site.i18n.home.print.text }}
37
46
  <i class="fa fa-{{ site.i18n.home.print.icon }}"></i>
38
47
  </button>
39
48
 
40
- {% include share_box.html url=page.url title=documento.title description=documento.description %}
49
+ {% include share_box.html url=page.url title=page.title description=page.description %}
41
50
  </div>
42
51
  </div>
43
52
  </header>
44
53
 
45
- {%- if documento.image.path -%}
54
+ {%- if page.image.path -%}
46
55
  <div class="float-lg-right">
47
56
  <img
48
57
  class="img-fluid ml-lg-3 mb-lg-3"
49
- src="{{ documento.image.path | thumbnail: 500 }}"
50
- alt="{{ documento.image.description | default: documento.title }}" />
58
+ src="{{ page.image.path | thumbnail: 500 | component_escape }}"
59
+ alt="{{ page.image.description | default: page.title | escape_once }}" />
51
60
  </div>
52
61
  {%- endif -%}
53
62
 
54
- {{ documento.content }}
63
+ <div class="content">
64
+ {{ page.content }}
65
+ </div>
55
66
  </article>
56
67
  </section>
57
68
 
58
69
  <section id="sumarse" class="d-print-none">
59
70
  <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" />
71
+ <img class="d-none" src="api/v1/sites/{{ site.name }}/invitades/cookie.png" />
61
72
 
62
73
  <div class="row no-gutters align-items-center">
63
74
  <div class="col-12 col-lg-6 pt-5">
@@ -78,8 +89,9 @@ layout: default
78
89
  <div class="toggled collapsed fade">
79
90
  <form
80
91
  data-controller="contact"
81
- data-delay="30"
82
- action="{{ site.sutty }}v1/sites/{{ site.hostname }}/posts/{{ form }}" method="post" enctype="multipart/form-data">
92
+ data-contact-delay-value="30"
93
+ action="api/v1/sites/{{ site.name }}/posts/{{ form }}" method="post" enctype="multipart/form-data">
94
+ <input type="hidden" name="lang" value="{{ site.locale }}" />
83
95
  <div class="row justify-content-center">
84
96
  {%- for field in site.data.layouts[form] -%}
85
97
  {%- if field[1].skip -%}{% continue %}{%- endif -%}
@@ -92,11 +104,9 @@ layout: default
92
104
 
93
105
  <div class="col-12">
94
106
  <input
95
- data-target="contact.submit"
107
+ data-contact-target="submit"
96
108
  type="submit" value="{{ site.i18n.home.form.submit }}" class="btn btn-success btn-block" />
97
- <small
98
- data-target="contact.help"
99
- class="form-text text-muted">
109
+ <small class="form-text text-muted">
100
110
  {{ site.i18n.home.form.submit_help }}
101
111
  </small>
102
112
  </div>
@@ -107,7 +117,7 @@ layout: default
107
117
  </div>
108
118
 
109
119
  <div class="col-12 col-lg-6 mt-5 mt-lg-0 pl-lg-5">
110
- {%- if documento.cita -%}
120
+ {%- if page.cita -%}
111
121
  <blockquote class="blockquote">
112
122
 
113
123
  <div class="font-bigger d-flex flex-row align-items-center justify-content-space-between">
@@ -116,7 +126,7 @@ layout: default
116
126
  </div>
117
127
 
118
128
  <div>
119
- {{ documento.cita | append: '' | markdownify }}
129
+ {{ page.cita | append: '' | markdownify }}
120
130
  </div>
121
131
 
122
132
  <div class="ml-2 align-self-end">
@@ -124,9 +134,9 @@ layout: default
124
134
  </div>
125
135
  </div>
126
136
 
127
- {%- if documento.cita_autore -%}
137
+ {%- if page.cita_autore -%}
128
138
  <footer class="blockquote-footer text-right">
129
- {{ documento.cita_autore }}
139
+ {{ page.cita_autore }}
130
140
  </footer>
131
141
  {%- endif -%}
132
142
  </blockquote>
@@ -135,12 +145,6 @@ layout: default
135
145
  </div>
136
146
  </section>
137
147
 
138
- {%- assign adhesiones = site.posts | where: 'layout', 'adhesion' -%}
139
- {%- assign adhesiones_individuales = site.posts | where: 'layout', 'adhesion_individual' -%}
140
- {%- assign total = adhesiones_individuales | size %}
141
- {%- assign total = adhesiones | size | plus: total -%}
142
- {%- assign adhesiones_individuales = adhesiones_individuales | where: 'public', true | where: 'draft', false -%}
143
-
144
148
  <section class="mt-5" id="adhesiones">
145
149
  <header class="row align-items-center justify-content-between">
146
150
  <div class="col-12 col-lg-4">
@@ -155,8 +159,12 @@ layout: default
155
159
  </p>
156
160
  </div>
157
161
 
158
- <div class="col-6 col-lg-4">
159
- <label for="share" class="share btn border d-print-none">
162
+ <div class="col-6 col-lg-4"
163
+ data-controller="share"
164
+ data-share-title-value="{{ page.title | escape_once }}"
165
+ data-share-text-value="{{ page.description | escape_once }}"
166
+ data-share-url-value="{{ page.url | absolute | component_escape }}">
167
+ <label for="share" class="share btn border d-print-none" data-action="share#share">
160
168
  {{ site.i18n.home.share_post.text }}
161
169
  <i class="fa fa-{{ site.i18n.home.share_post.icon }}"></i>
162
170
  </label>
@@ -184,7 +192,9 @@ layout: default
184
192
  </time>
185
193
  </header>
186
194
 
187
- {{ adhesion.content }}
195
+ <div class="content">
196
+ {{ adhesion.content }}
197
+ </div>
188
198
  </article>
189
199
  {%- endfor -%}
190
200
 
@@ -203,11 +213,17 @@ layout: default
203
213
  </time>
204
214
  </header>
205
215
 
206
- {{ adhesion.content }}
216
+ <div class="content">
217
+ {{ adhesion.content }}
218
+ </div>
207
219
  </article>
208
220
  {%- endfor -%}
209
221
 
210
222
  <footer class="row no-gutters justify-space-between">
223
+ <div class="col-12">
224
+ <h1>{{ site.i18n.home.organizaciones }}</h1>
225
+ </div>
226
+
211
227
  {%- for adhesion in adhesiones -%}
212
228
  {%- unless adhesion.logo.path -%}
213
229
  {%- continue -%}
@@ -215,15 +231,19 @@ layout: default
215
231
 
216
232
  <div class="col mb-5">
217
233
  {%- if adhesion.web -%}
218
- <a href="{{ adhesion.web }}" target="_blank">
234
+ <a href="{{ adhesion.web | component_escape }}" target="_blank" rel="noopener">
219
235
  <img
220
- src="{{ adhesion.logo.path | thumbnail: 200 }}"
221
- alt="{{ adhesion.title }}" />
236
+ loading="lazy"
237
+ width="200"
238
+ src="{{ adhesion.logo.path | thumbnail: 200 | component_escape }}"
239
+ alt="{{ adhesion.title | escape_once }}" />
222
240
  </a>
223
241
  {%- else -%}
224
242
  <img
225
- src="{{ adhesion.logo.path | thumbnail: 200 }}"
226
- alt="{{ adhesion.title }}" />
243
+ loading="lazy"
244
+ width="200"
245
+ src="{{ adhesion.logo.path | thumbnail: 200 | component_escape }}"
246
+ alt="{{ adhesion.title | escape_once }}" />
227
247
  {%- endif -%}
228
248
  </div>
229
249
  {%- endfor -%}
data/_layouts/post.html CHANGED
@@ -36,7 +36,7 @@ layout: default
36
36
  </p>
37
37
  </header>
38
38
 
39
- <div class="e-content" itemprop="articleBody">
39
+ <div class="e-content content" itemprop="articleBody">
40
40
  {{ content }}
41
41
  </div>
42
42
 
@@ -0,0 +1,116 @@
1
+ .content {
2
+ p {
3
+ min-height: $font-size-base * $line-height-base;
4
+ }
5
+ h1 {
6
+ min-height: $h1-font-size * $headings-line-height;
7
+ }
8
+ h2 {
9
+ min-height: $h2-font-size * $headings-line-height;
10
+ text-transform: uppercase !important;
11
+ margin-top: 2rem;
12
+ margin-bottom: 1.5rem;
13
+ font-family: "Open Sans", sans-serif;
14
+ letter-spacing: 2.73px;
15
+ }
16
+
17
+ h3 {
18
+ min-height: $h3-font-size * $headings-line-height;
19
+ font-weight: $font-weight-bold;
20
+ margin: 2rem 0 1.5rem;
21
+ }
22
+
23
+ h4 {
24
+ min-height: $h4-font-size * $headings-line-height;
25
+ }
26
+ h5 {
27
+ min-height: $h5-font-size * $headings-line-height;
28
+ }
29
+ h6 {
30
+ min-height: $h6-font-size * $headings-line-height;
31
+ }
32
+
33
+ iframe {
34
+ border: 0;
35
+ }
36
+
37
+ audio {
38
+ width: 100%;
39
+ }
40
+
41
+ img,
42
+ video {
43
+ @extend .img-fluid;
44
+ height: auto;
45
+ margin: 2rem 0;
46
+ }
47
+
48
+ figure {
49
+ text-align: center;
50
+ margin: 0;
51
+ }
52
+
53
+ & > * {
54
+ margin-bottom: 1rem;
55
+
56
+ &:last-child {
57
+ margin-bottom: 0;
58
+ }
59
+ }
60
+
61
+ li p {
62
+ margin-bottom: $paragraph-margin-bottom;
63
+ }
64
+
65
+ a {
66
+ text-decoration: underline !important;
67
+ }
68
+
69
+ sup {
70
+ position: relative;
71
+ @include font-size(100%);
72
+ line-height: 0;
73
+ vertical-align: baseline;
74
+ top: 0;
75
+ font-weight: bold;
76
+
77
+ &:before {
78
+ content: "[";
79
+ }
80
+
81
+ &:after {
82
+ content: "]";
83
+ }
84
+ }
85
+
86
+ blockquote {
87
+ border-left: 4px solid rgba(0, 0, 0, 0.2);
88
+ margin-left: 0.75em;
89
+ padding-left: 0.5em;
90
+ }
91
+
92
+ a {
93
+ word-break: break-word !important;
94
+ word-wrap: break-word !important;
95
+ }
96
+ }
97
+
98
+ footer .content a {
99
+ text-decoration: none !important;
100
+ }
101
+
102
+ small,
103
+ .small {
104
+ @include font-size($small-font-size);
105
+ font-weight: unset;
106
+ }
107
+
108
+ .mw-100vw {
109
+ max-width: 100vw;
110
+ }
111
+
112
+ @media (min-width: 768px) {
113
+ .responsive-header {
114
+ min-height: $h1-font-size * $headings-line-height;
115
+ }
116
+ }
@@ -35,6 +35,7 @@ $theme-colors: (
35
35
 
36
36
  $border-width: 0.3rem;
37
37
  $border-color: $secondary;
38
+ $navbar-light-color: $secondary;
38
39
 
39
40
  .font-bigger {
40
41
  font-size: 2rem !important;
@@ -61,11 +62,12 @@ $border-color: $secondary;
61
62
  @import "snap";
62
63
  @import "editor";
63
64
  @import "menu";
65
+ @import "content";
64
66
 
65
67
  .callout {
66
68
  padding: 15px;
67
69
  margin: 25px 0;
68
- border-left: 3px solid #343a40;/*--gray-dark*/
70
+ border-left: 3px solid #343a40;
69
71
  }
70
72
 
71
73
  @include media-breakpoint-down('md') {
data/assets/js/env.js ADDED
@@ -0,0 +1,8 @@
1
+ ---
2
+ ---
3
+
4
+ window.env = {
5
+ AIRBRAKE_PROJECT_ID: {{ site.env.AIRBRAKE_PROJECT_ID | default: 0 }},
6
+ AIRBRAKE_PROJECT_KEY: '{{ site.env.AIRBRAKE_PROJECT_KEY }}',
7
+ JEKYLL_ENV: '{{ site.env.JEKYLL_ENV }}'
8
+ }