-
Notifications
You must be signed in to change notification settings - Fork 142
Support page top header #733
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
82ba04a
Change Page.ejs template
Chng-Zhi-Xuan bdff76a
Add Header file support
Chng-Zhi-Xuan cffe229
Test: Update Site.test.js for header files
Chng-Zhi-Xuan 15b2ae7
Remove support for inline footers and headers
Chng-Zhi-Xuan 57d852c
Remove site nav expand button
Chng-Zhi-Xuan eac7513
Refactor inline styles to classes
Chng-Zhi-Xuan e887a5a
Rework site nav insertion and CSS file
Chng-Zhi-Xuan 5bcd620
Remove page navigation setup
Chng-Zhi-Xuan c356697
Rework page nav insertion and CSS file
Chng-Zhi-Xuan 3fad0ed
Add page section collection methods
Chng-Zhi-Xuan e15becd
Add holy grail layout section
Chng-Zhi-Xuan c8bc706
Docs: Change Footers section
Chng-Zhi-Xuan 64e0a52
Docs: Add Headers section
Chng-Zhi-Xuan f6c91f6
Format Page HTML before file write
Chng-Zhi-Xuan eb21d5f
Test: Update test_site expected folder
Chng-Zhi-Xuan 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 hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| ## Headers | ||
|
|
||
| **You can specify a <tooltip content="Content to be placed at the top of a page.">page header</tooltip>** above your page contents and <tooltip content="Site Navigation and <br>Page Navigation menus">navigation menus</tooltip> using a header file. | ||
|
|
||
| You can save multiple header files in the `_markbind/headers` folder and specify it in the `<frontmatter>` of the pages in which it should appear. | ||
|
|
||
| <div class="indented"> | ||
|
|
||
| {{ icon_example }} | ||
| **`_markbind/headers/`**`welcomeBanner.md`: | ||
| ```html | ||
| <header> | ||
| <div class="bg-primary display-4 text-center text-white"> | ||
| Welcome! | ||
| </div> | ||
| </header> | ||
| ``` | ||
| In the page that you want to include the header: | ||
| ```html | ||
| <frontmatter> | ||
| header: welcomeBanner.md | ||
| </frontmatter> | ||
| ``` | ||
| </div> | ||
|
|
||
| Notes: | ||
| - Any inline headers will be removed by MarkBind to ensure compatibility with header files. | ||
| - If a [Layout]({{ baseUrl }}/userGuide/tweakingThePageStructure.html#page-layouts) is specified, the header file specified in the `<frontmatter>` will override the header within the Layout. | ||
| - [MarkBind Components]({{ baseUrl }}/userGuide/usingComponents.html) and [`<include>` tags]({{ baseUrl }}/userGuide/reusingContents.html#the-include-tag) are not supported in headers. | ||
|
|
||
| <span id="short" class="d-none"> | ||
| ```html | ||
| <header> | ||
| <div class="bg-primary display-4 text-center text-white" style="height: 200px;"> | ||
| Welcome! | ||
| </div> | ||
| </header> | ||
| ``` | ||
| ```html | ||
| <frontmatter> | ||
| header: welcomeBanner.md | ||
| </frontmatter> | ||
| ``` | ||
| </span> | ||
| <span id="examples" class="d-none"> | ||
| <div class="bg-primary display-4 text-center text-white" style="height: 150px;"> | ||
| Content to be placed at the top of your page. | ||
| </div> | ||
| </span> |
This file contains hidden or 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
Oops, something went wrong.
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.
Are you planning any workarounds to restore this feature?
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.
With the new layout, the sticky
page-navnow has the height of the<content>instead of the viewport. SoscrollIntoViewwould not work.A different work around would need to be implemented, which is an independently scrollable sticky element.
References
Scrollable Sticky Element
Sticky Sidebar