Repository navigation
SiteBuilder 0.3.0
SiteBuilder 0.3.0 adds a navigation bar, materials, and dividers.
New
NavigationBaris a bar with a site's title and main links. It stays at the top of the window, over a blurred material. Its content is centered at amaxWidththat you match to the page's content. On screens narrower than 641 pixels, the links move into a menu built on a<details>element, so it works with touch, a pointer, the keyboard, and screen readers, without JavaScript.- The current page is marked: every link to the page being viewed gets
aria-current="page", and the navigation bar shows it in the tint. Materialandbackground(_:)give views SwiftUI's translucent, blurred backgrounds, fromultraThintoultraThick, plusbar. A material becomes nearly opaque when the browser reports a preference for reduced transparency, or can't blur.Dividerdraws a hairline across aVStackor down anHStack, and stays visible in forced colors mode.frame(maxWidth: .infinity)fills the available width, as in SwiftUI.
Changed
- Built-in views ship their styles only when a page uses them.