mirror of
https://github.com/ShayManor/github-readme-stats.git
synced 2026-12-02 11:53:48 +05:30
chore(favicon): replace old SVG with new design for favicon icon
chore(ResultScreen): simplify embed section layout and improve copy button chore(WorkshopScreen): replace emoji icons with inline SVGs for consistency chore(index.html): update page
This commit is contained in:
@@ -81,22 +81,28 @@ export function ResultScreen({ username, generating, generatedSvg, generateError
|
||||
</div>
|
||||
|
||||
<div className="w-full mt-8">
|
||||
<div className="flex items-baseline justify-between mb-2">
|
||||
<p className="text-xs uppercase tracking-wider text-gray-500">Embed in your README</p>
|
||||
<p className="text-xs uppercase tracking-wider text-gray-500 mb-2">Embed in your README</p>
|
||||
<div className="relative">
|
||||
<pre className="bg-gray-900 text-gray-100 text-xs p-4 pr-12 rounded-lg overflow-x-auto">
|
||||
{embedSnippet}
|
||||
</pre>
|
||||
<button
|
||||
onClick={copy}
|
||||
className="text-xs text-gray-500 hover:text-gray-800 transition-colors"
|
||||
title={copied ? 'Copied!' : 'Copy'}
|
||||
className="absolute top-2 right-2 p-1.5 rounded-md text-gray-400 hover:text-gray-100 hover:bg-gray-800 transition-colors"
|
||||
>
|
||||
{copied ? 'Copied!' : 'Copy'}
|
||||
{copied ? (
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<polyline points="20 6 9 17 4 12" />
|
||||
</svg>
|
||||
) : (
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
|
||||
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
|
||||
</svg>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
<pre className="bg-gray-900 text-gray-100 text-xs p-4 rounded-lg overflow-x-auto">
|
||||
{embedSnippet}
|
||||
</pre>
|
||||
<p className="text-[11px] text-gray-400 mt-2">
|
||||
GitHub requires HTTPS for README images — serve this behind a TLS
|
||||
reverse proxy or Cloudflare Tunnel if the page is on http://.
|
||||
</p>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -19,11 +19,50 @@ const ALL_WIDGETS = [
|
||||
{ id: 'achievements', label: 'Achievements' },
|
||||
]
|
||||
|
||||
const ICONS = [
|
||||
{ id: 'trophy', label: '🏆' },
|
||||
{ id: 'medal', label: '🥇' },
|
||||
{ id: 'star', label: '⭐' },
|
||||
{ id: 'hackathon', label: '💻' },
|
||||
// Inline SVGs keep parity with the backend (generator/src/widgets/achievements.py)
|
||||
// and render deterministically across platforms where emoji coverage varies.
|
||||
const ICONS: { id: string; svg: JSX.Element }[] = [
|
||||
{
|
||||
id: 'trophy',
|
||||
svg: (
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<path d="M6 9H4a2 2 0 0 1-2-2V5h4" />
|
||||
<path d="M18 9h2a2 2 0 0 0 2-2V5h-4" />
|
||||
<path d="M6 3h12v6a6 6 0 0 1-12 0V3z" />
|
||||
<path d="M10 21h4" />
|
||||
<path d="M12 15v6" />
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'medal',
|
||||
svg: (
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<circle cx="12" cy="15" r="6" />
|
||||
<path d="M8.5 2l3.5 7 3.5-7" />
|
||||
<path d="M7 2h10" />
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'star',
|
||||
svg: (
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<polygon points="12 2 15 9 22 9.5 17 14.5 18.5 22 12 18 5.5 22 7 14.5 2 9.5 9 9 12 2" />
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'hackathon',
|
||||
svg: (
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<rect x="2" y="4" width="20" height="14" rx="2" />
|
||||
<path d="M8 10l-2 2 2 2" />
|
||||
<path d="M16 10l2 2-2 2" />
|
||||
<path d="M2 20h20" />
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
]
|
||||
|
||||
const COLOR_PRESETS = [
|
||||
@@ -344,7 +383,9 @@ export function WorkshopScreen({
|
||||
}`}
|
||||
title={ic.id}
|
||||
>
|
||||
{ic.label}
|
||||
<span className={ach.icon === ic.id ? 'text-white' : 'text-gray-600'}>
|
||||
{ic.svg}
|
||||
</span>
|
||||
</button>
|
||||
))}
|
||||
<div className="flex-1" />
|
||||
|
||||
Reference in New Issue
Block a user