-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style(menu): add highlight to menu button when sidebar is active
And: - avoid unexpected behaviors of CSS pseudo class :hover in mobile device - make initScroll() a function
- Loading branch information
Showing
11 changed files
with
72 additions
and
49 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,27 +1,33 @@ | ||
import Sidebar from './sidebar' | ||
import InitSidebarLink from './tag' | ||
|
||
// init sidebar | ||
const sidebar = new Sidebar({ | ||
sidebar: '.sidebar', | ||
nav: '.sidebar-tabs', | ||
tabs: '.sidebar-tabs li', | ||
content: '.sidebar-content', | ||
panels: '.sideabar-contents > div', | ||
menuButton: '.header-sidebar-menu', | ||
}) | ||
const initSidebar = () => { | ||
// create sidebar object | ||
const sidebar = new Sidebar({ | ||
sidebar: '.sidebar', | ||
nav: '.sidebar-tabs', | ||
tabs: '.sidebar-tabs li', | ||
content: '.sidebar-content', | ||
panels: '.sideabar-contents > div', | ||
menuButton: '.header-sidebar-menu', | ||
}) | ||
|
||
// init sidebar link | ||
const metas = new InitSidebarLink(sidebar) | ||
metas.addTab({ | ||
metaName: 'tags', | ||
labelsContainer: '.sidebar-tags-name', | ||
postsContainer: '.sidebar-tags-list', | ||
}) | ||
metas.addTab({ | ||
metaName: 'categories', | ||
labelsContainer: '.sidebar-categories-name', | ||
postsContainer: '.sidebar-categories-list', | ||
}) | ||
// create sidebar metas object | ||
const metas = new InitSidebarLink(sidebar) | ||
|
||
export default { sidebar, metas } | ||
// add tabs to sidebar metas | ||
metas.addTab({ | ||
metaName: 'tags', | ||
labelsContainer: '.sidebar-tags-name', | ||
postsContainer: '.sidebar-tags-list', | ||
}) | ||
metas.addTab({ | ||
metaName: 'categories', | ||
labelsContainer: '.sidebar-categories-name', | ||
postsContainer: '.sidebar-categories-list', | ||
}) | ||
|
||
return { sidebar, metas } | ||
} | ||
|
||
export default initSidebar |
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
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
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
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