Change brand color and logotypes (#18592)

- Add rake task for generating Apple/Android icons and favicons from SVG
- Add rake task for generating PNG icons and logos for e-mails from SVG
- Remove obsolete Microsoft icons and configuration
- Remove PWA shortcut icons
This commit is contained in:
Eugen Rochko 2022-06-09 22:25:23 +02:00 committed by GitHub
parent a2871cd747
commit 45aa5781ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
112 changed files with 257 additions and 152 deletions

View file

@ -281,6 +281,9 @@ Style/RedundantRegexpEscape:
Style/RedundantReturn: Style/RedundantReturn:
Enabled: true Enabled: true
Style/RedundantBegin:
Enabled: false
Style/RegexpLiteral: Style/RegexpLiteral:
Enabled: false Enabled: false

View file

@ -1,5 +1,8 @@
![Mastodon](https://i.imgur.com/NhZc40l.png) <h1><picture>
======== <source media="(prefers-color-scheme: dark)" srcset="./lib/assets/wordmark.dark.png?raw=true">
<source media="(prefers-color-scheme: light)" srcset="./lib/assets/wordmark.light.png?raw=true">
<img alt="Mastodon" src="./lib/asssets/wordmark.light.png?raw=true" height="34">
</picture></h1>
[![GitHub release](https://img.shields.io/github/release/mastodon/mastodon.svg)][releases] [![GitHub release](https://img.shields.io/github/release/mastodon/mastodon.svg)][releases]
[![Build Status](https://img.shields.io/circleci/project/github/mastodon/mastodon.svg)][circleci] [![Build Status](https://img.shields.io/circleci/project/github/mastodon/mastodon.svg)][circleci]
@ -35,7 +38,7 @@ Click below to **learn more** in a video:
## Features ## Features
<img src="https://docs.joinmastodon.org/elephant.svg" align="right" width="30%" /> <img src="/app/javascript/images/elephant_ui_working.svg?raw=true" align="right" width="30%" />
### No vendor lock-in: Fully interoperable with any conforming platform ### No vendor lock-in: Fully interoperable with any conforming platform

View file

@ -23,20 +23,20 @@ module AccountsHelper
if user_signed_in? if user_signed_in?
if account.id == current_user.account_id if account.id == current_user.account_id
link_to settings_profile_url, class: 'button logo-button' do link_to settings_profile_url, class: 'button logo-button' do
safe_join([svg_logo, t('settings.edit_profile')]) safe_join([logo_as_symbol, t('settings.edit_profile')])
end end
elsif current_account.following?(account) || current_account.requested?(account) elsif current_account.following?(account) || current_account.requested?(account)
link_to account_unfollow_path(account), class: 'button logo-button button--destructive', data: { method: :post } do link_to account_unfollow_path(account), class: 'button logo-button button--destructive', data: { method: :post } do
safe_join([svg_logo, t('accounts.unfollow')]) safe_join([logo_as_symbol, t('accounts.unfollow')])
end end
elsif !(account.memorial? || account.moved?) elsif !(account.memorial? || account.moved?)
link_to account_follow_path(account), class: "button logo-button#{account.blocking?(current_account) ? ' disabled' : ''}", data: { method: :post } do link_to account_follow_path(account), class: "button logo-button#{account.blocking?(current_account) ? ' disabled' : ''}", data: { method: :post } do
safe_join([svg_logo, t('accounts.follow')]) safe_join([logo_as_symbol, t('accounts.follow')])
end end
end end
elsif !(account.memorial? || account.moved?) elsif !(account.memorial? || account.moved?)
link_to account_remote_follow_path(account), class: 'button logo-button modal-button', target: '_new' do link_to account_remote_follow_path(account), class: 'button logo-button modal-button', target: '_new' do
safe_join([svg_logo, t('accounts.follow')]) safe_join([logo_as_symbol, t('accounts.follow')])
end end
end end
end end
@ -99,12 +99,4 @@ module AccountsHelper
[prepend_str, account.note].join(' · ') [prepend_str, account.note].join(' · ')
end end
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
end end

View file

@ -99,11 +99,6 @@ module ApplicationHelper
end end
end end
def favicon_path
env_suffix = Rails.env.production? ? '' : '-dev'
"/favicon#{env_suffix}.ico"
end
def title def title
Rails.env.production? ? site_title : "#{site_title} (Dev)" Rails.env.production? ? site_title : "#{site_title} (Dev)"
end end
@ -147,8 +142,8 @@ module ApplicationHelper
end end
end end
def custom_emoji_tag(custom_emoji, animate = true) def custom_emoji_tag(custom_emoji)
if animate if prefers_autoplay?
image_tag(custom_emoji.image.url, class: 'emojione', alt: ":#{custom_emoji.shortcode}:") image_tag(custom_emoji.image.url, class: 'emojione', alt: ":#{custom_emoji.shortcode}:")
else else
image_tag(custom_emoji.image.url(:static), class: 'emojione custom-emoji', alt: ":#{custom_emoji.shortcode}", 'data-original' => full_asset_url(custom_emoji.image.url), 'data-static' => full_asset_url(custom_emoji.image.url(:static))) image_tag(custom_emoji.image.url(:static), class: 'emojione custom-emoji', alt: ":#{custom_emoji.shortcode}", 'data-original' => full_asset_url(custom_emoji.image.url), 'data-static' => full_asset_url(custom_emoji.image.url(:static)))
@ -198,7 +193,7 @@ module ApplicationHelper
def quote_wrap(text, line_width: 80, break_sequence: "\n") def quote_wrap(text, line_width: 80, break_sequence: "\n")
text = word_wrap(text, line_width: line_width - 2, break_sequence: break_sequence) text = word_wrap(text, line_width: line_width - 2, break_sequence: break_sequence)
text.split("\n").map { |line| '> ' + line }.join("\n") text.split("\n").map { |line| "> #{line}" }.join("\n")
end end
def render_initial_state def render_initial_state

View file

@ -0,0 +1,37 @@
# frozen_string_literal: true
module BrandingHelper
def logo_as_symbol(version = :icon)
case version
when :icon
_logo_as_symbol_icon
when :wordmark
_logo_as_symbol_wordmark
end
end
def _logo_as_symbol_wordmark
content_tag(:svg, tag(:use, href: '#logo-symbol-wordmark'), viewBox: '0 0 261 66', class: 'logo logo--wordmark')
end
def _logo_as_symbol_icon
content_tag(:svg, tag(:use, href: '#logo-symbol-icon'), viewBox: '0 0 79 75', class: 'logo logo--icon')
end
def render_logo
image_pack_tag('logo.svg', alt: 'Mastodon', class: 'logo logo--icon')
end
def render_symbol(version = :icon)
path = begin
case version
when :icon
'logo-symbol-icon.svg'
when :wordmark
'logo-symbol-wordmark.svg'
end
end
render(file: Rails.root.join('app', 'javascript', 'images', path)).html_safe # rubocop:disable Rails/OutputSafety
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1,28 @@
<svg width="130" height="130" viewBox="0 0 121 130" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="130" height="130" fill="url(#paint0_linear_2_2)" x="-4.5"/>
<g filter="url(#filter0_di_2_2)">
<path d="M95.7135 43.6043C94.6199 35.5459 87.5351 29.1953 79.1366 27.9647C77.7196 27.7568 72.351 27 59.9148 27H59.822C47.3824 27 44.7135 27.7568 43.2966 27.9647C35.1319 29.1612 27.6757 34.8675 25.8667 43.0214C24.9966 47.0369 24.9037 51.4888 25.0654 55.5726C25.2958 61.4289 25.3405 67.275 25.877 73.1075C26.2479 76.9817 26.895 80.8251 27.8133 84.6088C29.5329 91.5968 36.4938 97.4122 43.3138 99.7848C50.6155 102.259 58.468 102.67 65.9919 100.971C66.8196 100.78 67.6381 100.559 68.4475 100.306C70.2737 99.7302 72.4164 99.086 73.9915 97.9542C74.0131 97.9384 74.0308 97.9178 74.0433 97.8942C74.0558 97.8706 74.0628 97.8445 74.0637 97.8179V92.1661C74.0634 92.1412 74.0574 92.1167 74.0462 92.0944C74.035 92.0721 74.0189 92.0525 73.9992 92.0371C73.9794 92.0218 73.9564 92.011 73.9318 92.0056C73.9073 92.0002 73.8819 92.0003 73.8574 92.0059C69.0369 93.1472 64.0971 93.7193 59.141 93.7103C50.6118 93.7103 48.3178 89.6981 47.6609 88.0278C47.1329 86.5842 46.7976 85.0784 46.6636 83.5486C46.6622 83.5229 46.667 83.4973 46.6775 83.4738C46.688 83.4502 46.7039 83.4295 46.724 83.4132C46.7441 83.397 46.7678 83.3856 46.7931 83.3801C46.8185 83.3746 46.8448 83.3751 46.8699 83.3816C51.6101 84.5151 56.4693 85.0873 61.3455 85.086C62.5183 85.086 63.6876 85.086 64.8604 85.0553C69.7647 84.919 74.9339 84.6701 79.7591 83.7361C79.8794 83.7123 79.9998 83.6918 80.103 83.6611C87.7139 82.2124 94.9569 77.665 95.6929 66.1501C95.7204 65.6967 95.7892 61.4016 95.7892 60.9312C95.7926 59.3325 96.3085 49.5901 95.7135 43.6043ZM83.9996 72.3371H75.9966V52.9069C75.9966 48.8163 74.277 46.7302 70.7793 46.7302C66.9343 46.7302 65.0083 49.1981 65.0083 54.0727V64.7082H57.0534V54.0727C57.0534 49.1981 55.124 46.7302 51.279 46.7302C47.8019 46.7302 46.0651 48.8163 46.0617 52.9069V72.3371H38.0656V52.3172C38.0656 48.2266 39.1191 44.9769 41.2262 42.568C43.3998 40.1648 46.2509 38.9308 49.7898 38.9308C53.8859 38.9308 56.9812 40.492 59.0447 43.6111L61.036 46.9245L63.0308 43.6111C65.0943 40.492 68.1896 38.9308 72.2788 38.9308C75.8143 38.9308 78.6654 40.1648 80.8459 42.568C82.9529 44.9746 84.0065 48.2243 84.0065 52.3172L83.9996 72.3371Z" fill="#FBFBFB" fill-opacity="0.97"/>
</g>
<defs>
<filter id="filter0_di_2_2" x="21" y="27" width="79" height="83" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.261224 0 0 0 0 0.16597 0 0 0 0 0.662652 0 0 0 0.4 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2_2"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2_2" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.337255 0 0 0 0 0.227451 0 0 0 0 0.8 0 0 0 0.05 0"/>
<feBlend mode="normal" in2="shape" result="effect2_innerShadow_2_2"/>
</filter>
<linearGradient id="paint0_linear_2_2" x1="61" y1="130" x2="61" y2="-91.5" gradientUnits="userSpaceOnUse">
<stop offset="0.0755157" stop-color="#563ACC"/>
<stop offset="0.520094" stop-color="#6364FF"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width="2048" height="1792" viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1344 1504q0 13-9.5 22.5t-22.5 9.5h-960q-8 0-13.5-2t-9-7-5.5-8-3-11.5-1-11.5v-600h-192q-26 0-45-19t-19-45q0-24 15-41l320-384q19-22 49-22t49 22l320 384q15 17 15 41 0 26-19 45t-45 19h-192v384h576q16 0 25 11l160 192q7 10 7 21zm640-416q0 24-15 41l-320 384q-20 23-49 23t-49-23l-320-384q-15-17-15-41 0-26 19-45t45-19h192v-384h-576q-16 0-25-12l-160-192q-7-9-7-20 0-13 9.5-22.5t22.5-9.5h960q8 0 13.5 2t9 7 5.5 8 3 11.5 1 11.5v600h192q26 0 45 19t19 45z" fill="#fff"/></svg>

Before

Width:  |  Height:  |  Size: 604 B

View file

@ -1,4 +0,0 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
</svg>

Before

Width:  |  Height:  |  Size: 214 B

View file

@ -1,4 +0,0 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>

Before

Width:  |  Height:  |  Size: 273 B

View file

@ -1,4 +0,0 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>

Before

Width:  |  Height:  |  Size: 205 B

View file

@ -1,4 +0,0 @@
<svg fill="#FFFFFF" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"/>
</svg>

Before

Width:  |  Height:  |  Size: 197 B

View file

@ -1,4 +0,0 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>

Before

Width:  |  Height:  |  Size: 252 B

View file

@ -1,4 +0,0 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z"/>
</svg>

Before

Width:  |  Height:  |  Size: 395 B

View file

@ -1,4 +0,0 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
</svg>

Before

Width:  |  Height:  |  Size: 305 B

View file

@ -1,4 +0,0 @@
<svg fill="#FFFFFF" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"/>
<path d="M0 0h24v24H0z" fill="none"/>
</svg>

Before

Width:  |  Height:  |  Size: 220 B

View file

@ -0,0 +1 @@
<svg width="512" height="512" viewBox="0 0 2048 1792" xmlns="http://www.w3.org/2000/svg" fill="#fff"><path d="M1344 1504q0 13-9.5 22.5t-22.5 9.5h-960q-8 0-13.5-2t-9-7-5.5-8-3-11.5-1-11.5v-600h-192q-26 0-45-19t-19-45q0-24 15-41l320-384q19-22 49-22t49 22l320 384q15 17 15 41 0 26-19 45t-45 19h-192v384h576q16 0 25 11l160 192q7 10 7 21zm640-416q0 24-15 41l-320 384q-20 23-49 23t-49-23l-320-384q-15-17-15-41 0-26 19-45t45-19h192v-384h-576q-16 0-25-12l-160-192q-7-9-7-20 0-13 9.5-22.5t22.5-9.5h960q8 0 13.5 2t9 7 5.5 8 3 11.5 1 11.5v600h192q26 0 45 19t19 45z"/></svg>

After

Width:  |  Height:  |  Size: 563 B

View file

@ -0,0 +1 @@
<svg fill="#fff" width="512" height="512" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/></svg>

After

Width:  |  Height:  |  Size: 203 B

View file

@ -0,0 +1 @@
<svg fill="#fff" width="512" height="512" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/><path d="M0 0h24v24H0z" fill="none"/></svg>

After

Width:  |  Height:  |  Size: 262 B

View file

@ -0,0 +1 @@
<svg fill="#fff" width="512" height="512" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>

After

Width:  |  Height:  |  Size: 194 B

View file

@ -0,0 +1 @@
<svg fill="#fff" width="512" height="512" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"/></svg>

After

Width:  |  Height:  |  Size: 189 B

View file

@ -0,0 +1 @@
<svg fill="#fff" width="512" height="512" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/><path d="M0 0h24v24H0z" fill="none"/></svg>

After

Width:  |  Height:  |  Size: 241 B

View file

@ -0,0 +1 @@
<svg fill="#fff" width="512" height="512" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z"/></svg>

After

Width:  |  Height:  |  Size: 384 B

View file

@ -0,0 +1 @@
<svg fill="#fff" width="512" height="512" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>

After

Width:  |  Height:  |  Size: 294 B

View file

@ -0,0 +1 @@
<svg fill="#fff" width="512" height="512" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"/><path d="M0 0h24v24H0z" fill="none"/></svg>

After

Width:  |  Height:  |  Size: 209 B

View file

@ -0,0 +1,2 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="79" height="75" viewBox="0 0 79 75"><symbol id="logo-symbol-icon"><path d="M74.7135 16.6043C73.6199 8.54587 66.5351 2.19527 58.1366 0.964691C56.7196 0.756754 51.351 0 38.9148 0H38.822C26.3824 0 23.7135 0.756754 22.2966 0.964691C14.1319 2.16118 6.67571 7.86752 4.86669 16.0214C3.99657 20.0369 3.90371 24.4888 4.06535 28.5726C4.29578 34.4289 4.34049 40.275 4.877 46.1075C5.24791 49.9817 5.89495 53.8251 6.81328 57.6088C8.53288 64.5968 15.4938 70.4122 22.3138 72.7848C29.6155 75.259 37.468 75.6697 44.9919 73.971C45.8196 73.7801 46.6381 73.5586 47.4475 73.3063C49.2737 72.7302 51.4164 72.086 52.9915 70.9542C53.0131 70.9384 53.0308 70.9178 53.0433 70.8942C53.0558 70.8706 53.0628 70.8445 53.0637 70.8179V65.1661C53.0634 65.1412 53.0574 65.1167 53.0462 65.0944C53.035 65.0721 53.0189 65.0525 52.9992 65.0371C52.9794 65.0218 52.9564 65.011 52.9318 65.0056C52.9073 65.0002 52.8819 65.0003 52.8574 65.0059C48.0369 66.1472 43.0971 66.7193 38.141 66.7103C29.6118 66.7103 27.3178 62.6981 26.6609 61.0278C26.1329 59.5842 25.7976 58.0784 25.6636 56.5486C25.6622 56.5229 25.667 56.4973 25.6775 56.4738C25.688 56.4502 25.7039 56.4295 25.724 56.4132C25.7441 56.397 25.7678 56.3856 25.7931 56.3801C25.8185 56.3746 25.8448 56.3751 25.8699 56.3816C30.6101 57.5151 35.4693 58.0873 40.3455 58.086C41.5183 58.086 42.6876 58.086 43.8604 58.0553C48.7647 57.919 53.9339 57.6701 58.7591 56.7361C58.8794 56.7123 58.9998 56.6918 59.103 56.6611C66.7139 55.2124 73.9569 50.665 74.6929 39.1501C74.7204 38.6967 74.7892 34.4016 74.7892 33.9312C74.7926 32.3325 75.3085 22.5901 74.7135 16.6043ZM62.9996 45.3371H54.9966V25.9069C54.9966 21.8163 53.277 19.7302 49.7793 19.7302C45.9343 19.7302 44.0083 22.1981 44.0083 27.0727V37.7082H36.0534V27.0727C36.0534 22.1981 34.124 19.7302 30.279 19.7302C26.8019 19.7302 25.0651 21.8163 25.0617 25.9069V45.3371H17.0656V25.3172C17.0656 21.2266 18.1191 17.9769 20.2262 15.568C22.3998 13.1648 25.2509 11.9308 28.7898 11.9308C32.8859 11.9308 35.9812 13.492 38.0447 16.6111L40.036 19.9245L42.0308 16.6111C44.0943 13.492 47.1896 11.9308 51.2788 11.9308C54.8143 11.9308 57.6654 13.1648 59.8459 15.568C61.9529 17.9746 63.0065 21.2243 63.0065 25.3172L62.9996 45.3371Z" fill="currentColor"/></symbol><use xlink:href="#logo-symbol-icon" style="color:#fff" /></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -1 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216.4144 232.00976"><path d="M211.80734 139.0875c-3.18125 16.36625-28.4925 34.2775-57.5625 37.74875-15.15875 1.80875-30.08375 3.47125-45.99875 2.74125-26.0275-1.1925-46.565-6.2125-46.565-6.2125 0 2.53375.15625 4.94625.46875 7.2025 3.38375 25.68625 25.47 27.225 46.39125 27.9425 21.11625.7225 39.91875-5.20625 39.91875-5.20625l.8675 19.09s-14.77 7.93125-41.08125 9.39c-14.50875.7975-32.52375-.365-53.50625-5.91875C9.23234 213.82 1.40609 165.31125.20859 116.09125c-.365-14.61375-.14-28.39375-.14-39.91875 0-50.33 32.97625-65.0825 32.97625-65.0825C49.67234 3.45375 78.20359.2425 107.86484 0h.72875c29.66125.2425 58.21125 3.45375 74.8375 11.09 0 0 32.975 14.7525 32.975 65.0825 0 0 .41375 37.13375-4.59875 62.915" fill="#3088d4"/><path d="M177.50984 80.077v60.94125h-24.14375v-59.15c0-12.46875-5.24625-18.7975-15.74-18.7975-11.6025 0-17.4175 7.5075-17.4175 22.3525v32.37625H96.20734V85.42325c0-14.845-5.81625-22.3525-17.41875-22.3525-10.49375 0-15.74 6.32875-15.74 18.7975v59.15H38.90484V80.077c0-12.455 3.17125-22.3525 9.54125-29.675 6.56875-7.3225 15.17125-11.07625 25.85-11.07625 12.355 0 21.71125 4.74875 27.8975 14.2475l6.01375 10.08125 6.015-10.08125c6.185-9.49875 15.54125-14.2475 27.8975-14.2475 10.6775 0 19.28 3.75375 25.85 11.07625 6.36875 7.3225 9.54 17.22 9.54 29.675" fill="#fff"/></svg> <svg width="61" height="65" viewBox="0 0 61 65" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M60.7539 14.3904C59.8143 7.40642 53.7273 1.90257 46.5117 0.836066C45.2943 0.655854 40.6819 0 29.9973 0H29.9175C19.2299 0 16.937 0.655854 15.7196 0.836066C8.70488 1.87302 2.29885 6.81852 0.744617 13.8852C-0.00294988 17.3654 -0.0827298 21.2237 0.0561464 24.7629C0.254119 29.8384 0.292531 34.905 0.753482 39.9598C1.07215 43.3175 1.62806 46.6484 2.41704 49.9276C3.89445 55.9839 9.87499 61.0239 15.7344 63.0801C22.0077 65.2244 28.7542 65.5804 35.2184 64.1082C35.9295 63.9428 36.6318 63.7508 37.3252 63.5321C38.8971 63.0329 40.738 62.4745 42.0913 61.4937C42.1099 61.4799 42.1251 61.4621 42.1358 61.4417C42.1466 61.4212 42.1526 61.3986 42.1534 61.3755V56.4773C42.153 56.4557 42.1479 56.4345 42.1383 56.4151C42.1287 56.3958 42.1149 56.3788 42.0979 56.3655C42.0809 56.3522 42.0611 56.3429 42.04 56.3382C42.019 56.3335 41.9971 56.3336 41.9761 56.3384C37.8345 57.3276 33.5905 57.8234 29.3324 57.8156C22.0045 57.8156 20.0336 54.3384 19.4693 52.8908C19.0156 51.6397 18.7275 50.3346 18.6124 49.0088C18.6112 48.9866 18.6153 48.9643 18.6243 48.9439C18.6333 48.9236 18.647 48.9056 18.6643 48.8915C18.6816 48.8774 18.7019 48.8675 18.7237 48.8628C18.7455 48.858 18.7681 48.8585 18.7897 48.8641C22.8622 49.8465 27.037 50.3423 31.2265 50.3412C32.234 50.3412 33.2387 50.3412 34.2463 50.3146C38.4598 50.1964 42.9009 49.9808 47.0465 49.1713C47.1499 49.1506 47.2534 49.1329 47.342 49.1063C53.881 47.8507 60.1038 43.9097 60.7362 33.9301C60.7598 33.5372 60.8189 29.8148 60.8189 29.4071C60.8218 28.0215 61.2651 19.5781 60.7539 14.3904Z" fill="url(#paint0_linear_89_8)"/>
<path d="M50.3943 22.237V39.5876H43.5185V22.7481C43.5185 19.2029 42.0411 17.3949 39.036 17.3949C35.7325 17.3949 34.0778 19.5338 34.0778 23.7585V32.9759H27.2434V23.7585C27.2434 19.5338 25.5857 17.3949 22.2822 17.3949C19.2949 17.3949 17.8027 19.2029 17.8027 22.7481V39.5876H10.9298V22.237C10.9298 18.6918 11.835 15.8754 13.6453 13.7877C15.5128 11.7049 17.9623 10.6355 21.0028 10.6355C24.522 10.6355 27.1813 11.9885 28.9542 14.6917L30.665 17.5633L32.3788 14.6917C34.1517 11.9885 36.811 10.6355 40.3243 10.6355C43.3619 10.6355 45.8114 11.7049 47.6847 13.7877C49.4931 15.8734 50.3963 18.6899 50.3943 22.237Z" fill="white"/>
<defs>
<linearGradient id="paint0_linear_89_8" x1="30.5" y1="0" x2="30.5" y2="65" gradientUnits="userSpaceOnUse">
<stop stop-color="#6364FF"/>
<stop offset="1" stop-color="#563ACC"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg"><symbol id="mastodon-svg-logo" viewBox="0 0 216.4144 232.00976"><path d="M107.86523 0C78.203984.2425 49.672422 3.4535937 33.044922 11.089844c0 0-32.97656262 14.752031-32.97656262 65.082031 0 11.525-.224375 25.306175.140625 39.919925 1.19750002 49.22 9.02375002 97.72843 54.53124962 109.77343 20.9825 5.55375 38.99711 6.71547 53.505856 5.91797 26.31125-1.45875 41.08203-9.38867 41.08203-9.38867l-.86914-19.08984s-18.80171 5.92758-39.91796 5.20508c-20.921254-.7175-43.006879-2.25516-46.390629-27.94141-.3125-2.25625-.46875-4.66938-.46875-7.20313 0 0 20.536953 5.0204 46.564449 6.21289 15.915.73001 30.8393-.93343 45.99805-2.74218 29.07-3.47125 54.38125-21.3818 57.5625-37.74805 5.0125-25.78125 4.59961-62.916015 4.59961-62.916015 0-50.33-32.97461-65.082031-32.97461-65.082031C166.80539 3.4535938 138.255.2425 108.59375 0h-.72852zM74.296875 39.326172c12.355 0 21.710234 4.749297 27.896485 14.248047l6.01367 10.080078 6.01563-10.080078c6.185-9.49875 15.54023-14.248047 27.89648-14.248047 10.6775 0 19.28156 3.753672 25.85156 11.076172 6.36875 7.3225 9.53907 17.218828 9.53907 29.673828v60.941408h-24.14454V81.869141c0-12.46875-5.24453-18.798829-15.73828-18.798829-11.6025 0-17.41797 7.508516-17.41797 22.353516v32.375002H96.207031V85.423828c0-14.845-5.815468-22.353515-17.417969-22.353516-10.49375 0-15.740234 6.330079-15.740234 18.798829v59.148439H38.904297V80.076172c0-12.455 3.171016-22.351328 9.541015-29.673828 6.568751-7.3225 15.172813-11.076172 25.851563-11.076172z" /></symbol></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216.4144 232.00976"><path d="M107.86523 0C78.203984.2425 49.672422 3.4535937 33.044922 11.089844c0 0-32.97656262 14.752031-32.97656262 65.082031 0 11.525-.224375 25.306175.140625 39.919925 1.19750002 49.22 9.02375002 97.72843 54.53124962 109.77343 20.9825 5.55375 38.99711 6.71547 53.505856 5.91797 26.31125-1.45875 41.08203-9.38867 41.08203-9.38867l-.86914-19.08984s-18.80171 5.92758-39.91796 5.20508c-20.921254-.7175-43.006879-2.25516-46.390629-27.94141-.3125-2.25625-.46875-4.66938-.46875-7.20313 0 0 20.536953 5.0204 46.564449 6.21289 15.915.73001 30.8393-.93343 45.99805-2.74218 29.07-3.47125 54.38125-21.3818 57.5625-37.74805 5.0125-25.78125 4.59961-62.916015 4.59961-62.916015 0-50.33-32.97461-65.082031-32.97461-65.082031C166.80539 3.4535938 138.255.2425 108.59375 0h-.72852zM74.296875 39.326172c12.355 0 21.710234 4.749297 27.896485 14.248047l6.01367 10.080078 6.01563-10.080078c6.185-9.49875 15.54023-14.248047 27.89648-14.248047 10.6775 0 19.28156 3.753672 25.85156 11.076172 6.36875 7.3225 9.53907 17.218828 9.53907 29.673828v60.941408h-24.14454V81.869141c0-12.46875-5.24453-18.798829-15.73828-18.798829-11.6025 0-17.41797 7.508516-17.41797 22.353516v32.375002H96.207031V85.423828c0-14.845-5.815468-22.353515-17.417969-22.353516-10.49375 0-15.740234 6.330079-15.740234 18.798829v59.148439H38.904297V80.076172c0-12.455 3.171016-22.351328 9.541015-29.673828 6.568751-7.3225 15.172813-11.076172 25.851563-11.076172z" fill="#fff"/></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 423 B

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 817 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 319 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 371 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 KiB

View file

@ -1 +1,3 @@
require('../styles/mailer.scss'); require('../styles/mailer.scss');
require.context('../icons');

View file

@ -6,6 +6,7 @@
@import 'mastodon/reset'; @import 'mastodon/reset';
@import 'mastodon/basics'; @import 'mastodon/basics';
@import 'mastodon/branding';
@import 'mastodon/containers'; @import 'mastodon/containers';
@import 'mastodon/lists'; @import 'mastodon/lists';
@import 'mastodon/footer'; @import 'mastodon/footer';

View file

@ -688,7 +688,7 @@ $small-breakpoint: 960px;
align-items: center; align-items: center;
padding: 50px; padding: 50px;
svg { .logo {
fill: $primary-text-color; fill: $primary-text-color;
height: 52px; height: 52px;
} }

View file

@ -0,0 +1,3 @@
.logo {
color: $primary-text-color;
}

View file

@ -2538,7 +2538,6 @@ a.account__display-name {
padding: 40px; padding: 40px;
.logo { .logo {
fill: $primary-text-color;
width: 50px; width: 50px;
margin: 0 auto; margin: 0 auto;
margin-bottom: 40px; margin-bottom: 40px;

View file

@ -20,8 +20,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
svg { .logo {
fill: $primary-text-color;
height: 42px; height: 42px;
margin-right: 10px; margin-right: 10px;
} }
@ -320,7 +319,7 @@
display: block; display: block;
padding: 15px; padding: 15px;
svg { .logo {
display: block; display: block;
height: 18px; height: 18px;
width: auto; width: auto;

View file

@ -132,19 +132,19 @@
} }
.brand { .brand {
svg { .logo {
display: block; display: block;
height: 36px; height: 36px;
width: auto; width: auto;
margin: 0 auto; margin: 0 auto;
fill: lighten($ui-base-color, 34%); color: lighten($ui-base-color, 34%);
} }
&:hover, &:hover,
&:focus, &:focus,
&:active { &:active {
svg { .logo {
fill: lighten($ui-base-color, 38%); color: lighten($ui-base-color, 38%);
} }
} }
} }

View file

@ -12,7 +12,7 @@ $red-bookmark: $warning-red;
$classic-base-color: #282c37; // Midnight Express $classic-base-color: #282c37; // Midnight Express
$classic-primary-color: #9baec8; // Echo Blue $classic-primary-color: #9baec8; // Echo Blue
$classic-secondary-color: #d9e1e8; // Pattens Blue $classic-secondary-color: #d9e1e8; // Pattens Blue
$classic-highlight-color: #2b90d9; // Summer Sky $classic-highlight-color: #6364ff; // Brand purple
// Variables for defaults in UI // Variables for defaults in UI
$base-shadow-color: $black !default; $base-shadow-color: $black !default;

View file

@ -4,7 +4,19 @@ class ManifestSerializer < ActiveModel::Serializer
include RoutingHelper include RoutingHelper
include ActionView::Helpers::TextHelper include ActionView::Helpers::TextHelper
attributes :name, :short_name, :description, ICON_SIZES = %w(
36
48
72
96
144
192
256
384
512
).freeze
attributes :name, :short_name,
:icons, :theme_color, :background_color, :icons, :theme_color, :background_color,
:display, :start_url, :scope, :display, :start_url, :scope,
:share_target, :shortcuts :share_target, :shortcuts
@ -17,22 +29,18 @@ class ManifestSerializer < ActiveModel::Serializer
object.site_title object.site_title
end end
def description
strip_tags(object.site_short_description.presence || I18n.t('about.about_mastodon_html'))
end
def icons def icons
[ ICON_SIZES.map do |size|
{ {
src: '/android-chrome-192x192.png', src: full_pack_url("media/icons/android-chrome-#{size}x#{size}.png"),
sizes: '192x192', sizes: "#{size}x#{size}",
type: 'image/png', type: 'image/png',
}, }
] end
end end
def theme_color def theme_color
'#282c37' '#6364FF'
end end
def background_color def background_color
@ -68,37 +76,12 @@ class ManifestSerializer < ActiveModel::Serializer
def shortcuts def shortcuts
[ [
{ {
name: 'New toot', name: 'Compose new post',
url: '/web/publish', url: '/web/publish',
icons: [
{
src: '/shortcuts/new-status.png',
type: 'image/png',
sizes: '192x192',
},
],
}, },
{ {
name: 'Notifications', name: 'Notifications',
url: '/web/notifications', url: '/web/notifications',
icons: [
{
src: '/shortcuts/notifications.png',
type: 'image/png',
sizes: '192x192',
},
],
},
{
name: 'Direct messages',
url: '/web/conversations',
icons: [
{
src: '/shortcuts/direct.png',
type: 'image/png',
sizes: '192x192',
},
],
}, },
] ]
end end

View file

@ -39,7 +39,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
end end
def thumbnail def thumbnail
instance_presenter.thumbnail ? full_asset_url(instance_presenter.thumbnail.file.url) : full_pack_url('media/images/preview.jpg') instance_presenter.thumbnail ? full_asset_url(instance_presenter.thumbnail.file.url) : full_pack_url('media/images/preview.png')
end end
def stats def stats

View file

@ -9,7 +9,7 @@
.column-0 .column-0
.public-account-header.public-account-header--no-bar .public-account-header.public-account-header--no-bar
.public-account-header__image .public-account-header__image
= image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg'), alt: @instance_presenter.site_title, class: 'parallax' = image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.png'), alt: @instance_presenter.site_title, class: 'parallax'
.column-1 .column-1
.landing-page__call-to-action{ dir: 'ltr' } .landing-page__call-to-action{ dir: 'ltr' }

View file

@ -8,7 +8,7 @@
.landing .landing
.landing__brand .landing__brand
= link_to root_url, class: 'brand' do = link_to root_url, class: 'brand' do
= svg_logo_full = logo_as_symbol(:wordmark)
%span.brand__tagline=t 'about.tagline' %span.brand__tagline=t 'about.tagline'
.landing__grid .landing__grid
@ -53,7 +53,7 @@
.hero-widget .hero-widget
.hero-widget__img .hero-widget__img
= image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg'), alt: @instance_presenter.site_title = image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.png'), alt: @instance_presenter.site_title
.hero-widget__text .hero-widget__text
%p %p

View file

@ -5,7 +5,6 @@ RSS::Builder.build do |doc|
doc.image(full_asset_url(@account.avatar.url(:original)), display_name(@account), params[:tag].present? ? short_account_tag_url(@account, params[:tag]) : short_account_url(@account)) doc.image(full_asset_url(@account.avatar.url(:original)), display_name(@account), params[:tag].present? ? short_account_tag_url(@account, params[:tag]) : short_account_url(@account))
doc.last_build_date(@statuses.first.created_at) if @statuses.any? doc.last_build_date(@statuses.first.created_at) if @statuses.any?
doc.icon(full_asset_url(@account.avatar.url(:original))) doc.icon(full_asset_url(@account.avatar.url(:original)))
doc.logo(full_pack_url('media/images/logo_transparent_white.svg'))
doc.generator("Mastodon v#{Mastodon::Version.to_s}") doc.generator("Mastodon v#{Mastodon::Version.to_s}")
@statuses.each do |status| @statuses.each do |status|

View file

@ -3,7 +3,7 @@
= f.check_box :custom_emoji_ids, { multiple: true, include_hidden: false }, custom_emoji.id = f.check_box :custom_emoji_ids, { multiple: true, include_hidden: false }, custom_emoji.id
.batch-table__row__content.batch-table__row__content--with-image .batch-table__row__content.batch-table__row__content--with-image
.batch-table__row__content__image .batch-table__row__content__image
= custom_emoji_tag(custom_emoji, current_account&.user&.setting_auto_play_gif) = custom_emoji_tag(custom_emoji)
.batch-table__row__content__text .batch-table__row__content__text
%samp= ":#{custom_emoji.shortcode}:" %samp= ":#{custom_emoji.shortcode}:"

View file

@ -1,6 +1,6 @@
.hero-widget .hero-widget
.hero-widget__img .hero-widget__img
= image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg'), alt: @instance_presenter.site_title = image_tag @instance_presenter.hero&.file&.url || @instance_presenter.thumbnail&.file&.url || asset_pack_path('media/images/preview.png'), alt: @instance_presenter.site_title
.hero-widget__text .hero-widget__text
%p= @instance_presenter.site_short_description.html_safe.presence || t('about.about_mastodon_html') %p= @instance_presenter.site_short_description.html_safe.presence || t('about.about_mastodon_html')

View file

@ -8,12 +8,12 @@
.sidebar-wrapper__inner .sidebar-wrapper__inner
.sidebar .sidebar
= link_to root_path do = link_to root_path do
= image_pack_tag 'logo.svg', class: 'logo', alt: 'Mastodon' = render_logo
.sidebar__toggle .sidebar__toggle
.sidebar__toggle__logo .sidebar__toggle__logo
= link_to root_path do = link_to root_path do
= svg_logo_full = logo_as_symbol(:wordmark)
= link_to '#', class: 'sidebar__toggle__icon' do = link_to '#', class: 'sidebar__toggle__icon' do
= fa_icon 'bars' = fa_icon 'bars'

View file

@ -11,12 +11,17 @@
- if storage_host? - if storage_host?
%link{ rel: 'dns-prefetch', href: storage_host }/ %link{ rel: 'dns-prefetch', href: storage_host }/
%link{ rel: 'icon', href: favicon_path, type: 'image/x-icon' }/ %link{ rel: 'icon', href: '/favicon.ico', type: 'image/x-icon' }/
%link{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }/
%link{ rel: 'mask-icon', href: '/mask-icon.svg', color: '#2B90D9' }/ - %w(16 32 48).each do |size|
%link{ rel: 'manifest', href: '/manifest.json' }/ %link{ rel: 'icon', sizes: "#{size}x#{size}", href: asset_pack_path("media/icons/favicon-#{size}x#{size}.png"), type: 'image/png' }/
%meta{ name: 'msapplication-config', content: '/browserconfig.xml' }/
%meta{ name: 'theme-color', content: '#282c37' }/ - %w(57 60 72 76 114 120 144 152 167 180 1024).each do |size|
%link{ rel: 'apple-touch-icon', sizes: "#{size}x#{size}", href: asset_pack_path("media/icons/apple-touch-icon-#{size}x#{size}.png") }/
%link{ rel: 'mask-icon', href: asset_pack_path('media/images/logo-symbol-icon.svg'), color: '#6364FF' }/
%link{ rel: 'manifest', href: manifest_path(format: :json) }/
%meta{ name: 'theme-color', content: '#6364FF' }/
%meta{ name: 'apple-mobile-web-app-capable', content: 'yes' }/ %meta{ name: 'apple-mobile-web-app-capable', content: 'yes' }/
%title= content_for?(:page_title) ? safe_join([yield(:page_title).chomp.html_safe, title], ' - ') : title %title= content_for?(:page_title) ? safe_join([yield(:page_title).chomp.html_safe, title], ' - ') : title
@ -39,5 +44,5 @@
= content_for?(:content) ? yield(:content) : yield = content_for?(:content) ? yield(:content) : yield
.logo-resources .logo-resources
= raw render file: Rails.root.join('app', 'javascript', 'images', 'logo_transparent.svg') = render_symbol :icon
= raw render file: Rails.root.join('app', 'javascript', 'images', 'logo_full.svg') = render_symbol :wordmark

View file

@ -6,7 +6,7 @@
.logo-container .logo-container
%h1 %h1
= link_to root_path do = link_to root_path do
= svg_logo_full = logo_as_symbol(:wordmark)
.form-container .form-container
= render 'flashes' = render 'flashes'

View file

@ -21,4 +21,4 @@
= yield = yield
.logo-resources .logo-resources
= raw render file: Rails.root.join('app', 'javascript', 'images', 'logo_transparent.svg') = render_symbol :icon

View file

@ -24,7 +24,7 @@
%tr %tr
%td.column-cell %td.column-cell
= link_to root_url do = link_to root_url do
= image_tag full_pack_url('media/images/mailer/logo_full.png'), alt: 'Mastodon', height: 34, class: 'logo' = image_tag full_pack_url('media/images/mailer/wordmark.png'), alt: 'Mastodon', height: 34, class: 'logo'
= yield = yield
@ -49,4 +49,4 @@
%p= link_to t('application_mailer.notification_preferences'), settings_preferences_notifications_url %p= link_to t('application_mailer.notification_preferences'), settings_preferences_notifications_url
%td.column-cell.text-right %td.column-cell.text-right
= link_to root_url do = link_to root_url do
= image_tag full_pack_url('media/images/mailer/logo_transparent.png'), alt: 'Mastodon', height: 24 = image_tag full_pack_url('media/images/mailer/logo.png'), alt: 'Mastodon', height: 24

View file

@ -9,7 +9,7 @@
%nav.header %nav.header
.nav-left .nav-left
= link_to root_url, class: 'brand' do = link_to root_url, class: 'brand' do
= svg_logo_full = logo_as_symbol(:wordmark)
- unless whitelist_mode? - unless whitelist_mode?
= link_to t('directories.directory'), explore_path, class: 'nav-link optional' if Setting.profile_directory = link_to t('directories.directory'), explore_path, class: 'nav-link optional' if Setting.profile_directory
@ -42,7 +42,7 @@
%li= link_to t('about.api'), 'https://docs.joinmastodon.org/client/intro/' %li= link_to t('about.api'), 'https://docs.joinmastodon.org/client/intro/'
.column-2 .column-2
%h4= link_to t('about.what_is_mastodon'), 'https://joinmastodon.org/' %h4= link_to t('about.what_is_mastodon'), 'https://joinmastodon.org/'
= link_to svg_logo, root_url, class: 'brand' = link_to logo_as_symbol, root_url, class: 'brand'
.column-3 .column-3
%h4= site_hostname %h4= site_hostname
%ul %ul

View file

@ -8,7 +8,7 @@
= opengraph 'og:type', 'website' = opengraph 'og:type', 'website'
= opengraph 'og:title', @instance_presenter.site_title = opengraph 'og:title', @instance_presenter.site_title
= opengraph 'og:description', description = opengraph 'og:description', description
= opengraph 'og:image', full_asset_url(thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg', protocol: :request)) = opengraph 'og:image', full_asset_url(thumbnail&.file&.url || asset_pack_path('media/images/preview.png', protocol: :request))
= opengraph 'og:image:width', thumbnail ? thumbnail.meta['width'] : '1200' = opengraph 'og:image:width', thumbnail ? thumbnail.meta['width'] : '1200'
= opengraph 'og:image:height', thumbnail ? thumbnail.meta['height'] : '630' = opengraph 'og:image:height', thumbnail ? thumbnail.meta['height'] : '630'
= opengraph 'twitter:card', 'summary_large_image' = opengraph 'twitter:card', 'summary_large_image'

View file

@ -3,7 +3,6 @@ RSS::Builder.build do |doc|
doc.description(I18n.t('rss.descriptions.tag', hashtag: @tag.name)) doc.description(I18n.t('rss.descriptions.tag', hashtag: @tag.name))
doc.link(tag_url(@tag)) doc.link(tag_url(@tag))
doc.last_build_date(@statuses.first.created_at) if @statuses.any? doc.last_build_date(@statuses.first.created_at) if @statuses.any?
doc.logo(full_pack_url('media/images/logo_transparent_white.svg'))
doc.generator("Mastodon v#{Mastodon::Version.to_s}") doc.generator("Mastodon v#{Mastodon::Version.to_s}")
@statuses.each do |status| @statuses.each do |status|

View file

@ -17,7 +17,7 @@
%tbody %tbody
%tr %tr
%td %td
= image_tag full_pack_url('media/images/mailer/icon_warning.png'), alt: '' = image_tag full_pack_url('media/images/mailer/icon_flag.png'), alt: ''
%h1= t "user_mailer.warning.title.#{@warning.action}" %h1= t "user_mailer.warning.title.#{@warning.action}"

View file

@ -38,7 +38,7 @@ en:
one: post one: post
other: posts other: posts
status_count_before: Who published status_count_before: Who published
tagline: Follow friends and discover new ones tagline: Decentralized social network
terms: Terms of service terms: Terms of service
unavailable_content: Moderated servers unavailable_content: Moderated servers
unavailable_content_description: unavailable_content_description:

View file

@ -0,0 +1 @@
// Not needed

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View file

@ -0,0 +1 @@
use { color: #000 !important; }

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

78
lib/tasks/branding.rake Normal file
View file

@ -0,0 +1,78 @@
namespace :branding do
desc 'Generate necessary graphic assets for branding from source SVG files'
task generate: :environment do
Rake::Task['branding:generate_app_icons'].invoke
Rake::Task['branding:generate_app_badge'].invoke
Rake::Task['branding:generate_github_assets'].invoke
Rake::Task['branding:generate_mailer_assets'].invoke
end
desc 'Generate PNG icons and logos for e-mail templates'
task generate_mailer_assets: :environment do
rsvg_convert = Terrapin::CommandLine.new('rsvg-convert', '-w :w -h :h :input -o :output')
output_dest = Rails.root.join('app', 'javascript', 'images', 'mailer')
# Displayed size is 64px, at 3x it's 192px
Dir[Rails.root.join('app', 'javascript', 'images', 'icons', '*.svg')].each do |path|
rsvg_convert.run(input: path, w: 192, h: 192, output: output_dest.join("#{File.basename(path, '.svg')}.png"))
end
# Displayed size is 34px, at 3x it's 102px
rsvg_convert.run(input: Rails.root.join('app', 'javascript', 'images', 'logo-symbol-wordmark.svg'), w: (102 * (261.0 / 66)).ceil, h: 102, output: output_dest.join('wordmark.png'))
# Displayed size is 24px, at 3x it's 72px
rsvg_convert.run(input: Rails.root.join('app', 'javascript', 'images', 'logo-symbol-icon.svg'), w: (72 * (79.0 / 75)).ceil, h: 72, output: output_dest.join('logo.png'))
end
desc 'Generate light/dark logotypes for GitHub'
task generate_github_assets: :environment do
rsvg_convert = Terrapin::CommandLine.new('rsvg-convert', '--stylesheet :stylesheet -w :w -h :h :input -o :output')
output_dest = Rails.root.join('lib', 'assets')
rsvg_convert.run(stylesheet: Rails.root.join('lib', 'assets', 'wordmark.dark.css'), input: Rails.root.join('app', 'javascript', 'images', 'logo-symbol-wordmark.svg'), w: (102 * (261.0 / 66)).ceil, h: 102, output: output_dest.join('wordmark.dark.png'))
rsvg_convert.run(stylesheet: Rails.root.join('lib', 'assets', 'wordmark.light.css'), input: Rails.root.join('app', 'javascript', 'images', 'logo-symbol-wordmark.svg'), w: (102 * (261.0 / 66)).ceil, h: 102, output: output_dest.join('wordmark.light.png'))
end
desc 'Generate favicons and app icons from SVG source files'
task generate_app_icons: :environment do
favicon_source = Rails.root.join('app', 'javascript', 'images', 'logo.svg')
app_icon_source = Rails.root.join('app', 'javascript', 'images', 'app-icon.svg')
output_dest = Rails.root.join('app', 'javascript', 'icons')
rsvg_convert = Terrapin::CommandLine.new('rsvg-convert', '-w :size -h :size :input -o :output')
convert = Terrapin::CommandLine.new('convert', ':input :output')
favicon_sizes = [16, 32, 48]
apple_icon_sizes = [57, 60, 72, 76, 114, 120, 144, 152, 167, 180, 1024]
android_icon_sizes = [36, 48, 72, 96, 144, 192, 256, 384, 512]
favicons = []
favicon_sizes.each do |size|
output_path = output_dest.join("favicon-#{size}x#{size}.png")
favicons << output_path
rsvg_convert.run(size: size, input: favicon_source, output: output_path)
end
convert.run(input: favicons, output: Rails.root.join('public', 'favicon.ico'))
apple_icon_sizes.each do |size|
rsvg_convert.run(size: size, input: app_icon_source, output: output_dest.join("apple-touch-icon-#{size}x#{size}.png"))
end
android_icon_sizes.each do |size|
rsvg_convert.run(size: size, input: app_icon_source, output: output_dest.join("android-chrome-#{size}x#{size}.png"))
end
end
desc 'Generate badge icon from SVG source files'
task generate_app_badge: :environment do
rsvg_convert = Terrapin::CommandLine.new('rsvg-convert', '--stylesheet :stylesheet -w :w -h :h :input -o :output')
badge_source = Rails.root.join('app', 'javascript', 'images', 'logo-symbol-icon.svg')
source_ratio = 79.0 / 75
output_dest = Rails.root.join('public')
stylesheet = Rails.root.join('lib', 'assets', 'wordmark.light.css')
rsvg_convert.run(stylesheet: stylesheet, input: badge_source, w: (192 * source_ratio).ceil, h: 192, output: output_dest.join('badge.png'))
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Some files were not shown because too many files have changed in this diff Show more