Skip to content

Conversation

@arbessette
Copy link
Contributor

WPI is working through a rebrand to use the full name when possible. This line allows that without changing the WPILib logo

@Kevin-OConnor
Copy link
Contributor

In wonderfully confusing fashion, the logo here is just a reference and isn't actually used anywhere (I don't think). The individual sized files in https://github.com/wpilibsuite/frc-docs/tree/main/source/_static are what are actually displayed. It looks like I was the last one to touch those, but I will admit I don't remember what process I used to generate them from the single base image.

@arbessette
Copy link
Contributor Author

Ok, I can make the same size images manually. Thanks!

@sciencewhiz
Copy link
Collaborator

Best I can tell from this code, it will always pick the 300 px version, since sizes is always 300 px. I'm thinking the height parameter is ignored, or else the aspect ratio wouldn't be correct. Thoughts @TheTripleV?

@TheTripleV
Copy link
Member

The browser will pick the right image size to download. Its not always 300px. If you zoom the page in for example, it switches to 1050.

The logo pics are the only ones in the repo that aren't autogenerated because they don't go through sphinx and were hardcoded in RTD's theme template.

@arbessette
Copy link
Contributor Author

Is everything ok with the new images or do I need to change the height?

@TheTripleV
Copy link
Member

The images are fine. Since they are taller, please update the height in

{%- if logo_url %}
{#- sphinx version >= 4.0 only #}
<picture>
<source
sizes="300px"
srcset="{{logo_url|replace('.png', '_300.webp')}} 300w, {{logo_url|replace('.png', '_500.webp')}} 500w, {{logo_url|replace('.png', '_700.webp')}} 700w, {{logo_url|replace('.png', '_1050.webp')}} 1050w"
type="image/webp"
/>
<img
src="{{ logo_url }}"
sizes="300px"
srcset="{{logo_url|replace('.png', '_300.png')}} 300w, {{logo_url|replace('.png', '_500.png')}} 500w, {{logo_url|replace('.png', '_700.png')}} 700w, {{logo_url|replace('.png', '_1050.png')}} 1050w"
height="468"
width="1050"
alt="{{ _('Logo') }}"
decoding="async"
class="logo"
style="height: auto; width: 100%; border-radius: 0%;"
/>
</picture>
{%- endif %}
</a>

from 468 to 600.

@sciencewhiz sciencewhiz merged commit a8bae7d into wpilibsuite:main Aug 21, 2025
9 checks passed
sciencewhiz added a commit to sciencewhiz/frc-docs that referenced this pull request Aug 21, 2025
sciencewhiz added a commit that referenced this pull request Aug 31, 2025
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