-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] add new list templates for News plugin, (cards, simplelist,…
… timeline)
- Loading branch information
Showing
21 changed files
with
1,558 additions
and
49 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
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,18 @@ | ||
// news Timeline | ||
$('.js__news-timeline__item').on('click', function(e) { | ||
if ($(this).hasClass('collapsed')){ | ||
e.preventDefault(); | ||
$(this).removeClass('collapsed'); | ||
$(this).closest('.js__news-timeline__item-wrp').find('.js__news-timeline__date').addClass('open'); | ||
} | ||
}); | ||
|
||
// news Cards | ||
$('.js__news-cards__dotdotdot').dotdotdot({ | ||
watch: 'window' | ||
}); | ||
|
||
// news Simple list | ||
$('.js__news-simple-list__dotdotdot').dotdotdot({ | ||
watch: 'window' | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Cards | ||
.news-cards__item { | ||
position: relative; | ||
box-shadow: 0 2px 6px 0 rgba(0,0,0,0.15); | ||
border: 1px solid @border-color; | ||
margin-bottom: 30px; | ||
border-radius: 3px; | ||
} | ||
|
||
.news-cards__media-preview{ | ||
height: 180px; | ||
background-size: cover; | ||
background-repeat: no-repeat; | ||
background-position: 50% 50%; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.news-cards__text{ | ||
padding: 0 15px; | ||
color: @main-text-color; | ||
} | ||
|
||
.news-cards__author { | ||
padding: 10px 15px; | ||
background-color: darken(@main-body-bg, 10%); | ||
} | ||
|
||
.news-cards__more-link{ | ||
padding: 12px 15px; | ||
} | ||
.news-cards__header h3{ | ||
font-size: 22px; | ||
} | ||
|
||
|
||
@media (min-width: 768px) { | ||
.news-cards__item { | ||
height: 475px; | ||
} | ||
.news-cards__text{ | ||
height: 188px; | ||
overflow: hidden; | ||
} | ||
.news-cards__author { | ||
position: absolute; | ||
bottom: 0; | ||
width: 100%; | ||
} | ||
} |
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,59 @@ | ||
.news-simple-list__img-wrap { | ||
margin-right: 20px; | ||
overflow: hidden; | ||
height: 200px; | ||
width: 100%; | ||
} | ||
.news-simple-list__text{ | ||
overflow: hidden; | ||
position: relative; | ||
|
||
|
||
padding: 15px; | ||
padding-bottom: 0; | ||
height: auto; | ||
} | ||
|
||
.news-simple-list__item{ | ||
background-color: darken(@main-body-bg, 5%); | ||
margin-bottom: 30px; | ||
} | ||
|
||
.news-simple-list__media-preview{ | ||
background-size: cover; | ||
background-position: 50% 50%; | ||
height: 200px; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
.news-simple-list__more-link { | ||
padding: 0 15px 15px; | ||
} | ||
.news-simple-list__header h3 { | ||
font-size: 22px; | ||
} | ||
|
||
@media (min-width: 768px){ | ||
.news-simple-list__img-wrap { | ||
float: left; | ||
width: 225px; | ||
} | ||
.news-simple-list__text{ | ||
height: 168px; | ||
padding-left: 0; | ||
padding-top: 20px; | ||
padding-right: 30px; | ||
} | ||
.news-simple-list__more-link{ | ||
padding: 0; | ||
} | ||
} | ||
|
||
@media (min-width: 768px) and (max-width: 991px) { | ||
.news-simple-list__more-link{ | ||
padding-top: 4px; | ||
} | ||
.news-simple-list__header h3 { | ||
font-size: 19px; | ||
} | ||
} |
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,185 @@ | ||
// Timeline | ||
|
||
.news-timeline-wrp{ | ||
clear: both; | ||
overflow: hidden; | ||
position: relative; | ||
margin-bottom: 30px; | ||
} | ||
|
||
.news-timeline-wrp::before { | ||
content: ''; | ||
position: absolute; | ||
top: 0; | ||
height: 100%; | ||
width: 2px; | ||
background: darken(@main-body-bg, 7%); | ||
left: 23px; | ||
margin-left: -1px; | ||
margin-top: 80px; | ||
} | ||
|
||
.news-timeline__header{ | ||
margin: 30px; | ||
text-align: center; | ||
} | ||
|
||
.news-timeline__item-wrp{ | ||
position: relative; | ||
} | ||
|
||
// timeline date | ||
.news-timeline__date{ | ||
position: absolute; | ||
text-align: center; | ||
width: 42px; | ||
height: 42px; | ||
font-size: 12px; | ||
|
||
border-radius: 50%; | ||
background-color: darken(@main-body-bg, 7%); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
top: 20px; | ||
margin-left: -25px; | ||
color: @main-text-color; | ||
box-shadow: 0 2px 6px 0 rgba(0,0,0,0.15); | ||
left: 25px; | ||
} | ||
|
||
|
||
.news-timeline__date.open{ | ||
background-color: @main-color; | ||
color: #fff; | ||
} | ||
|
||
.news-timeline__date span{ | ||
display: block; | ||
} | ||
|
||
.news-timeline-wrp .odd.news-timeline__date.open::after, | ||
.news-timeline-wrp .even.news-timeline__date.open::after{ | ||
content: ""; | ||
position: absolute; | ||
top: 12px; | ||
width: 0; | ||
height: 0; | ||
border-top: 10px solid transparent; | ||
border-bottom: 10px solid transparent; | ||
right: -14px; | ||
border-left: 20px solid #288fb4; | ||
} | ||
|
||
.news-timeline-wrp .even.news-timeline__date.open::after{ | ||
border-right: 0; | ||
left: auto; | ||
right: -14px; | ||
border-left: 20px solid @main-color; | ||
} | ||
|
||
.news-timeline__date-day{ | ||
font-weight: 700; | ||
} | ||
|
||
|
||
// news item article | ||
.news-timeline__item-article{ | ||
width: 100%; | ||
position: relative; | ||
overflow: hidden; | ||
} | ||
|
||
.news-timeline__item{ | ||
margin-bottom: 30px; | ||
border-radius: 3px; | ||
position: relative; | ||
border: 1px solid darken(@main-body-bg, 15%); | ||
box-shadow: 0 2px 6px 0 rgba(0,0,0,0.15); | ||
width: auto; | ||
margin-left: 70px; | ||
} | ||
|
||
.news-timeline__item.last{ | ||
margin-bottom: 0; | ||
} | ||
|
||
.news-timeline__item.collapsed{ | ||
cursor: pointer; | ||
} | ||
|
||
.news-timeline__img-wrap{ | ||
} | ||
|
||
.news-timeline__media-preview{ | ||
height: 250px; | ||
background-size: cover; | ||
background-position: 50% 50%; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
.news-timeline__item-text{ | ||
padding: 15px 20px; | ||
} | ||
|
||
.news-timeline__item-header h3{ | ||
font-size: 20px; | ||
margin: 5px 0; | ||
} | ||
.news-timeline__item-teaser{ | ||
margin-top: 10px; | ||
} | ||
|
||
.news-timeline__item-author { | ||
background-color: darken(@main-body-bg, 7%); | ||
padding: 10px 20px 8px; | ||
text-transform: capitalize; | ||
font-size: 12px; | ||
} | ||
|
||
.news-timeline__item-wrp .collapsed .news-timeline__item-teaser, | ||
.news-timeline__item-wrp .collapsed .news-timeline__img-wrap{ | ||
opacity: 0; | ||
visibility: hidden; | ||
max-height: 0; | ||
} | ||
|
||
|
||
@media (min-width: 768px) { | ||
.news-timeline__date { | ||
width: 50px; | ||
height: 50px; | ||
font-size: 14px; | ||
} | ||
|
||
.news-timeline-wrp .odd.news-timeline__date.open::after, | ||
.news-timeline-wrp .even.news-timeline__date.open::after{ | ||
top: 15px; | ||
} | ||
|
||
} | ||
@media (min-width: 992px) { | ||
.news-timeline-wrp::before{ | ||
left: 50%; | ||
} | ||
.news-timeline__date{ | ||
left: 50%; | ||
} | ||
|
||
.news-timeline-wrp .odd.news-timeline__date.open::after{ | ||
right: auto; | ||
left: -14px; | ||
border-right: 20px solid @main-color; | ||
border-left: 0; | ||
} | ||
.news-timeline__item{ | ||
width: 44%; | ||
margin-left: 0; | ||
} | ||
.news-timeline__item.odd{ | ||
float: left; | ||
} | ||
.news-timeline__item.even{ | ||
float: right; | ||
} | ||
} |
Oops, something went wrong.