@@ -335,6 +335,13 @@ class Card extends React.Component {
);
}
+ getClipType(dimensions) {
+ if ((dimensions.x / dimensions.y) > (4 / 3)) {
+ return "landscape";
+ }
+ return "portrait";
+ }
+
setPanelState(state) {
this.setState({panelOpen: state});
}
diff --git a/static/css/shot-index.scss b/static/css/shot-index.scss
index 38d8a73f15..cdd0681608 100644
--- a/static/css/shot-index.scss
+++ b/static/css/shot-index.scss
@@ -160,10 +160,18 @@ h1 {
.shot-image-container {
background-size: cover;
box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.05) inset;
- min-height: 140px;
max-height: 280px;
+ max-width: 210px;
overflow: hidden;
+ }
+
+ &.landscape .shot-image-container {
+ img {
+ max-height: 280px;
+ }
+ }
+ &.portrait .shot-image-container {
img {
width: 210px;
}