|
| 1 | +import React from 'react' |
| 2 | +import { Container, Typography, Box, Grid, Paper, Divider, Chip } from '@mui/material' |
| 3 | +import VideoBadge from '../VideoBadge' |
| 4 | +import VideoBadgeEnhanced from '../VideoBadge/VideoBadgeEnhanced' |
| 5 | +import { BACKEND_BASE_URL } from '../../utils/settings' |
| 6 | + |
| 7 | +/** |
| 8 | + * Gallery page to preview all badge variations |
| 9 | + * Route: /badge-gallery |
| 10 | + */ |
| 11 | +const BadgeGallery: React.FC = () => { |
| 12 | + // Example claim URIs for demonstration |
| 13 | + const exampleClaims = { |
| 14 | + withVideo: `${BACKEND_BASE_URL}/claims/124446`, // Replace with actual claim with video |
| 15 | + rated: `${BACKEND_BASE_URL}/claims/124446`, // Example rated claim |
| 16 | + achievement: `${BACKEND_BASE_URL}/claims/124446` // Example achievement |
| 17 | + } |
| 18 | + |
| 19 | + return ( |
| 20 | + <Container maxWidth='xl' sx={{ py: 6 }}> |
| 21 | + <Typography variant='h3' sx={{ mb: 2, fontWeight: 700 }}> |
| 22 | + Video Badge Design Gallery |
| 23 | + </Typography> |
| 24 | + <Typography variant='body1' sx={{ mb: 3, color: 'text.secondary' }}> |
| 25 | + Preview all badge variations and sizes. Use this to test designs before deployment. |
| 26 | + </Typography> |
| 27 | + <Box sx={{ mb: 6, p: 3, backgroundColor: '#f0f7ff', borderRadius: 2 }}> |
| 28 | + <Typography variant='h6' sx={{ mb: 1 }}> |
| 29 | + Comparing Designs |
| 30 | + </Typography> |
| 31 | + <Typography variant='body2' sx={{ color: 'text.secondary' }}> |
| 32 | + <strong>Enhanced Version:</strong> Polished design with better hierarchy, animations, and visual appeal |
| 33 | + <br /> |
| 34 | + <strong>Original Version:</strong> Current production version for comparison |
| 35 | + </Typography> |
| 36 | + </Box> |
| 37 | + |
| 38 | + {/* Enhanced vs Original Comparison */} |
| 39 | + <Box sx={{ mb: 8 }}> |
| 40 | + <Typography variant='h4' sx={{ mb: 3, fontWeight: 600 }}> |
| 41 | + Enhanced Design (NEW) |
| 42 | + </Typography> |
| 43 | + <Grid container spacing={4}> |
| 44 | + <Grid item xs={12} md={6}> |
| 45 | + <Paper sx={{ p: 3, textAlign: 'center' }}> |
| 46 | + <Chip label='NEW - Enhanced' color='primary' size='small' sx={{ mb: 2 }} /> |
| 47 | + <Typography variant='h6' sx={{ mb: 2 }}> |
| 48 | + Standard (600px) |
| 49 | + </Typography> |
| 50 | + <Box sx={{ display: 'flex', justifyContent: 'center' }}> |
| 51 | + <VideoBadgeEnhanced claimUri={exampleClaims.withVideo} /> |
| 52 | + </Box> |
| 53 | + </Paper> |
| 54 | + </Grid> |
| 55 | + <Grid item xs={12} md={6}> |
| 56 | + <Paper sx={{ p: 3, textAlign: 'center' }}> |
| 57 | + <Chip label='NEW - Enhanced' color='primary' size='small' sx={{ mb: 2 }} /> |
| 58 | + <Typography variant='h6' sx={{ mb: 2 }}> |
| 59 | + Compact (320px) |
| 60 | + </Typography> |
| 61 | + <Box sx={{ display: 'flex', justifyContent: 'center' }}> |
| 62 | + <VideoBadgeEnhanced claimUri={exampleClaims.withVideo} compact={true} /> |
| 63 | + </Box> |
| 64 | + </Paper> |
| 65 | + </Grid> |
| 66 | + </Grid> |
| 67 | + </Box> |
| 68 | + |
| 69 | + <Divider sx={{ my: 6 }} /> |
| 70 | + |
| 71 | + {/* Original for Comparison */} |
| 72 | + <Box sx={{ mb: 8 }}> |
| 73 | + <Typography variant='h4' sx={{ mb: 3, fontWeight: 600 }}> |
| 74 | + Original Design (for comparison) |
| 75 | + </Typography> |
| 76 | + <Grid container spacing={4}> |
| 77 | + <Grid item xs={12} md={6}> |
| 78 | + <Paper sx={{ p: 3, textAlign: 'center' }}> |
| 79 | + <Chip label='Current' variant='outlined' size='small' sx={{ mb: 2 }} /> |
| 80 | + <Typography variant='h6' sx={{ mb: 2 }}> |
| 81 | + Standard |
| 82 | + </Typography> |
| 83 | + <Box sx={{ display: 'flex', justifyContent: 'center' }}> |
| 84 | + <VideoBadge claimUri={exampleClaims.withVideo} /> |
| 85 | + </Box> |
| 86 | + </Paper> |
| 87 | + </Grid> |
| 88 | + <Grid item xs={12} md={6}> |
| 89 | + <Paper sx={{ p: 3, textAlign: 'center' }}> |
| 90 | + <Chip label='Current' variant='outlined' size='small' sx={{ mb: 2 }} /> |
| 91 | + <Typography variant='h6' sx={{ mb: 2 }}> |
| 92 | + Compact |
| 93 | + </Typography> |
| 94 | + <Box sx={{ display: 'flex', justifyContent: 'center' }}> |
| 95 | + <VideoBadge claimUri={exampleClaims.withVideo} compact={true} /> |
| 96 | + </Box> |
| 97 | + </Paper> |
| 98 | + </Grid> |
| 99 | + </Grid> |
| 100 | + </Box> |
| 101 | + |
| 102 | + <Divider sx={{ my: 6 }} /> |
| 103 | + |
| 104 | + {/* Theme Variations - Enhanced */} |
| 105 | + <Box sx={{ mb: 8 }}> |
| 106 | + <Typography variant='h4' sx={{ mb: 3, fontWeight: 600 }}> |
| 107 | + Theme Variations (Enhanced) |
| 108 | + </Typography> |
| 109 | + <Grid container spacing={4}> |
| 110 | + <Grid item xs={12} md={6}> |
| 111 | + <Paper sx={{ p: 3, backgroundColor: '#f5f5f5' }}> |
| 112 | + <Typography variant='h6' sx={{ mb: 2 }}> |
| 113 | + Light Theme |
| 114 | + </Typography> |
| 115 | + <Box sx={{ display: 'flex', justifyContent: 'center' }}> |
| 116 | + <VideoBadgeEnhanced claimUri={exampleClaims.withVideo} theme='light' /> |
| 117 | + </Box> |
| 118 | + </Paper> |
| 119 | + </Grid> |
| 120 | + <Grid item xs={12} md={6}> |
| 121 | + <Paper sx={{ p: 3, backgroundColor: '#0a0a0a' }}> |
| 122 | + <Typography variant='h6' sx={{ mb: 2, color: 'white' }}> |
| 123 | + Dark Theme |
| 124 | + </Typography> |
| 125 | + <Box sx={{ display: 'flex', justifyContent: 'center' }}> |
| 126 | + <VideoBadgeEnhanced claimUri={exampleClaims.withVideo} theme='dark' /> |
| 127 | + </Box> |
| 128 | + </Paper> |
| 129 | + </Grid> |
| 130 | + </Grid> |
| 131 | + </Box> |
| 132 | + |
| 133 | + <Divider sx={{ my: 6 }} /> |
| 134 | + |
| 135 | + {/* Claim Type Variations */} |
| 136 | + <Box sx={{ mb: 8 }}> |
| 137 | + <Typography variant='h4' sx={{ mb: 3, fontWeight: 600 }}> |
| 138 | + Claim Type Variations |
| 139 | + </Typography> |
| 140 | + <Grid container spacing={4}> |
| 141 | + <Grid item xs={12} md={6}> |
| 142 | + <Paper sx={{ p: 3 }}> |
| 143 | + <Typography variant='h6' sx={{ mb: 2 }}> |
| 144 | + Rated Claim (with stars) |
| 145 | + </Typography> |
| 146 | + <Box sx={{ display: 'flex', justifyContent: 'center' }}> |
| 147 | + <VideoBadge claimUri={exampleClaims.rated} /> |
| 148 | + </Box> |
| 149 | + </Paper> |
| 150 | + </Grid> |
| 151 | + <Grid item xs={12} md={6}> |
| 152 | + <Paper sx={{ p: 3 }}> |
| 153 | + <Typography variant='h6' sx={{ mb: 2 }}> |
| 154 | + Achievement Claim |
| 155 | + </Typography> |
| 156 | + <Box sx={{ display: 'flex', justifyContent: 'center' }}> |
| 157 | + <VideoBadge claimUri={exampleClaims.achievement} /> |
| 158 | + </Box> |
| 159 | + </Paper> |
| 160 | + </Grid> |
| 161 | + </Grid> |
| 162 | + </Box> |
| 163 | + |
| 164 | + <Divider sx={{ my: 6 }} /> |
| 165 | + |
| 166 | + {/* Usage Instructions */} |
| 167 | + <Box> |
| 168 | + <Typography variant='h4' sx={{ mb: 3, fontWeight: 600 }}> |
| 169 | + Usage |
| 170 | + </Typography> |
| 171 | + <Paper sx={{ p: 4, backgroundColor: '#f8f9fa' }}> |
| 172 | + <Typography variant='h6' sx={{ mb: 2 }}> |
| 173 | + Direct Link: |
| 174 | + </Typography> |
| 175 | + <Typography variant='body2' sx={{ mb: 3, fontFamily: 'monospace', color: 'text.secondary' }}> |
| 176 | + /badge?claim=https://live.linkedtrust.us/claims/ID&compact=true&theme=dark |
| 177 | + </Typography> |
| 178 | + |
| 179 | + <Typography variant='h6' sx={{ mb: 2 }}> |
| 180 | + Component Usage: |
| 181 | + </Typography> |
| 182 | + <Paper sx={{ p: 2, backgroundColor: '#1e1e1e', color: '#d4d4d4', fontFamily: 'monospace', fontSize: 14 }}> |
| 183 | + <pre style={{ margin: 0 }}> |
| 184 | + {`import VideoBadge from './components/VideoBadge' |
| 185 | +
|
| 186 | +<VideoBadge |
| 187 | + claimUri="https://live.linkedtrust.us/claims/124446" |
| 188 | + compact={false} |
| 189 | + theme="light" |
| 190 | +/>`} |
| 191 | + </pre> |
| 192 | + </Paper> |
| 193 | + </Paper> |
| 194 | + </Box> |
| 195 | + </Container> |
| 196 | + ) |
| 197 | +} |
| 198 | + |
| 199 | +export default BadgeGallery |
0 commit comments