Permalink
Browse files

old version of OD link to current version

Fixes #79

English only for now (match /en/) pending #54
  • Loading branch information...
1 parent e098719 commit 33e81fa9c6842c0f99d044db03664e6dcd755335 @mlinksva mlinksva committed May 17, 2016
Showing with 10 additions and 3 deletions.
  1. +1 −1 _config.yml
  2. +5 −1 _layouts/default.html
  3. +4 −1 css/style.css
View
@@ -4,7 +4,7 @@ googleanalytics: UA-8271754-4
github: http://github.com/okfn/opendefinition
url: http://opendefinition.org
permalink: /:year/:month/:day/:title/
-od_current_version: 2.1
+od_current_version: '2.1'
gems:
- jekyll-sitemap
View
@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
- <title>
+ <title>
{{page.title}} - {{site.title}} - Defining Open in Open Data, Open Content and Open Knowledge
</title>
<meta name="author" content="Open Knowledge Open Definition Group" />
@@ -66,6 +66,10 @@
{% endif %}
<div class="row">
<div class="span7 main offset1">
+ {% assign url_elements = page.url | split:"/" %}
+ {% if url_elements[-3] == "od" and url_elements[-2] < site.od_current_version and url_elements[-1] == "en" %}
+ <div class="notice">A <a href="/od/{{ site.od_current_version }}/{{ url_elements[-1] }}/">newer version</a> of the Open Definition is available.</div>
+ {% endif %}
{% if page.notitle != true %}
<div class="page-header">
<h1>
View
@@ -41,6 +41,10 @@
text-align: center;
}
+.notice {
+ text-align: center;
+ background-color: lightyellow;
+}
/** Front page **/
@@ -49,4 +53,3 @@
line-height: 24px;
margin-bottom: 20px;
}
-

0 comments on commit 33e81fa

Please sign in to comment.