Commit d735d38d authored by morant's avatar morant

* Fix aligning of thumbnails inside a NestedCarousel

* Remove links from thumbnail image
* Fix vertical aligning when a thumbnail has more than one line of text
parent c7cc1b62
......@@ -35,7 +35,7 @@ var NestedCarousel = React.createClass({
lazyLoad: true,
slidesToShow: 1,
slidesToScroll: 1,
variableWidth: true
variableWidth: false
});
var arrows = this.props.items.length > settings.slidesToShow;
......
......@@ -2,7 +2,19 @@
@import "../carousel/carousel.scss";
.nestedcarousel {
/* Overrides carousel's settings for extra padding */
.slick-slide {
padding-left: 60px;
padding: 0;
/* Add some padding under the title for each slide */
h3 {
padding-bottom: 10px;
}
/* Align to top. Important when one of the slides have
more than one line of text */
.thumbnail.project {
vertical-align: top;
}
}
}
......@@ -55,18 +55,21 @@ var Thumbnail = React.createClass({
</div>
);
}
var titleElement;
var imgElement,titleElement;
if (this.props.linkTitle) {
imgElement = <a className="thumbnail-image" href={this.props.href}>
<img src={this.props.src} />
</a>;
titleElement = <a href={this.props.href}>{this.props.title}</a>;
} else {
imgElement = <img src={this.props.src} />;
titleElement = this.props.title;
}
return (
<div className={classes} >
<a className="thumbnail-image" href={this.props.href}>
<img src={this.props.src} />
</a>
{imgElement}
<div className="thumbnail-title">
{titleElement}
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment