Skip to content

Commit

Permalink
Foundation+Section: Improve section rendering (#39)
Browse files Browse the repository at this point in the history
This change adds a bit of margin between each section within the header
of the built-in Foundation theme. It also increases the line height for those
links to make them render nicely on smaller screens when a larger number
of sections have been added, and makes the currently selected link underlined.

It also makes the default title of all sections become a capitalized version
of their rawValue.
  • Loading branch information
JohnSundell committed Jan 10, 2020
1 parent 8ce51bb commit 4e64b3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Resources/FoundationTheme/styles.css
Expand Up @@ -51,6 +51,12 @@ nav {

nav li {
display: inline-block;
margin: 0 7px;
line-height: 1.5em;
}

nav li a.selected {
text-decoration: underline;
}

h1 {
Expand Down
1 change: 1 addition & 0 deletions Sources/Publish/API/Section.swift
Expand Up @@ -27,6 +27,7 @@ public struct Section<Site: Website>: Location {

internal init(id: Site.SectionID) {
self.id = id
self.title = id.rawValue.capitalized

This comment has been minimized.

Copy link
@benshepherd

benshepherd Jan 18, 2020

What if I have a section title like "FAQ" that I'd like to remain in all caps?

}
}

Expand Down

0 comments on commit 4e64b3d

Please sign in to comment.