Skip to content

Commit

Permalink
[ 仕様変更 ][ 最新記事ウィジェット ] .postList .postList_item への構造変更に伴う調整
Browse files Browse the repository at this point in the history
  • Loading branch information
kurudrive committed Dec 13, 2016
1 parent 44c2a01 commit 3e848a2
Show file tree
Hide file tree
Showing 10 changed files with 120 additions and 6 deletions.
14 changes: 13 additions & 1 deletion _scss/vkExUnit_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,9 @@ $section_pagelist_margin:2.5em 0 1em;
.postList_terms a {margin-right:3px; padding: 2px 5px 1px; border-radius:3px; background-color: #efefef;font-size:12px; }

// postList_miniThumb
.postList_miniThumb { display:block; overflow:hidden;clear: both;padding:15px 0 ;border-bottom:1px dotted #666;

.postList_miniThumb {
.postList_item { display:block; overflow:hidden;clear:both; position:relative; padding:15px 0 ;border-bottom:1px dotted #666;margin-bottom:0; }
.postList_thumbnail { float:left;margin-right:15px; }
.postList_thumbnail a { position: relative; display: block; overflow: hidden; border: 1px solid #e5e5e5; }
.postList_thumbnail img { width:80px; height:auto;}
Expand All @@ -502,6 +504,16 @@ $section_pagelist_margin:2.5em 0 1em;
}
}

/*
/* Lightning Charm 1.2.0 での表示崩れ回避用
/* Lightning Charm 1.4.0 以降になったら削除
*/
.mainSection .veu_postList.pt_0 .postList.postList_miniThumb { padding:0;margin-left:0;margin-right:0; }
@media (min-width: 992px) {
.mainSection .veu_postList.pt_0.postList_item .postList_thumbnail { margin-right:30px;margin-left:0; }
.mainSection .veu_postList.pt_0.postList_item.even .postList_thumbnail { margin-left:30px;margin-right:0; }
}

/*-------------------------------------------*/
/* Widget .veu_profile
/*-------------------------------------------*/
Expand Down
2 changes: 1 addition & 1 deletion css/vkExUnit_style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/vkExUnit_style_in_bs.css

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions js/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,31 @@ jQuery(document).ready(function($){
// jQuery('.child_page_block p').flatHeights();
jQuery('.child_page_block h4 a').flatHeights();
});
/*-------------------------------------------*/
/* Lightning Charm 1.2.0 での表示崩れ回避用
/* Lightning Charm 1.4.0 以降になったら削除
/*-------------------------------------------*/
(function($){
// veu_postList のサムネイルがない場合にクラスを付与
$veu_postList = $('.veu_postList');
if( $veu_postList.length ){
var $postList_item_veu = $('.veu_postList .postList > .postList_item'),
cnt = 0;

$postList_item_veu.each(function(){
var $post_thumb = $(this).find('.postList_thumbnail');
if( !( $post_thumb.length ) ){
$(this).addClass('no_img');
} else {
cnt++;
if( ( cnt % 2 ) == 0 ){
$(this).addClass('even');
}
}
});
}
})(jQuery);

/*-------------------------------------------*/
/* facebookLikeBox
/*-------------------------------------------*/
Expand Down
2 changes: 1 addition & 1 deletion js/all.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions js/all_in_bs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/all_in_bs.min.js

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions js/master.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
/*-------------------------------------------*/
/* Lightning Charm 1.2.0 での表示崩れ回避用
/* Lightning Charm 1.4.0 以降になったら削除
/*-------------------------------------------*/
(function($){
// veu_postList のサムネイルがない場合にクラスを付与
$veu_postList = $('.veu_postList');
if( $veu_postList.length ){
var $postList_item_veu = $('.veu_postList .postList > .postList_item'),
cnt = 0;

$postList_item_veu.each(function(){
var $post_thumb = $(this).find('.postList_thumbnail');
if( !( $post_thumb.length ) ){
$(this).addClass('no_img');
} else {
cnt++;
if( ( cnt % 2 ) == 0 ){
$(this).addClass('even');
}
}
});
}
})(jQuery);

/*-------------------------------------------*/
/* facebookLikeBox
/*-------------------------------------------*/
Expand Down
5 changes: 4 additions & 1 deletion plugins/other_widget/widget-new-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ function widget( $args, $instance ) {

if ( $post_loop->have_posts() ) :
if ( ! $instance['format'] ) {
echo '<div class="postList postList_miniThumb">';
while ( $post_loop->have_posts() ) : $post_loop->the_post();
$this->display_pattern_0($is_modified);
endwhile;
echo '</div>';
} else {
echo '<ul class="postList">';
while ( $post_loop->have_posts() ) : $post_loop->the_post();
Expand All @@ -87,7 +89,8 @@ function widget( $args, $instance ) {

function display_pattern_0($is_modified=false) {
?>
<div class="postList postList_miniThumb" id="post-<?php the_ID(); ?>">
<!-- [ .postList は近日削除されます ] -->
<div class="postList postList_item" id="post-<?php the_ID(); ?>">
<?php if ( has_post_thumbnail() ) : ?>
<div class="postList_thumbnail">
<a href="<?php the_permalink(); ?>">
Expand Down
24 changes: 24 additions & 0 deletions vkExUnit.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,27 @@ function vkExUnit_uninstall_function() {

include vkExUnit_get_directory( '/uninstaller.php' );
}

/*
/* Lightning Charm 1.2.0 での表示崩れ回避用
/* Lightning Charm 1.4.0 以降になったら削除
*/
add_action( 'wp_head', 'ltg_charm_1_2_fix_function',2 );
function ltg_charm_1_2_fix_function(){
$theme_opt = wp_get_theme( get_template() );
$skin = get_option('lightning_design_skin');
$theme = $theme_opt->Name;

if ( $skin == 'charm' && $theme == 'Lightning' ){

$charm_custom_css = "
.mainSection .veu_postList.pt_0 .postList.postList_miniThumb { padding:0;margin-left:0;margin-right:0; }
@media (min-width: 992px) {
.mainSection .veu_postList.pt_0 .postList_item .postList_thumbnail { width:50%;margin-left:0; }
.mainSection .veu_postList.pt_0 .postList_item.even .postList_thumbnail { margin-right:0; }
}
";
wp_add_inline_style( 'lightning-design-style', $charm_custom_css );

} // if ( $skin == 'charm' && $theme == 'Lightning' ){
}

0 comments on commit 3e848a2

Please sign in to comment.