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

Make the ReactOS logo look less blurry on big screens #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ paginate = 10
date_format = "January 2, 2006"

logo = "/sites/default/files/ReactOS_0.png"
logo_small = "/sites/default/files/ReactOS_0.png"

development_banner_text = "DEVELOPMENT COPY! Visit www.reactos.org for the production website."

Expand Down
Binary file modified static/sites/default/files/ReactOS_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions themes/reactos/layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
<div class="col-md-offset-1 col-md-10">
<div class="navbar-header">
<a class="navbar-brand home" href="{{ .Site.BaseURL }}">
<img src="{{ .Site.BaseURL }}{{ .Site.Params.logo }}" alt="{{ .Title }} logo"
class="hidden-xs hidden-sm">
<img src="{{ .Site.BaseURL }}{{ .Site.Params.logo_small }}" alt="{{ .Title }} logo"
class="visible-xs visible-sm">
<img src="{{ .Site.BaseURL }}{{ .Site.Params.logo }}" alt="{{ .Title }} logo" style="height: 54px; width: 227px;">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem basically is that we're enforcing Site.Params.logo por any kind of resolution. Reactos_0.png seems to be a 227x54 image, and this is cool for small devices but not for bigger resolutions.
The trick here is to use "srcset" instead "src": <img srcset=" {{ .Site.BaseURL }}{{.Site.Params.logo}} 1x, {{.site.BaseUrl }}{{.Site.Params.biggerlogo}} 2x" src="{{.site.BaseUrl }}{{.Site.Params.biggerlogo}}" alt="{{ .Title }}>
And a Bigger Logo is needed. This is the easiest trick, otherwise we would need to use "size".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to use SVG then.

<span class="sr-only">{{ .Title }} - {{ i18n "navHome" }}</span>
</a>
<div class="navbar-buttons">
Expand Down