share-to-fediverse-jekyll-theme 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +168 -0
  3. data/README.md +70 -0
  4. data/_config.yml +44 -0
  5. data/_data/en.yml +8 -0
  6. data/_data/es.yml +8 -0
  7. data/_data/forms/contacto.yml +40 -0
  8. data/_data/forms/fediverse.yml +18 -0
  9. data/_data/layouts/post.yml +113 -0
  10. data/_includes/boolean.html +30 -0
  11. data/_includes/contact.html +19 -0
  12. data/_includes/content.html +1 -0
  13. data/_includes/email.html +1 -0
  14. data/_includes/file.html +33 -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/input.html +1 -0
  21. data/_includes/form/markdown_content.html +1 -0
  22. data/_includes/form/number.html +1 -0
  23. data/_includes/form/predefined_array.html +1 -0
  24. data/_includes/form/section.html +1 -0
  25. data/_includes/form/separator.html +1 -0
  26. data/_includes/form/string.html +1 -0
  27. data/_includes/form/submit.html +1 -0
  28. data/_includes/form/text.html +1 -0
  29. data/_includes/form/url.html +1 -0
  30. data/_includes/hidden.html +5 -0
  31. data/_includes/input.html +33 -0
  32. data/_includes/markdown_content.html +1 -0
  33. data/_includes/navbar.html +29 -0
  34. data/_includes/number.html +1 -0
  35. data/_includes/predefined_array.html +39 -0
  36. data/_includes/section.html +1 -0
  37. data/_includes/separator.html +1 -0
  38. data/_includes/string.html +3 -0
  39. data/_includes/submit.html +1 -0
  40. data/_includes/text.html +32 -0
  41. data/_includes/url.html +1 -0
  42. data/_layouts/default.html +32 -0
  43. data/_layouts/home.html +23 -0
  44. data/_layouts/post.html +69 -0
  45. data/_sass/helpers.scss +39 -0
  46. data/assets/css/styles.scss +23 -0
  47. data/assets/js/script.js +36 -0
  48. metadata +229 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 208a69c3658ad5479968f52fe94c50947bf66b4431f4ada362628cc889030c46
