Skip to content
Browse files

Improve header. Thanks bquorning

  • Loading branch information...
2 parents d1c6b4b + 7743dc6 commit 70bef13c51c0651e627573fd0115350430ee8ee9 @ZenCocoon committed Mar 2, 2011
View
2 app/views/layouts/tolk/application.html.erb
@@ -14,7 +14,7 @@
<body>
<div id="container">
<header>
- <h1><span class="home"><%= link_to "Tolk", tolk_root_path %></span><%= yield :locale %></h1>
+ <h1><span class="home"><%= link_to "Tolk", tolk_root_path %></span><% if @locale.present? %><span class="locale"><%= link_to @locale.language_name, tolk_locale_path(@locale) %></span><% end %></h1>
</header>
<%= yield %>
</div>
View
3 app/views/tolk/locales/all.html.erb
@@ -1,6 +1,3 @@
-<% content_for :locale do %><span class="locale"><%= @locale.language_name %></span>
-<% end %>
-
<h3 class="switch">Completed translations <span>(<%= link_to 'See phrases missing translation', @locale %>)</span></h3>
<% if @locale.has_updated_translations? && action_name != 'updated' %>
View
3 app/views/tolk/locales/index.html.erb
@@ -1,6 +1,3 @@
-<% content_for :locale do %><span class="locale empty"></span>
-<% end %>
-
<h2>Locales <span>Primary locale is <%= Tolk::Locale.primary_locale.language_name %></span></h2>
<% if @locales.any? %>
<ul class="locales clearfix">
View
4 app/views/tolk/locales/show.html.erb
@@ -1,7 +1,3 @@
-<% content_for :locale do %>
- <span class="locale"><%= @locale.language_name %></span>
-<% end %>
-
<% content_for :head do %>
<link rel="alternate" type="application/rss+xml" title="RSS" href="<%= tolk_locale_path(@locale, :format => 'atom') -%>" />
<% end %>
View
4 app/views/tolk/searches/show.html.erb
@@ -1,7 +1,3 @@
-<% content_for :locale do %>
- <span class="locale"><%= @locale.language_name %></span>
-<% end %>
-
<h3 class="search">
<%= render :partial => "form", :locals => { :locale => @locale } %>
</h3>
View
2 config/routes.rb
@@ -9,4 +9,4 @@
end
resource :search
end
-end
+end
View
48 public/tolk/stylesheets/screen.css
@@ -69,23 +69,37 @@ header a {
text-decoration: none;
}
+header span {
+ padding: 8px 6px;
+ margin-right: 1px;
+}
+
header span.home {
+ background: #333;
+}
+
+header span.locale {
+ background: #444;
+ font-weight: bold;
+ background: #444;
+}
+
+header span.locale a {
+ color: #fff;
+}
+
+header span:first-child {
+ padding-left: 12px;
-webkit-border-top-left-radius: 10px;
-webkit-border-bottom-left-radius: 10px;
-moz-border-radius-topleft: 10px;
-moz-border-radius-bottomleft: 10px;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
- background: #333;
- padding: 8px 6px 8px 12px;
- margin-right: 1px;
}
-header span.locale {
- color: #fff;
- font-weight: bold;
- background: #444;
- padding: 8px 12px 8px 6px;
+header span:last-child {
+ padding-right: 12px;
-webkit-border-top-right-radius: 10px;
-webkit-border-bottom-right-radius: 10px;
-moz-border-radius-topright: 10px;
@@ -94,24 +108,6 @@ header span.locale {
border-bottom-right-radius: 10px;
}
-header span.locale.empty {
- background: #333;
- padding-left: 0;
- margin-left: -6px;
-}
-
-header span.locale em {
- font-style: normal;
- font-weight: normal;
-}
-
-header span.note {
- color: #777;
- font-size: 13px;
- font-weight: normal;
- margin-left: 10px;
-}
-
h2,
h3 {
font-size: 18px;

0 comments on commit 70bef13

Please sign in to comment.
Something went wrong with that request. Please try again.