mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Updated social media previews in tag settings
This commit is contained in:
parent
478084e274
commit
b0354c7f7e
2 changed files with 214 additions and 162 deletions
|
@ -94,8 +94,9 @@
|
|||
|
||||
<div class="gh-expandable-content">
|
||||
{{#liquid-if this.metadataOpen}}
|
||||
<div class="gh-main-section columns-2">
|
||||
<div class="gh-main-section-block">
|
||||
<div class="gh-setting-content-extended">
|
||||
<div class="gh-seo-settings">
|
||||
<div class="gh-seo-settings-left flex-basis-1-2-m flex-basis-2-3-l">
|
||||
<GhFormGroup @errors={{this.tag.errors}} @hasValidated={{this.tag.hasValidated}} @property="metaTitle">
|
||||
<label for="meta-title">Meta title</label>
|
||||
<GhTextInput
|
||||
|
@ -136,13 +137,18 @@
|
|||
<GhErrorMessage @errors={{this.tag.errors}} @property="canonicalUrl" />
|
||||
</GhFormGroup>
|
||||
</div>
|
||||
<div class="gh-main-section-block">
|
||||
<div class="form-group">
|
||||
<div class="flex-basis-1-2-m flex-basis-1-3-l">
|
||||
<label>Search Engine Result Preview</label>
|
||||
<div class="seo-preview">
|
||||
<div class="seo-preview-title">{{this.seoTitle}}</div>
|
||||
<div class="seo-preview-link">{{this.seoURL}}</div>
|
||||
<div class="seo-preview-description">{{this.seoDescription}}</div>
|
||||
<div class="gh-seo-container">
|
||||
<div class="gh-seo-preview">
|
||||
<div class="flex mb6">
|
||||
{{svg-jar "google"}}
|
||||
<div class="gh-seo-search-bar">{{svg-jar "google-search"}}</div>
|
||||
</div>
|
||||
<div class="gh-seo-preview-link">{{this.seoURL}}</div>
|
||||
<div class="gh-seo-preview-title">{{this.seoTitle}}</div>
|
||||
<div class="gh-seo-preview-desc">{{this.seoDescription}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -162,8 +168,9 @@
|
|||
|
||||
<div class="gh-expandable-content">
|
||||
{{#liquid-if this.twitterMetadataOpen}}
|
||||
<div class="gh-main-section columns-2">
|
||||
<div class="gh-main-section-block">
|
||||
<div class="gh-setting-content-extended">
|
||||
<div class="gh-twitter-settings">
|
||||
<div class="gh-twitter-settings-left flex-basis-1-2-m flex-basis-2-3-l">
|
||||
<GhFormGroup @errors={{this.tag.errors}} @hasValidated={{this.tag.hasValidated}} @property="twitterImage">
|
||||
<label for="twitter-image">Twitter image</label>
|
||||
<GhImageUploaderWithPreview
|
||||
|
@ -201,24 +208,39 @@
|
|||
@focus-out={{action "setProperty" "twitterDescription" this.scratchTag.twitterDescription}}
|
||||
/>
|
||||
<GhErrorMessage @errors={{this.tag.errors}} @property="twitterDescription" />
|
||||
<p>Recommended: <b>156</b> characters. You’ve used {{gh-count-down-characters this.scratchTag.twitterDescription 156}}</p>
|
||||
<p>Recommended: <b>125</b> characters. You’ve used {{gh-count-down-characters this.scratchTag.twitterDescription 125}}</p>
|
||||
</GhFormGroup>
|
||||
</div>
|
||||
<div class="gh-main-section-block">
|
||||
<div class="form-group">
|
||||
<label>Preview</label>
|
||||
<div class="gh-twitter-preview">
|
||||
<div class="flex-basis-1-2-m flex-basis-1-3-l">
|
||||
<label>Twitter preview</label>
|
||||
<div class="gh-twitter-container">
|
||||
<div class="flex ma4">
|
||||
<span>{{svg-jar "social-twitter" class="social-icon"}}</span>
|
||||
<div class="w-100">
|
||||
<span class="gh-social-og-title">{{or this.settings.metaTitle this.settings.title}}</span>
|
||||
<span class="gh-social-og-time">12 hrs</span>
|
||||
<div class="flex flex-column mt2 mb3">
|
||||
<span class="gh-social-og-desc w-100 mb2" />
|
||||
<span class="gh-social-og-desc w-60" />
|
||||
</div>
|
||||
<div class="gh-social-twitter-post-preview">
|
||||
{{#if this.twitterImage}}
|
||||
<div class="gh-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}}
|
||||
<div class="gh-twitter-preview-content">
|
||||
<div class="gh-twitter-preview-title">{{this.twitterTitle}}</div>
|
||||
<div class="gh-twitter-preview-description">{{truncate this.twitterDescription 155}}</div>
|
||||
<div class="gh-twitter-preview-footer">
|
||||
<div class="gh-twitter-preview-footer-left">
|
||||
<div class="gh-social-twitter-preview-content">
|
||||
<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-meta">
|
||||
{{svg-jar "twitter-link"}}
|
||||
{{this.config.blogDomain}}
|
||||
</div>
|
||||
<div class="gh-twitter-preview-footer-right">
|
||||
</div>
|
||||
</div>
|
||||
<div class="gh-social-twitter-reactions">
|
||||
<div class="flex items-center">{{svg-jar "twitter-comment"}}2</div>
|
||||
<div class="flex items-center">{{svg-jar "twitter-retweet"}}11</div>
|
||||
<div class="flex items-center">{{svg-jar "twitter-like"}}32</div>
|
||||
<div class="flex items-center">{{svg-jar "twitter-share"}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -241,8 +263,9 @@
|
|||
|
||||
<div class="gh-expandable-content">
|
||||
{{#liquid-if this.facebookMetadataOpen}}
|
||||
<div class="gh-main-section columns-2">
|
||||
<div class="gh-main-section-block">
|
||||
<div class="gh-setting-content-extended">
|
||||
<div class="gh-og-settings">
|
||||
<div class="gh-og-settings-left flex-basis-1-2-m flex-basis-2-3-l">
|
||||
<GhFormGroup @errors={{this.tag.errors}} @hasValidated={{this.tag.hasValidated}} @property="ogImage">
|
||||
<label for="og-image">Facebook image</label>
|
||||
<GhImageUploaderWithPreview
|
||||
|
@ -280,26 +303,39 @@
|
|||
@focus-out={{action "setProperty" "ogDescription" this.scratchTag.ogDescription}}
|
||||
/>
|
||||
<GhErrorMessage @errors={{this.tag.errors}} @property="ogDescription" />
|
||||
<p>Recommended: <b>156</b> characters. You’ve used {{gh-count-down-characters this.scratchTag.ogDescription 156}}</p>
|
||||
<p>Recommended: <b>65</b> characters. You’ve used {{gh-count-down-characters this.scratchTag.ogDescription 65}}</p>
|
||||
</GhFormGroup>
|
||||
</div>
|
||||
<div class="gh-main-section-block">
|
||||
<div class="form-group">
|
||||
<label>Preview</label>
|
||||
<div class="gh-og-preview">
|
||||
<div class="flex-basis-1-2-m flex-basis-1-3-l">
|
||||
<label>Facebook preview</label>
|
||||
<div class="gh-og-container">
|
||||
<div class="flex ma3 mb2">
|
||||
<span>{{svg-jar "social-facebook" class="social-icon"}}</span>
|
||||
<div>
|
||||
<div class="gh-social-og-title">{{or this.settings.metaTitle this.settings.title}}</div>
|
||||
<div class="gh-social-og-time">12 hrs</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-column ma3 mt2">
|
||||
<span class="gh-social-og-desc w-100 mb2" />
|
||||
<span class="gh-social-og-desc w-60" />
|
||||
</div>
|
||||
<div class="gh-social-og-preview">
|
||||
{{#if this.facebookImage}}
|
||||
<div class="gh-og-preview-image" style={{background-image-style this.facebookImage}}></div>
|
||||
<div class="gh-social-og-preview-image" style={{background-image-style this.facebookImage}}></div>
|
||||
{{/if}}
|
||||
<div class="gh-og-preview-content">
|
||||
<div class="gh-og-preview-title">{{truncate this.facebookTitle 88}}</div>
|
||||
<div class="gh-og-preview-description">{{truncate this.facebookDescription 300}}</div>
|
||||
<div class="gh-og-preview-footer">
|
||||
<div class="gh-og-preview-footer-left">
|
||||
{{this.config.blogDomain}} <span class="gh-og-preview-footer-left-divider">|</span> by <span class="gh-og-preview-footer-author">{{author-names this.post.authors}}</span>
|
||||
<div class="gh-social-og-preview-content">
|
||||
<div class="gh-social-og-preview-meta">
|
||||
{{this.config.blogDomain}}
|
||||
</div>
|
||||
<div class="gh-og-preview-footer-right">
|
||||
<div class="gh-social-og-preview-title">{{truncate this.facebookTitle 88}}</div>
|
||||
<div class="gh-social-og-preview-desc">{{truncate this.facebookDescription}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gh-social-og-reactions">
|
||||
<span class="gh-social-og-likes">{{svg-jar "facebook-like" class="z-999"}}{{svg-jar "facebook-heart" class="nl1"}}182</span>
|
||||
<span class="gh-social-og-comments">7 comments</span>
|
||||
<span class="gh-social-og-comments ml2">2 shares</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -530,18 +530,26 @@
|
|||
.gh-seo-settings .form-group {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.gh-seo-settings-left,
|
||||
.gh-seo-container {
|
||||
max-width: 591px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1360px) {
|
||||
.gh-seo-settings-left {
|
||||
margin-right: 2.4rem;
|
||||
}
|
||||
|
||||
.gh-seo-container {
|
||||
max-width: 1091px;
|
||||
}
|
||||
}
|
||||
|
||||
.gh-seo-container {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
max-width: 1091px;
|
||||
margin-bottom: 2.4rem;
|
||||
padding: 20px 30px 16px;
|
||||
border: 1px solid var(--whitegrey);
|
||||
|
@ -567,6 +575,10 @@
|
|||
.gh-twitter-settings .form-group {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.gh-twitter-settings-left {
|
||||
max-width: 591px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1360px) {
|
||||
|
@ -601,6 +613,10 @@
|
|||
.gh-og-settings .form-group {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.gh-og-settings-left {
|
||||
max-width: 591px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1360px) {
|
||||
|
|
Loading…
Add table
Reference in a new issue