cardのレイアウトを横向きに

This commit is contained in:
eai04191
2019-02-28 00:00:23 +09:00
parent 579bd3e31f
commit 0ff253cbfb
3 changed files with 28 additions and 7 deletions

12
public/css/tissue.css vendored
View File

@@ -84,4 +84,16 @@
#navbarAccountDropdownSp {
max-width: calc(100vw - 5em);
}
.card-img-left {
width: 100%;
border-top-left-radius: calc(.25rem - 1px);
border-bottom-left-radius: calc(.25rem - 1px);
}
.card-img-right {
width: 100%;
border-top-right-radius: calc(.25rem - 1px);
border-bottom-right-radius: calc(.25rem - 1px);
}

7
public/js/tissue.js vendored
View File

@@ -17,9 +17,11 @@
url: $this.find('a').attr('href')
}
}).then(function (data) {
var $metaColumn = $this.find('.col-12:last-of-type');
var $imageColumn = $this.find('.col-12:first-of-type');
var $title = $this.find('.card-title');
var $desc = $this.find('.card-text');
var $image = $this.find('img');
var $image = $imageColumn.find('img');
if (data.title === '') {
$title.hide();
@@ -34,7 +36,8 @@
}
if (data.image === '') {
$image.hide();
$imageColumn.hide();
$metaColumn.removeClass('col-md-6');
} else {
$image.attr('src', data.image);
}