Skip to content

Commit

Permalink
Merge pull request #142 from okfn/newer-od-notice
Browse files Browse the repository at this point in the history
old version of OD link to current version
  • Loading branch information
mlinksva committed May 17, 2016
2 parents e098719 + 33e81fa commit 96f9595
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down Expand Up @@ -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>
Expand Down
5 changes: 4 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
text-align: center;
}

.notice {
text-align: center;
background-color: lightyellow;
}

/** Front page **/

Expand All @@ -49,4 +53,3 @@
line-height: 24px;
margin-bottom: 20px;
}

0 comments on commit 96f9595

Please sign in to comment.