cardのレイアウトを横向きに
This commit is contained in:
12
public/css/tissue.css
vendored
12
public/css/tissue.css
vendored
@@ -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
7
public/js/tissue.js
vendored
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user