Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG favicon #6738

Merged
merged 10 commits into from
Jan 6, 2024
Merged

SVG favicon #6738

merged 10 commits into from
Jan 6, 2024

Conversation

stokito
Copy link
Contributor

@stokito stokito commented Dec 4, 2023

Replacement for #6717

  • Fix OpenWrt 2020 logo colors and background
  • Use the SVG logo as a favicon
  • Migrate all themes to the same logo

@stokito stokito force-pushed the svg_favicon branch 2 times, most recently from ff6f0a7 to f0ee84b Compare December 5, 2023 07:40
@stokito stokito marked this pull request as ready for review December 5, 2023 07:41
@stokito
Copy link
Contributor Author

stokito commented Dec 5, 2023

Needs for testing and feedback but generally it's should be ready to be merged. It will close #6716 and #6717

@stokito stokito force-pushed the svg_favicon branch 3 times, most recently from 5d54c40 to 909a4fb Compare December 8, 2023 08:44
@systemcrash
Copy link
Contributor

One thing #6717 does correctly is retain the png for those browsers that do not support them (safari...).

https://caniuse.com/link-icon-svg

@stokito stokito marked this pull request as draft December 12, 2023 08:59
The "White & Dark Blue" logo should have a background filled with PANTONE 306 C HEX #00B5E2.
SVG doesn't support background-color properly so use a rectangle instead.
The dark blue circle must be PANTONE 7463 C HEX #002B49

See https://openwrt.org/_media/docs/guide-graphic-designer/openwrt-logo-usage-guidelines.pdf

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
To keep ratio the one pixel was also added to left and right and now size is 100x100

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
Save 686-536=150 bytes

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
That was a fix for old browsers when the mime type is incorrect.
Today all servers return a correct mime but also browsers can sniff a type.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
Chrome, Edge and Firefox will use the SVG icon but Safari will use the PNG.
Chrome will try to pick an icon with a best suited dimension.
So it will also download the PNG to check it's dimension.
The explicitly specified sizes are preventing this.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
The apple-touch-icon was used by old Safari on iOS.
Today just <link rel="icon" href="logo.png"> is enough.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
The new OpenWrt logo.svg is copied from luci-theme-openwrt-2020.
The logo.png was copied too but resized from 180px 3.9Kb down to 48px 2.3Kb.
This is enough when used as icon for app pinned to desktop.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
The new OpenWrt logo.svg is copied from luci-theme-openwrt-2020.
The logo.png was copied too but resized from 180px 3.9Kb down to 48px 2.3Kb.
This is enough when used as icon for app pinned to desktop.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
According to a style guide the color should be #00B5E2.
In a9f6d85 added a light blue square background to logo.svg.
Their color started differs, the change fixes this.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
@stokito
Copy link
Contributor Author

stokito commented Dec 12, 2023

I completely reworked the PR.
First of all here we needed to fix the logo.svg in the openwrt-2000 theme.

Then I made the openwrt-2000 favicon to work properly on Safari and iOS with minimal deviation from web standards. I tested it carefully on Safari/macOS, Safari iOS, Chrome Android, Firefox Android, Chrome Windows, Edge on Windows. We may broke the icon for some really old Safari from iPhone 6 but who cares.

I copied the logo to other themes except of the old luci-theme-openwrt theme which is as far I understood in maintenance only mode. Also I made the PNG version smaller down to 48px because it's used when adding the website as an app on desktop. It still looks good.

The last commit fixes this logo and header background discrepancy:

theme-header-background-logo

CC @532910 please review and test

@stokito stokito marked this pull request as ready for review December 12, 2023 19:32
@systemcrash
Copy link
Contributor

Looks mostly good. You retained the 180x180 png ya?

@stokito
Copy link
Contributor Author

stokito commented Dec 14, 2023

Yes, sorry, forgot to mention this: the original logo.png from the 2020 theme remains untouched. I was afraid to make a regression there.
For the theme the logo is also shown on the front page as a home logo.
Maybe there the 48px would be not enough.
But the material and the bootstrap will use the 48px version.

@stokito
Copy link
Contributor Author

stokito commented Dec 14, 2023

For the theme the logo is also shown on the front page as a home logo.

Sorry, I was wrong, there is used the logo.svg, not png.
It should be safe to downscale that png too. It must be approved by the theme author.

@hnyman
Copy link
Contributor

hnyman commented Dec 22, 2023

I tested with Firefox and Chrome, both bootstrap and openwrt2020 themes.
Looks ok to me.

Any objections, @jow- ?

@hnyman hnyman merged commit db31798 into openwrt:master Jan 6, 2024
2 checks passed
@stokito stokito deleted the svg_favicon branch January 6, 2024 11:38
@stokito
Copy link
Contributor Author

stokito commented Jan 6, 2024

Thank you!

@jow-
Copy link
Contributor

jow- commented Feb 23, 2024

Looks quite ugly in dark mode:
grafik

I think the white curved bars at the top should be light blue, the circle should remain dark blue and the background should become transparent. This way it works well in both dark and light backgrounds.

@stokito
Copy link
Contributor Author

stokito commented Feb 23, 2024

According to logo usage guidelines there are a few schemes:

  1. White & Dark Blue that is used here
  2. White & Blue that should look better on a dark background
  3. White that also may be used in a dark mode.

The problem that I see is that here we have a dark theme of OS but the site itself may be in a light mode.

@stokito
Copy link
Contributor Author

stokito commented Feb 23, 2024

FYI: the SVG can be adopted to a dark mode by using internal styles https://rigtorp.se/notes/dark-mode-svg/

@jow-
Copy link
Contributor

jow- commented Feb 23, 2024

Here's a quick mockup of the changed color scheme:
grafik
grafik
grafik
grafik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants