-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f376f0e
commit 3eeac93
Showing
5 changed files
with
94 additions
and
14 deletions.
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
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,24 @@ | ||
|
||
const $ = require('jquery'); | ||
require('slick-carousel'); | ||
|
||
function handleMainPage () { | ||
var imgSrc = $('#mp-tfa-img img').attr('src').split('/100px')[0].replace('thumb/', ''), | ||
arr = imgSrc.split('/') | ||
|
||
arr.splice(arr.length - 1); | ||
$('#mp-tfa-img').css({ 'background-image' : 'url("' + arr.join('/') + '")' }); | ||
|
||
$('head').append('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.5.9/slick.min.css">'); | ||
|
||
$('#mp-dyk ul').slick({ | ||
arrows: false, | ||
autoplay: true, | ||
autoplaySpeed: 5000, | ||
dots: true, | ||
fade: true | ||
}); | ||
|
||
} | ||
|
||
module.exports = handleMainPage; |
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