mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fixed twitter preview shrinking bug and responsive issues for social preview
This commit is contained in:
parent
4839da5047
commit
a792d152da
2 changed files with 42 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
<div class="gh-post-preview-social-container">
|
<div class="gh-post-preview-social-container">
|
||||||
<div class="flex flex-column">
|
<div class="flex flex-column">
|
||||||
<div class="flex mb6">
|
<div class="flex gh-social-container-responsive">
|
||||||
<div class="gh-social-og-container">
|
<div class="gh-social-og-container">
|
||||||
<div class="flex ma3 mb2">
|
<div class="flex ma3 mb2">
|
||||||
<span>{{svg-jar "social-facebook" class="social-icon"}}</span>
|
<span>{{svg-jar "social-facebook" class="social-icon"}}</span>
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="gh-social-twitter-container">
|
<div class="gh-social-twitter-container">
|
||||||
<div class="flex ma3 mb2 mr4">
|
<div class="flex ma4">
|
||||||
<span>{{svg-jar "social-twitter" class="social-icon"}}</span>
|
<span>{{svg-jar "social-twitter" class="social-icon"}}</span>
|
||||||
<div>
|
<div>
|
||||||
<span class="gh-social-og-title">{{or this.settings.metaTitle this.settings.title}}</span>
|
<span class="gh-social-og-title">{{or this.settings.metaTitle this.settings.title}}</span>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
{{#if this.twitterImage}}
|
{{#if this.twitterImage}}
|
||||||
<div class="gh-social-twitter-preview-image" style={{background-image-style this.twitterImage}}></div>
|
<div class="gh-social-twitter-preview-image" style={{background-image-style this.twitterImage}}></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="gh-twitter-preview-content">
|
<div class="gh-social-twitter-preview-content">
|
||||||
<div class="gh-social-twitter-preview-title">{{this.twitterTitle}}</div>
|
<div class="gh-social-twitter-preview-title">{{this.twitterTitle}}</div>
|
||||||
<div class="gh-social-twitter-preview-desc">{{truncate this.twitterDescription}}</div>
|
<div class="gh-social-twitter-preview-desc">{{truncate this.twitterDescription}}</div>
|
||||||
<div class="gh-social-twitter-preview-meta">
|
<div class="gh-social-twitter-preview-meta">
|
||||||
|
|
|
@ -186,7 +186,9 @@
|
||||||
.gh-post-preview-social-container {
|
.gh-post-preview-social-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
padding: 3.2rem;
|
padding: 3.2rem;
|
||||||
|
@ -196,6 +198,20 @@
|
||||||
border-bottom-right-radius: 3px;
|
border-bottom-right-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gh-post-preview-social-container:after {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
height: 2.4rem;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1120px) {
|
||||||
|
.gh-social-container-responsive {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.social-icon {
|
.social-icon {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
@ -204,12 +220,18 @@
|
||||||
|
|
||||||
.gh-social-og-container {
|
.gh-social-og-container {
|
||||||
width: 476px;
|
width: 476px;
|
||||||
margin-right: 1.2rem;
|
margin-bottom: 2.4rem;
|
||||||
border: 1px solid #e5e5e5;
|
border: 1px solid #e5e5e5;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1120px) {
|
||||||
|
.gh-social-og-container {
|
||||||
|
margin-right: 1.2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.gh-social-og-title {
|
.gh-social-og-title {
|
||||||
color: #385898;
|
color: #385898;
|
||||||
font-size: 14;
|
font-size: 14;
|
||||||
|
@ -313,12 +335,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.gh-social-twitter-container {
|
.gh-social-twitter-container {
|
||||||
width: 600px;
|
width: 591px;
|
||||||
margin-left: 1.2rem;
|
margin-bottom: 2.4rem;
|
||||||
border: 1px solid #ebeef0;
|
border: 1px solid #ebeef0;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1120px) {
|
||||||
|
.gh-social-twitter-container {
|
||||||
|
margin-left: 1.2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.gh-social-twitter-post-preview {
|
.gh-social-twitter-post-preview {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #292f33;
|
color: #292f33;
|
||||||
|
@ -338,8 +366,12 @@
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.gh-social-twitter-preview-content {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.gh-social-twitter-preview-title {
|
.gh-social-twitter-preview-title {
|
||||||
max-width: 487px;
|
width: 487px;
|
||||||
max-height: 1.3em;
|
max-height: 1.3em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
@ -353,6 +385,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.gh-social-twitter-preview-desc {
|
.gh-social-twitter-preview-desc {
|
||||||
|
width: 487px;
|
||||||
max-height: 40px;
|
max-height: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
@ -369,6 +402,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
|
width: 487px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
color: #5b7083;
|
color: #5b7083;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
@ -406,7 +440,7 @@
|
||||||
.gh-seo-preview-container {
|
.gh-seo-preview-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 1108px;
|
max-width: 1091px;
|
||||||
padding: 20px 30px;
|
padding: 20px 30px;
|
||||||
border: 1px solid var(--whitegrey);
|
border: 1px solid var(--whitegrey);
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
|
|
Loading…
Add table
Reference in a new issue