mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: better handling of logo size
This commit is contained in:
parent
f402d0d74f
commit
336436dfb4
@ -46,7 +46,6 @@ export default createWidget("home-logo", {
|
|||||||
attributes: {
|
attributes: {
|
||||||
src: Discourse.getURL(logoSmallUrl),
|
src: Discourse.getURL(logoSmallUrl),
|
||||||
width: 36,
|
width: 36,
|
||||||
height: 36,
|
|
||||||
alt: title
|
alt: title
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -61,7 +60,7 @@ export default createWidget("home-logo", {
|
|||||||
} else if (logoUrl.length) {
|
} else if (logoUrl.length) {
|
||||||
return h("img#site-logo.logo-big", {
|
return h("img#site-logo.logo-big", {
|
||||||
key: "logo-big",
|
key: "logo-big",
|
||||||
attributes: { src: Discourse.getURL(logoUrl), height: 36, alt: title }
|
attributes: { src: Discourse.getURL(logoUrl), alt: title }
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return h("h1#site-text-logo.text-logo", { key: "logo-text" }, title);
|
return h("h1#site-text-logo.text-logo", { key: "logo-text" }, title);
|
||||||
|
@ -33,8 +33,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// the logo height is set in the home-logo widget. This ensures we get a scaled
|
|
||||||
// width that respects the aspect ratio of the image
|
|
||||||
#site-logo {
|
#site-logo {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,9 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
height: 4.2858em;
|
height: 4.2858em;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
|
#site-logo {
|
||||||
|
height: 2.57em;
|
||||||
|
}
|
||||||
#site-text-logo {
|
#site-text-logo {
|
||||||
font-size: $font-up-3;
|
font-size: $font-up-3;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -17,6 +17,9 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#site-logo {
|
||||||
|
height: 2.4em;
|
||||||
|
}
|
||||||
#site-text-logo {
|
#site-text-logo {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: $font-up-1;
|
font-size: $font-up-1;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<div class="logo-wrapper">
|
<div class="logo-wrapper">
|
||||||
<a href="<%= path "/" %>">
|
<a href="<%= path "/" %>">
|
||||||
<%- if application_logo_url.present? %>
|
<%- if application_logo_url.present? %>
|
||||||
<img src="<%= application_logo_url %>" height="36" alt="<%= SiteSetting.title %>" id="site-logo">
|
<img src="<%= application_logo_url %>" alt="<%= SiteSetting.title %>" id="site-logo">
|
||||||
<%- else %>
|
<%- else %>
|
||||||
<h2 id='site-text-logo'><%= SiteSetting.title %></h2>
|
<h2 id='site-text-logo'><%= SiteSetting.title %></h2>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
|
Loading…
Reference in New Issue
Block a user