FIX: Support text only logos when activating account.

This commit is contained in:
Robin Ward 2015-02-25 11:35:47 -05:00
parent cf00e73ed8
commit bcb0346595
4 changed files with 34 additions and 33 deletions

View File

@ -137,6 +137,10 @@ module ApplicationHelper
end
end
def application_logo_url
@application_logo_url ||= (mobile_view? && SiteSetting.mobile_logo_url) || SiteSetting.logo_url
end
def login_path
"#{Discourse::base_uri}/login"
end

View File

@ -0,0 +1,22 @@
<header class="d-header">
<div class="container">
<div class="contents">
<div class="row">
<div class="title span13">
<a href="/">
<%- if application_logo_url.present? %>
<img src="<%= application_logo_url %>" alt="<%= SiteSetting.title %>" id="site-logo">
<%- else %>
<h2 id='site-text-logo'><%= SiteSetting.title %></h2>
<%- end %>
</a>
</div>
<% unless current_user %>
<div class='panel clearfix'>
<a href="/login" class='btn btn-primary btn-small'><i class="fa fa-user"></i><%= I18n.t('log_in') %></a>
</div>
<% end %>
</div>
</div>
</div>
</header>

View File

@ -37,17 +37,7 @@
<body>
<noscript data-path="<%= request.env['PATH_INFO'] %>">
<header class="d-header">
<div class="container">
<div class="contents">
<div class="row">
<div class="title span13">
<a href="/"><img src="<%= (mobile_view? && SiteSetting.mobile_logo_url) || SiteSetting.logo_url %>" alt="<%=SiteSetting.title%>" id="site-logo"></a>
</div>
</div>
</div>
</div>
</header>
<%= render partial: 'header' %>
<div id="main-outlet" class="container">
<!-- preload-content: -->
<%= yield %>

View File

@ -15,29 +15,14 @@
<%= yield(:no_ember_head) %>
</head>
<body>
<%- unless customization_disabled? %>
<%- unless customization_disabled? %>
<%= SiteCustomization.custom_header(session[:preview_style]) %>
<%- end %>
<section id='main'>
<header class="d-header">
<div class="container">
<div class="contents">
<div class="row">
<div class="title span13">
<a href="/"><img src="<%=SiteSetting.logo_url%>" alt="<%=SiteSetting.title%>" id="site-logo"></a>
</div>
<% unless current_user %>
<div class='panel clearfix'>
<a href="/login" class='btn btn-primary btn-small'><i class="fa fa-user"></i><%= I18n.t('log_in') %></a>
</div>
<% end %>
</div>
</div>
<%- end %>
<section id='main'>
<%= render partial: 'header' %>
<div id="main-outlet" class="<%= @container_class ? @container_class : 'container' %>">
<%= yield %>
</div>
</header>
<div id="main-outlet" class="<%= @container_class ? @container_class : 'container' %>">
<%= yield %>
</div>
</section>
</section>
</body>
</html>