academic 0.4.0 → 0.4.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cff9aed8c851292b77c2917ee82c2c345d1e3487
4
- data.tar.gz: 978021a3be64764dfdd788bcc8e1ed03dd2b6d3e
3
+ metadata.gz: b1b98e3240cbb368e4a3e2bc415ae7fbf8a8aa32
4
+ data.tar.gz: fe1e0fc52265bcc43416b340875a5359509f1393
5
5
  SHA512:
6
- metadata.gz: b188f1da0ce2583ffb7cf746df538050e556a2f9dfeceffea00b43104826c6de473f16ef1d75a66a47de475c6a673444961ad26dacde980dbaba9bb7319f220a
7
- data.tar.gz: f9c477e5074bd3324204ec145adc355f912926bed74c25177041cfb9997f52113b30e81d217d9bd33eda54a0f9c5abe6cf477f3ea74f5637206941dd8dc331ff
6
+ metadata.gz: 0a378a6bee5b4580591f427b447195a3d7786156d009389c7f5c5dced3c30595c889dfa619fac41bcdc57c7fddbeb6fd5d2edcaad13949b737d4d98d4d603f32
7
+ data.tar.gz: 13ea3dbc4a36af78fc687f864a8fe7f723502578847f8a6741bee87df37e0c6c0286a6e54030f60f756c502dcffec503e5fb7851acc75a3dbc340b91bb6db4a3
data/README.md CHANGED
@@ -17,7 +17,6 @@ Check out my [personal website](https://gaalcaras.com) or my [blog](https://soci
17
17
 
18
18
  Table of contents:
19
19
 
20
-
21
20
  * [Features](#features)
22
21
  * [Installation](#installation)
23
22
  * [Usage](#usage)
@@ -26,6 +25,8 @@ Table of contents:
26
25
  * [General settings](#general-settings)
27
26
  * [Author](#author)
28
27
  * [Navigation menu](#navigation-menu)
28
+ * [Multilingual and i18n support](#multilingual-and-i18n-support)
29
+ * [Plugins](#plugins)
29
30
  * [Layouts](#layouts)
30
31
  * [Post layout](#post-layout)
31
32
  * [Page layout](#page-layout)
@@ -44,6 +45,10 @@ Table of contents:
44
45
  + High contrast colors and backgrounds as much as possible ([read more](http://contrastrebellion.com/), [and more](https://backchannel.com/how-the-web-became-unreadable-a781ddc711b6))
45
46
  + Comfortable line length (around 66 characters, [read more](http://webtypography.net/2.1.2))
46
47
  + Attention to vertical rhythm, law of proximity and so on ([read more](http://typographyhandbook.com/))
48
+ + If you'd like a **multilingual** website, Academic has basic **i18n** support (no plugin required):
49
+ + English and French translations are included in the theme
50
+ + Lang selector to change languages automatically added in header and footer
51
+ + Basic SEO support for multilingual pages
47
52
  + Add an **image thumbnail** to illustrate your posts. It's displayed both on the post list and on the post itself.
48
53
  + Add a **summary** to your posts. It's used in the posts lists and on the post itself.
49
54
  + **MathJax** support (loaded only on posts layouts)
@@ -173,6 +178,71 @@ nav_ext_links:
173
178
  - name: Link 2
174
179
  url: http://wallabag.org/
175
180
  ```
181
+
182
+ #### Multilingual and i18n support
183
+
184
+ Academic works perfectly well as a single language website.
185
+ But if you need to translate part of your pages or posts, it also supports basic i18n and multilingual features.
186
+ The theme includes French and English versions as of now.
187
+
188
+ To enable multilingual mode, just add the following to your `_config.yml`:
189
+
190
+ ```yaml
191
+ langs: ["fr", "en"]
192
+ defaults:
193
+ - scope:
194
+ path: ""
195
+ values:
196
+ lang: "fr"
197
+ ```
198
+
199
+ The `langs` variable should be an array containing your languages.
200
+ Important: the first item should be your "default" language (ie the language that you translate posts from or/and that has the largest content available).
201
+
202
+ Don't forget to define a default lang for your whole website.
203
+
204
+ If you want to translate some of the variables in your `_config.yml`, you can just do this:
205
+
206
+ ```yaml
207
+ title:
208
+ fr: "Nom du site en Français"
209
+ en: "English name of the website"
210
+ ```
211
+
212
+ Translating posts and pages is very easy.
213
+ Let's say my default lang is `fr` and I want to translate `_posts/billet-au-hasard.md` to English.
214
+
215
+ ```yaml
216
+ ---
217
+ layout: post
218
+ title: "Billet au hasard"
219
+ permalink: /fr/billet-au-hasard/
220
+ date: 2017-02-14 15:32:29 +0100
221
+ ---
222
+ ```
223
+
224
+ First, I'll create a new file named `_posts/billet-au-hasard.en.md`.
225
+ Both files have to share the *exact same name before the first extension* (`.md` or `.en.md`) in order to signal to Academic that these posts are translations of eachother.
226
+
227
+ Then, in `_posts/billet-au-hasard.en.md`, add the lang and change the permalink in your frontmatter:
228
+
229
+ ```yaml
230
+ layout: post
231
+ title: "Random post"
232
+ permalink: /en/random-post
233
+ date: 2017-02-14 15:32:29 +0100
234
+ lang: en
235
+ ```
236
+
237
+ That's it!
238
+ Academic will handle the lang selector and will add `<link />` to the `<head>` section to improve SEO.
239
+
240
+ Note that you have to handle the permalinks manually.
241
+ I recommend that you use the subdirectory `/lang/` naming convention everywhere, as exemplified above.
242
+ You should at least take care of your homepage URL.
243
+
244
+ If you'd like Academic to support more languages, please contribute by adding the appropriate translations in `/_data/i18n_academic.yml`.
245
+
176
246
  #### Plugins
177
247
 
178
248
  Academic is compatible with the `jekyll-last-modified-at` plugin ([repo](https://github.com/gjtorikian/jekyll-last-modified-at)). If installed, the last modified date will be (discretely) displayed in the posts lists and in the post layout.
@@ -1,9 +1,19 @@
1
1
  <div class="colored-block">
2
- {% if include.message %}
3
- {{ include.message | escape }}
2
+ {% assign cta = site.data.academic_i18n.cta %}
3
+ {% if page.layout == "home" or page.layout == "archive" %}
4
+ {{ cta.like[page.lang] | escape }}
5
+ {% else if page.layout == "post" %}
6
+ {{ cta.post[page.lang] | escape }}
7
+ {% else %}
4
8
  {% endif %}
5
- Vous pouvez vous abonner au <a href="/feed.xml">fil RSS</a> du blog
9
+
10
+ {{ cta.rss[page.lang][0] }}
11
+ <a href="/feed.xml">{{ cta.rss[page.lang][1]}}</a>
12
+ {{ cat.rss[page.lang][2]}}
13
+
6
14
  {% if site.twitter_username %}
7
- ou suivre <a href="https://twitter.com/{{ site.twitter_username }}">@{{ site.twitter_username }}</a> sur Twitter
15
+ {{ cta.twitter[page.lang][0] }}
16
+ <a href="https://twitter.com/{{ site.twitter_username }}">@{{ site.twitter_username }}</a>
17
+ {{ cta.twitter[page.lang][1] }}
8
18
  {% endif %}.
9
19
  </div>
@@ -1,4 +1,6 @@
1
- <span class="contact-list-title">Liens :</span>
1
+ <span class="contact-list-title">
2
+ {{ site.data.academic_i18n.links[page.lang] }}
3
+ </span>
2
4
  <ul class="contact-list {{ include.class }}">
3
5
  <li>
4
6
  {% include icon-rss.html %}
@@ -1,10 +1,10 @@
1
- {% if site.dateformat %}
2
- {% assign months = "Janvier, Février, Mars, Avril, Mai, Juin, Juillet, Août, Septembre, Octobre, Novembre, Décembre" | downcase | split: ", " %}
3
- {% assign date = include.date | date: site.dateformat %}
1
+ {% if page.lang != "en" %}
2
+ {% assign dateformat = site.data.academic_i18n.dateformat[page.lang] %}
3
+ {% assign date = include.date | date: dateformat %}
4
4
  {% assign eng_month = include.date | date: "%B" %}
5
5
  {% assign num_month = include.date | date: "%m" | minus: 1 %}
6
6
 
7
- {{ date | replace:eng_month, months[num_month] }}
7
+ {{ date | replace:eng_month, site.data.academic_i18n.months[page.lang][num_month] }}
8
8
  {% else %}
9
- {{ include.date | date: "%b %-d, %Y" }}
9
+ {{ include.date | date: site.data.academic_i18n.dateformat[page.lang] }}
10
10
  {% endif %}
@@ -1,17 +1,15 @@
1
+ {% assign i18n = site.data.academic_i18n %}
1
2
  <footer class="site-footer">
2
3
 
3
4
  <div class="wrapper">
4
5
 
5
6
  <ul class="footer-col footer-col-1">
6
7
  <li>
7
- {% if site.title_html %}
8
- <a href="{{ "/" | relative_url}}">{{ site.title_html }}</a>
9
- {% else %}
10
- <a href="{{ "/" | relative_url}}"><b>{{ site.title }}</b></a>
11
- {% endif %}
8
+ {% include sitetitle.html %}
12
9
 
13
10
  {% if site.author_display %}
14
- <span class="author"> par
11
+ <span class="author">
12
+ {{ i18n.by[page.lang] }}
15
13
  {% if site.author_website %}
16
14
  <a target="_blank" href="{{ site.author_website }}">{{ site.author }}</a>
17
15
  {% else %}
@@ -22,7 +20,7 @@
22
20
  {% endif %}
23
21
 
24
22
  {% if site.description %}
25
- <li>{{ site.description }}</li>
23
+ <li>{% include i18n.html value=site.description %}</li>
26
24
  {% endif %}
27
25
 
28
26
  </ul>
@@ -37,6 +35,11 @@
37
35
  {% endif %}
38
36
 
39
37
  <div class="bottom">
38
+
39
+ {% if site.langs %}
40
+ {% include lang_selector.html %}
41
+ {% endif %}
42
+
40
43
  <div class="tech">
41
44
  <a target="_blank" href="https://jekyllrb.com/">Jekyll</a> + <a target="_blank" href="https://github.com/gaalcaras/academic">Academic</a>
42
45
  {% if site.repo %}
@@ -46,18 +49,20 @@
46
49
 
47
50
  <div class="legal">
48
51
  {% if site.cc == null %}©{% endif %}
49
- {% if site.title %}
50
- <a href="{{ "/" | relative_url}}">{{ site.title | escape }}</a>
51
- {% endif %}
52
+ {% include sitetitle.html %}
52
53
  {% assign oldest_post = site.posts reversed | first %}
53
54
  {% assign oldest = oldest_post.date | date: "%Y" %}
54
55
  {% assign newest = site.time | date: "%Y" %}
55
56
  ({% if oldest != newest %}{{ oldest }}-{% endif %}{{ newest }})
56
57
  {% if site.author and site.author_display %}
57
- par <a target="_blank" href="{{ site.author_website }}">{{ site.author }}</a>
58
+ {{ i18n.legal[page.lang][0] }}
59
+ <a target="_blank" href="{{ site.author_website }}">{{ site.author }}</a>
58
60
  {% endif %}
59
61
  {% if site.cc %}
60
- est placé sous licence <a target="_blank" rel="license" href="https://creativecommons.org/licenses/{{ site.cc }}/4.0/" class="cc-licence">CC {{ site.cc }}</a>
62
+ {{ i18n.legal[page.lang][1] }}
63
+ <a target="_blank" rel="license" href="https://creativecommons.org/licenses/{{ site.cc }}/4.0/" class="cc-licence">
64
+ CC {{ site.cc }}
65
+ </a>
61
66
  {% endif %}
62
67
  </div>
63
68
  </div>
@@ -3,13 +3,31 @@
3
3
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1">
5
5
 
6
- <title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
7
- <meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
6
+ <title>{{ page.title }} | {% include i18n.html value=site.title %}</title>
7
+ <meta name="description" content="{% include i18n.html value=site.description %}">
8
8
 
9
9
  <link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
10
10
  <link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
11
- <link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">
12
-
11
+ <link rel="alternate" type="application/rss+xml" title="{% include i18n.html value=site.title %}" href="{{ "/feed.xml" | relative_url }}">
12
+
13
+ {% assign pagename = page.path | split:"." | first %}
14
+
15
+ {% if page.layout == "post" %}
16
+ {% assign i18n_posts = site.posts | where_exp:"p","p.path contains pagename" %}
17
+ {% else %}
18
+ {% assign i18n_posts = site.pages | where_exp:"p","p.path contains pagename" %}
19
+ {% endif %}
20
+
21
+ {% for t_lang in site.langs %}
22
+ {% unless t_lang == page.lang %}
23
+ {% assign t = i18n_posts | where:"lang",t_lang | first %}
24
+
25
+ {% if t %}
26
+ <link rel="alternate" hreflang="{{ t_lang }}" href="{{ site.url }}{{ t.url }}" />
27
+ {% endif %}
28
+ {% endunless %}
29
+ {% endfor %}
30
+
13
31
  {% if site.piwik %}
14
32
  {% include piwik.html %}
15
33
  {% endif %}
@@ -2,21 +2,10 @@
2
2
 
3
3
  <div class="wrapper">
4
4
 
5
+ <div class="site-header-float">
6
+ {% include sitetitle.html class=true %}
5
7
  {% if site.pitch %}
6
- {% assign title_class = "site-title with-pitch" %}
7
- {% else %}
8
- {% assign title_class = "site-title" %}
9
- {% endif %}
10
-
11
- {% if site.title_html %}
12
- {% assign title = site.title_html %}
13
- {% else %}
14
- {% assign title = site.title escape %}
15
- {% endif %}
16
-
17
- <a class="{{ title_class }}" href="{{ "/" | relative_url}}">{{ title }}</a>
18
- {% if site.pitch %}
19
- <span class="site-pitch">{{ site.pitch | espace }}</span>
8
+ <span class="site-pitch">{% include i18n.html value=site.pitch %}</span>
20
9
  {% endif %}
21
10
 
22
11
  {% if site.pitch == null %}
@@ -34,6 +23,11 @@
34
23
  </div>
35
24
  </nav>
36
25
  {% endif %}
26
+ </div>
27
+
28
+ {% if site.langs %}
29
+ {% include lang_selector.html %}
30
+ {% endif %}
37
31
 
38
32
  </div>
39
33
 
@@ -0,0 +1,13 @@
1
+ {% assign val = include.value %}
2
+
3
+ {% if val[page.lang] %}
4
+ {% assign v = val[page.lang] %}
5
+ {% else %}
6
+ {% assign v = val %}
7
+ {% endif %}
8
+
9
+ {% if include.escape %}
10
+ {{ v | escape | strip_newlines }}
11
+ {% else %}
12
+ {{ v | strip_newlines }}
13
+ {% endif %}
@@ -1,5 +1,6 @@
1
1
  <a href="/feed.xml" title="RSS"><span class="icon icon--feed">{% include icon-rss.svg %}</span>
2
- <span class="username">flux
2
+ <span class="username">
3
+ {{ site.data.academic_i18n.feed[page.lang] }}
3
4
  </span>
4
5
  </a>
5
6
 
@@ -0,0 +1,41 @@
1
+ {% assign pagename = page.path | split:"." | first %}
2
+ {% assign versions = site.data.academic_i18n.versions %}
3
+ {% assign no_versions = site.data.academic_i18n.no_versions %}
4
+
5
+ {% if page.layout == "post" %}
6
+ {% assign i18n_posts = site.posts | where_exp:"p","p.path contains pagename" %}
7
+ {% else %}
8
+ {% assign i18n_posts = site.pages | where_exp:"p","p.path contains pagename" %}
9
+ {% endif %}
10
+
11
+ <ul class="lang-selector">
12
+ <span class="lang-intro">
13
+ {{ site.data.academic_i18n.langs_avail[page.lang] }}
14
+ </span>
15
+ <li class="lang">
16
+ <a href="{{ page.url }}" title="{{ versions[page.lang] }} {{ page.title }}">
17
+ {{ page.lang }}
18
+ </a>
19
+ </li>
20
+
21
+ {% for t_lang in site.langs %}
22
+ {% unless t_lang == page.lang %}
23
+ {% assign t = i18n_posts | where:"lang",t_lang | first %}
24
+ <li class="lang">
25
+ {% if t %}
26
+ <a href="{{ t.url }}" rel="alternate" title="{{ versions[t_lang] }} {{ t.title }}">
27
+ {% else %}
28
+ <span class="no-version" title="{{ no_versions[t_lang] }}">
29
+ {% endif %}
30
+
31
+ {{ t_lang }}
32
+
33
+ {% if t %}
34
+ </a>
35
+ {% else %}
36
+ </span>
37
+ {% endif %}
38
+ </li>
39
+ {% endunless %}
40
+ {% endfor %}
41
+ </ul>
@@ -10,11 +10,12 @@
10
10
  <span class="last-update">·
11
11
 
12
12
  {% if site.repo %}
13
- <a title="Voir l'historique des révisions de ce billet"
13
+ <a title="{{ site.data.academic_i18n.revhistory[page.lang] }}"
14
14
  href="{{site.repo}}/commits/master/{{object.path}}">
15
15
  {% endif %}
16
16
 
17
- mis à jour le {% include date.html date=object.last_modified_at %}
17
+ {{ site.data.academic_i18n.lastupdated[page.lang] }}
18
+ {% include date.html date=object.last_modified_at %}
18
19
 
19
20
  {% if site.repo %}
20
21
  </a>
@@ -0,0 +1,2 @@
1
+ {% assign object = site.pages | where_exp:"p","p.path contains include.path" | where:"lang",page.lang | first %}
2
+ {{ object.url }}
@@ -1,12 +1,16 @@
1
- <span class="nav-list-title">Menu :</span>
1
+ <span class="nav-list-title">{{ site.data.academic_i18n.menu[page.lang] }}</span>
2
2
  <ul class="nav-list {{ include.class }}">
3
3
  {% for link in site.nav_ext_links %}
4
4
  {% if link.url and link.name %}
5
- <li><a target="_blank" class="page-link" href="{{ link.url }}">{{ link.name | escape }}</a></li>
5
+ <li><a target="_blank" class="page-link" href="{{ link.url }}">
6
+ {% include i18n.html value=link.name %}
7
+ </a></li>
6
8
  {% endif %}
7
9
  {% endfor %}
8
10
 
9
- {% for my_page in site.pages %}
11
+ {% assign pages = site.pages | where:"lang",page.lang %}
12
+
13
+ {% for my_page in pages %}
10
14
  {% unless my_page.invisible %}
11
15
  {% if my_page.title %}
12
16
  <li><a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a></li>
@@ -1,5 +1,4 @@
1
1
  <li>
2
-
3
2
  <h2>
4
3
  <a class="post-link" href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
5
4
  </h2>
@@ -0,0 +1,12 @@
1
+ {% if include.limit %}
2
+ {% assign limit = site.nb_posts_page %}
3
+ {% else %}
4
+ {% assign limit = 1000000 %}
5
+ {% endif %}
6
+
7
+ <ul class="post-list">
8
+ {% assign posts = site.posts | where:"lang",page.lang %}
9
+ {% for post in posts limit:limit %}
10
+ {% include post-li.html %}
11
+ {% endfor %}
12
+ </ul>
@@ -0,0 +1,19 @@
1
+ {% if include.class %}
2
+ {% if site.pitch %}
3
+ {% assign title_class = "site-title with-pitch" %}
4
+ {% else %}
5
+ {% assign title_class = "site-title" %}
6
+ {% endif %}
7
+ {% else %}
8
+ {% assign title_class = "" %}
9
+ {% endif %}
10
+
11
+ {% capture title %}
12
+ {% if site.title_html %}
13
+ {% include i18n.html value=site.title_html escape=false %}
14
+ {% else %}
15
+ {% include i18n.html value=site.title %}
16
+ {% endif %}
17
+ {% endcapture %}
18
+
19
+ <a class="{{ title_class }}" href="{% include link.html path="index" %}">{{ title }}</a>
@@ -4,17 +4,13 @@ layout: default
4
4
 
5
5
  <div class="home">
6
6
  <div class="colored-block">
7
- Bienvenue dans les archives de ce blog. Vous trouverez ci-dessous la liste complète des billets publiés, ordonnés du plus récent au plus ancien.
7
+ {{ site.data.academic_i18n.archive[page.lang] }}
8
8
  </div>
9
9
 
10
10
  {{ content }}
11
11
 
12
- <ul class="post-list">
13
- {% for post in site.posts %}
14
- {% include post-li.html %}
15
- {% endfor %}
16
- </ul>
12
+ {% include post-ul.html %}
17
13
 
18
- {% include calltoaction.html message="Le blog vous intéresse ?" %}
14
+ {% include calltoaction.html %}
19
15
 
20
16
  </div>
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="{{ page.lang | default: site.lang | default: "en" }}">
2
+ <html lang="{{ page.lang | default: site.langs[0] | default: "en" }}">
3
3
 
4
4
  {% include head.html %}
5
5
 
@@ -9,29 +9,22 @@ layout: default
9
9
  {% endif %}
10
10
 
11
11
  <div class="{{ div_class }}">
12
- {% if site.pitch == null %}
13
- <p>{{ site.description | escape }}</p>
14
- {% endif %}
12
+ {% unless site.pitch %}
13
+ <p>{% include i18n.html value=site.description %}</p>
14
+ {% endunless %}
15
15
 
16
16
  {{ content }}
17
17
 
18
- <ul class="post-list">
19
- {% for post in site.posts limit:site.nb_posts_page %}
20
- {% include post-li.html %}
21
- {% endfor %}
22
- </ul>
18
+ {% include post-ul.html limit=true %}
23
19
 
24
- {% include calltoaction.html message="Le blog vous intéresse ?" %}
20
+ {% include calltoaction.html %}
25
21
 
26
22
  {% assign nb_posts = site.posts | size %}
27
- {% if site.archive_permalink %}
28
- {% assign archive_link = site.archive_permalink %}
29
- {% else %}
30
- {% assign archive_link = "/archive" %}
31
- {% endif %}
32
23
 
33
24
  {% if nb_posts > site.nb_posts_page %}
34
- <div class="archive">Voir <a href="{{ archive_link }}">tous les articles publiés</a>.</div>
25
+ <div class="archive">
26
+ {{ site.data.academic_i18n.all_posts[page.lang][0] }}
27
+ <a href="{% include link.html path="archive" %}">{{ site.data.academic_i18n.all_posts[page.lang][1] }}</a>.</div>
35
28
  {% endif %}
36
29
 
37
30
  </div>
@@ -4,7 +4,7 @@ layout: default
4
4
 
5
5
  <div class="msg-404">
6
6
  <div class="title">404</div>
7
- <div class="description">Cette page a probablement déménagé vers une nouvelle adresse...</div>
7
+ <div class="description">{{ site.data.academic_i18n.notfound[page.lang] }}</div>
8
8
  </div>
9
9
 
10
10
  {{ page.content }}
@@ -30,7 +30,7 @@ layout: default
30
30
  {{ content }}
31
31
  </div>
32
32
 
33
- {% include calltoaction.html message="Cet article vous a plu ?" %}
33
+ {% include calltoaction.html %}
34
34
 
35
35
  {% if site.shortbio %}
36
36
  <div class="post-author">
@@ -43,7 +43,7 @@ layout: default
43
43
  <li class="user-name">
44
44
  {{ site.author }}
45
45
  </li>
46
- <li class="user-shortbio">{{ site.shortbio }}</li>
46
+ <li class="user-shortbio">{% include i18n.html value=site.shortbio %}</li>
47
47
  </ul>
48
48
  </div>
49
49
  {% endif %}
@@ -4,10 +4,127 @@
4
4
  .site-header {
5
5
  border-top: 5px solid $grey-color;
6
6
  border-bottom: 1px solid $grey-color-light;
7
- min-height: 60px;
7
+
8
+ @include media-query($on-laptop) {
9
+ min-height: 100px;
10
+ }
8
11
 
9
12
  // Positioning context for the mobile navigation icon
10
13
  position: relative;
14
+
15
+ .site-header-float {
16
+ min-height: 60px;
17
+ }
18
+
19
+ .lang-selector {
20
+ position: absolute;
21
+ z-index: 900;
22
+ top: 0px;
23
+ right: 0px;
24
+ width: 30px;
25
+ text-align: center;
26
+ margin-right: 10px;
27
+ padding: 10px;
28
+
29
+ .lang-intro {
30
+ display: none;
31
+ }
32
+
33
+ .lang {
34
+ font-variant: small-caps;
35
+ text-transform: capitalize;
36
+ list-style: none;
37
+ line-height: 40px;
38
+
39
+ &:nth-child(n+3) {
40
+ display: none;
41
+ padding: 10px 0 10px 0;
42
+ }
43
+
44
+ &:nth-child(2) {
45
+ padding-bottom: 10px;
46
+ }
47
+
48
+ a {
49
+ color: $grey-color-light;
50
+ }
51
+
52
+ }
53
+
54
+ &:hover {
55
+ padding-bottom: 0px;
56
+ background: $grey-color;
57
+
58
+ .lang:first-child {
59
+ padding-bottom: 10px;
60
+ }
61
+
62
+ .lang a {
63
+ color: $brand-color;
64
+
65
+ &:hover {
66
+ text-decoration: none;
67
+ color: $grey-color-light;
68
+ }
69
+ }
70
+
71
+ .lang:nth-child(n+3) {
72
+ border-top: 1px solid $grey-color-light;
73
+ display: block;
74
+ }
75
+ }
76
+
77
+ @include media-query($on-laptop) {
78
+ position: relative;
79
+ left: 0;
80
+ width: auto;
81
+ clear: both;
82
+ margin: 0 -$spacing-unit/2 0 -$spacing-unit/2;
83
+ padding: 5px 5px 5px $spacing-unit/2;
84
+ background: $grey-color-lighter;
85
+ text-align: left;
86
+ @include size(small);
87
+
88
+ .lang-intro {
89
+ display: inline-block;
90
+ }
91
+
92
+ .lang:nth-child(n+1) {
93
+ padding: 5px 5px 5px 0;
94
+ line-height: normal;
95
+ display: inline-block;
96
+
97
+ a {
98
+ color: $grey-color-dark;
99
+
100
+ &:hover {
101
+ text-decoration: underline
102
+ }
103
+ }
104
+ }
105
+
106
+ .lang:nth-child(n+3):before {
107
+ content: "| ";
108
+ }
109
+
110
+ &:hover {
111
+ background: $grey-color-lighter;
112
+ padding: 5px 5px 5px $spacing-unit/2;
113
+
114
+ .lang:nth-child(n+1) {
115
+ padding: 5px 5px 5px 0;
116
+ display: inline-block;
117
+ border: none;
118
+
119
+ a { color: $grey-color-dark; }
120
+ }
121
+ }
122
+
123
+ @include media-query($on-palm) {
124
+ margin-top: 0px;
125
+ }
126
+ }
127
+ }
11
128
  }
12
129
 
13
130
  .site-title {
@@ -17,7 +134,6 @@
17
134
  line-height: 55px;
18
135
  letter-spacing: -1px;
19
136
  margin-bottom: -5px;
20
- float: left;
21
137
 
22
138
  &,
23
139
  &:visited {
@@ -68,6 +184,7 @@
68
184
  .site-nav {
69
185
  float: right;
70
186
  line-height: 60px;
187
+ z-index: 1000;
71
188
 
72
189
  .menu-icon {
73
190
  display: none;
@@ -237,6 +354,10 @@
237
354
  a .username:hover {
238
355
  text-decoration: underline;
239
356
  }
357
+
358
+ @include media-query($on-palm) {
359
+ margin-bottom: $spacing-unit / 2;
360
+ }
240
361
  }
241
362
 
242
363
  .bottom {
@@ -248,6 +369,10 @@
248
369
  margin-top: $spacing-unit;
249
370
  margin-bottom: $spacing-unit;
250
371
 
372
+ @include media-query($on-palm) {
373
+ margin-top: 0px;
374
+ }
375
+
251
376
  a {
252
377
  color: $grey-color-light;
253
378
  }
@@ -256,6 +381,38 @@
256
381
  text-transform: uppercase;
257
382
  }
258
383
 
384
+ .lang-selector {
385
+ display: inline-block;
386
+ list-style: none;
387
+ color: $grey-color;
388
+ margin: $spacing-unit / 4 0 0 0;
389
+ padding: 10px;
390
+
391
+ @include media-query($on-palm) {
392
+ text-align: left;
393
+ padding-left: 0px;
394
+ margin: 0px 0px $spacing-unit/2 0px;
395
+
396
+ .lang-intro {
397
+ font-weight: bold;
398
+ }
399
+ }
400
+
401
+ .lang {
402
+ display: inline-block;
403
+ text-transform: lowercase;
404
+
405
+ a {
406
+ color: $grey-color;
407
+ }
408
+
409
+ &:nth-child(n+3) {
410
+ &:before {
411
+ content:"|"
412
+ }
413
+ }
414
+ }
415
+ }
259
416
  }
260
417
 
261
418
  }
@@ -607,3 +764,7 @@
607
764
  font-family: $base-font-family;
608
765
  }
609
766
  }
767
+
768
+ .no-version {
769
+ cursor: default;
770
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: academic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - gaalcaras
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-14 00:00:00.000000000 Z
11
+ date: 2017-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -67,6 +67,7 @@ files:
67
67
  - _includes/footer.html
68
68
  - _includes/head.html
69
69
  - _includes/header.html
70
+ - _includes/i18n.html
70
71
  - _includes/icon-email.html
71
72
  - _includes/icon-email.svg
72
73
  - _includes/icon-file.html
@@ -83,10 +84,14 @@ files:
83
84
  - _includes/icon-twitter.svg
84
85
  - _includes/icon-website.html
85
86
  - _includes/icon-website.svg
87
+ - _includes/lang_selector.html
86
88
  - _includes/last_modified_at.html
89
+ - _includes/link.html
87
90
  - _includes/nav_menu.html
88
91
  - _includes/piwik.html
89
92
  - _includes/post-li.html
93
+ - _includes/post-ul.html
94
+ - _includes/sitetitle.html
90
95
  - _layouts/about.html
91
96
  - _layouts/archive.html
92
97
  - _layouts/default.html