Skip to content

Commit

Permalink
Merge pull request #382 from caelum/addingLanguageIcons
Browse files Browse the repository at this point in the history
Adding language icons on site
  • Loading branch information
Turini committed Feb 18, 2014
2 parents a908e43 + 3c028aa commit 3ecee76
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 8 deletions.
26 changes: 26 additions & 0 deletions vraptor-site/content/css/flags.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.flag {
width: 16px;
height: 11px;
display: inline-block;
background: url(../img/flags.png) no-repeat;
}

.flag.not-selected {
background-position: 0 -11px
}

.flag.flag-pt {
background-position: -16px 0
}

.flag.flag-en {
background-position: -32px 0
}

.flag.flag-pt.not-selected {
background-position: -16px -11px
}

.flag.flag-en.not-selected {
background-position: -32px -11px
}
5 changes: 5 additions & 0 deletions vraptor-site/content/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,8 @@ pre {
color: #AAAAAA;
vertical-align: middle;
}

span#language {
float: right;
margin-right: 20px;
}
Binary file added vraptor-site/content/img/flags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions vraptor-site/layouts/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
<link rel="stylesheet" href="/css/reset.css">
<link rel="stylesheet" href="/css/custom-highlight.css" />
<link rel="stylesheet" href="/css/style.css" />
<link rel="stylesheet" href="/css/flags.css" />
<meta name="generator" content="nanoc <%= Nanoc::VERSION %>">
</head>
20 changes: 12 additions & 8 deletions vraptor-site/layouts/header.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<%
if @item[:filename].start_with?('content/en')
path = "/en"
else
path = "/pt"
end
%>
<% path = @item[:filename].start_with?('content/en') ? '/en' : '/pt' %>

<header>
<h1 class="logo"><a class="logo-link" href="<%=path%>">
<img src="/img/logo.png" alt="VRaptor">
</a></h1>
<span class="sublogo-message">Framework Java MVC</span>
</header>

<span id="language">
<a class="language" title="en" href="/en">
<span class="flag flag-en <%=path == '/en' ? '' : 'not-selected'%>"></span> EN
</a>
<a class="language" title="pt" href="/pt">
<span class="flag flag-pt <%=path == '/pt' ? '' : 'not-selected'%>"></span> PT
</a>
</span>

</header>

0 comments on commit 3ecee76

Please sign in to comment.