{if $object->status == "SUCCESSFUL"}
- <div class="unfurlCard {if $object->imageType == 'COVER' && !$object->getImageUrl()|empty}unfurlLargeContentImage{elseif $object->imageType == 'SQUARED' && !$object->getImageUrl()|empty}unfurlSquaredContentImage{/if}">
- <a {anchorAttributes url=$object->url appendClassname=false isUgc=true}>
- <div{if !$object->getImageUrl()|empty} style="background-image: url('{$object->getImageUrl()}')"{/if}></div>
- <div class="unfurlInformation">
- <div class="urlTitle">{$object->title}</div>
- <div class="urlDescription">{$object->description}</div>
- <div class="urlHost">{$object->getHost()}</div>
- </div>
- </a>
+ <div class="
+ unfurlUrlCard
+ {if $object->hasCoverImage()}unfurlUrlCardCoverImage{/if}
+ {if $object->hasSquaredImage()}unfurlUrlCardSquaredImage{/if}
+ ">
+
+ <div{if !$object->getImageUrl()|empty} style="background-image: url('{$object->getImageUrl()}')"{/if}></div>
+ <div class="unfurlUrlInformation">
+ <div class="unfurlUrlTitle">{$object->title}</div>
+ <div class="unfurlUrlDescription">{$object->description}</div>
+ <div class="unfurlUrlHost">{$object->getHost()}</div>
+ </div>
+ <a class="unfurlUrlLink" {anchorAttributes url=$object->url appendClassname=false isUgc=true}></a>
</div>
{else}
<a {anchorAttributes url=$object->url isUgc=true}>{$object->url}</a>
-.unfurlCard {
+.unfurlUrlCard {
background-color: $wcfContentBackground;
+ border-radius: 3px;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
+ color: $wcfContentText;
display: inline-block;
- margin: 20px 0;
- white-space: nowrap;
-
- @include screen-md-up {
- max-width: 700px;
- }
+ margin: 10px 0;
+ max-width: 100%;
+ overflow: hidden;
+ position: relative;
+ width: 600px;
- @include screen-sm-down {
- max-width: 100%;
+ &.unfurlUrlCardCoverImage {
+ > :first-child:not(:last-child) {
+ min-height: 150px;
+ background-position: center;
+ background-repeat: no-repeat;
+ background-size: cover;
+ position: relative;
+ }
}
- > a {
- color: $wcfContentText;
+ &.unfurlUrlCardSquaredImage {
+ display: flex;
- .unfurlInformation {
+ > :first-child:not(:last-child) {
+ flex: 0 0 auto;
+ height: 128px !important;
+ width: 128px !important;
+ margin: 10px;
+ background-position: center;
+ background-repeat: no-repeat;
+ background-size: cover;
position: relative;
- padding: 10px 20px 20px;
}
- .urlTitle {
- display: block;
+ > :last-child {
+ flex: 1 1 auto;
overflow: hidden;
- text-overflow: ellipsis;
-
- @include wcfFontHeadline;
- }
-
- .urlDescription {
- white-space: normal;
+ padding-left: 10px;
}
- .urlHost {
- @include wcfFontSmall;
- float: right;
- color: $wcfContentDimmedText;
- bottom: 5px;
- position: absolute;
- right: 5px;
-
- img {
- height: 12px !important;
+ @include screen-sm-down {
+ > :first-child:not(:last-child) {
+ display: none;
}
}
}
+}
- &.unfurlLargeContentImage {
- min-width: 300px;
+.unfurlUrlInformation {
+ position: relative;
+ padding: 10px 10px 25px 10px;
+}
- > a > :first-child:not(:last-child) {
- min-height: 150px;
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- position: relative;
- }
- }
+.unfurlUrlTitle {
+ @include wcfFontHeadline;
+ @include wcfFontBold;
+
+ display: block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
- &.unfurlSquaredContentImage {
- > a {
- display: flex;
+.unfurlUrlDescription {
+ color: $wcfContentDimmedText;
+ margin-top: 10px;
+}
- > :first-child:not(:last-child) {
- flex: 0 0 auto;
- height: 128px !important;
- width: 128px !important;
- margin: 10px;
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- position: relative;
- }
+.unfurlUrlHost {
+ @include wcfFontSmall;
- > :last-child {
- flex: 1 1 auto;
- overflow: hidden;
- padding-left: 10px;
- }
+ bottom: 5px;
+ color: $wcfContentDimmedText;
+ float: right;
+ position: absolute;
+ right: 5px;
- @include screen-sm-down {
- > :first-child:not(:last-child) {
- display: none;
- }
- }
- }
+ img {
+ height: 12px !important;
}
}
+
+.unfurlUrlLink {
+ bottom: 0;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+}