add option nav-short to have navbar permanently collapsed

This commit is contained in:
Dean Attali 2020-04-28 20:09:00 +00:00
parent b514a80381
commit 9bf17b2c40
4 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,8 @@
This file lists all non-trivial changes to Beautiful Jekyll. I often make small changes to documentation, to the demo site, or to the general look-and-feel. These and other minor changes will not be listed here. This file lists all non-trivial changes to Beautiful Jekyll. I often make small changes to documentation, to the demo site, or to the general look-and-feel. These and other minor changes will not be listed here.
**2020-04-28** Add YAML option `nav-short` to have navbar permanently collapsed
**2020-04-28** Add social network link: Calendly **2020-04-28** Add social network link: Calendly
**2020-04-28** Fix bug where RSS link in footer was showing even when turned off **2020-04-28** Fix bug where RSS link in footer was showing even when turned off

View File

@ -128,6 +128,7 @@ image | If you want to add a personalized image to your blog post that wil
readtime | If you want to show how many minutes it will take to read a post in the header, add `readtime: true`. readtime | If you want to show how many minutes it will take to read a post in the header, add `readtime: true`.
share-img | If you want to specify an image to use when sharing the page on Facebook or Twitter, then provide the image's full URL here. share-img | If you want to specify an image to use when sharing the page on Facebook or Twitter, then provide the image's full URL here.
social-share | If you don't want to show buttons to share a blog post on social media, use `social-share: false` (this feature is turned on by default). social-share | If you don't want to show buttons to share a blog post on social media, use `social-share: false` (this feature is turned on by default).
nav-short | By default, the navigation bar gets shorter after scrolling down the page. If you want the navigation bar to always be short on a certain page, use `nav-short: true`
use-site-title | If you want to use the site title rather than page title as HTML document title (ie. browser tab title), use `use-site-title: true`. When set, the document title will take the format `Site Title - Site Description` (eg. `My website - A virtual proof that name is awesome!`). By default, it will use `Page Title` if it exists, or `Site Title` otherwise. use-site-title | If you want to use the site title rather than page title as HTML document title (ie. browser tab title), use `use-site-title: true`. When set, the document title will take the format `Site Title - Site Description` (eg. `My website - A virtual proof that name is awesome!`). By default, it will use `Page Title` if it exists, or `Site Title` otherwise.
language | HTML language code to be set on <html> element (see [W3Schools website](https://www.w3schools.com/tags/ref_language_codes.asp) for more info on this topic). Language can also be set site-wide in `_config.yml`. language | HTML language code to be set on <html> element (see [W3Schools website](https://www.w3schools.com/tags/ref_language_codes.asp) for more info on this topic). Language can also be set site-wide in `_config.yml`.
layout | What type of page this is (default is `post` for blog posts and `page` for other pages). See _Page types_ section below for more information. layout | What type of page this is (default is `post` for blog posts and `page` for other pages). See _Page types_ section below for more information.

View File

@ -1,4 +1,4 @@
<nav class="navbar navbar-default navbar-fixed-top navbar-custom"> <nav class="navbar navbar-default navbar-fixed-top navbar-custom {% if page.nav-short %}top-nav-short-permanent{% endif %}">
<div class="container-fluid"> <div class="container-fluid">
<div class="navbar-header"> <div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-navbar"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-navbar">

View File

@ -161,6 +161,7 @@ img {
transition: background .5s ease-in-out,padding .5s ease-in-out; transition: background .5s ease-in-out,padding .5s ease-in-out;
} }
.navbar-custom.top-nav-short-permanent,
.navbar-custom.top-nav-short { .navbar-custom.top-nav-short {
padding: 0; padding: 0;
} }