Consolidate Q&A share buttons — X and Facebook now share image; v1.0.13
Replaced the separate text-link X/FB buttons and the duplicate image buttons with a single X and Facebook button each that share the generated quote card. Keeps button row to 5: Upvote, X Share, Facebook Share, Copy link, Save image. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "siteforge",
|
"name": "siteforge",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.12",
|
"version": "1.0.13",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -1044,7 +1044,7 @@ export default function QASection() {
|
|||||||
type="button"
|
type="button"
|
||||||
aria-label="Share on X"
|
aria-label="Share on X"
|
||||||
className="qa-social-btn qa-social-btn--x"
|
className="qa-social-btn qa-social-btn--x"
|
||||||
onClick={() => shareToX(question)}
|
onClick={() => shareImageTo(question, 'x')}
|
||||||
>
|
>
|
||||||
<svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor" width="14" height="14"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.746l7.73-8.835L1.254 2.25H8.08l4.253 5.622zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
|
<svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor" width="14" height="14"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.746l7.73-8.835L1.254 2.25H8.08l4.253 5.622zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
|
||||||
<span>Share</span>
|
<span>Share</span>
|
||||||
@@ -1053,10 +1053,10 @@ export default function QASection() {
|
|||||||
type="button"
|
type="button"
|
||||||
aria-label="Share on Facebook"
|
aria-label="Share on Facebook"
|
||||||
className="qa-social-btn qa-social-btn--fb"
|
className="qa-social-btn qa-social-btn--fb"
|
||||||
onClick={() => shareToFacebook(question)}
|
onClick={() => shareImageTo(question, 'facebook')}
|
||||||
>
|
>
|
||||||
<svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor" width="14" height="14"><path d="M24 12.073C24 5.404 18.627 0 12 0S0 5.404 0 12.073C0 18.1 4.388 23.094 10.125 24v-8.437H7.078v-3.49h3.047V9.41c0-3.025 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.97h-1.513c-1.491 0-1.956.93-1.956 1.884v2.25h3.328l-.532 3.49h-2.796V24C19.612 23.094 24 18.1 24 12.073z"/></svg>
|
<svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor" width="14" height="14"><path d="M24 12.073C24 5.404 18.627 0 12 0S0 5.404 0 12.073C0 18.1 4.388 23.094 10.125 24v-8.437H7.078v-3.49h3.047V9.41c0-3.025 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.97h-1.513c-1.491 0-1.956.93-1.956 1.884v2.25h3.328l-.532 3.49h-2.796V24C19.612 23.094 24 18.1 24 12.073z"/></svg>
|
||||||
<span>{facebookCaptionCopied ? 'Caption copied' : 'Share'}</span>
|
<span>Share</span>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" className="qa-share-btn" onClick={() => shareQuestion(question.id)}>
|
<button type="button" className="qa-share-btn" onClick={() => shareQuestion(question.id)}>
|
||||||
{linkCopied ? '✓ Copied' : 'Copy link'}
|
{linkCopied ? '✓ Copied' : 'Copy link'}
|
||||||
@@ -1064,14 +1064,6 @@ export default function QASection() {
|
|||||||
<button type="button" className="qa-share-btn" onClick={() => saveAsImage(question)}>
|
<button type="button" className="qa-share-btn" onClick={() => saveAsImage(question)}>
|
||||||
Save image
|
Save image
|
||||||
</button>
|
</button>
|
||||||
<button type="button" className="qa-social-btn qa-social-btn--x" onClick={() => shareImageTo(question, 'x')}>
|
|
||||||
<svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor" width="14" height="14"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-4.714-6.231-5.401 6.231H2.746l7.73-8.835L1.254 2.25H8.08l4.253 5.622zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>
|
|
||||||
<span>Image</span>
|
|
||||||
</button>
|
|
||||||
<button type="button" className="qa-social-btn qa-social-btn--fb" onClick={() => shareImageTo(question, 'facebook')}>
|
|
||||||
<svg viewBox="0 0 24 24" aria-hidden="true" fill="currentColor" width="14" height="14"><path d="M24 12.073C24 5.404 18.627 0 12 0S0 5.404 0 12.073C0 18.1 4.388 23.094 10.125 24v-8.437H7.078v-3.49h3.047V9.41c0-3.025 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.97h-1.513c-1.491 0-1.956.93-1.956 1.884v2.25h3.328l-.532 3.49h-2.796V24C19.612 23.094 24 18.1 24 12.073z"/></svg>
|
|
||||||
<span>Image</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
{(facebookCaptionCopied || linkCopied) && (
|
{(facebookCaptionCopied || linkCopied) && (
|
||||||
<p className="qa-share-feedback" role="status" aria-live="polite">
|
<p className="qa-share-feedback" role="status" aria-live="polite">
|
||||||
|
|||||||
Reference in New Issue
Block a user