Skip to content

Commit

Permalink
Change full logo to use primary text color of the given theme (mastod…
Browse files Browse the repository at this point in the history
…on#10994)

* Change full logo to use primary text color of the given theme

* Fix colors of public layout header in light theme
  • Loading branch information
Gargron authored and hiyuki2578 committed Oct 2, 2019
1 parent e68df72 commit 73444bc
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 19 deletions.
4 changes: 4 additions & 0 deletions app/helpers/stream_entries_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def svg_logo
content_tag(:svg, tag(:use, 'xlink:href' => '#mastodon-svg-logo'), 'viewBox' => '0 0 216.4144 232.00976')
end

def svg_logo_full
content_tag(:svg, tag(:use, 'xlink:href' => '#mastodon-svg-logo-full'), 'viewBox' => '0 0 713.35878 175.8678')
end

def account_badge(account, all: false)
roles = []

Expand Down
2 changes: 1 addition & 1 deletion app/javascript/images/logo_full.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 3 additions & 12 deletions app/javascript/styles/mastodon-light/diff.scss
Original file line number Diff line number Diff line change
Expand Up @@ -531,23 +531,14 @@ html {
}

.header {
background: lighten($ui-base-color, 24%);

.nav-link {
color: $white;

&:hover,
&:focus,
&:active {
color: $white;
}
}
background: $ui-base-color;
border: 1px solid lighten($ui-base-color, 8%);

.brand {
&:hover,
&:focus,
&:active {
background: lighten($ui-base-color, 28%);
background: lighten($ui-base-color, 4%);
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion app/javascript/styles/mastodon/about.scss
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,8 @@ $small-breakpoint: 960px;
align-items: center;
padding: 50px;

img {
svg {
fill: $primary-text-color;
height: 52px;
}

Expand Down
6 changes: 4 additions & 2 deletions app/javascript/styles/mastodon/containers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
justify-content: center;
align-items: center;

img {
svg {
fill: $primary-text-color;
height: 42px;
margin-right: 10px;
}
Expand Down Expand Up @@ -256,12 +257,13 @@
display: block;
padding: 15px;

img {
svg {
display: block;
height: 18px;
width: auto;
position: relative;
bottom: -2px;
fill: $primary-text-color;

@media screen and (max-width: $no-gap-breakpoint) {
height: 20px;
Expand Down
2 changes: 1 addition & 1 deletion app/views/about/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
.landing
.landing__brand
= link_to root_url, class: 'brand' do
= image_pack_tag 'logo_full.svg', alt: 'Mastodon'
= svg_logo_full
%span.brand__tagline=t 'about.tagline'

.landing__grid
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@

%div{ style: 'display: none'}
= render file: Rails.root.join('app', 'javascript', 'images', 'logo_transparent.svg')
= render file: Rails.root.join('app', 'javascript', 'images', 'logo_full.svg')
2 changes: 1 addition & 1 deletion app/views/layouts/auth.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.logo-container
%h1
= link_to root_path do
= image_pack_tag 'logo_full.svg', alt: 'Mastodon'
= svg_logo_full

.form-container
= render 'flashes'
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/public.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%nav.header
.nav-left
= link_to root_url, class: 'brand' do
= image_pack_tag 'logo_full.svg', alt: 'Mastodon'
= svg_logo_full

= link_to t('directories.directory'), explore_path, class: 'nav-link optional' if Setting.profile_directory
= link_to t('about.about_this'), about_more_path, class: 'nav-link optional'
Expand Down

0 comments on commit 73444bc

Please sign in to comment.