Skip to content

Prompt as Code | GPT Image 2 / 2.5 提示词与案例库,530+ 个案例、20+ 套工业级模板与可复用 Skills,新增 2.5 同提示词对比专区,附完整提示词与生成记录,持续更新。

Tighten hero and show latest cases

freestylefly1ba188b952ce
diff --git a/src/main.jsx b/src/main.jsx
index 03bf698..bdc1086 100644
--- a/src/main.jsx
+++ b/src/main.jsx
@@ -328,7 +328,7 @@ function formatTemplatePrompt(item, language, styleLibrary) {
].join('\n');
}
-function Hero({ hotCases, language, repoUrl, totalCases, categoryCount }) {
+function Hero({ latestCases, language, repoUrl, totalCases, categoryCount }) {
const t = copy[language];
return (
@@ -359,8 +359,8 @@ function Hero({ hotCases, language, repoUrl, totalCases, categoryCount }) {
<span><strong>20+</strong> {t.templates}</span>
</div>
</div>
- <div className="heroDeck" aria-label="Featured GPT-Image2 cases">
- {hotCases.slice(0, 5).map((caseItem, index) => (
+ <div className="heroDeck" aria-label="Latest GPT-Image2 cases">
+ {latestCases.slice(0, 5).map((caseItem, index) => (
<a
className={`heroCard heroCard${index + 1}`}
href={caseItem.githubUrl}
@@ -793,11 +793,9 @@ function App() {
});
}, [siteData, styleLibrary]);
- const hotCases = useMemo(() => {
+ const latestCases = useMemo(() => {
if (!siteData) return [];
- return [...siteData.cases]
- .filter((item) => item.featured)
- .sort((a, b) => b.id - a.id);
+ return [...siteData.cases].sort((a, b) => b.id - a.id);
}, [siteData]);
const filteredCases = useMemo(() => {
@@ -863,7 +861,7 @@ function App() {
</header>
<Hero
- hotCases={hotCases}
+ latestCases={latestCases}
language={language}
repoUrl={repoUrl}
totalCases={siteData.totalCases}
@@ -871,7 +869,7 @@ function App() {
/>
<section className="hotStrip">
- {hotCases.slice(0, 8).map((caseItem) => (
+ {latestCases.slice(0, 8).map((caseItem) => (
<a href={caseItem.githubUrl} target="_blank" rel="noreferrer" key={caseItem.id}>
<img src={caseItem.image} alt={caseItem.imageAlt} />
<span>#{caseItem.id}</span>
diff --git a/src/styles.css b/src/styles.css
index de5b196..619b5e3 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -159,9 +159,8 @@ button {
gap: 44px;
align-items: center;
width: min(1180px, calc(100% - 32px));
- min-height: calc(100vh - 92px);
margin: 0 auto;
- padding: 56px 0 72px;
+ padding: 46px 0 26px;
overflow: hidden;
}
@@ -287,7 +286,7 @@ button {
}
.heroDeck {
- min-height: 610px;
+ min-height: 560px;
}
.heroCard {
@@ -330,39 +329,39 @@ button {
.heroCard1 {
--tilt: -5deg;
inset: 30px auto auto 42px;
- width: 285px;
- height: 360px;
+ width: 270px;
+ height: 340px;
}
.heroCard2 {
--tilt: 4deg;
inset: 0 8px auto auto;
- width: 240px;
- height: 310px;
+ width: 230px;
+ height: 292px;
animation-delay: -1.2s;
}
.heroCard3 {
--tilt: 5deg;
- inset: 318px auto auto 5px;
- width: 220px;
- height: 250px;
+ inset: 286px auto auto 5px;
+ width: 210px;
+ height: 232px;
animation-delay: -2.3s;
}
.heroCard4 {
--tilt: -3deg;
- inset: 300px 36px auto auto;
- width: 300px;
- height: 270px;
+ inset: 270px 30px auto auto;
+ width: 285px;
+ height: 246px;
animation-delay: -3.4s;
}
.heroCard5 {
--tilt: 2deg;
- inset: 196px auto auto 190px;
- width: 210px;
- height: 260px;
+ inset: 186px auto auto 176px;
+ width: 205px;
+ height: 242px;
animation-delay: -4.2s;
}