Skip to content

Commit

Permalink
Add no-translation feature
Browse files Browse the repository at this point in the history
  • Loading branch information
makowildcat committed Jul 15, 2024
1 parent 2c05ce6 commit 8b66563
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions _data/en/strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ for the university community, aimed at developing and studying the use
of an electricity-generating bike-desk platform."
about: About
contributors: Contributors
no_translation: This page is not available in English.
all: All topics
topics:
update: Update
1 change: 1 addition & 0 deletions _data/fr/strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ l'utilisation d'une plateforme de vélo-bureau générant de l'électricité."
about: À propos
blog: Blog
contributors: Personnes contributrices
no_translation: Cette page n'est pas disponible en Français.
all: Tous les sujets
topics:
update: Actualités
Expand Down
3 changes: 3 additions & 0 deletions _includes/no-translation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="message-box" id="no-translation-msg">
{{ site.data.strings.no_translation }}
</div>
3 changes: 3 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<article class="post h-entry" itemscope itemtype="http://schema.org/BlogPosting">

<header class="post-header">
{%- if page.lang != site.active_lang -%}
{%- include no-translation.html -%}
{%- endif -%}
<h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}</h1>
<p class="post-meta">
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: post
title: "Welcome to Jekyll!"
date: 2024-07-10 18:46:00 +0200
date: 2024-03-28 18:46:00 +0200
categories: jekyll update
lang: en
---
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: post
title: "Welcome to Veluqac"
date: 2024-06-10 11:46:00 +0200
date: 2024-05-07 11:46:00 +0200
categories: jekyll
lang: fr
---
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.

Expand Down
8 changes: 8 additions & 0 deletions _sass/minima/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,11 @@
}
}
}

.message-box {
background-color: #f5eeee;
border: 1px solid #e8e8e8;
border-radius: 3px;
margin-bottom: 30px;
text-align: center;
}

0 comments on commit 8b66563

Please sign in to comment.