Add more signature fonts and move signatures left
This commit is contained in:
parent
bac668828d
commit
9a94e9e781
4 changed files with 40 additions and 7 deletions
|
|
@ -12,7 +12,7 @@
|
|||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600&family=Fira+Code:wght@300;400;500;600&family=Source+Sans+Pro:ital,wght@0,300;0,400;0,600;0,700;1,400;1,600&family=Nunito:ital,wght@0,300;0,400;0,600;0,700;0,800;1,400;1,600&family=Comfortaa:wght@300;400;500;700&family=Fredoka+One&display=swap">
|
||||
|
||||
<!-- Signature Fonts -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Pacifico&family=Great+Vibes&family=Caveat:wght@400;700&display=swap">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&family=Pacifico&family=Great+Vibes&family=Caveat:wght@400;700&family=Sacramento&family=Allura&family=Alex+Brush&family=Kaushan+Script&family=Satisfy&family=Cookie&display=swap">
|
||||
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta content="coles website!" property="og:title" />
|
||||
|
|
|
|||
|
|
@ -52,6 +52,12 @@ const SubmissionsSection = () => {
|
|||
{ value: 'pacifico', label: 'Pacifico', className: 'font-pacifico' },
|
||||
{ value: 'great-vibes', label: 'Great Vibes', className: 'font-great-vibes' },
|
||||
{ value: 'caveat', label: 'Caveat', className: 'font-caveat' },
|
||||
{ value: 'sacramento', label: 'Sacramento', className: 'font-sacramento' },
|
||||
{ value: 'allura', label: 'Allura', className: 'font-allura' },
|
||||
{ value: 'alex-brush', label: 'Alex Brush', className: 'font-alex-brush' },
|
||||
{ value: 'kaushan', label: 'Kaushan Script', className: 'font-kaushan' },
|
||||
{ value: 'satisfy', label: 'Satisfy', className: 'font-satisfy' },
|
||||
{ value: 'cookie', label: 'Cookie', className: 'font-cookie' },
|
||||
];
|
||||
|
||||
// Cooldown management
|
||||
|
|
|
|||
|
|
@ -175,10 +175,25 @@ const AdminDashboard = () => {
|
|||
const metrics = ctx.measureText(testLine);
|
||||
|
||||
if (metrics.width > canvas.width - 60) {
|
||||
if (currentLine) lines.push(currentLine);
|
||||
currentLine = word;
|
||||
} else {
|
||||
currentLine = testLine;
|
||||
|
||||
// Map signature fonts to canvas fonts
|
||||
const fontMap: { [key: string]: string } = {
|
||||
'dancing': 'Dancing Script',
|
||||
'pacifico': 'Pacifico',
|
||||
'great-vibes': 'Great Vibes',
|
||||
'caveat': 'Caveat',
|
||||
'sacramento': 'Sacramento',
|
||||
'allura': 'Allura',
|
||||
'alex-brush': 'Alex Brush',
|
||||
'kaushan': 'Kaushan Script',
|
||||
'satisfy': 'Satisfy',
|
||||
'cookie': 'Cookie'
|
||||
};
|
||||
|
||||
const fontFamily = fontMap[submission.signature_font || 'dancing'] || 'Dancing Script';
|
||||
ctx.font = `italic 18px ${fontFamily}, cursive`;
|
||||
ctx.textAlign = 'left';
|
||||
ctx.fillText(`— ${submission.signature_text}`, 30, y);
|
||||
}
|
||||
}
|
||||
if (currentLine) lines.push(currentLine);
|
||||
|
|
@ -332,11 +347,17 @@ const AdminDashboard = () => {
|
|||
{submission.signature_enabled && submission.signature_text && (
|
||||
<div className="bg-muted/30 p-3 rounded border border-border/30">
|
||||
<div className="text-xs text-muted-foreground mb-1">Signature:</div>
|
||||
<div className={`text-right italic text-primary ${
|
||||
<div className={`text-left italic text-primary ${
|
||||
submission.signature_font === 'dancing' ? 'font-dancing' :
|
||||
submission.signature_font === 'pacifico' ? 'font-pacifico' :
|
||||
submission.signature_font === 'great-vibes' ? 'font-great-vibes' :
|
||||
submission.signature_font === 'caveat' ? 'font-caveat' : ''
|
||||
submission.signature_font === 'caveat' ? 'font-caveat' :
|
||||
submission.signature_font === 'sacramento' ? 'font-sacramento' :
|
||||
submission.signature_font === 'allura' ? 'font-allura' :
|
||||
submission.signature_font === 'alex-brush' ? 'font-alex-brush' :
|
||||
submission.signature_font === 'kaushan' ? 'font-kaushan' :
|
||||
submission.signature_font === 'satisfy' ? 'font-satisfy' :
|
||||
submission.signature_font === 'cookie' ? 'font-cookie' : ''
|
||||
}`}>
|
||||
— {submission.signature_text}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@ export default {
|
|||
'pacifico': ['Pacifico', 'cursive'],
|
||||
'great-vibes': ['Great Vibes', 'cursive'],
|
||||
'caveat': ['Caveat', 'cursive'],
|
||||
'sacramento': ['Sacramento', 'cursive'],
|
||||
'allura': ['Allura', 'cursive'],
|
||||
'alex-brush': ['Alex Brush', 'cursive'],
|
||||
'kaushan': ['Kaushan Script', 'cursive'],
|
||||
'satisfy': ['Satisfy', 'cursive'],
|
||||
'cookie': ['Cookie', 'cursive'],
|
||||
},
|
||||
colors: {
|
||||
border: 'hsl(var(--border))',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue