betterplace-content 0.7.28 → 0.7.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/_layouts/default.html +13 -21
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d50453c4fd5b07ad995d02e20745b8be683202d0b6fba577c650b1a1b7afb2a0
4
- data.tar.gz: 1eeaaeae210c2644727418f4bbe094546e3fdf43da8caf7e51c11be907240f0c
3
+ metadata.gz: 1e6c945e902a000be82e9045476ca5341e33179a66bc9cc8f9b73e97107bb2ae
4
+ data.tar.gz: 19638ad0c81503a61c63baa173d1e8487bc0b30cf0142bf9d0d4cc8851511d3f
5
5
  SHA512:
6
- metadata.gz: 42800bd19f2c2a7c0a62f7f6134fdd7cb3618b10f76d917eb620687fcbb43789fad03d3f5235762707e3d170ffed4dcb15eb450483508df59b2e95c9fe6716da
7
- data.tar.gz: 2404b8813f83ed3988ad81be6660097dc05e6cd23dbade3bb94b5b04ab19a73d8ee5fadb2f2423c450dce33cf4689e568359c96f9b47f2bd59bc6ef1c1f948f7
6
+ metadata.gz: a9b5eae05eee2860fc24098c3952b27d491405495994276d01d5e3483a3d3b30162a13bd2ae709f115bbb28733e1d235459553904b7459d019f3b6b99c140aba
7
+ data.tar.gz: 4ef07414ca68e55d78baf8933f3833f68ee7004e104c07768642ff77827382983bf6142472e2c5ee1d77a1698bb8f882a85dccb495e4b5bb2d9450b451252881
@@ -34,25 +34,8 @@ Update 2019-07-19: Another problem that came us is, that URLs endet in .html whi
34
34
 
35
35
  <title>{{ page.title | default:'betterplace.org' }}</title>
36
36
 
37
- {% if page.translation_url %}
38
-
39
- {% if site.lang == "de" %}
40
- {% assign self_url = hostname | append: site.baseurl %}
41
- {% assign translation_url = page.translation_url %}
42
- {% assign default_url = hostname | append: site.baseurl %}
43
- {% else %}
44
- {% assign self_url = hostname | append: site.baseurl %}
45
- {% assign translation_url = page.translation_url %}
46
- {% assign default_url = page.translation_url %}
47
- {% endif %}
48
-
49
- <link rel="alternate" hreflang="{{ site.lang }}" href="{{ self_url }}">
50
- <link rel="alternate" hreflang="{{ site.translation_lang }}" href="{{ translation_url }}">
51
- <link rel="alternate" hreflang="x-default" href="{{ default_url }}">
52
-
53
- {% endif %}
54
- {% if page.multiple_translation_urls %}
55
- {% for item in page.multiple_translation_urls %}
37
+ {% if page.alternate_url %}
38
+ {% for item in page.alternate_url %}
56
39
  <link rel="alternate" hreflang="{{ item[0] | replace:'_','-' }}" href="{{ item[1] | replace:'https://www.betterplace.org',hostname }}">
57
40
  {% endfor %}
58
41
  {% endif %}
@@ -97,8 +80,17 @@ Update 2019-07-19: Another problem that came us is, that URLs endet in .html whi
97
80
  {% endcapture %}
98
81
 
99
82
  {% capture language_switch_content %}
100
- {% if page.translation_url %}
101
- <a onclick="ga(&#39;send&#39;, &#39;event&#39;, &#39;navigation header&#39;, &#39;{{ page.translation_url | replace:'https://www.betterplace.org','' }}&#39;);" class="language-switcher" href="{{ page.translation_url | replace:'https://www.betterplace.org',hostname }}">{{ other_lang }}</a>
83
+ {% if page.alternate_url %}
84
+ {% if site.translation_lang == 'de' %}
85
+ {% if page.alternate_url contains 'de_DE' %}
86
+ {% assign translation = 'de_DE' %}
87
+ {% else %}
88
+ {% assign translation = 'de' %}
89
+ {% endif %}
90
+ {% else %}
91
+ {% assign translation = site.translation_lang %}
92
+ {% endif %}
93
+ <a onclick="ga(&#39;send&#39;, &#39;event&#39;, &#39;navigation header&#39;, &#39;{{ page.alternate_url[translation] | replace:'https://www.betterplace.org','' }}&#39;);" class="language-switcher" href="{{ page.alternate_url[translation] | replace:'https://www.betterplace.org',hostname }}">{{ other_lang }}</a>
102
94
  {% else %}
103
95
  <span style="text-decoration: line-through; color: #cccccc;" class="language-switcher">{{ other_lang }}</span>
104
96
  {% endif %}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: betterplace-content
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.28
4
+ version: 0.7.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - betterplace.org Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-02 00:00:00.000000000 Z
11
+ date: 2020-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll