-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dividers and fix bug in siteNav #1063
Merged
Merged
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
538ff88
add _site to ignore list
Tejas2805 52e1afa
update highlighted text bg color
Tejas2805 f3d3f34
Merge branch 'master' of https://github.com/MarkBind/markbind
Tejas2805 5738a2b
add <hr> to code
Tejas2805 145b97c
update
Tejas2805 7132f95
add <br> to output
Tejas2805 d5b91ff
add <br> to code
Tejas2805 27c11d7
update to make it consistent
Tejas2805 34d2563
correct input indentation
Tejas2805 f64773a
update
Tejas2805 8b5e5d9
update code to code blocks
Tejas2805 8ef5aa5
Update siteNavigationMenus.mbdf
Tejas2805 45331b0
Update siteNavigationMenus.mbdf
Tejas2805 5f0a6ab
Update docs/userGuide/syntax/siteNavigationMenus.mbdf
Tejas2805 cd3e2de
Update siteNavigationMenus.mbdf
Tejas2805 3cc213d
Update horizontal rules link to same page
Tejas2805 ba9078f
add hr to code and output
Tejas2805 d4b6923
Update siteNavigationMenus.mbdf
Tejas2805 3eb2ce3
remove extra whitepace
Tejas2805 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,26 +3,26 @@ | |
**A _Site Navigation Menu_ (==_siteNav_ for short==) is a fixed menu on the ==left edge== of a page**, that can be used to show a road map of the main pages of your site. | ||
|
||
Steps to add a siteNav: | ||
1. Format your siteNav as an unordered Markdown list and save it inside the `_markbind/navigation` directory. | ||
1. Format your siteNav as an unordered Markdown list and save it inside the `_markbind/navigation` directory. You may include dividers in the siteNav via <a href="{{ baseUrl }}/userGuide/readerfacingfeatures#horizontal-rules">horizontal rules</a>. | ||
2. Specify the file as the value of the `siteNav` attribute in the `<frontmatter>` of the page. | ||
|
||
<div class="indented"> | ||
|
||
{{ icon_example }} Here is an example siteNav code saved in **`_markbind/navigation/`**`mySiteNav.md` file: | ||
|
||
<box> | ||
|
||
<code> | ||
* [:house: Home]({{ showBaseUrlText }}/index.html)<br> | ||
* Docs<br> | ||
* [User Guide]({{ showBaseUrlText }}/ug.html)<br> | ||
* [Dev Guide]({{ showBaseUrlText }}/dg.html)<br> | ||
* [Search]({{ showBaseUrlText }}/search.html)<br> | ||
* [Google Search](https://www.google.com/)<br> | ||
* [YouTube Search](https://www.youtube.com/)<br> | ||
* [Contact]({{ showBaseUrlText }}/contact.html) | ||
</code> | ||
</box> | ||
```{.no-line-numbers} | ||
* [:house: Home]({{ baseUrl }}/index.html) | ||
--- | ||
* Docs | ||
* [User Guide]({{ baseUrl }}/ug.html) | ||
* [Dev Guide]({{ baseUrl }}/dg.html) | ||
--- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bit of a nit, but let's not leave trailing spaces behind 🙂 You should also be able to configure your editor to automatically remove trailing whitespace behind, so you don't have to worry about it yourself. |
||
* [Search]({{ baseUrl }}/search.html) | ||
* [Google Search](https://www.google.com/) | ||
* [YouTube Search](https://www.youtube.com/) | ||
--- | ||
* [Contact]({{ baseUrl }}/contact.html) | ||
``` | ||
|
||
Here's how another page can make use of the above siteNav: | ||
|
||
|
@@ -37,6 +37,7 @@ Here's how the above siteNav will appear: | |
|
||
<ul style="list-style-type: none; margin-left:-1em"> | ||
<li style="margin-top: 10px"><a class="site-nav__a" href="/index.html">🏠 Home</a></li> | ||
<hr> | ||
<li style="margin-top: 10px"> | ||
<button class="dropdown-btn">Docs <i class="dropdown-btn-icon"> | ||
<span class="glyphicon glyphicon-menu-down" aria-hidden="true"></span></i></button> | ||
|
@@ -47,12 +48,15 @@ Here's how the above siteNav will appear: | |
</ul> | ||
</div> | ||
</li> | ||
<hr> | ||
<li style="margin-top:10px"><a class="site-nav__a" href="">Search</a> | ||
<ul style="list-style-type: none; margin-left:-1em"> | ||
<li style="margin-top: 10px"><a class="site-nav__a" href="http://www.google.com">Google Search</a></li> | ||
<li style="margin-top: 10px"><a class="site-nav__a" href="http://www.youtube.com">YouTube Search</a></li> | ||
</ul> | ||
</li> | ||
<hr> | ||
<li style="margin-top:10px"><a class="site-nav__a" href="">Contact</a></li> | ||
</ul> | ||
|
||
</div> | ||
|
@@ -85,7 +89,7 @@ You may have additional HTML and Markdown content in a <tooltip content="the fil | |
|
||
More than one siteNav file can be in `_markbind/navigation/` directory but a page may not have more than one siteNav. | ||
|
||
A siteNav has a fixed width of 300 pixels for its contents. A siteNavs is [_responsive_](https://www.w3schools.com/html/html_responsive.asp) in that it will collapse to a menu button when the screen width is smaller than 992 pixels. It will then be completely hidden when the screen size is smaller than 576 pixels. | ||
A siteNav has a fixed width of 300 pixels for its contents. A siteNav is [_responsive_](https://www.w3schools.com/html/html_responsive.asp) in that it will collapse to a menu button when the screen width is smaller than 992 pixels. It will then be completely hidden when the screen size is smaller than 576 pixels. | ||
|
||
There is no limit to the number of nesting levels or the number of items in the menu, but note that any content exceeding a height of 1000 pixels will be cut off. | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think adding a divider in the example would be helpful, since we mentioned it above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should. So that they can understand how it looks and accordingly decide whether to use or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't see any changes here?
![Screenshot 2020-03-04 at 12 19 05 PM](https://user-images.githubusercontent.com/17447681/75844886-582d2f80-5e12-11ea-9964-a7c5aa4524b9.png)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah my bad. I was asking you whether to do it or not. Didn't realise you were saying to implement and show. I have done it now. Sorry for the confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, sorry for the lack of clarity!