Skip to content

Commit

Permalink
Merge pull request #57 from mathieucarbou/issue-45
Browse files Browse the repository at this point in the history
#45 Visual clue to indicate old, current and future documentation
  • Loading branch information
ljacomet authored Jun 29, 2016
2 parents 79bc7c4 + 20003ad commit ec2f8dd
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
4 changes: 4 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ asciidoctor:
- idprefix
- idseparator=-

documentation:
ehcache:
current: "3.0"
future: "3.1"

defaults:
-
Expand Down
15 changes: 13 additions & 2 deletions _layouts/docs3x_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<br/>

<div class="container-fluid">
<div class="container-fluid ehcache-documentation v{{ page.ehc_version }} {% if site.documentation.ehcache.current == page.ehc_version %} current {% else %} {% if site.documentation.ehcache.future == page.ehc_version %} future {% else %} old {% endif %} {% endif %}">


<div class="row row-offcanvas row-offcanvas-left">
Expand Down Expand Up @@ -53,7 +53,18 @@
<div class="col-xs-12 col-sm-9">
<header class="post-header">
{% if page.no_title_on_main_layout %} {% else %}
<h1 class="post-title">{% if page.visible_title %}{{ page.visible_title | replace: '!DOC_VERSION!', page.ehc_version }} {% else %}{{ page.title | replace: '!DOC_VERSION!', page.ehc_version }}{% endif %}</h1>
<h1 class="post-title">
<span>{% if page.visible_title %}{{ page.visible_title | replace: '!DOC_VERSION!', page.ehc_version }} {% else %}{{ page.title | replace: '!DOC_VERSION!', page.ehc_version }}{% endif %}</span>
{% if site.documentation.ehcache.current == page.ehc_version %}
<span class="current">CURRENT</span>
{% else %}
{% if site.documentation.ehcache.future == page.ehc_version %}
<span class="future">CURRENT:&nbsp;&nbsp;<a href="/documentation/{{site.documentation.ehcache.current}}">{{site.documentation.ehcache.current}}</a></span>
{% else %}
<span class="old">CURRENT:&nbsp;&nbsp;<a href="/documentation/{{site.documentation.ehcache.current}}">{{site.documentation.ehcache.current}}</a></span>
{% endif %}
{% endif %}
</h1>
<hr/>
{% endif %}
</header>
Expand Down
23 changes: 22 additions & 1 deletion _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -670,4 +670,25 @@ pre {
.entry:last-child {
border-bottom: none;
}
}
}

.ehcache-documentation {

.current {
float: right;
color: limegreen;
font-size: 14px;
}

.future {
float: right;
color: orange;
font-size: 14px;
}

.old {
float: right;
color: red;
font-size: 14px;
}
}

0 comments on commit ec2f8dd

Please sign in to comment.