Class: DocsUI::TopbarLinks
- Inherits:
-
Phlex::HTML
- Object
- Phlex::HTML
- DocsUI::TopbarLinks
- Defined in:
- app/components/docs_ui/topbar_links.rb
Overview
The config-driven repo/social links in the topbar, next to the theme switcher (DocsKit.configuration.topbar_links). Each link renders as an icon-only ghost button — a DocsUI::BrandMark (a shipped brand glyph like GitHub/Discord, or a lucide fallback) whose accessible name is the link's #label. External links open in a new tab with rel=noopener; a site-relative link opens in place.
Renders nothing when the site configures no links, so a site that sets c.topbar_links = [] (the default) has a byte-identical topbar.
Instance Method Summary collapse
Instance Method Details
#view_template ⇒ Object
13 14 15 16 17 18 |
# File 'app/components/docs_ui/topbar_links.rb', line 13 def view_template links = DocsKit.configuration. return if links.empty? links.each { |link| (link) } end |