-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to webpack encore for JS and CSS build
- Loading branch information
1 parent
8d0fea4
commit 7f1150d
Showing
35 changed files
with
6,004 additions
and
10,688 deletions.
There are no files selected for viewing
File renamed without changes.
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
plugins: { | ||
'autoprefixer': {}, | ||
}, | ||
}; |
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 was deleted.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
import $ from 'jquery'; | ||
|
||
export default class NavigationToggler { | ||
initialize($el, options) { | ||
this.toggler = $el; | ||
this.navigation = options.navigation; | ||
this.togglerActiveIconClass = options.togglerActiveIconClass || 'icon icon--times'; | ||
this.togglerInactiveIconClass = options.togglerInactiveIconClass || 'icon icon--menu'; | ||
|
||
// Needed to let jquery know to set display to flex when calling fadeIn | ||
$(this.navigation).css('display', 'flex').hide(); | ||
initialize(el, options) { | ||
this.toggler = el; | ||
this.navigation = document.querySelector(options.navigation); | ||
this.togglerActiveIconClass = options.togglerActiveIconClass || 'icon--times'; | ||
this.togglerInactiveIconClass = options.togglerInactiveIconClass || 'icon--menu'; | ||
|
||
$(this.toggler).click(this.click.bind(this)); | ||
this.toggler.addEventListener('click', this.click.bind(this)); | ||
} | ||
|
||
click() { | ||
$(this.navigation).fadeToggle('fast'); | ||
$(this.toggler).toggleClass(this.togglerActiveIconClass); | ||
$(this.toggler).toggleClass(this.togglerInactiveIconClass); | ||
this.navigation.style.display = this.navigation.style.display === 'flex' ? 'none' : 'flex'; | ||
this.toggler.classList.toggle(this.togglerActiveIconClass); | ||
this.toggler.classList.toggle(this.togglerInactiveIconClass); | ||
} | ||
} |
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
Oops, something went wrong.