radios-comunitarias-jekyll-theme 0.1.0

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.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +168 -0
  3. data/README.md +113 -0
  4. data/_data/en.yml +38 -0
  5. data/_data/es.yml +61 -0
  6. data/_data/forms/contacto.yml +40 -0
  7. data/_data/layouts/post.yml +112 -0
  8. data/_data/layouts/radio.yml +165 -0
  9. data/_includes/boolean.html +30 -0
  10. data/_includes/contact.html +19 -0
  11. data/_includes/content.html +1 -0
  12. data/_includes/email.html +1 -0
  13. data/_includes/file.html +35 -0
  14. data/_includes/footer.html +28 -0
  15. data/_includes/form/boolean.html +1 -0
  16. data/_includes/form/content.html +1 -0
  17. data/_includes/form/email.html +1 -0
  18. data/_includes/form/file.html +1 -0
  19. data/_includes/form/hidden.html +1 -0
  20. data/_includes/form/image.html +1 -0
  21. data/_includes/form/input.html +1 -0
  22. data/_includes/form/markdown_content.html +1 -0
  23. data/_includes/form/number.html +1 -0
  24. data/_includes/form/predefined_array.html +1 -0
  25. data/_includes/form/section.html +1 -0
  26. data/_includes/form/separator.html +1 -0
  27. data/_includes/form/string.html +1 -0
  28. data/_includes/form/submit.html +1 -0
  29. data/_includes/form/tel.html +1 -0
  30. data/_includes/form/text.html +1 -0
  31. data/_includes/form/url.html +1 -0
  32. data/_includes/hidden.html +5 -0
  33. data/_includes/image.html +32 -0
  34. data/_includes/input.html +33 -0
  35. data/_includes/logo.html +5 -0
  36. data/_includes/markdown_content.html +1 -0
  37. data/_includes/navbar.html +78 -0
  38. data/_includes/number.html +1 -0
  39. data/_includes/post.html +118 -0
  40. data/_includes/predefined_array.html +39 -0
  41. data/_includes/reproductor.html +20 -0
  42. data/_includes/section.html +1 -0
  43. data/_includes/separator.html +1 -0
  44. data/_includes/share.html +28 -0
  45. data/_includes/share_box.html +13 -0
  46. data/_includes/string.html +3 -0
  47. data/_includes/submit.html +1 -0
  48. data/_includes/tel.html +1 -0
  49. data/_includes/text.html +32 -0
  50. data/_includes/url.html +1 -0
  51. data/_layouts/default.html +40 -0
  52. data/_layouts/home.html +30 -0
  53. data/_layouts/post.html +5 -0
  54. data/_layouts/radio.html +49 -0
  55. data/_sass/accessibility.scss +13 -0
  56. data/_sass/helpers.scss +54 -0
  57. data/_sass/share.html +12 -0
  58. data/_sass/share_box.html +16 -0
  59. data/_sass/share_box.scss +26 -0
  60. data/_sass/toggler.scss +39 -0
  61. data/assets/css/styles.scss +66 -0
  62. data/assets/fonts/forkawesome-webfont.woff2 +0 -0
  63. data/assets/js/script.js +50 -0
  64. metadata +279 -0
