Permalink
Browse files

Render H1 in the layout file, let CSS handle the case of having no @l…

  • Loading branch information...
1 parent a17fc25 commit 2c95971e3314bf8481630419f9173e484150a3ba Benjamin Quorning committed Jan 4, 2011
@@ -19,7 +19,7 @@
<body>
<div id="container">
<div id="head">
- <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"><%= @locale.language_name %></span><% end %></h1>
</div>
<%= yield %>
</div>
@@ -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' %>
@@ -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">
@@ -1,6 +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 %>
@@ -1,6 +1,3 @@
-<% content_for :locale do %><span class="locale"><%= @locale.language_name %></span>
-<% end %>
-
<h3 class="search">
<%= render :partial => "form", :locals => { :locale => @locale } %>
</h3>
@@ -69,23 +69,33 @@ div#head a {
text-decoration: none;
}
+div#head span {
+ padding: 8px 6px;
+ margin-right: 1px;
+}
+
div#head span.home {
+ background: #333;
+}
+
+div#head span.locale {
+ color: #fff;
+ font-weight: bold;
+ background: #444;
+}
+
+div#head 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;
}
-div#head span.locale {
- color: #fff;
- font-weight: bold;
- background: #444;
- padding: 8px 12px 8px 6px;
+div#head 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 +104,6 @@ div#head span.locale {
border-bottom-right-radius: 10px;
}
-div#head span.locale.empty {
- background: #333;
- padding-left: 0;
- margin-left: -6px;
-}
-
-div#head span.locale em {
- font-style: normal;
- font-weight: normal;
-}
-
-div#head span.note {
- color: #777;
- font-size: 13px;
- font-weight: normal;
- margin-left: 10px;
-}
-
h2,
h3 {
font-size: 18px;

0 comments on commit 2c95971

Please sign in to comment.