1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub-skin.git synced 2024-06-17 07:30:48 +03:00

Поправка конфликта классов у спойлеров

This commit is contained in:
Alexander Yakovlev 2019-04-08 17:45:53 +07:00
parent fa5bc5b7af
commit af2da02c1f
Signed by: oreolek
GPG key ID: 1CDC4B7820C93BD3
2 changed files with 46 additions and 9 deletions

View file

@ -138,23 +138,20 @@ summary {
**/
.spoiler-title {
color: #6da3bd;
text-decoration: underline 1px dashed;
border-bottom: 1px dashed;
font-weight: normal;
cursor: pointer;
}
.spoiler-title:hover {
color: #4d7285;
}
.spoiler[open] .spoiler-title {
text-decoration: none;
margin-bottom: .5em;
}
.spoiler {
.spoiler-body {
display: none;
padding: 10px;
}
.spoiler[open] {
border: 1px solid #eee;
background: #f9f9f9;
margin-top: 10px;
overflow: hidden;
}
.spoiler-title:before {
float: left;
@ -166,7 +163,42 @@ summary {
border: 0px solid red;
background: url(../images/spoiler.icon.png) no-repeat left top;
}
.spoiler[open] .spoiler-title:before {
.spoiler-title.open:before {
background: url(../images/spoiler.icon.png) no-repeat left bottom;
}
.newspoiler-title {
color: #6da3bd;
text-decoration: underline 1px dashed;
font-weight: normal;
cursor: pointer;
}
.newspoiler-title:hover {
color: #4d7285;
}
.newspoiler[open] .newspoiler-title {
text-decoration: none;
margin-bottom: .5em;
}
.newspoiler {
padding: 10px;
}
.newspoiler[open] {
border: 1px solid #eee;
background: #f9f9f9;
}
.newspoiler-title:before {
float: left;
content: " ";
width: 16px;
height: 16px;
margin-top: 2px;
display: block;
border: 0px solid red;
background: url(../images/spoiler.icon.png) no-repeat left top;
}
.newspoiler[open] .newspoiler-title:before {
background: url(../images/spoiler.icon.png) no-repeat left bottom;
}

View file

@ -9,6 +9,11 @@ jQuery(document).ready(function($){
$(".search-icon").on('click touchstart', function(){
$(".main-search").toggle()
});
$('.spoiler-title').on('click touchstart', function(){
$(this).toggleClass('open');
$(this).parent().children('div.spoiler-body').toggle('normal');
return false;
});
});
/* --- https://github.com/stationer/DetailsShim/blob/master/details-shim.js --- */