Skip to content

Conversation

@dfcoffin
Copy link

@dfcoffin dfcoffin commented Feb 8, 2026

Summary

Adds Green Button Alliance logos to both Redocly and Swagger UI documentation pages. Logos are sourced from the repository for reliability, performance, and offline development support.

Changes

Logo Assets

  • Added docs/logo.png (300px) - Main logo for documentation display
  • Updated docs/favicon.png (250px) - Browser tab icon with GBA logo

Redocly Documentation

  • Injected GBA logo into sidebar with fixed positioning
  • Logo container styled with white background, padding, and shadow
  • Responsive design: adjusts positioning for mobile viewports (<50rem)
  • Navigation menu padding adjusted to avoid logo overlap

Swagger UI

  • Added GBA logo to topbar using CSS ::before pseudo-element
  • Logo appears before other topbar content
  • Maintains existing Green Button color scheme (#10a54a)

Build Process

  • Updated scripts/build-swagger.js to copy logos to dist/ and dist/swagger/
  • Logos automatically included in built documentation
  • No manual copying required

Technical Implementation

Redocly CSS:

#gba-logo-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 10000;
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 200px;
}

Swagger UI CSS:

.topbar::before {
  content: '';
  background-image: url('./logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 180px;
  height: 50px;
  display: inline-block;
  margin: 10px 20px;
}

Advantages

Reliability - No dependency on external CDNs or URLs
Performance - No external HTTP requests, faster load times
Offline Development - Works without internet connection
Version Control - Logo changes tracked in git
Consistency - Same logo across all environments
GitHub Pages Compatible - Served from same domain as docs

Testing

  • Logo code present in built Redocly HTML
  • Logo CSS present in Swagger UI HTML
  • Logo file accessible at /logo.png (HTTP 200)
  • Logo file accessible at /swagger/logo.png (HTTP 200)
  • Favicon updated with GBA logo
  • Both pages build successfully without errors
  • Responsive design verified for mobile viewports

Preview

After merging, the logos will appear on:

Files Changed

modified:   docs/favicon.png (98% rewrite - updated to GBA logo)
modified:   docs/index.html (added logo container and CSS)
modified:   scripts/build-swagger.js (added logo copying and CSS)
new file:   docs/logo.png (GBA logo 300px)

🤖 Generated with Claude Code

- Add GBA logo (300px) to docs/ folder for inclusion in built documentation
- Update favicon.png with GBA logo (250px) for browser tabs
- Inject GBA logo into Redocly sidebar with fixed positioning
- Add GBA logo to Swagger UI topbar using ::before pseudo-element
- Update build-swagger.js to copy logo files to dist/ and dist/swagger/
- Logos are sourced from repository, not external URLs
- Responsive design: logo adjusts for mobile viewports

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@dfcoffin dfcoffin merged commit c357921 into main Feb 8, 2026
2 checks passed
@dfcoffin dfcoffin deleted the feature/add-gba-logos branch February 8, 2026 18:38
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.

1 participant