mirror of
https://github.com/olivierlacan/keep-a-changelog.git
synced 2025-07-29 16:54:12 +02:00
Display a notice if this isn’t the latest version
This will allow visitors to translations to be aware (if they speak English, I know…) that there is a newer version already available in English but that it hasn’t been translated into their language yet.
This commit is contained in:
parent
4af96a47b1
commit
9bae4a465e
@ -35,7 +35,19 @@
|
||||
%li= link_to "#{language.last} [#{language.first}]", "/#{language.first}/",
|
||||
{ rel: "alternate", lang: "#{language}", hreflang: "#{language}" }
|
||||
|
||||
.main{role: "main"}= yield
|
||||
.main{role: "main"}
|
||||
- if current_page.metadata[:page][:version] != $last_version
|
||||
- code = current_page.metadata[:page][:language]
|
||||
- versions = Dir.entries("source/#{code}") - %w[. ..]
|
||||
- if versions.include?($last_version)
|
||||
= link_to "Version #{$last_version}", "#{code}/#{$last_version}"
|
||||
- else
|
||||
%p
|
||||
The latest version of Keep a Changelog is not yet available in
|
||||
this language but
|
||||
= link_to "you can read it in English", "/en/#{$last_version}"
|
||||
for now.
|
||||
= yield
|
||||
|
||||
%footer.clearfix{role: "banner"}
|
||||
%p.license
|
||||
|
Loading…
x
Reference in New Issue
Block a user