@@ -0,0 +1 @@
1
+ {% include input.html field=field %}
@@ -0,0 +1,118 @@
1
+ {% comment %}
2
+ Una plantilla que representa un artículo, podría ser un layout pero lo
3
+ ponemos en includes para poder reutilizarlo en la portada.
4
+
5
+ Ya tiene todos los metadatos para schema.org y microformats.org
6
+ {% endcomment %}
7
+
8
+ {% assign page = include.page %}
9
+
10
+ <article class="h-entry mt-5" itemscope itemtype="http://schema.org/Article">
11
+ <header class="row no-gutters align-items-center mb-3">
12
+ <div class="p-name col-12 col-lg-9">
13
+ <h1 class="p-name" itemprop="name headline">
14
+ {{ page.title | escape }}
15
+ </h1>
16
+
17
+ {%- if page.description -%}
18
+ <p class="lead p-summary" itemprop="description">{{ page.description | escape }}</p>
19
+ {%- endif -%}
20
+ </div>
21
+
22
+ <div class="col-6">
23
+ <p class="m-0">
24
+ {%- for author in page.author -%}
25
+ <span itemprop="author" itemscope itemtype="http://schema.org/Person">
26
+ <span class="p-author h-card" itemprop="name">
27
+ {{ author | escape }}
28
+ </span>{% unless forloop.last %},{% endunless %}
29
+ </span>
30
+ {%- endfor -%}
31
+ </p>
32
+ </div>
33
+
34
+ <div class="col-6 col-lg-3 text-right">
35
+ <time
36
+ class="dt-published"
37
+ datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
38
+ {%- assign date_format = site.i18n.date | default: "%b %-d, %Y" -%}
39
+ {{ page.date | date: date_format }}
40
+ </time>
41
+ </div>
42
+ </header>
43
+
44
+ {% comment %}
45
+ En responsive, el contenido pierde el espacio que lo separa de la
46
+ imagen a la derecha y las dos columnas invierten su orden, la imagen
47
+ se coloca encima.
48
+ {% endcomment %}
49
+ <div class="row no-gutters">
50
+ <div class="col-12 col-md-6 e-content pt-3 pr-md-3 order-1 order-md-0" itemprop="articleBody">
51
+ {{ page.content }}
52
+
53
+ {% comment %}
54
+ TODO: Estaría bueno tener una forma de extraer las imágenes
55
+ y videos y mandarlas a la barra del costado no?
56
+ {% endcomment %}
57
+ </div>
58
+
59
+ <div class="col-12 col-md-6 col-lg-3 order-0 order-md-1">
60
+ {%- if page.image.path -%}
61
+ <picture>
62
+ {% comment %}
63
+ Producir versiones de las imágenes para distintos tamaños
64
+ de pantalla, de forma que siempre se baje la resolución
65
+ justa.
66
+
67
+ TODO: Vincular a la imagen completa para que librenauta
68
+ pueda collagear :P
69
+ {% endcomment %}
70
+ {% for size in site.images.sizes %}
71
+ <source srcset="{{ page.image.path | thumbnail: size }}" media="(max-width: {{ size }}px)" />
72
+ {% endfor %}
73
+
74
+ <img
75
+ class="img-fluid"
76
+ src="{{ page.image.path | thumbnail: 1140 }}"
77
+ alt="{{ page.image.description | default: page.title }}" />
78
+ </picture>
79
+ {%- endif -%}
80
+
81
+ {%
82
+ include_cached
83
+ share_box.html
84
+ url=page.url
85
+ title=page.title
86
+ description=page.description
87
+ categories=page.categories
88
+ %}
89
+ </div>
90
+ </div>
91
+
92
+ <footer>
93
+ <a class="u-url" itemprop="url" href="{{ page.url }}" hidden>
94
+ {{ site.url }}/{{ page.url }}
95
+ </a>
96
+
97
+ {%- if page.uuid -%}
98
+ <span hidden itemprop="identifier">{{ page.uuid }}</span>
99
+ {%- endif -%}
100
+
101
+ {%- if page.license.url -%}
102
+ <p itemprop="license" itemtype="http://schema.org/CreativeWork">
103
+ <a rel="license" itemprop="url" href="{{ page.license.url }}">
104
+ <span itemprop="articleBody">
105
+ {{ page.license.description }}
106
+ </span>
107
+ </a>
108
+ </p>
109
+ {%- endif -%}
110
+
111
+ {%- if page.tags %}
112
+ <span itemprop="keywords" hidden>{{ page.tags | join: ', ' }}</span>
113
+ {%- for tag in page.tags -%}
114
+ <span hidden class="h-category">{{ tag }}</span>
115
+ {%- endfor -%}
116
+ {%- endif -%}
117
+ </footer>
118
+ </article>
@@ -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,20 @@
1
+ {%- assign radio = site.posts | find: 'layout', 'radio' -%}
2
+
3
+ {% comment %}
4
+ https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio
5
+
6
+ Le indicamos al navegador que no empiece a cargar hasta que le damos
7
+ play porque sino vamos a escuchar la radio con retraso.
8
+ {% endcomment %}
9
+ <audio controls preload="none" class="w-100" id="transmission">
10
+ {% for source in radio.streams %}
11
+ <source src="{{ source }}" />
12
+ {% endfor %}
13
+
14
+ <p>
15
+ {{ site.i18n.no_audio_support }}
16
+ <a href="{{ radio.streams | first }}">
17
+ {{ radio.streams | first }}
18
+ </a>
19
+ </p>
20
+ </audio>
@@ -0,0 +1 @@
1
+ <h2 id="{{ include.field[0] }}">{{ include.field[1].title }}</h2>
@@ -0,0 +1 @@
1
+ <hr/>
@@ -0,0 +1,28 @@
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 %}
8
+ {% assign hashtag = include.categories | first | capitalize | remove: ' ' %}
9
+
10
+ <a
11
+ {% if include.share.url == '%url' %}
12
+ download
13
+ {% else %}
14
+ target="_blank"
15
+ {% endif %}
16
+ rel="nofollow"
17
+ title="{{ include.share.title }}"
18
+ class="d-flex flex-column align-items-center"
19
+ href="{{
20
+ include.share.url
21
+ | replace: '%url', url
22
+ | replace: '%title', title
23
+ | replace: '%description', description
24
+ | replace: '%hashtag', hashtag
25
+ }}">
26
+ <i class="fa fa-fw fa-{{ include.share.icon }}"></i>
27
+ <span class="sr-only">{{ include.share.title }}</span>
28
+ </a>
@@ -0,0 +1,13 @@
1
+ <div class="d-flex align-items-center justify-content-between mt-3">
2
+ {% for share in site.i18n.share.items %}
3
+ {%
4
+ include_cached
5
+ share.html
6
+ share=share
7
+ url=include.url
8
+ title=include.title
9
+ description=include.description
10
+ categories=include.categories
11
+ %}
12
+ {% endfor %}
13
+ </div>
@@ -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 @@
1
+ {% include input.html field=field %}
@@ -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,40 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ site.lang }}" dir="{{ site.dir }}">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <base href="{% base %}" />
6
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
7
+ <meta content="width=device-width, initial-scale=1.0" name="viewport">
8
+ <meta name="theme-color" content="white"/>
9
+ <meta name="color-scheme" content="light"/>
10
+
11
+ <link href="assets/css/styles.css" rel="stylesheet">
12
+ <script defer type="text/javascript" src="assets/js/script.js"></script>
13
+
14
+ {% seo %}
15
+ {% feed_meta %}
16
+ </head>
17
+ {% comment %}
18
+ El sitio es una columna grande y el pie está siempre al final, para
19
+ imprimirlo lo mostramos como un bloque.
20
+
21
+ El alto mínimo del sitio es el alto de la pantalla.
22
+ {% endcomment %}
23
+ <body class="d-flex flex-column justify-content-between d-print-block min-vh-100">
24
+ {% include_cached navbar.html %}
25
+
26
+ {% comment %}
27
+ El espacio principal se expande para ocupar todo el alto
28
+ disponible y empuja el pie al fondo.
29
+ {% endcomment %}
30
+ <main class="flex-grow-1">
31
+ <div class="row no-gutters align-items-center justify-content-center d-print-block">
32
+ <div class="col-10">
33
+ {{ content }}
34
+ </div>
35
+ </div>
36
+ </main>
37
+
38
+ {% include_cached footer.html %}
39
+ </body>
40
+ </html>
@@ -0,0 +1,30 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {% comment %}
6
+ Traer el primer artículo en la portada y permitir navegar el resto
7
+ a continuación.
8
+ {% endcomment %}
9
+
10
+ <section>
11
+ {%- assign post = site.posts | find: 'layout', 'post' -%}
12
+ {% include_cached post.html page=post %}
13
+
14
+ <footer>
15
+ <div class="row no-gutters">
16
+ <div class="col-12 col-md-6">
17
+ <h2>{{ site.i18n.other_posts }}</h2>
18
+ <div>
19
+ {% for post in site.posts offset: 2 %}
20
+ <h3>
21
+ <a href="{{ post.url }}">{{ post.title }}</a>
22
+ </h3>
23
+
24
+ <p class="lead">{{ post.description }}</p>
25
+ {% endfor %}
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </footer>
30
+ </section>
@@ -0,0 +1,5 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {% include_cached post.html page=page %}
@@ -0,0 +1,49 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {% comment %}
6
+ Metadatos para reconocer organizaciones
7
+ {% endcomment %}
8
+ <article class="h-card mt-5" itemscope itemtype="https://schema.org/Organization">
9
+ <header class="row no-gutters align-items-center mb-3">
10
+ <div class="col-12 col-lg-9">
11
+ <h1 class="p-name" itemprop="name">{{ page.title }}</h1>
12
+ <p class="lead">{{ page.description }}</p>
13
+ </div>
14
+ </header>
15
+
16
+ <div class="row no-gutters">
17
+ <div class="col-12 col-md-6 e-content pt-3 pr-md-3 order-1 order-md-0" itemprop="articleBody">
18
+ {{ page.content }}
19
+ </div>
20
+
21
+ <div class="col-12 col-md-6 col-lg-3 order-0 order-md-1">
22
+ {%- if page.logo.path -%}
23
+ <picture>
24
+ {% for size in site.images.sizes %}
25
+ <source srcset="{{ page.logo.path | thumbnail: size }}" media="(max-width: {{ size }}px)" />
26
+ {% endfor %}
27
+
28
+ <img
29
+ class="img-fluid"
30
+ src="{{ page.logo.path | thumbnail: 1140 }}"
31
+ alt="{{ page.logo.description | default: page.title }}" />
32
+ </picture>
33
+ {%- endif -%}
34
+
35
+ {%
36
+ include_cached
37
+ share_box.html
38
+ url=page.url
39
+ title=page.title
40
+ description=page.description
41
+ categories=page.categories
42
+ %}
43
+ </div>
44
+ </div>
45
+
46
+ {% comment %}
47
+ TODO: Formulario de contacto
48
+ {% endcomment %}
49
+ </article>
@@ -0,0 +1,13 @@
1
+ * {
2
+ scroll-behavior: smooth;
3
+ }
4
+
5
+ /*
6
+ * Deshabilita animaciones si la usuaria las tiene deshabilitadas
7
+ */
8
+ @media (prefers-reduced-motion: reduce) {
9
+ * {
10
+ scroll-behavior: auto;
11
+ animation: none !important;
12
+ }
13
+ }
@@ -0,0 +1,54 @@
1
+ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
2
+
3
+ /*
4
+ * Crea una propiedad con prefijos de navegador
5
+ */
6
+ $vendor-prefixes: ("", "-webkit-", "-ms-", "-o-", "-moz-");
7
+ @mixin vendor-prefix($property, $definition...) {
8
+ @each $prefix in $vendor-prefixes {
9
+ #{$prefix}$property: $definition;
10
+ }
11
+ }
12
+
13
+ /*
14
+ * Crea clases para asignar colores según la lista de colores.
15
+ */
16
+ @each $color, $_ in $colors {
17
+ .background-#{$color} {
18
+ background-color: var(--#{$color});
19
+ }
20
+
21
+ .#{$color} {
22
+ color: var(--#{$color});
23
+
24
+ ::-moz-selection,
25
+ ::selection {
26
+ background: var(--#{$color});
27
+ color: white;
28
+ }
29
+
30
+ svg {
31
+ * {
32
+ fill: var(--#{$color});
33
+ }
34
+ }
35
+
36
+ .form-control {
37
+ border-color: var(--#{$color});
38
+ }
39
+
40
+ .btn {
41
+ background-color: var(--#{$color});
42
+ color: white;
43
+ border-color: var(--#{$color});
44
+ }
45
+
46
+ hr {
47
+ border-color: var(--#{$color});
48
+ }
49
+
50
+ a {
51
+ color: var(--#{$color});
52
+ }
53
+ }
54
+ }