davidhampgonsalves / hugo-black-and-light-theme

A High contrast, text oriented, performant and Javascript-free theme for Hugo.
https://themes.gohugo.io/themes/hugo-black-and-light-theme/
GNU General Public License v3.0
189 stars 94 forks source link

fix justification of nav links and improve performance #24

Closed cconcannon closed 4 years ago

cconcannon commented 4 years ago

The layouts/_default/single.html page has links at the bottom to navigate to/from additional posts. These <a> elements were given a class that was not specified with any styling in the styles.html file. As a result, the links would stack on top of each other in a left-justified manner like so:

Screen Shot 2020-05-17 at 6 51 35 PM

I modified the page to use an existing justification attribute for each link, and I added constraints for those attributes (via the width property) so that the links will display side-by-side. Here's a screenshot of the result:

Screen Shot 2020-05-17 at 6 52 04 PM
cconcannon commented 4 years ago

I added additional changes to the header partial so that the rendered html always uses the post metadata description and so that the font CSS loads in a non-blocking manner. These improvements bump up the default Lighthouse performance scores