4
+ data.tar.gz: e260a721b654ef44b9e54278c25dcd6257a5956840f5ac71d639b9acb8875faf
5
+ SHA512:
6
+ metadata.gz: be4161bcb479e2c94519a656d8d268928b0c151b6a84eb49626e0f3bd602ff46fe2e3610beae23406fa9832fec2241ce18829bb75232877e11b22dd096ee5b53
7
+ data.tar.gz: ec367d281599797a4db3f7e9deec793bdd6f0bfd275f3751296c442f2b0605dc76739563f579be41d51f41fdc4d4512ae63ba24280e80fade6e6769d8ea1b49e
@@ -0,0 +1,168 @@
1
+ Copyright (c) 2020 Sutty
2
+
3
+ The following license is modified from the MIT license and downloaded
4
+ from <https://github.com/Laurelai/anti-fascist-mit-license> on
5
+ 2019-07-11.
6
+
7
+ Anti-Fascist MIT License:
8
+
9
+ The following conditions must be met by any person obtaining a copy of
10
+ this software:
11
+
12
+ - You MAY NOT be a fascist.
13
+ - You MUST not financially support fascists.
14
+ - You MUST not intentionally provide or knowingly provide through
15
+ inaction a platform for fascists to spread propaganda or organize.
16
+ - You MUST not publicly voice support for fascists.
17
+ - You MAY NOT be a member of any fascist organization, even if you are a
18
+ member to infiltrate for anti-fascist purposes.
19
+
20
+ "Fascist" can be understood as any group or individual who promotes the
21
+ political ideology of fascism.
22
+
23
+ "Fascism" can be broken down into 11 ideological features as well as 8
24
+ tactics that can form a fascist system in varying combinations, for the
25
+ sake of simplicity and brevity the individual or organization in
26
+ question must match to at least 5 features or tactics or a combination
27
+ of the two determined by the individual licencer.
28
+
29
+ Said licencer may provide a list if an individual or group matches to at
30
+ least 5 features upon request from the individual or group in question.
31
+
32
+ The ideological features are listed below.
33
+
34
+ 1. Hyper-nationalism.
35
+
36
+ As defined as "The belief in the superiority of one's nation and of the
37
+ paramount importance of advancing it."
38
+
39
+ 2. Militarism.
40
+
41
+ As defined as "Advocating for an increase in military forces beyond what
42
+ the real defense of a nation needs, more influence of the military upon
43
+ the policies of the civilian government, and a preference for force as a
44
+ solution over diplomacy for problems."
45
+
46
+ 3. Glorification of violence and readiness to use it in politics.
47
+
48
+ As defined as "The belief that violence can be used to cleanse a
49
+ tarnished nation, also by using violence to harm, intimidate or kill
50
+ political oppoenents."
51
+
52
+ 4. Fetishization of youth.
53
+
54
+ As defined as "Extolling the virtues of youth and making a special
55
+ appeal to young people to join a cause or organization"
56
+
57
+ 5. Fetishization of masculinity.
58
+
59
+ As defined as "Extolling the virtues of male authority or patriarchy and
60
+ making a special appeal to men to be leaders of households and groups"
61
+
62
+ 6. Leader cult.
63
+
64
+ As defined as "Creating an idealized, heroic, and worshipful image of a
65
+ leader, often through unquestioning flattery and praise."
66
+
67
+ 7. Lost-golden-age syndrome.
68
+
69
+ As defined as "Creating or promoting the idea that a nation had a lost
70
+ or stolen golden age in the past that must be returned to"
71
+
72
+ 8. Self-definition by opposition.
73
+
74
+ As defined as "Creating or promoting the idea that the group or
75
+ individual is the only person or way who can fight real or imagined
76
+ evils within a society."
77
+
78
+ 9. Mass mobilization and mass party.
79
+
80
+ As defined as "Creating or promoting the creation of a populist group or
81
+ party for the advancment of fascist tactics or features."
82
+
83
+ 10. Hierarchical party structure and tendency to purge the disloyal.
84
+
85
+ As defined as "Removal of membership from a group for lacking absolute
86
+ loyalty or lacking further usefulness to the group. Also having a
87
+ hierarchical structure within the group itself."
88
+
89
+ 11. Theatricality.
90
+
91
+ As defined as "Using spectacle to gain and keep the attention of those
92
+ inside and outside of the group using speeches full of absolutes and or
93
+ superlatives. Elaborate collective rituals (rallies) meant to reenforce
94
+ loyalty within the group."
95
+
96
+ Fascist tactics include
97
+
98
+ 1) Persecution of national minorities.
99
+ 2) Persecution of racial minorities.
100
+ 3) Persecution of religious minorities (Anti-Semitism, Islamophobia and others).
101
+ 4) Promotion of a type of national purity.
102
+ 5) Promotion of a state run by ideologically oriented corporate bodies.
103
+ 6) Persecution of gender or sexual minorities.
104
+ 7) Persecution of the disabled.
105
+ 8) Formation of extra-legal forces (brownshirts) to defend fascist values.
106
+
107
+ Special criteria: Meeting only one point of the special criteria is
108
+ enough to consider someone or a group to be fascist for the purposes of
109
+ this licence.
110
+
111
+ 1. Promotion of any theories that state members of the jewish ethnicity
112
+ or faith control or largely control the world, finance, or other
113
+ global major power system.
114
+
115
+ 2. Denial of the holocaust or any other historically proven genocide.
116
+
117
+ 3. Promotion of ethnostates.
118
+
119
+ 4. Advocating for eugenics. Either positive or negative eugenics.
120
+ Promotion for the rights of abortion are not considered eugenics.
121
+
122
+ 5. Advocating for the removal of rights or legal protections from a
123
+ class or group of people.
124
+
125
+ Former fascists: People or organizations who used to promote the
126
+ political ideology of fascism but no longer do so must meet the
127
+ following criterea to be able to use this software.
128
+
129
+ 1. Publicly disavow past fascist deeds and ideologies.
130
+
131
+ 2. Expose any and all known fascists former allies to the public.
132
+
133
+ A suggested route would be through the one peoples project
134
+ (onepeoplesproject.com). If they can confirm you have done so that
135
+ will count as meeting condition two.
136
+
137
+ 3. Publicly destroy any and all fascist paraphenelia you have in your
138
+ posession including removal of tattoos and body markings
139
+ affiliated with fascist groups or gangs.
140
+
141
+ ANTI-FASCIST-MIT LICENSE:
142
+
143
+ Permission is hereby granted, free of charge, to any person obtaining a
144
+ copy of this software and associated documentation files (the
145
+ "Software"), to deal in the Software without restriction, including
146
+ without limitation the rights to use, copy, modify, merge, publish,
147
+ distribute, sublicense, and/or sell copies of the Software, and to
148
+ permit persons to whom the Software is furnished to do so, subject to
149
+ the following conditions:
150
+
151
+ The above copyright notice and this permission notice shall be included
152
+ in all copies or substantial portions of the Software.
153
+
154
+ The above licence agreement conditions are met in full.
155
+
156
+ The Anti-Fascist MIT License may only be used under the terms of the
157
+ Anti-Fascist MIT License.
158
+
159
+ Any modified versions of this software must also include the
160
+ Anti-Fascist MIT Licence.
161
+
162
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
163
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
164
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
165
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
166
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
167
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
168
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,70 @@
1
+ # share-to-fediverse-jekyll-theme
2
+
3
+ This theme generates a microwebsite to share URL to the Fediverse (or
4
+ Mastodon, at least).
5
+
6
+ ## Installation
7
+
8
+ Add this line to your Jekyll site's `Gemfile`:
9
+
10
+ ```ruby
11
+ gem "share-to-fediverse-jekyll-theme"
12
+ ```
13
+
14
+ And add this line to your Jekyll site's `_config.yml`:
15
+
16
+ ```yaml
17
+ theme: share-to-fediverse-jekyll-theme
18
+ ```
19
+
20
+ And then execute:
21
+
22
+ $ bundle
23
+
24
+ Or install it yourself as:
25
+
26
+ $ gem install share-to-fediverse-jekyll-theme
27
+
28
+ ## Usage
29
+
30
+ The `instance` option on `_config.yml` is the default instance used.
31
+
32
+ Create a share button with:
33
+
34
+ ```
35
+ https://yourwebsite.org/?u=URL&t=TITLE&d=DESCRIPTION
36
+ ```
37
+
38
+ Replacing `URL`, `TITLE` and `DESCRIPTION` for the shareable content.
39
+
40
+ ## Contributing
41
+
42
+ Bug reports and pull requests are welcome on 0xacab.org at
43
+ https://0xacab.org/sutty/jekyll/share-to-fediverse-jekyll-theme. This
44
+ project is intended to be a safe, welcoming space for collaboration, and
45
+ contributors are expected to adhere to the [Sutty's code of
46
+ conduct](http://sutty.nl/en/code-of-conduct).
47
+
48
+ ## Development
49
+
50
+ To set up your environment to develop this theme, run `bundle install`.
51
+
52
+ Your theme is setup just like a normal Jekyll site! To test your theme,
53
+ run `bundle exec jekyll serve` and open your browser at
54
+ `http://localhost:4000`. This starts a Jekyll server using your
55
+ theme. Add pages, documents, data, etc. like normal to test your theme's
56
+ contents. As you make modifications to your theme and to your content,
57
+ your site will regenerate and you should see the changes in the browser
58
+ after a refresh, just like normal.
59
+
60
+ When your theme is released, only the files in `_layouts`, `_includes`,
61
+ `_sass` and `assets` tracked with Git will be bundled.
62
+
63
+ To add a custom directory to your theme-gem, please edit the array in
64
+ `share-to-fediverse-jekyll-theme.gemspec` accordingly.
65
+
66
+ ## License
67
+
68
+ The theme is available as open source under the terms of the [Antifacist
69
+ MIT License](LICENSE.txt).
70
+
@@ -0,0 +1,44 @@
1
+ plugins:
2
+ - jekyll-locales
3
+ - jekyll-relative-urls
4
+ - jekyll-feed
5
+ - jekyll-seo-tag
6
+ - jekyll-images
7
+ - jekyll-include-cache
8
+ # Agregar node_modules a la lista de directorios donde SASS busca
9
+ # archivos. Podríamos haber agregado solo "node_modules/bootstrap/scss"
10
+ # pero queríamos dejarlo abierto para poder cambiar de framework o
11
+ # llamar a varios a la vez.
12
+ sass:
13
+ load_paths:
14
+ - node_modules
15
+ # Opciones para generar las URLs de las páginas. Por defecto Jekyll
16
+ # crea /categoria/año/mes/dia/titulo.html que me parece innecesariamente
17
+ # larga.
18
+ #
19
+ # Con esto generamos URLs relativas (sin / al principio) y solo el
20
+ # titulo convertido en slug. El slug es la versión limpia del título,
21
+ # sin espacios ni mayusculas, a veces sin tildes.
22
+ #
23
+ # En realidad Jekyll es un poco confuso acá porque :title es el nombre
24
+ # del archivo usado en _posts/yyyy-mm-dd-slug.md y no el titulo
25
+ # slugificado. De todas formas Sutty se encarga de que coincidan.
26
+ permalink: ":title/"
27
+ # El nombre de la plantilla
28
+ # theme: sutty-base-jekyll-theme
29
+ # La lista de resoluciones de imágenes disponibles para jekyll-images.
30
+ # Estamos usando los puntos de quiebre de bootstrap.
31
+ #
32
+ # https://getbootstrap.com/docs/4.4/layout/overview/#responsive-breakpoints
33
+ images:
34
+ sizes:
35
+ - 576
36
+ - 768
37
+ - 992
38
+ - 1140
39
+ locales:
40
+ - es
41
+ - en
42
+ lang: es
43
+ locale: es
44
+ instance: 'https://todon.nl/'
@@ -0,0 +1,8 @@
1
+ ---
2
+ locale: English
3
+ made_by: 'Made by [Sutty](https://sutty.nl/en/). [Follow us to the Fediverse](https://todon.nl/@sutty).'
4
+ home:
5
+ about: You're about to share
6
+ title: No title
7
+ description: No description
8
+ url: '#'
@@ -0,0 +1,8 @@
1
+ ---
2
+ locale: Castellano
3
+ made_by: 'Hecho por [Sutty](https://sutty.nl/es/). [Seguinos al Fediverso](https://todon.nl/@sutty).'
4
+ home:
5
+ about: Estás por compartir
6
+ title: No hay un título
7
+ description: No hay una descripción
8
+ url: '#'
@@ -0,0 +1,40 @@
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
+ body:
27
+ type: text
28
+ label:
29
+ es: Mensaje
30
+ en: Message
31
+ consent:
32
+ type: boolean
33
+ label:
34
+ es: Acepto las políticas de privacidad
35
+ en: I agree to the privacy policy
36
+ submit:
37
+ type: submit
38
+ label:
39
+ es: Enviar
40
+ en: Send
@@ -0,0 +1,18 @@
1
+ ---
2
+ text:
3
+ type: 'hidden'
4
+ instance:
5
+ type: 'url'
6
+ required: true
7
+ autocomplete: 'url'
8
+ label:
9
+ es: 'Instancia'
10
+ en: 'Instance'
11
+ help:
12
+ es: 'Tu servidor de Mastodon, incluyendo https://'
13
+ en: 'Your Mastodon server, including https://'
14
+ submit:
15
+ type: 'submit'
16
+ label:
17
+ es: 'Compartir'
18
+ en: 'Share'
@@ -0,0 +1,113 @@
1
+ ---
2
+ title:
3
+ type: 'string'
4
+ required: true
5
+ label:
6
+ es: 'Título del artículo'
7
+ en: 'Post title'
8
+ help:
9
+ es: '¡Un título que invite a leer el artículo!'
10
+ en: 'A title that invites people to read the post!'
11
+ description:
12
+ type: 'text'
13
+ required: true
14
+ label:
15
+ es: 'Alerta de contenido o descripción del artículo'
16
+ en: 'Content warning or post description'
17
+ help:
18
+ es: |
19
+ Resumen del contenido del artículo, que también usarán redes
20
+ sociales y buscadores. Si el artículo trata de violencias y otros
21
+ temas sensibles, te invitamos a usar este campo como alerta de
22
+ contenido, para que las personas puedan determinar cuándo quieren
23
+ abrirlo.
24
+ en: |
25
+ Summary of the post contents, also used by social media and search
26
+ engines. If the post is about violence and other sensitive
27
+ topics, we invite you to use it as a content warning, so others
28
+ can decide when they want to read it.
29
+ author:
30
+ type: 'array'
31
+ label:
32
+ es: 'Autores'
33
+ en: 'Authors'
34
+ help:
35
+ es: 'Quiénes participaron en la escritura de este artículo'
36
+ en: 'Who collaborated in write this post'
37
+ image:
38
+ type: 'image'
39
+ path:
40
+ label:
41
+ es: 'Imagen principal'
42
+ en: 'Main image'
43
+ help:
44
+ es: |
45
+ Se utiliza para ilustrar el artículo y como previsualización en
46
+ las redes sociales.
47
+ en: |
48
+ It's used to illustrate the article and as preview in social
49
+ networks.
50
+ description:
51
+ label:
52
+ es: 'Descripción de la imagen principal'
53
+ en: 'Main image description'
54
+ help:
55
+ es: |
56
+ Describe la imagen principal para usuaries no videntes y
57
+ buscadores
58
+ en: |
59
+ Describe the main image for blind or partially sighted users and
60
+ search engines
61
+ content:
62
+ type: 'content'
63
+ label:
64
+ es: 'Contenido del artículo'
65
+ en: 'Post content'
66
+ help:
67
+ es: 'Escribe aquí el artículo'
68
+ en: 'Write down your post'
69
+ permalink:
70
+ type: 'string'
71
+ label:
72
+ es: 'Enlace'
73
+ en: 'Permalink'
74
+ help:
75
+ es: |
76
+ Si no quieres utilizar el formato de enlaces general del sitio
77
+ para este artículo, especifica uno aquí.
78
+ en: |
79
+ If you don't want to follow the site's link format for this
80
+ post, change it here.
81
+ categories:
82
+ type: 'array'
83
+ label:
84
+ es: 'Categorías'
85
+ en: 'Categories'
86
+ help:
87
+ es: 'Ayudan a organizar los artículos en temas'
88
+ en: 'Use categories to organize posts by themes'
89
+ tags:
90
+ type: 'array'
91
+ label:
92
+ es: 'Etiquetas'
93
+ en: 'Tags'
94
+ help:
95
+ es: 'Usa etiquetas para resaltar palabras clave'
96
+ en: 'Tags are helpful as keywords'
97
+ draft:
98
+ type: 'boolean'
99
+ label:
100
+ es: 'Borrador'
101
+ en: 'Draft'
102
+ help:
103
+ es: 'Este artículo aun no está listo para publicar'
104
+ en: "This post isn't ready to be published yet"
105
+ order:
106
+ type: 'order'
107
+ label:
108
+ es: 'Orden'
109
+ en: 'Order'
110
+ help:
111
+ es: 'La posición del artículo en la lista de artículos'
112
+ en: 'The post position in the posts list'
113
+ ---
@@ -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,19 @@
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
+
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 %}
17
+ </div>
18
+ {%- endfor -%}
19
+ </form>
@@ -0,0 +1 @@
1
+ {% include text.html field=field %}
@@ -0,0 +1 @@
1
+ {% include input.html field=field %}
@@ -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]['path'].label[site.locale] -%}
4
+ {%- assign help = include.field[1]['path'].help[site.locale] -%}
5
+ {%- assign autocomplete = include.field[1].autocomplete -%}
6
+
7
+ <div class="custom-file">
8
+ <input
9
+ {% if help %}
10
+ aria-describedby="help-{{ id }}"
11
+ {% endif %}
12
+ {% if include.field[1].required %}
13
+ required
14
+ {% endif %}
15
+ type="{{ include.field[1].type }}"
16
+ name="{{ name }}[path]"
17
+ id="{{ id }}_path"
18
+ {% if autocomplete %}
19
+ autocomplete="{{ autocomplete }}"
20
+ {% endif %}
21
+ class="custom-file-input" />
22
+
23
+ <label for="{{ id }}_path" class="custom-file-label">
24
+ {{ label }}
25
+ {% if include.field[1].required %}*{% endif %}
26
+ </label>
27
+
28
+ {%- if help -%}
29
+ <small id="help-{{ id }}" class="form-text">
30
+ {{ help }}
31
+ </small>
32
+ {%- endif -%}
33
+ </div>
@@ -0,0 +1 @@
1
+ ../boolean.html
@@ -0,0 +1 @@
1
+ ../content.html
@@ -0,0 +1 @@
1
+ ../email.html
@@ -0,0 +1 @@
1
+ ../file.html
@@ -0,0 +1 @@
1
+ ../hidden.html
@@ -0,0 +1 @@
1
+ ../input.html
@@ -0,0 +1 @@
1
+ ../markdown_content.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>
@@ -0,0 +1 @@
1
+ {% include text.html field=field %}
@@ -0,0 +1,29 @@
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.html %}
4
+ </a>
5
+
6
+ {% comment %}
7
+ TODO: Add CSS-only hamburger menu.
8
+ {% endcomment %}
9
+ <ul class="navbar-nav d-print-none">
10
+ {%- for item in site.i18n.menu.items -%}
11
+ {% comment %}
12
+ This makes it hard to just cache the whole navbar, but we prefer
13
+ to mark the active item in code rather than with JS.
14
+ {% endcomment %}
15
+
16
+ <li class="nav-item">
17
+ <a class="nav-link{% if page.url == item.href %} active{% endif %}" href="{{ item.href }}">
18
+ {{ item.title }}
19
+
20
+ {%- if page.url == item.href -%}
21
+ <span class="sr-only">
22
+ {{ site.i18n.menu.active | default: '(current)' }}
23
+ </span>
24
+ {%- endif -%}
25
+ </a>
26
+ </li>
27
+ {%- endfor -%}
28
+ </ul>
29
+ </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 %}
@@ -0,0 +1,32 @@
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
+ <body class="background-mastodon mastodon-grey">
18
+ <main class="container vh-100 d-flex flex-column justify-content-between align-items-center d-print-block">
19
+ <nav class="mt-2">
20
+ {%- for locale in site.locales -%}
21
+ <a href="../{{ locale }}" class="p-2" lang="{{ locale }}">{{ site.data[locale].locale }}</a>
22
+ {%- endfor -%}
23
+ </nav>
24
+
25
+ {{ content }}
26
+
27
+ <footer class="align-self-end">
28
+ {{ site.data[site.lang].made_by | markdownify }}
29
+ </footer>
30
+ </main>
31
+ </body>
32
+ </html>
@@ -0,0 +1,23 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article>
6
+ <header>
7
+ <p><small>{{ site.data[site.lang].home.about }}</small></p>
8
+ <h1 id="t">{{ site.data[site.lang].home.title }}</h1>
9
+ <p id="d" class="lead">{{ site.data[site.lang].home.description }}</p>
10
+
11
+ <a href="" id="u"></a>
12
+ </header>
13
+
14
+ <footer class="mt-5">
15
+ <form method="get" action="{{ site.instance | default: 'https://todon.nl/' }}share">
16
+ {%- for field in site.data.forms.fediverse -%}
17
+ {%- assign template = field[1].type | append: '.html' -%}
18
+
19
+ {% include {{ template }} field=field %}
20
+ {%- endfor -%}
21
+ </form>
22
+ </footer>
23
+ </article>
@@ -0,0 +1,69 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <article class="h-entry" itemscope itemtype="http://schema.org/Article">
6
+ <header>
7
+ <h1 class="p-name" itemprop="name headline">{{ page.title | escape }}</h1>
8
+
9
+ {%- if page.description -%}
10
+ <p class="lead p-summary" itemprop="description">{{ page.description | escape }}</p>
11
+ {%- endif -%}
12
+
13
+ {%- if page.image.path -%}
14
+ <picture>
15
+ {% for size in site.images.sizes %}
16
+ <source srcset="{{ page.image.path | thumbnail: size }}" media="(max-width: {{ size }}px)" />
17
+ {% endfor %}
18
+
19
+ <img class="img-fluid" src="{{ page.image.path | thumbnail: 1140 }}" alt="{{ page.image.description }}" />
20
+ </picture>
21
+ {%- endif -%}
22
+
23
+ <p>
24
+ <time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
25
+ {%- assign date_format = site.i18n.date | default: "%b %-d, %Y" -%}
26
+ {{ page.date | date: date_format }}
27
+ </time>
28
+ {%- for author in page.author -%}
29
+
30
+ <span itemprop="author" itemscope itemtype="http://schema.org/Person">
31
+ <span class="p-author h-card" itemprop="name">
32
+ {{ author | escape }}
33
+ </span>
34
+ </span>
35
+ {%- endfor -%}
36
+ </p>
37
+ </header>
38
+
39
+ <div class="e-content" itemprop="articleBody">
40
+ {{ content }}
41
+ </div>
42
+
43
+ <footer>
44
+ <a class="u-url" itemprop="url" href="{{ page.url }}" hidden>
45
+ {{ site.url }}/{{ page.url }}
46
+ </a>
47
+
48
+ {%- if page.uuid -%}
49
+ <span hidden itemprop="identifier">{{ page.uuid }}</span>
50
+ {%- endif -%}
51
+
52
+ {%- if page.license.url -%}
53
+ <p itemprop="license" itemtype="http://schema.org/CreativeWork">
54
+ <a rel="license" itemprop="url" href="{{ page.license.url }}">
55
+ <span itemprop="articleBody">
56
+ {{ page.license.description }}
57
+ </span>
58
+ </a>
59
+ </p>
60
+ {%- endif -%}
61
+
62
+ {%- if page.tags %}
63
+ <span itemprop="keywords" hidden>{{ page.tags | join: ', ' }}</span>
64
+ {%- for tag in page.tags -%}
65
+ <span hidden class="h-category">{{ tag }}</span>
66
+ {%- endfor -%}
67
+ {%- endif -%}
68
+ </footer>
69
+ </article>
@@ -0,0 +1,39 @@
1
+ @each $color, $_ in $colors {
2
+ .background-#{$color} {
3
+ background-color: var(--#{$color});
4
+ }
5
+
6
+ .#{$color} {
7
+ color: var(--#{$color});
8
+
9
+ ::-moz-selection,
10
+ ::selection {
11
+ background: var(--#{$color});
12
+ color: white;
13
+ }
14
+
15
+ svg {
16
+ * {
17
+ fill: var(--#{$color});
18
+ }
19
+ }
20
+
21
+ .form-control {
22
+ border-color: var(--#{$color});
23
+ }
24
+
25
+ .btn {
26
+ background-color: var(--#{$color});
27
+ color: white;
28
+ border-color: var(--#{$color});
29
+ }
30
+
31
+ hr {
32
+ border-color: var(--#{$color});
33
+ }
34
+
35
+ a {
36
+ color: var(--#{$color});
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,23 @@
1
+ ---
2
+ # Ponemos un frontmatter porque queremos que Jekyll procese este archivo
3
+ ---
4
+
5
+ $mastodon: #191b22;
6
+ $mastodon-grey: #9baec8;
7
+ $success: $mastodon-grey;
8
+
9
+ $colors: (
10
+ "transparent": transparent,
11
+ "mastodon": $mastodon,
12
+ "mastodon-grey": $mastodon-grey
13
+ );
14
+
15
+ /*
16
+ * XXX: Solo importar los archivos necesarios de bootstrap para
17
+ * facilitar la reducción de CSS. Por ahora pedimos todo para poder
18
+ * empezar a trabajar en el HTML sin pensar en CSS.
19
+ *
20
+ * Los archivos se encuentran en node_modules/bootstrap/scss
21
+ */
22
+ @import "bootstrap/scss/bootstrap";
23
+ @import "helpers";
@@ -0,0 +1,36 @@
1
+ ---
2
+ ---
3
+
4
+ // https://stackoverflow.com/a/7090123
5
+ const searchToObject = () => {
6
+ var pairs = window.location.search.substring(1).split("&"),
7
+ obj = {},
8
+ pair,
9
+ i;
10
+
11
+ for (i in pairs) {
12
+ if (pairs[i] === "") continue;
13
+
14
+ pair = pairs[i].split("=");
15
+ obj[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
16
+ }
17
+
18
+ return obj;
19
+ }
20
+
21
+
22
+ document.addEventListener('DOMContentLoaded', e => {
23
+ const urlShared = searchToObject();
24
+
25
+ ['t','d','u'].forEach(field => {
26
+ if (urlShared[field] === undefined) return;
27
+
28
+ document.querySelector(`#${field}`).innerText = urlShared[field];
29
+ });
30
+
31
+ document.querySelector('#text').value = Object.values(urlShared).join("\n\n");
32
+
33
+ document.querySelector('form').addEventListener('submit', e => {
34
+ e.target.action = document.querySelector('#instance').value + '/share';
35
+ });
36
+ });
metadata ADDED
@@ -0,0 +1,229 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: share-to-fediverse-jekyll-theme
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - f
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-06-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: jekyll-relative-urls
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: jekyll-feed
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.9'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.9'
55
+ - !ruby/object:Gem::Dependency
56
+ name: jekyll-seo-tag
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.1'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: jekyll-images
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.2'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.2'
83
+ - !ruby/object:Gem::Dependency
84
+ name: jekyll-include-cache
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: jekyll-data
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.1'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.1'
111
+ - !ruby/object:Gem::Dependency
112
+ name: bundler
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '2.1'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '2.1'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rake
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '12.0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '12.0'
139
+ description:
140
+ email:
141
+ - f@sutty.nl
142
+ executables: []
143
+ extensions: []
144
+ extra_rdoc_files:
145
+ - README.md
146
+ - LICENSE.txt
147
+ files:
148
+ - LICENSE.txt
149
+ - README.md
150
+ - _config.yml
151
+ - _data/en.yml
152
+ - _data/es.yml
153
+ - _data/forms/contacto.yml
154
+ - _data/forms/fediverse.yml
155
+ - _data/layouts/post.yml
156
+ - _includes/boolean.html
157
+ - _includes/contact.html
158
+ - _includes/content.html
159
+ - _includes/email.html
160
+ - _includes/file.html
161
+ - _includes/form/boolean.html
162
+ - _includes/form/content.html
163
+ - _includes/form/email.html
164
+ - _includes/form/file.html
165
+ - _includes/form/hidden.html
166
+ - _includes/form/input.html
167
+ - _includes/form/markdown_content.html
168
+ - _includes/form/number.html
169
+ - _includes/form/predefined_array.html
170
+ - _includes/form/section.html
171
+ - _includes/form/separator.html
172
+ - _includes/form/string.html
173
+ - _includes/form/submit.html
174
+ - _includes/form/text.html
175
+ - _includes/form/url.html
176
+ - _includes/hidden.html
177
+ - _includes/input.html
178
+ - _includes/markdown_content.html
179
+ - _includes/navbar.html
180
+ - _includes/number.html
181
+ - _includes/predefined_array.html
182
+ - _includes/section.html
183
+ - _includes/separator.html
184
+ - _includes/string.html
185
+ - _includes/submit.html
186
+ - _includes/text.html
187
+ - _includes/url.html
188
+ - _layouts/default.html
189
+ - _layouts/home.html
190
+ - _layouts/post.html
191
+ - _sass/helpers.scss
192
+ - assets/css/styles.scss
193
+ - assets/js/script.js
194
+ homepage: https://0xacab.org/sutty/jekyll/share-to-fediverse-jekyll-theme
195
+ licenses:
196
+ - Nonstandard
197
+ metadata:
198
+ bug_tracker_uri: https://0xacab.org/sutty/jekyll/share-to-fediverse-jekyll-theme/issues
199
+ homepage_uri: https://0xacab.org/sutty/jekyll/share-to-fediverse-jekyll-theme
200
+ source_code_uri: https://0xacab.org/sutty/jekyll/share-to-fediverse-jekyll-theme
201
+ changelog_uri: https://0xacab.org/sutty/jekyll/share-to-fediverse-jekyll-theme/-/blob/master/CHANGELOG.md
202
+ documentation_uri: https://rubydoc.info/gems/share-to-fediverse-jekyll-theme
203
+ post_install_message:
204
+ rdoc_options:
205
+ - "--title"
206
+ - share-to-fediverse-jekyll-theme - A share to Fediverse microwebsite
207
+ - "--main"
208
+ - README.md
209
+ - "--line-numbers"
210
+ - "--inline-source"
211
+ - "--quiet"
212
+ require_paths:
213
+ - lib
214
+ required_ruby_version: !ruby/object:Gem::Requirement
215
+ requirements:
216
+ - - ">="
217
+ - !ruby/object:Gem::Version
218
+ version: '0'
219
+ required_rubygems_version: !ruby/object:Gem::Requirement
220
+ requirements:
221
+ - - ">="
222
+ - !ruby/object:Gem::Version
223
+ version: '0'
224
+ requirements: []
225
+ rubygems_version: 3.0.3
226
+ signing_key:
227
+ specification_version: 4
228
+ summary: A share to Fediverse microwebsite
229
+ test_files: []