Prompt as Code | GPT Image 2 / 2.5 提示词与案例库,530+ 个案例、20+ 套工业级模板与可复用 Skills,新增 2.5 同提示词对比专区,附完整提示词与生成记录,持续更新。
JavaScript agentsai-image-generationchatgptdsh-plugingpt-image-2image-promptsprompt-as-codeprompt-engineeringskillsworkflow-automation
Add community QR nav popover
freestyleflyf4392de0b1f4
diff --git a/src/assets/wechat-community.jpg b/src/assets/wechat-community.jpgnew file mode 100644index 0000000..1e3bc9dBinary files /dev/null and b/src/assets/wechat-community.jpg differdiff --git a/src/main.jsx b/src/main.jsxindex e8fee72..5dd1ab4 100644--- a/src/main.jsx+++ b/src/main.jsx@@ -16,6 +16,7 @@ import {LoaderCircle,LogIn,LogOut,+ MessageCircle,PackageCheck,RefreshCw,ReceiptText,@@ -33,6 +34,7 @@ import {} from 'lucide-react';import './styles.css';import { isSupabaseConfigured, supabase } from './supabaseClient';+import wechatCommunityImage from './assets/wechat-community.jpg';import skillExampleImage from '../agents/skills/gpt-image-2-style-library/assets/city-life-system-map.png';const fallbackRepoUrl = 'https://github.com/freestylefly/awesome-gpt-image-2';@@ -45,6 +47,8 @@ const copy = {navCases: 'Cases',navSkill: 'Skill',navTemplates: 'Templates',+ navCommunity: 'Community',+ communityQrAlt: 'WeChat community invite card for GPT-Image2',eyebrow: 'Live GPT-Image2 prompt gallery',title: 'From viral images to reusable prompts.',subtitle:@@ -238,6 +242,8 @@ const copy = {navCases: '案例',navSkill: '技能',navTemplates: '模板',+ navCommunity: '交流群',+ communityQrAlt: 'GPT-Image2 微信交流群邀请卡',eyebrow: '实时更新的 GPT-Image2 提示词画廊',title: '从爆款图片,到可复用 Prompt。',subtitle:@@ -985,6 +991,36 @@ function LanguageSwitch({ language, setLanguage }) {);}+function CommunityNavItem({ language }) {+ const t = copy[language];+ const [open, setOpen] = useState(false);+ return (+ <span+ className={cx('communityNavItem', open && 'open')}+ onMouseEnter={() => setOpen(true)}+ onMouseLeave={() => setOpen(false)}+ onFocus={() => setOpen(true)}+ onBlur={(event) => {+ if (!event.currentTarget.contains(event.relatedTarget)) setOpen(false);+ }}+ >+ <button+ type="button"+ aria-haspopup="dialog"+ aria-expanded={open}+ aria-label={t.navCommunity}+ onClick={() => setOpen((current) => !current)}+ >+ <MessageCircle size={17} />+ {t.navCommunity}+ </button>+ <span className="communityPopover" role="dialog" aria-label={t.navCommunity}>+ <img src={wechatCommunityImage} alt={t.communityQrAlt} loading="lazy" />+ </span>+ </span>+ );+}+function authErrorMessage(error, language) {const t = copy[language];const message = String(error?.message || error || '').trim();@@ -2921,6 +2957,7 @@ function App() {<a href="#gallery">{t.navCases}</a><a href="#templates">{t.navTemplates}</a><a href="#agent-skill">{t.navSkill}</a>+ <CommunityNavItem language={language} /><a href={repoUrl} target="_blank" rel="noreferrer">GitHub</a>diff --git a/src/styles.css b/src/styles.cssindex b644ecd..3792dbc 100644--- a/src/styles.css+++ b/src/styles.css@@ -115,20 +115,88 @@ button {gap: 10px;}-.topbar nav a {+.topbar nav a,+.communityNavItem > button {display: inline-flex;align-items: center;+ gap: 6px;min-height: 34px;+ border: 0;padding: 0 12px;border-radius: 7px;+ background: transparent;color: #b7c7df;+ font: inherit;+ font-weight: 700;+ letter-spacing: 0;}-.topbar nav a:hover {+.topbar nav a:hover,+.communityNavItem > button:hover,+.communityNavItem:focus-within > button {background: rgba(255, 255, 255, 0.08);color: #ffffff;}+.communityNavItem {+ position: relative;+ display: inline-flex;+ align-items: center;+}++.communityNavItem > button {+ cursor: pointer;+}++.communityNavItem > button svg {+ color: #36ef8f;+}++.communityPopover {+ position: absolute;+ top: calc(100% + 12px);+ left: 50%;+ z-index: 60;+ width: min(430px, calc(100vw - 36px));+ pointer-events: none;+ visibility: hidden;+ opacity: 0;+ transform: translate(-50%, -6px) scale(0.98);+ transition:+ visibility 0.18s ease,+ opacity 0.18s ease,+ transform 0.18s ease;+}++.communityPopover::before {+ content: "";+ position: absolute;+ top: -12px;+ left: 0;+ width: 100%;+ height: 14px;+}++.communityPopover img {+ display: block;+ width: 100%;+ border: 1px solid rgba(255, 255, 255, 0.28);+ border-radius: 8px;+ background: #ffffff;+ box-shadow:+ 0 26px 80px rgba(0, 0, 0, 0.55),+ 0 0 32px rgba(54, 239, 143, 0.16);+}++.communityNavItem:hover .communityPopover,+.communityNavItem:focus-within .communityPopover,+.communityNavItem.open .communityPopover {+ pointer-events: auto;+ visibility: visible;+ opacity: 1;+ transform: translate(-50%, 0) scale(1);+}+.dropdownControl {position: relative;display: inline-flex;@@ -2922,10 +2990,26 @@ button {display: none;}- .topbar nav a {+ .topbar nav a,+ .communityNavItem > button {padding: 0 8px;}+ .communityPopover {+ position: fixed;+ top: 112px;+ right: 12px;+ left: 12px;+ width: auto;+ transform: translateY(-6px) scale(0.98);+ }++ .communityNavItem:hover .communityPopover,+ .communityNavItem:focus-within .communityPopover,+ .communityNavItem.open .communityPopover {+ transform: translateY(0) scale(1);+ }+.languageSwitch {grid-column: 2;grid-row: 2;