店面引擎:自适应网站设计提示
来自 Wikiprompt,自由的提示词百科全书
店面引擎:自适应网站设计提示 用于生成自适应、个性化网站设计的结构化提示模板,包含布局参数和验证检查。
提示词内容收藏
🌐
class StorefrontEngine:
KERNEL = K_DTC # 恒定类型;绝不采样
def __init__(self, BRAND, PRODUCT, CATEGORY):
self.theta = infer(BRAND, PRODUCT, CATEGORY) # 个性、配色、文案、变体、菜单……
self.P = self.layout_params(self.theta) # A₁:自适应向量
def layout_params(self, th): # g(θ):设计随个性变化
base = dict(zone=(0.34,0.40,0.26), hero_scale=1.0, hero_rot=0, accent_sat=0.5,
sticker_n=2, deco_density=0.3, type_case="title", motif="neutral")
return match th.personality:
case "loud": base|dict(hero_rot=8, hero_scale=1.15, accent_sat=0.9, sticker_n=3, deco_density=0.7, type_case="UPPER")
case "calm": base|dict(hero_rot=2, hero_scale=1.0, accent_sat=0.3, sticker_n=2, deco_density=0.15)
case "cute": base|dict(hero_rot=5, accent_sat=0.8, sticker_n=3, deco_density=0.5, type_case="UPPER")
case "luxe": base|dict(hero_rot=0, accent_sat=0.2, sticker_n=1, deco_density=0.1)
# … athletic / botanical / nostalgic / technical (总计 ⇒ 每个输入都得到不同的 P)
def build(self):
nav = Nav(logo=L, menu=self.theta.menu, capsule=BLACK(search|div|cart|badge))
hero = ThreeZone(L=Pitch(self.theta.headline, self.theta.pitch,
CTA(self.theta.cta_verb, icon, qty=(-,n,+))),
C=floating_hero(self.theta.hero_angle, scale=self.P.hero_scale,
rot=self.P.hero_rot, shadow=SOFT_CONTACT), # η
R=callouts(self.theta.benefits, icons=SEMANTIC))
stick = stickers(self.theta.sticker_words, n=self.P.sticker_n, over=hero.C) # A₅ 真实属性
shelf = Shelf(hue=self.theta.shelf_hue, cards=self.theta.variants, # 深度互补
break_outside=True, price+rating+action=True)
return page(self.KERNEL, self.P, nav, hero, stick, shelf)
def verify(self, page, other_page=None):
assert P(self) != P(other_input) for distinct inputs, "A₁:模板粘贴(无自适应)"
assert deco_density_outside_focal(page) <= EPS, "A₂:趣味性未被限制"
assert all_tokens_from(self.theta.personality), "A₃:混合个性"
assert weight(product)>=weight(headline)>=weight(callouts)>=weight(deco), "A₄ 层级"
assert 0.65 <= hero_height(page) <= 0.72, "A₄ 构图"
assert sells_category(self.theta.headline) and not vague(self.theta.headline), "A₅"
assert stickers_are_attributes(self.theta.sticker_words), "A₅ ¬泛泛赞美"
StorefrontEngine($BRAND,$PRODUCT,$PRODUCT_CATEGORY).build()
用法
此提示词专为 creative 设计。复制上方内容并粘贴到你常用的 AI 工具中。
为获得最佳效果,可将占位符(方括号或大写字母标示)替换为你的具体需求。
讨论
0 条评论